Conversation
|
@Promises I created a new |
| modification.column = outBufferToJSON.readInt(); | ||
| for (let set = 0; set < sets; set++) { | ||
| if(fileVersion >=3) { | ||
| setsFlag[set] = outBufferToJSON.readInt(); |
There was a problem hiding this comment.
Is setsFlag information we want to store in the JSON object to write it back to a w3-file later?
It doesn't look like you're using this variable anywhere.
There was a problem hiding this comment.
Could probably remove as we don't patch existing object Giles, only generate new ones
| modification.type = this.varTypes[outBufferToJSON.readInt()]; // 'int' | 'real' | 'unreal' | 'string', | ||
| const originalId = outBufferToJSON.readChars(4); | ||
| const customId = outBufferToJSON.readChars(4); | ||
| let sets = 1; |
There was a problem hiding this comment.
Also can you clarify since I haven't looked at a 1.33 object data diff: the entire modification table is now wrapped in an additional loop? What do the sets represent?
There was a problem hiding this comment.
I'm not really sure, I'll have to do some research, this was copied from mdx-model-viewer
There was a problem hiding this comment.
Yea if you could also dig around to figure out what it is, that would be useful.
Here's an experiment I did:
- Create a new map in World Editor
- Modify the (human) Peasant original object - edit just one field, in my case base damage
- Annotate the bytes in the
.w3ufile to check for new data
I am seeing some new bytes that aren't accounted for in the version 2 of the parser:
03 00 00 00 :: version 3
01 00 00 00 :: num table modifications (original)
:: modification table 1 - Peasant
68 70 65 61 :: "hpea" (human peasant)
00 00 00 00 :: custom id - 0 = original object
01 00 00 00 :: modifications to this object: 1
00 00 00 00 :: <<<< NEW 4 BYTES ??
01 00 00 00 :: <<<< NEW 4 BYTES ??
:: modification 1 - Peasant - Base Damage
75 61 31 62 :: mod ID: "ua1b" (unit attack 1 - base damage)
00 00 00 00 :: mod type: 0 = int
0C 00 00 00 :: value = 12 (base damage updated to 12)
68 70 65 61 :: "hpea" (repeated object ID)
00 00 00 00 :: num table modifications (custom)
I cant figure out what branch to target @ChiefOfGxBxL (fixes from @cipherxof mdx-m3-viewer)