Map Protection Article Index for
Map
Website Links For
Map
 

Information About

Map Protection




Map protection is a process by which custom Starcraft and Warcraft III Maps can be rendered unopenable by official Campaign Editor included with the game ( StarEdit and the Warcraft III World Editor , respectively).


OVERVIEW

Many popular multiplayer Maps , once completed and released to the general public via Battle.net , suffer from "hijacking." It ranges from someone simply re-releasing a map he did not create, claming credit for it to re-releasing a map altered so that the hijacker has an advantage to searching the map for secrets and Easter Eggs in the editor to simply making sometimes-useful, sometimes-damaging changes. If a map is popular enough, there will eventually be hundreds of variations on it which may be fundamentally the same but bear the names of different authors, have minor game-play differences, and have altered Balance —and every time a player encounters a variation which he or she does not have, it must be downloaded to his or her computer before play.

Map protection is an aid in this problem. Most protection methods work by altering a copy of a map, removing information that the Campaign Editor requires to open the map but is not required by the game to ''play'' the map. As a result, anyone attempting to open the map in the campaign editor is presented with a cryptic error message. This prevents casual hijackers from performing any modifications to the map. (If the original author later wishes to change the map, he simply edits his private unprotected copy and then distributes a re-protected version.)

By the very nature of map protection, it is imperfect. As long as the game can read the map, it is possible to create a utility to unprotect a map. However, this is usually more work than the average hijacker will endure.

There is a controversy over map protection. Anyone with a legitimate reason to change a protected map is forced to either ask the author for an unprotected copy or ask the author to add whatever changes they had in mind. This can be difficult if the original author is hard to contact or no longer maintaining the map. In addition, a useful way to learn to create maps is to open existing ones and examine them—needless to say, it's impossible to learn from a protected map. Unless, however, the map has a "Corrupt on Save" sort of protection, if this is the case, then learning from the map will be easy.


PROTECTION METHODS IN WARCRAFT III

Warcraft III maps are saved in the Mo'PaQ format, which means that every map is effectively a set of other Files identified by a Path . Many of the files included in a map are for the Campaign Editor 's convenience only. The basis of most Map Protectors is mutilating or removing the unnecessary files.


Map script and convenience files

All maps include a file named ''war3map.j''. It is known as the map script file. It is used exclusively by the game to specify the map's camera positions, map regions, sounds, music, and custom triggers. However, due to the nature of Scripting Languages (such as the one used by ''war3map.j'', Jass ), it's difficult to get the important data out of a script and into a suitable format for humans to edit. Because of that, the World Editor adds several convenience files in a simple format to avoid doing it the hard way. These files are ''war3map.w3c'', ''war3map.w3r'', ''war3map.w3s'', ''war3map.wtg'' and ''war3map.wct''.

If one or more of these files (especially the ones corresponding to custom triggers) is damaged or removed, the World Editor will either refuse to open the map or open the map with the appropriate data missing. This is a common protection method.

This can be broken by creating a utility that will read the map script and re-create the convenience files. This is possible, although difficult, and may not restore the data exactly as it was before protection (comments entered into the editor may be missing, for example).


Map script obfuscation

The map script file is easy, as files go, to read in a text editor such as Windows Notepad . The World Editor strives to make it as close to human-readable as possible when the map is saved. This means that if a user knows Jass , they can open the map script file and discover any secrets or Easter Eggs that may have been hidden via other protection methods.

Obfuscation is the process of changing a script file so it is harder for a human to read but identical from an Interpreter 's perspective. However, some obfuscation methods are incompatible with some maps. Obfuscation is commonly used in conjunction with Removing The Editor's Convenience Files .


Map script hiding

Due to the specifics of the Mo'PaQ format used by Warcraft III to store maps, to open a file included in a map you must know the Path of the file you want. A similar protection method to map script obfuscation is changing the path of the ''war3map.j'' file to ''Scripts\war3map.j''. This path is not known by some MPQ Editors , which makes the map script effectively unopenable unless the user knows of this protection method. The game knows of this path, however, and will be able to load the map script normally.


Corruption when saved

An alternate method of map protection allows the map to be opened normally in the World Editor, but will corrupt the map when it is saved, making it difficult to alter and re-distribute the map, but lets the map be inspected and used for learning purposes. There are many ways of accomplishing this.