| 03-27-2006, 09:50 AM | #1 |
This is a tutorial on how to save-lock your map. It relies on the fact that the World Editor crashes when parsing an incomplete if-endif block. The purpose is to make your map open-source; anyone will be able to open it up in the World Editor and see how it works, but if they try to save it the World Editor will crash. This is not meant as a strong protection, and it is quite easy to reverse. IT'S SUPPOSED TO BE THIS WAY. It is only meant to keep your map protected from newbies or to prevent people from accidentally saving. Why would you want this protection? Use it if you want your map to be open-source, but you want to keep newbies from spreading broken versions. I use it in my map because I compute the pathing map using a modified TerrainArt/Terrain.slk; saving without this file computes the pathing map incorrectly, and it has no effect when included in the map. Thus I have it save-locked using this weak protection rather than something strong to prevent people from breaking it, but to allow smart people to mod it correctly. If you don't want it to be easily reversed by knowledgeable mappers, then this protection is not for you. To save-lock your map this way, follow these instructions: 1. BACKUP YOUR MAP! Open up the copy you want locked in WE (or WEU), set it up however you like, compute the shadow map, and do whatever you want to make it the release version. Be sure the map is saved before proceeding to the next step. 2. Add the following code to the bottom of the custom script code in the triggers: JASS://This should crash WE when attempting to save: function crash takes nothing returns nothing if true then Remove the comment and call it something different if you don't want it to be obvious. 3. Save. The World Editor will crash. This is supposed to happen. 4. Open WE (or WEU) and open up the copy you want locked again. Go to the Import manager, and click Import. Go to the location where your map is saved. There will be a folder called <mapname>.w3xTemp . In this folder, you'll find a file called war3map.wct . Import this file, and remove the path so that it is called simply war3map.wct . 5. Save, and close the map. That's it, you're done. Try opening the map again and saving; the World Editor will crash, leaving the map intact. Now distribute your map online! To reverse the lock, just open up the map, remove the lines you added to the custom script code, and remove the file from the import manager. This will allow the map to once again be saved. |
| 03-29-2006, 05:38 AM | #2 |
you can accually make dummy functions instead of this one that are called but serve no purpose in that it is just to confuse the reader and not endif's on those |
| 03-30-2006, 04:47 PM | #3 |
Well, if the noobs read your tutorial they can easly un-protect the map :), good tut by the way! |
| 03-31-2006, 04:20 PM | #4 | |
Quote:
|
| 04-03-2006, 04:46 PM | #5 |
I really don't mind if they unprotect the map; I encourage people to mod it. This lock makes sure they pay some attention to what is needed to actually mod it, so you don't get noobs opening it up and rigging a hero for example without knowing anything about how it works. |
| 04-07-2006, 08:28 AM | #6 |
lol, if they read this, they will take the lock off; oh well it will keep noobs out, and thats all we really want. +rep |
| 04-10-2006, 11:26 PM | #7 |
Do you really think those idiots even find this thread,kaldoreielf? |
| 04-11-2006, 12:02 AM | #8 |
lol; thats what I mean, NOOBS wont be able to unlock it... |
| 10-27-2009, 08:01 PM | #9 |
it is compatible with patch 1.24 ? |
| 10-30-2009, 09:32 PM | #10 |
This went out of style with NewGen... maybe even before that. |
