- 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
- Theorically fixed a patch 1.24-related bug that could make some few GUI maps incompatible with patch 1.24.
- Better number literal optimization may reduce filesize slightly better than the previous version.
- The optimizer is now more agressive when adding safety !=null stuff to prevent the IsUnitType bug. This might increment some maps' bits after optimizing but will greatly reduce the risk of this problem (in fact, it might actually stop happening).
- The Enforce IsUnitType safety tweak is not ignored anymore, ironically, due to the above change it may not be necessary anymore.
- Fixed "init function merge" causing compile errors if there was a function with only local variables.
- Fixed a major bug with init Merge on certain maps doing more than usual inside InitTrig.
- The tweaks "Disable:" frame now says "Avoid: (Check to disable)".
- Fixed a major bug with EnumDestructablesInCircleBJ and BJ optimize, often reported as &aquot;compress map names makes my map lag like hell&aquot;.
- Fixed a minor memory leak possibility in replacement for EnumDestructablesInCircleBJ.
- Fixed a memory leak and probable crash with a mpq-file-reading function.
- Fixed a bug that could come in Merge Init functions in certain maps that were compiled using jasshelper's inline optimizations.
- The [Merge Init functions] should be more effective and able to avoid more problems.
- Maps using TriggerRegisterVariableEvent will automatically get an all caps charmap for name compression.
- Command line gibberish.
- Bugfix: Constant variable inlining conflicting with local declarations using the same variable name.
- Bugfix: Unfortunate constant variable double inline (constant integer A=1, constant integer B=A, set x=B).
- Feature: Compress map names uses real variable protection automatically if it finds a call to TriggerRegisterVariableEvent.
- Fixed yet another bug with EnumDestructablesInCircleBJ and BJ optimization.
- Can save tweaks again.
- Fixed issues with strings that contained the number 5.
- Fixed a dangerous bug with the BJ optimization in some maps that used EnumDestructablesInCircleBJ.
- Added a tweak to turn rawcodes into numbers.
- Fixed an issue with strings in the script that were formed of digits or _, again.
- Fixed an issue with the optimizer replacing \\ with \" (or viceversa) in strings.
- Fixed a bug regarding possible malfunction after inlining real constants that did not specify a real initial value.
- Fixed an issue with strings in the script that were formed of digits or _
- Fixed jass compile error in maps that used EnumDestructablesInCircleBJ
- Readme updated
- Changed the interface a lot.
- Fixed a bug with 'Compress names' a.k.a "Shortest names as possible" that was potentially dangerous for scripts with a lot of globals. (A LOT of globals)
- Fixed a bug with the globals merger that could have arised issues with global variables with initialized values.
- "Compress names" will now automatically use an upper case charmap
- Added tweaks dialog containing the usual things to disable certain methods or to allow some of the formerly known as "non-recommendable" checkboxes.
- Improved size reduction for basic obfuscation on certain specific cases.
- Kind of updates in the readme.
- Added "Inline constant globals" method.
- "Look for other scripts to obfuscate" renamed to "Other scripts opt"
- "Other scripts opt" can now optimize .pld files as well.
- Added option to remove extra .j files found in the map.
- "Make sure to clean every unused function/variable" renamed to "Recursive cleaning"
- No longer has a chance to add 3 utf8 characters at the top of the map's script.
- Improved the loading time of external list files, it will also not freeze the PC when the listfile is really big.
- Fixed various bugs with gamecache function optimization.
- Fixed a bug with Anti BJ that replaced GetAbilityEffectBJ and GetAbilitySoundBJ incorrectly.
- Fixed a bug with remove useless code that had a chance to cause bugs if a typical gamecache
init function was called without using it as an expression but with the call statement
- Removed some '}' debug messages.
- Fixed a graphical glitch.
- Fixed a bug with Safe IsUnitType not working correctly sometimes and making the map fail.
- Fixed a bug with 'Remove editor suffixes' it had a chance to make an ability malfunction If its only modified field was
the editor suffix
- Improved the 3.9 feature of optimizing gamecache functions a little.
- Checked state of 'Not recommended' options will no longer get loaded.
- It will always save a script file with the same name as the target map but will end with .j that will
show the resulting script used by the map. This will save some time to the guys that like to check the
resulting script file after optimizing.
- 'Remove useless code' now removes some dummy order commands generated by the world editor in the preplaced
unit creation area
- Fixed a bug when strings with a \ followed by a " were present
- Fixed various grave bugs with Shortest Number representations and Shorter variable names possible concerning ' notation.
- "Make sure to clean every unused function/variable" Is now way faster than before.
- "Shortest variable/function names possible" Will no longer automatically consider names of real variables as possible
identifier names to be used as strings. To make it consider real variables for strings, a new option called
"Script uses real variable value events" has been addedï¿½
- Fixed a chance the optimizer had to not add one file to the new map under certain circunstances.
- 'Remove useless code' now also optimizes gamecache based systems that use an extra function to automatically setup
their gamecache variables.
- Fixed a bug with optimizer not being aware that functions might have extra spaces before their argument lists, and this
caused a probability for map optimizer to fail.
- Added a Safe IsUnitType option to let it fix IsUnitType bugs even i the most extreme cases (but it hits performance
a little I advice against using it unless there are problems.
- Fixed a bug that was making the optimizer create 2 files: c:\i.mpq and c:\h.mpq for no reason at all. The
contents of those files were the original and optimized versions of the map.
- Fixed a bug with 'Remove Useless Code' that made maps fail when optimized when they had and else before
an endif just before a line that uses a constant function that didn't take arguments.
- AntiBJ now changes GetUnitAbilityLevelSwapped to GetUnitAbilityLevel as it was supposed to do.
- The result map / script now uses 1 character to break lines instead of 2. This saves a pair of kilobytes in maps with big map
- Fixed a bug with Merge initializations that could move to the global declaration a value that wasn't
declared yet and cause script errors.
- Fixed a bug with the selection of script files that choose commonj twice instead of considering blizzard.j
which makes me wonder if anybody actually used that option.
- It is finallly possible to use an auxiliar listfile to help the optimizer browse the map's file.
- Added an option that allows you to update/create the (attributes) file.
- An inescrupolous party has been calling the "Make world editor Crash" option a "Map protection", and were
making "gosu 1337" map unprotection tutorials to get rid of that "Protection" so I just changed the name
of that option to "Remove As much WE-only data as possible" with a warning that it will cause World Editor
to crash when openning the map file.
- Added a "Keep dummy war3mapunits.doo" option that allows the optimizer to keep a dummy war3mapunits.doo
in the map when using "Remove As much WE-only data as possible" , this is to prevent wc3sear.ch's map
upload script to mark the map as 'Corrupted by a Third party software'.
- Various interface changes.
- Improved the formatting of the readme.html file
- "Merge Initialization" , now saves even more script size and its merge globals process got a speed boost.
- "Optimize BJ functions" now also fixes a leak on GetCurrentCameraSetup and Adds a faster version of
- "Clean slks" no longer removes the special classification of units, cause it is actually considered by
the "Random Creep Unit Type" function.
- Added "Force Upper Case" option to "shortest variable/function names possible" it should be used to fix
a very rare bug that may happen in some maps when using that method.
- Fixed a chance to LOSE the script file of the map when optimizing widgetized maps, this seems to have
been caused by a SFMPQ.DLL bug with listfiles when you make plenty of modiffications, or something like
- Nothing else besides some minor updates on the readme, Download this version only if you had problems with
widgetized maps, It might not solve every single problem with widgetized maps, but at least it fixed the
ones presented in 2 maps I got. More minor updates might be released in the near future until I am sure
every single bug with widgetizer is fixed.
- Added 'Keep "Open Source"' option for Remove Editor Only Files.
- Fixed a bug with "Remove Editor Only Files" making the optimizer freeze and create a big map file when
being used on ROC files , special thanks to ShofetHaolam for reporting it. I forgot ROC maps when testing
this feature, sorry.
- You can now open the readme file from the about dialog.
- Fixed a bug with "Merge Initializations" not merging functions that were empty.
- "Shortest Number Representations" no longer requires you to use "Shortest Variable/function names possible"
and is also used by "Look for other files to obfuscate"
- Fixed a deadly bug: Remove "World Editor only files" was removing some data required in multiplayer!
- html readme
- Fixed a tricky bug that had a chance to appear when using 'Conditions' or 'Remove useless code' , the bug
was actually blizzard's fault and was really tricky.
- Fixed bugs with clean BLPs option.
- Fixed 'Remove Editor only files' not removing the listfile when Buffer size or zlib weren't used.
- 'Remove Editor only files' now removes the WE data fro item/unit tables, forces, upgrades and ability
- Changed the way 'Make world editor crash' works, it no longers turns the map into an infinite loop but it
adds less space.
- Added clean BLPs option.
- Script optimization removes a lot of more useless spaces than before.
- Fixed a bug with Remove Editor Suffixes, in some rare situations it could disable an ability. It was
actually blizzard's fault and seems to be caused by a change in patch 1.18.
- Fixed various bugs with the "Conditions" method.
- Improved "Conditions" method now avoids to add unnecesary parenthesis/spaces.
- Fixed a logic flaw that was making the "Shortest names possible" work only if the "Make sure to clean
every unused function" method is checked. And it stopped the map from working if you checked the
Optimize BJ functions method.
- Merged the "Merge" obfuscation methods (Merge initialization functions, merge global initializations and
merge arrays init) into one method called "Merge initializations".
- Fixed a bug wit the "Shortest names possible" method combined with functions that had local variable names
that started with array, causing map corruption (This is the kind of bug you would only note when optimizing a WEU map)
- Fixed a bug that was disabling the optimizer to fix a map correctly if it didn't have a war3map.wts (Mostly
the case of a special kind of widgetized map)
- By popular demand added "Make World Editor Crash" option.
- New Script Obfuscation Method : "Shortest Number Representations"
- Fixed a bug with the "Optimize BJ Functions" method that was literally crippling the purpose of the
enter/leave rect(region) registration functions.
- Optimize BJ Functions optimizes the CountLivingPlayerUnitsOfTypeId function to a really improved
version of it.
- "Merge initialization functions" now also merges InitTechTree and InitUpgrades.
- Remove useless code also removes !=false
- New Script Optimization Method: "Optimize BJ Functions"
- Fixed Merge Globals obfuscation method, now it avoids merging values that shouldn't be merged (like bj
variables that were not initialized)
- "Remove useless files" and "Remove unit position data were merged" into Remove Editor-Only Files.
- Fixed the damned crash
- Fixed a lame bug with map scripts that had strings that were x and some number (for example "x3")
- Fixed a bug with Clean SLKs when reading SLKs that were made using Microsoft Excel.
- Fixed a bug when optimizing strings and certain interface error messages.
- Fixed a bug with the script loader and AntiBJ combined that sometimes stopped the map from working.
- Fixed a bug with AntiBJ actually stopping the Set Unit Ability level function for GUI from working at all.
- String Optimizing / Remove editor suffixes should work for object strings files too.
- New Script optimizing method: Option to make sure to clean every unused function/variable.
- New Map optimizing option: SLK cleaning.
- Fixed some typos in this file.
- Works on Widgetized maps without halting now.
- Fixed bugs with scripts that had \\ at the end of strings.
- Conditions obfuscation method is faster.
- No longer loads the map script again when using the 'shortest' obfuscation method
- Fixed a bug that was reducing compression ratio a lot and was kind of lame, the script file was getting duplicated? , and even worse the duplicated was the unobfuscated version.
- Fixed major bugs with maps that had scripts that used /" inside strings.
- Fixed a bug with shortest variable/function names possible combined with conditions obfuscation
- Will now consider the strings used on war3map.wtg and war3map.wct in case protection and map preview are unchecked.
- New map optimization option that allows to move the strings from the wts file into the files that use them, this is effective for reducing loading time and also allows you to remove the editor suffixes to save some extra kilobytes.
- Rebuildin the map with new buffer size or making Zlib compression should be much faster now.
- Simple string file optimization is much faster.
- Fixed a bug when copying the map, was copying the map twice, so it halved the time used for that.
- New important obfuscation method that replaces the names of variables/ functions in the map with really small names, this makes the map smaller and much faster.
- Fixed a small bug, maps would generally lose some extra bytes now.
- AntiBJ and remove useless code now optimize patch 1.18 stuff.
- Compatibility with other languages, again.
- Now uses the right places to save options and temporal files (Would fix problems with user restrictions and that stuff in some windows versions)
- Fixed a horrible bug that would cause total corruption when you had a comment with a " inside in your map.
- Fixed a with codifications that inserted '?' signs at the start of the maps.
- Fixed a bug with 'AntiBJ' not working in certain situations
- Fixed a bug with 'Merge array initializations' not working in certain situations
- It will tell you how much bytes it saved besides of the percentage now.
- Fixed a horrible bug that happened when a string finished with a carriage return in the JASS script, making the program to 'eat' some of the remaining code.
- There was a chance of odd I/O errors on certain maps, that was fixed.
- Fixed a bug with the merge array initializations method.
- Hopefully now works 100% allright with maps that use 'Foreign' characters. The only way to test this I had was the ï¿½ I had from spanish, but it should work with the other languages.
- Added AUTODETECT to the buffer size level option, and fixed a bug with it, (it wasn't actually using the values you wanted).
- Merged the Constant function purge method with the remove useless code method.
- The Remove Useless code method will also merge variable sets with function calls.
- AntiBJ now deals with calls to BJ swapped functions.
- The merge array initializations method is now incredibly fast, so fast that in most of the cases you don't even note the moment it is called.
- Fixed an evil bug with the purge constant functions method that was making any map unplayable
- Fixed an evil bug, yet not that important that was happening with Big script files.
- My logic was flawed, again, figured that a function that has a return statement shouldn't be merged, fixed that now.
- Another Flawed logic issue, it can't just add a -1 to the arguments because it would screw becase * has priority in the evaluation order, if you were having problems in certain triggers and you love using Convert Player to index and the convert index to player, then the cause of that issue was fixed.
- Fixed another bug with AntiBJ, there was a slight chance that it wouldn't change certain functions.
- Fixed another problem, the merge array initializations method wasn't actually working if the merge functions option was enabled, now its fixed.
- Added the Purge constant functions method.
- My logic was flawed, I found a big problem with the way I was merging functions with locals, now the initial value of the local variable would be set in the right place (putting it in the declaration would cause problems in certain situations)
- Fixed a rather small frozen time before starting the global merge method.
- The merge initialization functions method got a major speed boost.
- Other methods excepting the Merge Array Initializations and the conditions obfuscation were improved speed wise too.
- Fixed a bug that was causing the merge Initialization functions option to make the map unplayable under certain circunstances.
- Fixed various bugs in the merge Initialization functions options when strings had carriage returns.
- The "merge global initializations with declarations" options got a major speed boost, used to be the slowest method and now is the fastest, similar improvements will be done with the other methods.
- Fixed some stuff in the readme file (this file)
- The function merge methods now are able to merge functions that use local variables, excepting some weird cases.
- The function merging methods were all merged into one option, this is because they all use the same function afterall, so if one is bugged all the other ones will too, and it will save you 2 clicking times.
- More functions are merged, at this time it will end with a gigantic main function that contains everything from global initializations to triggers, including unit creation.
- Maps that use the Remove weather effect action, can now use Anti BJ without problems, in other words I fixed the bug with Anti BJ.
- Fixed a bug with the conditions obfuscation method, thanks Karukef for the feedback that helped finding it.
- Fixed problems with "foreign" characters , thanks a lot to Zoar for this.
- Reorganized the form so the status label has more space to show information.
- Hopefully no longer leaves any temp file.
- Now you can open map files directly, and the program will automatically fix the strings and obfuscate the script of the map.
- Also added some map optimization options like changing the buffer size, forcing zlib deflate, and removing useless files, you can get really incredibly file size compression now.
- The Interface was changed somehow now that it can open maps too.
- Now the program is called wc3 map optimizer.
- Script and Wts file fixing without changing the map are still possible when you open that kind of files.
- Global initialization merge was fixed due to a lot of glitches that certain types cause, even if the map compiled well, now it would only merge certain types or any variable that is initialized with null.
- Global initialization merge also works with sounds now.
- Updated AntiBJ, does its work with more functions, and the new BJ dummies that came with 1.17
- Added The Conditions Obfuscation Method.
- You can now associate script files or maps with this program.
- Temporal files are now created on the same directory of this program.
- Added the "Merge Global Declarations with initializations" obfuscation method.
- Added the "Merge Array Initializations" obfuscation method.
- Added the "Remove useless code" optimization method.
- Added a check/uncheck all check box, since the options are already too many.
- JASS script obfuscating no longer ignores tabs.
- Added 3 new obfuscation methods based in merging the initialization functions into a giant one.
- Array brackets are now considered operators as they are supposed to be, so the problem with stuff inside array brackets not being fixed is solved.
- Fixed a bug in the Anti BJ, was causing it to fix strings instead of non strings after certain circunstances.
- Anti BJ no longer leaves a temp file.
- Anti BJ now also replaces the GUI get player number with the native one +1 (so it takes less space)
- String File Fixer now makes sure it is not removing lines inside the strings.
- The program now tells you how much the file size was reduced.
- Added a progress bar, new obfuscating methods were too time consuming for me.
- Added the Anti BJ obfuscation method, still at beta stage so it can ruin your map, my tests of the method didn't show problems though.
- I recently discovered that strings might have a weird behaviur in JASS syntax, and this program wasn't aware of that either, just fixed it, so there aren't bugs with strings that have carriage returns inside.
0.1 : (first version)