War3Net icon indicating copy to clipboard operation
War3Net copied to clipboard

Update .w3i Info file parser

Open Luashine opened this issue 1 year ago • 5 comments

The Map info file has been fully documented now, format versions 0-31. The missing legacy pieces are ROC Beta 100 (the first one).

After implementing this, you'll be able to correctly read the info of ROC/TFT Beta maps.

Luashine avatar Apr 21 '23 22:04 Luashine

Interesting, how did you discover all this?

Do you also have example files for all the different .w3i file format versions? I'd like to have at least one of each version to use for my unit tests.

I noticed that you haven't documented the map flags added in 1.32: https://github.com/Drake53/War3Net/blob/master/src/War3Net.Build.Core/Info/MapFlags.cs

Drake53 avatar Apr 22 '23 08:04 Drake53

Interesting, how did you discover all this?

It's all hard work as a side-effect of the W3CE being worked on :)

Do you also have example files for all the different .w3i file format versions?

Therefore I do not ;) All I can provide you with is a mirror for Firstrun70's old map version collection. It's the same archive as in the attachments.

Old Warcraft 3 Map Versions, including pre-Reforged and ROC Beta, TFT Beta wc3 file-format 8 10 11 15 23 24 26 27 by Firstrun70.zip

Historically, WorldEdit was found about in ROC Beta and patched to work. iirc 2 or 3 different versions were patched and made available for use. There must be some old maps available somewhere in the depths of the web. But there shouldn't exist different map versions that aren't already available in the archive. Blizzard almost always resaved default maps for then current beta patch.

You bring up an important point though, probably someone (I) should create test maps based on the description and let the game decide if they're correct or not. I haven't thought of it, probably I shouldn't be so quick to notify and test the description myself first, at least by creating a Kaitai Struct definition for parsing. Well w3i is too important to wait imho.

Thanks for the flags I'll check them out and push an update!

Luashine avatar Apr 22 '23 08:04 Luashine

For the other WIP files: https://github.com/Luashine/wc3-file-formats to see what's in the pipeline

Luashine avatar Apr 22 '23 08:04 Luashine

@Drake53 Have Map Info Flag30, Flag31 been observed in the wild or are they just placeholders?

https://github.com/Drake53/War3Net/blob/master/src/War3Net.Build.Core/Info/MapFlags.cs#L39

Luashine avatar Apr 22 '23 13:04 Luashine

I added those because my parser validates that the flags must exist, and I encountered at least one map that set these two flags, presumably as a form of map protection.

Drake53 avatar Apr 22 '23 20:04 Drake53