• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Map Optimizer 5.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
****************************************
* *
* Wc3 Text File Optimizer 5.0 *
* *
****************************************
The usual 3rd party program warning:

THIS PROGRAM IS DISTRIBUTED "AS IS". NO WARRANTY OF ANY KIND IS EXPRESSED
OR IMPLIED. YOU USE AT YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR
DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING
OR MISSUSING THIS SOFTWARE.

NOTE: This program as EVERY SINGLE 3rd party wc3 modding program is
AGAINST the world editor's EULA.

System requirements

You probably need a computer to run this program, processor speed would determine the time the optimizing process takes, on some large maps this might get a little large. Memory is also recommended, it should work with 256 MB of RAM, but it might get over that if there are bugs in my code, so expect some swapping.

You may run wc3mapoptimizer on supported platforms, which would be Windows XP SP2 and WINE 1.0 or greater. Windows XP SP3 is probably fine as well. Notice other platforms are not supported by the developer, the optimizer might work there but if there's a bug that you can get in them and I cannot reproduce on the supported platforms it is unlikely I'd fix it.

Map protection?

You have probably downloaded it because some one in some forum told you it is the "Strongest Map Protection method" as I noticed from browsing the web it is the usual way in which the map optimizer is linked. You got to notice that "map protection" is not something I consider to exist, unless a tool that encryptyed the map and made wc3 require a special DRM-like hack to read the map is created . Although that is very feasible to happen, I doubt anyone would actually make it done.

But some of optimizer's options certainly have the side effect of making world editor unable to edit the map or open it at all. And the script optimization methods change the pattern in the map's script in a way that it is very hard to rebuild the data from it automatically. Before the optimizer was around it was a common "map protection method" to delete war3map.wtg from the map, it made the editor unable to open the map. But someone made a tool that reconstructed the war3map.wtg from the map's script and let the map be editable again, hence the name of map deprotector.

Since those tools were based on patterns and not on keywords, the optimizer's ability to change the patterns in a script to better ones made those tools unable to work again, and that is the reason the optimizer got its fame of a very strong protection method, since files are no longer rebuildable (this is just a theoric wall, this is actually caused by the lack of ability/interest among the people in that side, since they are either unable to make a complex map script parser that would be able to rebuild such data OR they figured pretty much that rebuilding those is very useless).

But the fact is that nothing really prevents people from editing a map, unless they really could not stand editing it without world editor. Thus such a thing as "Map protection" does not exist.

But there are plenty of things you can do to prevent your map from being abused to some extent.

Use the optimizer, yes, I know what I said already but it is at least able to make the process much harder.
Use the widgetizer (see bellow ). Somehow some guys are pretty unable to edit SLK files and are dependant on object editor editing...
Have an official download place for your map, and ask your usual players to only download from that place and avoid downloading a "new version" from someone hosting the map on battle.net
Rig the map, there are plenty of traps you can add to the map script to prevent it or the map from being changed. I cannot explain any in this readme since it would also be explaining the way to "unlock" the trap. And I will also avoid to explain them directly through email so do not ask me for it. It is better to be creative and invent your own way to do this, the possibilities are actually infinite.
But if your map gets really popular there will be enough losers with a lot of time and the lack of playing skills required to add cheats to your map. In that case just be happy that it happened, and remember that if you followed the tip about the official place this should not really matter since your map's popularity is already protecting your map.

Cheating is still a big deal, since if for some reason it happens to a map that is just starting it would be very difficult to fight it. If you think about it there is not much we can do ourselves besides what I said. In the context of starcraft 2 being announced, it would be a good idea to ask blizzard to think of ways to prevent this situation at least in that game. Why should they care about this? A game is supposed to be fun and cheating is not fun, and playing against a cheater is not fun either, just like they are surely taking measures against map hacking they should try to at least make map cheating harder.

There are plenty of ways to do this, one if that they could let a bnet account register a map's name so that name could not be used in another map in a public bnet game. Map format should be designed in a way that version could be a different field than name, as well.

An actual petition to do something about this is in my plans, thus I will request that you either make your own petition or you support mine. There are plenty of reasons to have an internal map registering feature.

Cheating.
Sharing knowledge, the fear prevents some mappers to share knowledge, if your own map could never be changed officially without changing the map's name it would not matter that much.
Encouraging map making: It has been proved that maps make a game even more popular and replayable, showing some extra respect and promoting popularity of map authors seems to be only good for the game itself.

Version:5.0
5.0:
- Fixed a bug that caused an arbitrary mod limit in the object optimizer.
- The optimizer will no longer ignore the tweak to disable BJ optimize (BTW,
This script tends to be the root of all "map does not work" bugs, so it is a good
thing that it is possible to disable it again).
- Fixed a bug that made map scripts with native declarations fail after the short names
obfuscation executes.

How to use it?
Open the exe file, then click the button and find your map, then use to save the optimized version of the map, before doing that you can choose what extra optimization methods you'd like.
I made sure the program disallows you to save your map in the same path to ensure you have a backup of the file you optimized.

I am just a guy that wants to optimize a map, which options should I use?

For maximum optimization you'd like to use every option besides of tweaks, make sure that you enable 'compress names' for that you need to specify the path to warpatch.mpq.

What to do if the optimized map does not work correctly?

Whenever you find a problem, please report them to [email protected] , I may also want you to send me your original map script or in the case the problem is caused by the Map optimizing options, your original map. Don't worry, I am not interested in "stealing" your map, and even If I was, I am the kind of person that doesn't need the original version of your map to do so; But I really need the original version of your map/map script to find the reasons behind the bugs SO I CAN FIX THEM.

Is the map a widgetized map? In that case try optimizing a non-widgetized version and check if it still has the bugs, In that case, remember to tell me that the bugs happen only on the widgetized version, and try unchecking "optimize strings" and see if that makes it work correctly.

I suggest these debugging steps:

1) Try Optimizing the map without using any map script optimization. If the new map works, then the problem was caused by one of the obfuscation methods. In that case, Try disabling different combinations of obfuscation options using tweaks, enabling the merge and normal anti bj methods is often enough. Now that we know it was caused by the obfuscation methods, I will really appreciate if you send me your map's map script file (I only need the map script). Also try the map with solely the [Enforce IsUnitType Safety] tweak.

If you are using some events from WEU advanced triggers and [compress names] is enabled, you will have to set the [Consider real variable events] tweak.

If your map contains some rare ExecuteFunc abuse in which some functions are at the same time called by normal call and also called by concatenation, you will have to either stop doing that (since it is a very bad way of doing things) or using the [Identifiers ignored for renaming] tweak.

2) In case it doesn't work even without the script methods, try disabling all of the extra map optimization methods, in case the map works now report it to me, and If possible send me your map so I can debug this program.



*******************OR READ README FOR BETED DESCRIPTION*************

Keywords:
Map,Protect,optimize,jas.per,tool,star wars,jedi
Contents

Map Optimizer 5.0 (Binary)

Reviews
13:28, 16th Jul 2012 -Kobas-: Stolen Resource!
Top