jonadrian619
-___-
- Reaction score
- 240
Tips and Tricks: Map Protection
Tell me if its good or bad. Just a practical advice for today's mappers.
Introduction:
This tutorial explains how to protect your map and even double-protect it. This tutorial will prevent your map from being unprotected and directly openable with the WE once deprotected.
I've written this tutorial because map deprotectors are getting one step ahead towards people to force them to 'deprotect' maps. The unprotector makers say that map protection is 'map corruption'. Map deprotection is also called pirating. Protecting a map prevents it from being copied and stolen.
Part 1 - The Basics:Requirements:
A Map Protector (I prefer Vexorian's Wc3 map optmizer at wc3campaigns)
An MPQ Browser (I prefer MPQMaster.) Download here
BEFORE YOU START: ALWAYS Make a back up or a copy of the unprotcted map so that in case of protection errors you can use the backup, make a copy of the backup and protect the previous backup again, and so on until there are no errors.
1) Use one of the best 3rd party map protectors in Warcraft III (I prefer Heavylocker or Map Optmizer.) Then, check all important values like obfuscation of trigger codes, optmizing strings, removal of BJ calls, removing as much WE data as possible (Protecting the map), and all other fields you prefer.
2) When you've done all of the protection work, save your protected version of the map. I prefer saving the protected version in another folder.
3) Open your MPQMaster. Then open the protected version of the map, using the Warcraft III listfile instead of the native listfile. In some MPQ browsers you are prompted to autodetect it's listfile, so use that.
4) Look at the list of files in the MPQ Browser. The 'File0000000.xxx' files are damaged WE only files, damaged by using map protectors, and are capable of crashing the WE when opened, and thats good.
5) Look for the war3map.j file inside. If that file does not exist, it means that it's disguised as a 'File000000.xxx file or something which has .xxx extention, and that means hackers will fail 100% deprotecting the map. But some of the import data will exist as real files, not .xxx files. Don't worry, for as long as the deprotectors will NOT gain access to your Triggers (Whether JASS or GUI) and Object Data in WE. DotA usually uses Vexorian's Wc3 Map Optmizer to damage the war3map.j file and instead turning it into File000000.xxx files, so that their maps will never be deprotcted in any way.
THIS STEP (5) IS THE MOST IMPORTANT OF MAP PROTECTION
Files with .xxx extention inside the map are damaged and when opened by a Notepad or any program it's empty and contains nothing, making deprotection impossible.
These are the basics. Other map protection techniques are listed below. Beware that some of these steps are not recommended, but it's at your own risk.
Part 2 - Other Map Protection Techniques.
1) Damaging the MPQ headersize information.
A Warcraft 3 map is like a zip file. You have first a 512 bytes big map header with some information. Then you have a MPQ archive attached. The MPQ archive contains all the numerous files needed for a map. The first 4 bytes of the MPQ file are the identifier. It can be read as 'MPQ'. The next four bytes are the header size, which is always hex 0x20 00 00 00. Clever map protectors now change the size from 0x20 00 00 00 to a random number which can look like this (mine) for example: hex 0xG6 RE A2 16. Most MPQ applications now cannot open the MPQ archive anymore because of that wrong size entry. Warcraft 3 seems to ignore false header size entries, so those maps still run in warcraft 3.
2) Deleting the war3map.w3c, war3map.w3s, war3map.w3r, .war3mapunits.doo files.
war3map.w3c stores the camera settings for the world editor. war3map.w3s stores the sounds used by a map world editor. war3map.w3r defines the regions used in a map for the world editor.
All those files are also only used by the world editor (WE only files) and can be easily regenerated by the war3map.j file. Damaging the war3map.j file can reduce chances of restoration.
3) Hiding the war3map.j file (Alternative to damaging the war3map.j file, IF it's not an .xxx file)
Some clever map protectors figured out a way to hide the war3map.j file, so you cannot extract it easily with some programs (Good). Regular map files contain the war3map.j file directly in the root directory. The good map protectors figured out that a map still works if the file is moved into a directory called "Scripts\".
4) Scrambling the war3map.j file (Another alternative)
Some map protectors rename all the variables and function names with random numbers. This renders the war3map.j file very hard to read by normal people.
Other Protection Techniques:
None
TIP: If you have a way to protect maps, they will be added here after a few days.
Map protection can help reduce map size and can can reduce loading time. It is necessary to protect your maps at this time because of the rising number of hackers or map pirates. So at this time, protect often!!
To make things even better, you can protect your map and reduce loading time at the same time by wigetizing your map using PitzerMike's Widgetizer, and optmize the widgetized map to reduce loading time and reduce map size. This only works with the Map Optmizer. Widgetizign a map increases size but if you use the Map Optmizer on a widgetized map then it will have slightly reduced size now with increaded loading time.
KEY POINTERS:
- Damage war3map.j, by protecting it and the protector will convert it into a damaged File000000.xxx file.
- Damaging war3map.j can ensure protection from hacks, but not 100%
- Protect your maps often to prevent deprotectors from stealing map content directly
- If your map is copied and stolen, he will claim it as his own, thus other people know that the map is owned by the map thief himself. If that happens, you're screwed for all time.
Don't worry, the war3map.j file is not really 'damaged'. It's just optmized and obfuscated. You can refer the 'Damaged' as 'obfuscated'. You can still play the map even with a damaged war3map.j file.
Comments are welcome and if you have another way to protect maps please post them here so that it will be added to the Other Protection Techniques (with all the details).
Tell me if its good or bad. Just a practical advice for today's mappers.
Introduction:
This tutorial explains how to protect your map and even double-protect it. This tutorial will prevent your map from being unprotected and directly openable with the WE once deprotected.
I've written this tutorial because map deprotectors are getting one step ahead towards people to force them to 'deprotect' maps. The unprotector makers say that map protection is 'map corruption'. Map deprotection is also called pirating. Protecting a map prevents it from being copied and stolen.
Part 1 - The Basics:Requirements:
A Map Protector (I prefer Vexorian's Wc3 map optmizer at wc3campaigns)
An MPQ Browser (I prefer MPQMaster.) Download here
BEFORE YOU START: ALWAYS Make a back up or a copy of the unprotcted map so that in case of protection errors you can use the backup, make a copy of the backup and protect the previous backup again, and so on until there are no errors.
1) Use one of the best 3rd party map protectors in Warcraft III (I prefer Heavylocker or Map Optmizer.) Then, check all important values like obfuscation of trigger codes, optmizing strings, removal of BJ calls, removing as much WE data as possible (Protecting the map), and all other fields you prefer.
2) When you've done all of the protection work, save your protected version of the map. I prefer saving the protected version in another folder.
3) Open your MPQMaster. Then open the protected version of the map, using the Warcraft III listfile instead of the native listfile. In some MPQ browsers you are prompted to autodetect it's listfile, so use that.
4) Look at the list of files in the MPQ Browser. The 'File0000000.xxx' files are damaged WE only files, damaged by using map protectors, and are capable of crashing the WE when opened, and thats good.
5) Look for the war3map.j file inside. If that file does not exist, it means that it's disguised as a 'File000000.xxx file or something which has .xxx extention, and that means hackers will fail 100% deprotecting the map. But some of the import data will exist as real files, not .xxx files. Don't worry, for as long as the deprotectors will NOT gain access to your Triggers (Whether JASS or GUI) and Object Data in WE. DotA usually uses Vexorian's Wc3 Map Optmizer to damage the war3map.j file and instead turning it into File000000.xxx files, so that their maps will never be deprotcted in any way.
THIS STEP (5) IS THE MOST IMPORTANT OF MAP PROTECTION
Files with .xxx extention inside the map are damaged and when opened by a Notepad or any program it's empty and contains nothing, making deprotection impossible.
These are the basics. Other map protection techniques are listed below. Beware that some of these steps are not recommended, but it's at your own risk.
Part 2 - Other Map Protection Techniques.
1) Damaging the MPQ headersize information.
A Warcraft 3 map is like a zip file. You have first a 512 bytes big map header with some information. Then you have a MPQ archive attached. The MPQ archive contains all the numerous files needed for a map. The first 4 bytes of the MPQ file are the identifier. It can be read as 'MPQ'. The next four bytes are the header size, which is always hex 0x20 00 00 00. Clever map protectors now change the size from 0x20 00 00 00 to a random number which can look like this (mine) for example: hex 0xG6 RE A2 16. Most MPQ applications now cannot open the MPQ archive anymore because of that wrong size entry. Warcraft 3 seems to ignore false header size entries, so those maps still run in warcraft 3.
2) Deleting the war3map.w3c, war3map.w3s, war3map.w3r, .war3mapunits.doo files.
war3map.w3c stores the camera settings for the world editor. war3map.w3s stores the sounds used by a map world editor. war3map.w3r defines the regions used in a map for the world editor.
All those files are also only used by the world editor (WE only files) and can be easily regenerated by the war3map.j file. Damaging the war3map.j file can reduce chances of restoration.
3) Hiding the war3map.j file (Alternative to damaging the war3map.j file, IF it's not an .xxx file)
Some clever map protectors figured out a way to hide the war3map.j file, so you cannot extract it easily with some programs (Good). Regular map files contain the war3map.j file directly in the root directory. The good map protectors figured out that a map still works if the file is moved into a directory called "Scripts\".
4) Scrambling the war3map.j file (Another alternative)
Some map protectors rename all the variables and function names with random numbers. This renders the war3map.j file very hard to read by normal people.
Other Protection Techniques:
None
TIP: If you have a way to protect maps, they will be added here after a few days.
Map protection can help reduce map size and can can reduce loading time. It is necessary to protect your maps at this time because of the rising number of hackers or map pirates. So at this time, protect often!!
To make things even better, you can protect your map and reduce loading time at the same time by wigetizing your map using PitzerMike's Widgetizer, and optmize the widgetized map to reduce loading time and reduce map size. This only works with the Map Optmizer. Widgetizign a map increases size but if you use the Map Optmizer on a widgetized map then it will have slightly reduced size now with increaded loading time.
KEY POINTERS:
- Damage war3map.j, by protecting it and the protector will convert it into a damaged File000000.xxx file.
- Damaging war3map.j can ensure protection from hacks, but not 100%
- Protect your maps often to prevent deprotectors from stealing map content directly
- If your map is copied and stolen, he will claim it as his own, thus other people know that the map is owned by the map thief himself. If that happens, you're screwed for all time.
Don't worry, the war3map.j file is not really 'damaged'. It's just optmized and obfuscated. You can refer the 'Damaged' as 'obfuscated'. You can still play the map even with a damaged war3map.j file.
Comments are welcome and if you have another way to protect maps please post them here so that it will be added to the Other Protection Techniques (with all the details).