ChiefOfGxBxL / WC3MapTranslator

Translate war3map ⇄ json formats for WarCraft III .w3x maps
https://www.npmjs.com/package/wc3maptranslator
MIT License
73 stars 31 forks source link

Update translators to work with 1.32 (Reforged beta) #38

Closed ttay24 closed 3 years ago

ttay24 commented 4 years ago

Not sure if anyone has looked at this yet, but do we know which files have changed in the 1.32 Reforged beta?

ChiefOfGxBxL commented 4 years ago

I'm still on an older version of WarCraft III so I'm not sure yet. But Blizzard has still indicated they're pursuing the 2019 release, so we don't have much longer until the official version is released and is more stable.

I will certainly be upgrading to Reforged, and will try my hand at deciphering any changes to the data formats they may have made. I don't think it will be much, because a large part of the upgrade is with textures and models. I don't think any entities (placing units, doodads, etc. on the map) will have any changes, but maybe the terrain file will.

RobinKa commented 4 years ago

Hey just found this project. I'm also working on fixing another similar tool for 1.32. I already found some changes in the w3i (eg. see here +8 bytes after each player, and +8 bytes after the header).

There are also some changes related to object files (slk etc.) but still investigating those.

ChiefOfGxBxL commented 4 years ago

Great, thanks for notifying me of these changes. I'll take a look by this weekend!

On Sat, Feb 1, 2020, 9:24 PM Robin Kahlow notifications@github.com wrote:

Hey just found this project. I'm also working on fixing another similar tool for 1.32. I already found some changes in the w3i (eg. see here https://github.com/sumneko/w3x2lni/pull/58 +8 bytes after each player, and +8 bytes after the header).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ChiefOfGxBxL/WC3MapTranslator/issues/38?email_source=notifications&email_token=AA7D3OTX37AWGXQZVLFK3ITRAYVEFA5CNFSM4J35Q2OKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRLYMI#issuecomment-581090353, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7D3OVC5X5Y7CKY2D5QFMLRAYVEFANCNFSM4J35Q2OA .

ChiefOfGxBxL commented 4 years ago

I've looked at a bare-minimum w3x file saved by the new World Editor. The .w3i info file has changed as you mentioned, but I'm getting even more bytes in the header section and after the "Water" section (number 1 and 2 on the list below). Please see the attached file for how I break down the bytes in the .w3i file (Attached: wc3 info reforged.txt).

  1. ..❔...There are 16 bytes in the header section after the editor version
  2. ..❔...There are 12 bytes after the water section and before the number of players section
  3. ..✔️..There are 8 bytes after each player, as you mentioned, so at least these are accounted for.

I'm going to keep this issue open for a while since this upgrade to support Reforged may take more investigation, and I'd like people to be able to discuss the changes here 💭

I am uncertain what the new 8 bytes on each player would represent. But for the header, there are some new checkboxes in the Map Options dialog: image Maybe the first few checkboxes are some of the unknown w3i flags?


w3x .w3i file: Parsed
1F 00 00 00 % file version 03 00 00 00 % number of saves D9 17 00 00 % editor version 01 00 00 00 20 00 00 00 01 00 00 00 0C 39 00 00 % UNKNOWN 4A 75 73 74 20 61 6E 6F 74 68 65 72 20 57 61 72 63 72 61 66 74 20 49 49 49 20 6D 61 70 00 % Name - just another wc3 map 55 6E 6B 6E 6F 77 6E 00 4E 6F 6E 64 65 73 63 72 69 70 74 00 % Description: nondescript 41 6E 79 00 % Recommended players: Any % Camera bounds (8 floats) 00 00 30 C5 00 00 50 C5 00 00 30 45 00 00 30 45 00 00 30 C5 00 00 30 45 00 00 30 45 00 00 50 C5 % Camera complements (4 floats) 06 00 00 00 06 00 00 00 04 00 00 00 08 00 00 00 % Playable area (2 integers) 34 00 00 00 34 00 00 00 10 DC 00 00 % Flags 4C % main tile map - L = Lordaeron Summer % Loading screen FF FF FF FF 00 00 00 00 % Game data set FF FF FF FF % Prologue 00 00 00 00 % Fog 00 00 00 00 % Type = None 00 80 3B 45 % Start height: 3000.00 00 40 9C 45 % End height: 5000.00 00 00 00 3F % Density: 0.50 00 00 00 FF % Color: black 00 00 00 00 00 00 FF FF FF FF % Water % UNKNOWN 00 00 00 00 03 00 00 00 02 00 00 00 % Players 01 00 00 00 % Number of players 00 00 00 00 % Player num (0 = Red) 01 00 00 00 % Player type (1=person) 01 00 00 00 % Player race (1=human) 00 00 00 00 % Is starting pos fixed? 54 52 49 47 53 54 52 5F 30 30 31 00 % TRIGSTR_001 "Player 1" 00 00 D8 C4 % Starting pos X 00 00 E8 44 % Starting pos Y 00 00 00 00 % Ally low priorities 00 00 00 00 % Ally high priorities 00 00 00 00 00 00 00 00 % ADDITIONAL 8 PLAYER BYTES, UNKNOWN 01 00 00 00 % Number of forces 00 00 00 00 % Force flag FF FF FF FF % Force players 54 52 49 47 53 54 52 5F 30 30 32 00 % TRIGSTR_002 "Force 1" (force name) 00 00 00 00 % Upgrade avail. 00 00 00 00 % Tech avail. 00 00 00 00 % Random unit table 00 00 00 00 % Random item table
RobinKa commented 4 years ago

.❔...There are 16 bytes in the header section after the editor version

https://github.com/sumneko/w3x2lni/blob/4d31cee553b0be2c8b7d730e92ced496e25d70c5/script/core/slk/frontend_w3i.lua#L53-L58

Introduced in file version 28 and called War3 version here.

..❔...There are 12 bytes after the water section and before the number of players section

https://github.com/sumneko/w3x2lni/blob/4d31cee553b0be2c8b7d730e92ced496e25d70c5/script/core/slk/frontend_w3i.lua#L147-L156

The first 4 byte were introduced in file version 28 and are 0 for Jass and 1 for Lua. Don't know yet what the next 8 are that were introduced in file version 31.

// Edit: also found https://github.com/stijnherfst/HiveWE/wiki/war3map.w3i---Map-Information which contains all this info.

ChiefOfGxBxL commented 3 years ago

This issue is being closed with the Release 4.0!

There are two updated translators in Release 4.0 which resolve Reforged changes:

  1. Info
  2. Sounds