-
Notifications
You must be signed in to change notification settings - Fork 59
war3map(skin).w3* Modifications
These are the files that store the changes you make in the object editor. They all have one format in common. They have an initial int and then there are 2 tables Both look the same. The first table is the original table (Standard Objects by Blizzard). The second table contains the user created objects (Custom units / items / abilities …)
1.33 has added a second set of these files, war3mapSkin.w3*, which follow the same format, and are probably used to store "netsafe" fields, since these new files aren't in map_crc
uint32 format_version
The following structure 2 times.
uint32 object_count
for each object {
char[4] original_id
char[4] modified_id
if format_version >= 3 {
uint32 sets_count
} else sets_count = 1
for each set {
if format_version >= 3 {
uint32 set_flag
}
uint32 modifications_count
for each modification {
char[4] modification_id
uint32 variable_type
if optional_ints {
uint32 level_variation
uint32 data_pointer
}
if variable_type == 0 {
uint32 value
}
if variable_type == 1 || variable_type == 2 {
float value
}
if variable_type == 3 {
c_string value
}
char[4] end_token
}
}
}
uint32 format_version
1 or 2 or 3
uint32 object_count
for each object {
char[4] original_id
Always one of the base units/items/abilities/... as defined by Blizzard.
char[4] modified_id
If we are reading the first table then this is always 0. If we are reading the second table then this is the new custom ID.
uint32 sets_count
Only in version >=3, these sets probably correspond to the different asset modes the game recognises (SD vs HD, teen, all languages)
for each set {
There's always one (0th) set before version 3, but we need to go through all of them to load the data correctly
if format_version >= 3 {
uint32 set_flag
}
Unknown which values exist, but 0 is the default which makes it work for all asset modes
uint32 modifications_count
for each modification {
char[4] modification_id
A modification id from one of the xxxMetaData.slk files. You can use this to map to a field name.
uint32 variable_type
Value | Variable Type | Value Format |
---|---|---|
0 | Integer | int |
1 | Real | float (single precision) |
2 | Unreal (0 <= val <= 1) | float (single precision) |
3 | String | string (null terminated) |
if optional_ints {
Some types of objects use optional ints to specify things like variations or levels. See the table at the bottom.
uint32 level_variation
In the ability and upgrade file this is the level of the ability/upgrade, in the doodads file this is the variation, set to 0 if the object doesn't have more than one level/variation.
uint32 data_pointer
In reality this is only used in the ability file for values that are originally stored in one of the Data columns in AbilityData.slk, this int tells the game to which of those columns the value resolves (0 = A, 1 = B, 2 = C, 3 = D, 4 = F, 5 = G, 6 = H), for example if the change applies to the column DataA3 the level int will be set to 3 and the data pointer to 0
}
if variable_type == 0 {
uint32 value
}
if variable_type == 1 || variable_type == 2 {
float value
}
if variable_type == 3 {
c_string value
}
char[4] end_token
This is either 0, or equal to the original object ID or equal to the new object ID of the current object. When reading files you can use this to check if the format is correct, when writing a file you should use the new object ID of the current object here. From testing I have concluded that this field is not really used in the World Editor or the game so you can safely set it to 0.
}
}
}
Extension | Object Type | Object IDs | Mod IDs | Optional Ints |
---|---|---|---|---|
.w3u | Units | Units\UnitData.slk | Units\UnitMetaData.slk | No |
.w3t | Items | Units\ItemData.slk | Units\UnitMetaData.slk (where useItem = 1) | No |
.w3b | Destructables | Units\DestructableData.slk | Units\DestructableMetaData.slk | No |
.w3d | Doodads | Doodads\Doodads.slk | Doodads\DoodadMetaData.slk | Yes |
.w3a | Abilities | Units\AbilityData.slk | Units\AbilityMetaData.slk | Yes |
.w3h | Buffs | Units\AbilityBuffData.slk | Units\AbilityBuffMetaData.slk | No |
.w3q | Upgrades | Units\UpgradeData.slk | Units\UpgradeMetaData.slk | Yes |