Luashine / wc3-file-formats

Project to document the proprietary file formats used by Warcraft 3
3 stars 0 forks source link

.wai .w3o appendix #2

Open WaterKnight opened 1 year ago

WaterKnight commented 1 year ago

Did a .ksy file for .wai (which is still incomplete) according to https://867380699.github.io/blog/2019/05/09/W3X_Files_Format#war3mapwai and found there was a spare 4 bytes at the end. This becomes 1 when you import custom data (in the General tab of the AI editor in the WE). There is a bit of meta data and then follows a .w3o structure. See: https://github.com/WaterKnight/Warcraft3-Formats-KaitaiStruct/blob/911a8b90ec0f08f53464ee33a56e734379a7b837/w3-wai.ksy#L110

Luashine commented 1 year ago

This is what my spreadsheet wai.ods looks like:

IF (FORMAT != 0)    
int unknown_wai_v1_1
IF (unknown_wai_v1_1 != 0)  
string  unknown_wai_v1_2
string  unknown_wai_v1_3
...read structure:  
SEE APPENDIX STRUCTURE  
ENDIF   
ENDIF   

The "1" you mention is probably IF (unknown_wai_v1_1 != 0). The two strings are file paths (260 limit, confirmed).

I didn't look super deep, but yeah it looks like the w3o structure and the following w3u looks to match. If I'm reading this right, (supposedly about everything) for version = 0 it only reads 2 structures (i.e. w3u and w3t?) and otherwise (ver >= 1) it reads all 7. If so this is new for my w3o description as well.