I am recreating a map using Dencer/DengSir's and Luangzhi's fantastic VS Code extension warcraft-vscode (it's posted here on Hive Workshop and also on GitHub) which features programmatic object creation and editing.
I have a .w3u file that I can open in the regular World Editor and view the unit data no problem. What I'm looking for is a tool or a way to extract the unit data into some formatted data structure, like a JSON object for example. It doesn't have to be JSON specifically, just any data format that I can write a script to parse the data into code that I can use for programmatic object creation.
The object creation syntax looks like this:
local h101 = UnitDefinition:new('H101', 'Hpal')
h101:setName('Hello objediting')
local i101 = ItemDefinition:new('I101', 'ratf')
i101:setInterfaceIcon('ReplaceableTextures\\CommandButtons\\BTNDarkSummoning.blp')
For custom object creation, the first parameter is the unit ID for the newly created custom unit, and the second is the super ID of the base unit used to initialize the custom unit's data fields. And then you can reassign all of your custom unit's data fields to whatever you want them to be.
You can probably see where I'm going with this. I want a formatted data list of a .w3u file's unit data that I can parse into this object editing syntax to be able to further customize unit creation in my new map.
I have a .w3u file that I can open in the regular World Editor and view the unit data no problem. What I'm looking for is a tool or a way to extract the unit data into some formatted data structure, like a JSON object for example. It doesn't have to be JSON specifically, just any data format that I can write a script to parse the data into code that I can use for programmatic object creation.
The object creation syntax looks like this:
local h101 = UnitDefinition:new('H101', 'Hpal')
h101:setName('Hello objediting')
local i101 = ItemDefinition:new('I101', 'ratf')
i101:setInterfaceIcon('ReplaceableTextures\\CommandButtons\\BTNDarkSummoning.blp')
For custom object creation, the first parameter is the unit ID for the newly created custom unit, and the second is the super ID of the base unit used to initialize the custom unit's data fields. And then you can reassign all of your custom unit's data fields to whatever you want them to be.
You can probably see where I'm going with this. I want a formatted data list of a .w3u file's unit data that I can parse into this object editing syntax to be able to further customize unit creation in my new map.