I couldn't find an accurate spec for this file so I made my own. This is accurate to the best of my knowledge but I only spend ~20 minutes on it. It might be useful to someone. When I code this, I'll discover any inaccuracies in it.
All Integer fields are Little Endian. All Strings are null-terminated. The null-terminator byte is 0x00.
Structure: War3map.w3u/t/a
versionId [uint32]: Usually 2
numModified [uint32]: Shows how many default objects have been modified
modifiedObject [Structure[numModified]]: Structure defining the modified objects
numObjectsCount [uint32]: Shows how many new objects were created
newObjects [Structure[newObjectsCount]]: Structure defining the new objects
Structure: ModifiedObject
rawcode [byte[4]]: The rawcode of this original modified object
unknown1 [uint32]: Always zero
modifiedFieldsCount [uint32]: Declares how many fields we modified on this object
modifiedField [Structure[modifiedFieldsCount]]: The data of the field
Structure: ModifiedField
fieldcode [byte[4]]: The code for the modified field
fieldType [uint32]: 0 for int, 1 for real, for unsigned real, 3 for string
fieldData [String/uint32/real/ureal]: Declares the data of that field.
rawcode [byte[4]]: The rawcode of this original modified object. Matches the first found rawcodes.
Structure: NewObject
basedOnFieldCode [byte[4]]: The rawcode that this object was based on
customRawCode [byte[4]]: The custom rawcode that was assigned to this object
modifiedFieldsCount [uint32]: Declares how many fields were modified on this object
newObjectField [Structure[modifiedFieldsCount]]: The data of the fields
Structure: NewObjectField
fieldcode [byte[4]]: The code for the modified field
fieldType [uint32]: 0 for int, 1 for real, for unsigned real, 3 for string
fieldData [String/uint32/real/ureal]: Declares the data of that field.
unknown [uint32]: Not always zero. Purpose unknown.
** Note the minor but important difference between NewObjectField structure and ModifiedField structure!
WC3 Objects File Spec [war3map.w3u, war3map.w3t, etc]
Moderator: Cheaters
-
- Forum Staff
- Posts: 1943
- Joined: February 3rd, 2009, 11:28 pm
- Been thanked: 1 time