wc3edit.net

United Warcraft 3 map hacking!
It is currently May 25th, 2020, 4:50 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: April 22nd, 2020, 2:44 am 
Offline
Super Moderator

Joined: February 3rd, 2009, 11:28 pm
Posts: 2329
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)