• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Map won't open anymore!

Status
Not open for further replies.
Level 7
Joined
Feb 13, 2022
Messages
86
Howdy! I have been working on my map off and on for the last two weeks now, I have been able to save it and reopen the map countless times! But now when I try to open my map (despite nothing changing, since the last time I was able to open my map) it won't load the map. The file attached shows what world editor displays to me each time I attempt to open my map. Anyone got any potential solutions for this?

BROKENRATMAZE.PNG


Also before this issue started, when I launched Battle.net it asked me to download Warcraft again (despite the game already being installed on my computer. I did it, since this has happened before, but the previous times it had happened it didn't affect any of my maps before. I don't think this caused the issue, but it could be important to fixing the problem 🤷‍♂️
 
Last edited:
Level 7
Joined
Feb 13, 2022
Messages
86
Do you know how I would be able to go back to the last version of Reforged? Also I don't know if that is the issue since I had been working on this update for my game, since the patch had came out and I was able to save it and open it quite a few times with no issue.
 
well hmm try to see if you can open your map with the last war 3 version , if you still get that error then maybe your map got corrupted. But I'm sure that this is an error for old war 3 editors that try to open new versions. I tested that i tried to open a ref map with my war 1.30 and i got the same error like you
 
Level 7
Joined
Feb 13, 2022
Messages
86
well hmm try to see if you can open your map with the last war 3 version , if you still get that error then maybe your map got corrupted. But I'm sure that this is an error for old war 3 editors that try to open new versions. I tested that i tried to open a ref map with my war 1.30 and i got the same error like you
Sweet I will give it a try! How do you switch to an older version? Btw I appreciate the feedback!
 
Sweet I will give it a try! How do you switch to an older version? Btw I appreciate the feedback!
Well if you want to downgrade your map then, to change a map from 1.32 to 1.31 is not very easy you can try this Map Adapter . But don't you have a old save for your map? Like a backup in case something goes wrong with your map? If not you should make at least one from time to time.
 
Level 7
Joined
Feb 13, 2022
Messages
86
Update: I uninstalled and reinstalled Warcraft in hopes that it would work. It didn't, I'm going to restart from the last update, making backups while I work on it. Please reach out if you have the solution or anything I could attempt, otherwise I'm out of 10+ hours of work.
 
Level 18
Joined
Jan 1, 2018
Messages
728
The error 'Level info data missing or invalid' indicates an issue with the war3map.w3i file. Usually this happens when you try to open the map in an older version of the world editor / game, while the map was saved with a more recent version. Patch 1.31 and 1.32 introduced changes to the file format, so if for example the map was saved with 1.31 then you cannot open it in 1.30 and earlier. The file also may have been corrupted somehow. Can't say what's wrong exactly if you don't upload the map (or just the war3map.w3i file if you don't want to share the entire map, you can use an mpq file extraction tool for this).
 
Level 7
Joined
Feb 13, 2022
Messages
86
The error 'Level info data missing or invalid' indicates an issue with the war3map.w3i file. Usually this happens when you try to open the map in an older version of the world editor / game, while the map was saved with a more recent version. Patch 1.31 and 1.32 introduced changes to the file format, so if for example the map was saved with 1.31 then you cannot open it in 1.30 and earlier. The file also may have been corrupted somehow. Can't say what's wrong exactly if you don't upload the map (or just the war3map.w3i file if you don't want to share the entire map, you can use an mpq file extraction tool for this).
BROKEN RAT MAZE
Here is the latest version, if you wanted to take a look at it! Thank you for the feedback what do you recommend I do ?
 
BROKEN RAT MAZE
Here is the latest version, if you wanted to take a look at it! Thank you for the feedback what do you recommend I do ?
did you protect your map? From what somebody told me this error will appear if you protected this map. But the ref will make a backup for maps that you tested in C, see if you find your map there
 
Level 18
Joined
Jan 1, 2018
Messages
728
BROKEN RAT MAZE
Here is the latest version, if you wanted to take a look at it! Thank you for the feedback what do you recommend I do ?
It seems that the entire map has been corrupted somehow. The mpq header seems intact, but the hash table and block table are useless. I can't tell if the file data is corrupted as well since you need these tables to access them.

I'll try to explain the technical details, a warcraft 3 map is an MPQ archive (comparable to a .zip file). An MPQ file starts with a header that tells you the location of the file data, the hash table, and the block table. Usually the data is in this order (so header first, then file data, then tables), but it's possible to do it differently (for example protected maps may start with the file data and/or tables and put the header afterwards, this is possible because MPQ archives can be embedded in other files, and then the MPQ header can be found by checking for a 'magic' number). The header itself is fine, it says the file data is at offset 32 (directly after the header), and the tables are at roughly 40000000 (which should be around 38.4MB, the size of the file). The problem is that the hash table and block table are corrupted. The hash table is used to find the entry in the block table given a filename (war3map.w3i, war3mapMap.blp, etc), then the block table tells you where the file is and what its size is. Note that the filenames are not stored in an MPQ archive, only the hashes. What I noticed is that after the first couple of entries in the hash table, every three entries all have the same data. It's all garbage though so I'm not sure it means anything. The block table has 84 entries (files) according to the header. Then there's the files themselves, assuming these didn't get corrupted like the hashtable and blocktable, without the tables all you really know is that the first file starts at offset 32 (directly after the header), and the second file will probably start directly after the first one, but you don't know the size of the first file, that information is stored in the block table.

I don't know if anyone ever attempted to recover files from an MPQ archive, but in theory it may be possible, because the map is not protected we can make some assumptions.
First of all the world editor will save all files in a specific order: war3map.w3e, war3map.w3i, ..., imported files, (listfile), (attributes). The last two are files specific the MPQ archives and will be compressed and encrypted, the others will only be compressed. MPQ compression is usually done in blocks of 4kB. At the start of the data is an offset table, for every 4kB part is an offset, for example a file that is 200 bytes compressed will have an offset table of [8, 208] (the offsets includes the offset table itself, so because there are two offsets the first offset is two multiplied by 4 (the size of one offset). Now we know the compressed size of the file, so we know where it ends and so where the next file starts. Only thing we don't know is the UNcompressed size of the file. I don't know if you really need to know this (might depend in the compression algorithm), but at least we know that every block means 4kB uncompressed size, and the last one's uncompressed size should be larger than its compressed size, but no larger than 4kB (if the compressed and uncompressed sizes are equal (usually if the last block is very small) then the data should be uncompressed, not sure about when compressed is larger than uncompressed).

So if you put this theory to practice what do you get? A bunch of files but without their file names (and file extensions). I said before the MPQ doesn't store the filenames, but that's actually not true, they are stored in the (listfile) that I mentioned earlier (the () is part of the filename). This file will not tell you which file had which filename, but if you check the files you should be able to tell what file type (extension) it should have, for example if it should be a BLP file. Then if you know it's a BLP file you can open it to see the image, and find the correct filename from the list. Same goes for MDX files (models), etc.

Of course all of this only works if the file data has not been corrupted like the hash table and block table. I'll check tomorrow to see if I can retrieve any files from the MPQ.
 
Level 18
Joined
Jan 1, 2018
Messages
728
I have managed to recover some of the files from the MPQ archive. The corruption starts in the middle of the 62nd file, so every file after that cannot be recovered. The file itself is an audio file, which plays fine until it gets to the part that got corrupted.
I have written a tool to automatically assign the correct file extension to every recovered file, and did this manually for the text-based files. What I noticed is that some of the files which appear to be object editor data files did not get assigned a file extension. These files have an updated format since 1.33 which is not yet fully understood/supported, so that may be the reason.
Next step is to find the correct file names.
When I'm done with that do you mind if I attach the result here or should I send it to you privately?
 

Attachments

  • File list.png
    File list.png
    27 KB · Views: 16
Last edited:
Level 7
Joined
Feb 13, 2022
Messages
86
Wow you are a truly kind individual thank you! I didn’t understand majority of the technical jargon! But it still useful to have this information for the future and to use as a learning tool! You could privately send it to me, I would appreciate that method the most.
I have managed to recover some of the files from the MPQ archive. The corruption starts in the middle of the 62nd file, so every file after that cannot be recovered. The file itself is an audio file, which plays fine until it gets to the part that got corrupted.
I have written a tool to automatically assign the correct file extension to every recovered file, and did this manually for the text-based files. What I noticed is that some of the files which appear to be object editor data files did not get assigned a file extension. These files have an updated format since 1.33 which is not yet fully understood/supported, so that may be the reason.
Next step is to find the correct file names.
When I'm done with that do you mind if I attach the result here or should I send it to you privately?
 
Level 18
Joined
Jan 1, 2018
Messages
728
Wow you are a truly kind individual thank you! I didn’t understand majority of the technical jargon! But it still useful to have this information for the future and to use as a learning tool! You could privately send it to me, I would appreciate that method the most.
I added a .zip containing the files and a list of missing files to a private pastebin. The filenames have been retrieved from the war3map.imp file, which allowed me to name the imported files and make a list of the imported files that you have to add back yourself again.
 
Level 7
Joined
Feb 13, 2022
Messages
86
I added a .zip containing the files and a list of missing files to a private pastebin. The filenames have been retrieved from the war3map.imp file, which allowed me to name the imported files and make a list of the imported files that you have to add back yourself again.
That is a 1000 times easier than starting from scratch! Sweet! I’m waiting eagerly for your direct message that includes the pastebin link!
 
try AppData\Local\Temp\Maps\Test\WorldEditTestMap.w3x
another place to look for map backups, sometimes, is "Documents/Warcraft III/JassHelper/backups" or something like that. Just saying, if it were me before using the world editor more (and maybe losing backups when it overwrites them) I would copy that folder somewhere safe so you could later look thru it
 
Status
Not open for further replies.
Top