• 🏆 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!

How to import and export data from one map to another?

Status
Not open for further replies.
Level 24
Joined
Jun 26, 2020
Messages
1,853
I think my map is corrupted so I decided to move all to another map, but I don't know how, I searched and I saw I have to import the data and then export, I did that but nothing happens, and the editor stopped working and I had to close it to end the import, can you help me?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
If you are using the current version of Warcraft III then you can save map as a folder. Save the new map you are making also as a folder. You can then use file explorer to move the map data files from the old map to the new map. Each file holds a specific type of data as defined by its format. Some files are needed for World Editor to load the map such as GUI trigger related files, while other are part of a set of files that have to be kept consistent for the map to load such as terrain related files.

If using a legacy version of Warcraft III that does not support saving maps as folder then you will need to use a third party MPQ editor such as MPQEdit to manipulate the map data files. The same logic as above applies, but you will need to move the files around inside the MPQEditor.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Sorry but I don't know how to use the MPQ editor, can you explain me?
Open MPQEdit. Then open archive. Select your map file that you want to take files from. In the file list, select the files you want to export. Right click and extract them into some temporary folder. Close archive.

Then open archive. Select your map file that you want to add files to. Right click in the file list and select add files. Navigate to the files you extracted. Select them and confirm. After the files are added, compact the archive and close.

You may need to add the files one at a time, or add all files from a folder. I forget the details.
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
Open MPQEdit. Then open archive. Select your map file that you want to take files from. In the file list, select the files you want to export. Right click and extract them into some temporary folder. Close archive.

Then open archive. Select your map file that you want to add files to. Right click in the file list and select add files. Navigate to the files you extracted. Select them and confirm. After the files are added, compact the archive and close.

You may need to add the files one at a time, or add all files from a folder. I forget the details.
For some reason I got the message in some the files that have a name "File0000xxx.xxx" that tells me the parameter is not correct, what is hapenning?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
For some reason I got the message in some the files that have a name "File0000xxx.xxx" that tells me the parameter is not correct, what is hapenning?
That points towards the map archive having its "(listfile)" deleted. This is usually a sign of protection by the map author but could also be caused if something interrupted the map archive when it was being written. If this is caused by the archive being incompletely written then there is a high chance that more files may be missing and what files are present might be corrupt. Missing or corrupt files cannot be recovered from an archive, you will need to find older versions of the map which have the files intact or recreate these files.
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
That points towards the map archive having its "(listfile)" deleted. This is usually a sign of protection by the map author but could also be caused if something interrupted the map archive when it was being written. If this is caused by the archive being incompletely written then there is a high chance that more files may be missing and what files are present might be corrupt. Missing or corrupt files cannot be recovered from an archive, you will need to find older versions of the map which have the files intact or recreate these files.
How can be that?, because I also have that type of files in the new map I wanna move it.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
What do you mean?
MPQ Archives, used by WC3 maps, contain a file listing all files contained inside the archive. This is called the list file and it is called something like "(listfile)". Any file that is detected in the archive structures but not present in the list file will be given a generated name and auto detected, if possible, extension.
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
MPQ Archives, used by WC3 maps, contain a file listing all files contained inside the archive. This is called the list file and it is called something like "(listfile)". Any file that is detected in the archive structures but not present in the list file will be given a generated name and auto detected, if possible, extension.
I mean, what do you mean with "match up"?
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
Are there any files that exist but are not mentioned in the listfile? This would confirm the files are being shown with generated names instead of them just having generated like names.
If you reffer that the files have names like "File0000xxx.xxx" instead of a normal name, well there are few with normal names and the rest has that type of name.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
If you reffer that the files have names like "File0000xxx.xxx" instead of a normal name, well there are few with normal names and the rest has that type of name.
So they are missing from the listfile? This is very strange for the reasons I mentioned previously.

In any case the core data files for a map are always known since they use the same file names. You can extract these and import them into another map archive using the same file name.
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
So they are missing from the listfile? This is very strange for the reasons I mentioned previously.

In any case the core data files for a map are always known since they use the same file names. You can extract these and import them into another map archive using the same file name.
Do you mean only import the files that have a normal name to another map?, because I tried that before and the map become useless.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Do you mean only import the files that have a normal name to another map?, because I tried that before and the map become useless.
Then it is possible your map is corrupt and some amount of important data has been lost. Given that the reason you were trying to move data files in the first place was that it was not loading in the Editor.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
So, what options I have?
I would recommend using a backup version from before the map was corrupted if available. If not available then you can try inspecting the map files one-by-one to see which are salvageable and then rebuilding any data that was lost.

You could also link the map for people to independently verify that it is corrupt and maybe to help salvage data from it.
 
Status
Not open for further replies.
Top