Test script:
"use strict";
const fs = require('fs');
const {ObjectsTranslator} = require('wc3maptranslator');
function parseAbilities(filePath) {
return ObjectsTranslator.warToJson('abilities', fs.readFileSync(filePath));
}
function exportAbilities(filePath, data) {
fs.writeFileSync(filePath, ObjectsTranslator.jsonToWar('abilities', data).buffer);
}
const abilities = parseAbilities('war3map.w3a');
if (abilities.errors.length) throw new Error(`Errors found: ${abilities.errors.join(', ')}`)
exportAbilities('war3map-rt.w3a', abilities.json);
In the attached files, you can verify that war3map-rt.w3a has added a bunch of extraneous FourCC codes where there used to be a quad of zeroes.
w3a-test.zip
Test script:
In the attached files, you can verify that
war3map-rt.w3ahas added a bunch of extraneous FourCC codes where there used to be a quad of zeroes.w3a-test.zip