This tool allows you to convert .w3a files to .json and vice versa, as well as remove specific ability data from .json files based on various filters.
Parent ability data (ability-data.slk) from patch 1.26a.
npm installnpm run convert <input_w3a> [output_json]npm run convert war3map.w3a war3map.jsonnpm run convert <input_json> [output_w3a]npm run convert war3map.json war3map.w3anpm run remove <input_json> <output_json> [--rawcodes <rawcode_list>] [--id x] [--value x] [--lookup-parent]--rawcodes <rawcode_list>: Path to the file with rawcodes to filter.--id <id>: Filter by id. Allowed types see in meta-data-dict.ts.--value <value>: Filter by value.--lookup-parent: Lookup parent ability if filters do not match (.w3a contains only modified data).
The rawcodes file should contain one rawcode per line. Example:
A001
A003
A005
A00F
A03K
...
The command below will delete all the abilities that match rawcodes in rawcodes.txt, which belong to the orc race. If an ability doesn't have modified data for race, then it will look for the race in the parent ability.
bash:
npm run remove -- war3map.json war3map-filtered.json --rawcodes rawcodes.txt --id arac --value orc --lookup-parentpowershell:
npm run remove -- .\war3map.json .\war3map-removed.json -- --rawcodes rawcodes.txt --id arac --value orc --lookup-parent