Warcraft 3 documentation
vJASS & Zinc Documentation
For the latest documentation about how it works vJASS and Zinc language layers for Warcraft III, please follow these links:
Jasshelper documentation - Zinc documentation - WC3 Optimizer documentation

Wc3mapoptimizer 5.0 No New Posts WC3 Editing Tools

Started by
moyack

0 Members and 1 Guest are viewing this topic.

Rating

Average Score - 5 / 5

« Created: December 30, 2017, 07:52:53 AM by moyack »

Wc3mapoptimizer 5.0
on: April 23, 2012, 12:25:49 PM
Version: 5.0
Keywords: Optimizer, protect, Vexorian
Operating System (OS):
  • Windows XP
  • Windows Vista
  • Windows 7
  • Windows 8
  • Windows 10
Tool Category: MPQ Management, Specific WE Module as a Standalone App, World Editor (WE) Add on or plugin
Rating: 5
Warcraft III Tool resource
« Created: December 30, 2017, 07:55:15 AM by moyack »
« Last Edit: December 30, 2017, 09:48:18 AM by moyack »

Optimize maps, make them smaller and faster, even unopenable in World Editor if you want them to.


Code: Text
  1. 5.0:
  2. - Fixed a bug that caused an arbitrary mod limit in the object optimizer.
  3. - The optimizer will no longer ignore the tweak to disable BJ optimize (BTW,
  4.   This script tends to be the root of all "map does not work" bugs, so it is a good
  5.   thing that it is possible to disable it again).
  6. - Fixed a bug that made map scripts with native declarations fail after the short names
  7.   obfuscation executes.
  8.  
  9.  
  10. 4.9:
  11. - Theorically fixed a patch 1.24-related bug that could make some few GUI maps incompatible with patch 1.24.
  12.  
  13. 4.8:
  14. - Better number literal optimization may reduce filesize slightly better than the previous version.
  15. - 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).
  16. - The Enforce IsUnitType safety tweak is not ignored anymore, ironically, due to the above change it may not be necessary anymore.
  17. - Fixed "init function merge" causing compile errors if there was a function with only local variables.
  18.  
  19. 4.7c:
  20.   - Fixed a major bug with init Merge on certain maps doing more than usual inside InitTrig.
  21.   - The tweaks "Disable:" frame now says "Avoid: (Check to disable)".
  22.  
  23.  
  24. 4.7b:
  25.   - Fixed a major bug with EnumDestructablesInCircleBJ and BJ optimize, often reported as &aquot;compress map names makes my map lag like hell&aquot;.
  26.   - Fixed a minor memory leak possibility in replacement for EnumDestructablesInCircleBJ.
  27.  
  28. 4.7:
  29.   - Fixed a memory leak and probable crash with a mpq-file-reading function.
  30.   - Fixed a bug that could come in Merge Init functions in certain maps that were compiled using jasshelper's inline optimizations.
  31.   - The [Merge Init functions] should be more effective and able to avoid more problems.
  32.   - Maps using TriggerRegisterVariableEvent will automatically get an all caps charmap for name compression.
  33.   - Command line gibberish.
  34.  
  35.  4.6
  36.   - Bugfix: Constant variable inlining conflicting with local declarations using the same variable name.
  37.   - Bugfix: Unfortunate constant variable double inline (constant integer A=1, constant integer B=A, set x=B).
  38.   - Feature: Compress map names uses real variable protection automatically if it finds a call to TriggerRegisterVariableEvent.
  39.  
  40.  4.5:
  41.   - Fixed yet another bug with  EnumDestructablesInCircleBJ and BJ optimization.
  42.   - Can save tweaks again.
  43.  
  44.  4.4:
  45.   - Fixed issues with strings that contained the number 5.
  46.   - Fixed a dangerous bug with the BJ optimization in some maps that used EnumDestructablesInCircleBJ.
  47.   - Added a tweak to turn rawcodes into numbers.
  48.  
  49.  4.3:
  50.  - Fixed an issue with strings in the script that were formed of digits or _, again.
  51.  - Fixed an issue with the optimizer replacing \\ with \" (or viceversa) in strings.
  52.  - Fixed a bug regarding possible malfunction after inlining real constants that did not specify a real initial value.
  53.  
  54.  4.2:
  55.  - Fixed an issue with strings in the script that were formed of digits or _
  56.  - Fixed jass compile error in maps that used EnumDestructablesInCircleBJ
  57.  
  58.  4.1:
  59.  - Readme updated
  60.  - Changed the interface a lot.
  61.  - 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)
  62.  - Fixed a bug with the globals merger that could have arised issues with global variables with initialized values.
  63.  - "Compress names" will now automatically use an upper case charmap
  64.  - Added tweaks dialog containing the usual things to disable certain methods or to allow some of the formerly known as "non-recommendable" checkboxes.
  65.  - Improved size reduction for basic obfuscation on certain specific cases.
  66.  
  67.  4.0 :
  68.  - Kind of updates in the readme.
  69.  - Added "Inline constant globals" method.
  70.  - "Look for other scripts to obfuscate" renamed to "Other scripts opt"
  71.  - "Other scripts opt" can now optimize .pld files as well.
  72.  - Added option to remove extra .j files found in the map.
  73.  - "Make sure to clean every unused function/variable" renamed to "Recursive cleaning"
  74.  - No longer has a chance to add 3 utf8 characters at the top of the map's script.
  75.  
  76.  3.9d :
  77.  - Improved the loading time of external list files, it will also not freeze the PC when the listfile is really big.
  78.  - Fixed various bugs with gamecache function optimization.
  79.  
  80.  
  81.  3.9c :
  82.  - Fixed a bug with Anti BJ that replaced GetAbilityEffectBJ and GetAbilitySoundBJ incorrectly.
  83.  - Fixed a bug with remove useless code that had a chance to cause bugs if a typical gamecache
  84.    init function was called without using it as an expression but with the call statement
  85.  - Removed some '}' debug messages.
  86.  - Fixed a graphical glitch.
  87.  
  88.  3.9b :
  89.  - Fixed a bug with Safe IsUnitType not working correctly sometimes and making the map fail.
  90.  - Fixed a bug with 'Remove editor suffixes' it had a chance to make an ability malfunction If its only modified field was
  91.    the editor suffix
  92.  - Improved the 3.9 feature of optimizing gamecache functions a little.
  93.  - Checked state of 'Not recommended' options will no longer get loaded.
  94.  - It will always save a script file with the same name as the target map but will end with .j that will
  95.    show the resulting script used by the map. This will save some time to the guys that like to check the
  96.    resulting script file after optimizing.
  97.  - 'Remove useless code' now removes some dummy order commands generated by the world editor in the preplaced
  98.    unit creation area
  99.  
  100.  3.9 :
  101.  - Fixed a bug when strings with a \ followed by a " were present
  102.  - Fixed various grave bugs with Shortest Number representations and Shorter variable names possible concerning ' notation.
  103.  - "Make sure to clean every unused function/variable" Is now way faster than before.
  104.  - "Shortest variable/function names possible" Will no longer automatically consider names of real variables as possible
  105.    identifier names to be used as strings. To make it consider real variables for strings,  a new option called
  106.    "Script uses real variable value events" has been added�
  107.  - Fixed a chance the optimizer had to not add one file to the new map under certain circunstances.
  108.  - 'Remove useless code' now also optimizes gamecache based systems that use an extra function to automatically setup
  109.    their gamecache variables.
  110.  
  111.  
  112.  3.8b:
  113.  - Fixed a bug with optimizer not being aware that functions might have extra spaces before their argument lists, and this
  114.    caused a probability for map optimizer to fail.
  115.  - Added a Safe IsUnitType option to let it fix IsUnitType bugs even i the most extreme cases (but it hits performance
  116.    a little I advice against using it unless there are problems.
  117.  
  118.  3.8 :
  119.  - Fixed a bug that was making the optimizer create 2 files: c:\i.mpq and c:\h.mpq for no reason at all. The
  120.    contents of those files were the original and optimized versions of the map.
  121.  - Fixed a bug with 'Remove Useless Code' that made maps fail when optimized when they had and else before
  122.    an endif just before a line that uses a constant function that didn't take arguments.
  123.  - AntiBJ now changes GetUnitAbilityLevelSwapped to GetUnitAbilityLevel as it was supposed to do.
  124.  - 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
  125.    scripts.
  126.  
  127.  
  128.  3.7 :
  129.  - Fixed a bug with Merge initializations that could move to the global declaration a value that wasn't
  130.    declared yet and cause script errors.
  131.  - Fixed a bug with the selection of script files that choose commonj twice instead of considering blizzard.j
  132.    which makes me wonder if anybody actually used that option.
  133.  - It is finallly possible to use an auxiliar listfile to help the optimizer browse the map's file.
  134.  - Added an option that allows you to update/create the (attributes) file.
  135.  - An inescrupolous party has been calling the "Make world editor Crash" option a "Map protection", and were
  136.    making "gosu 1337" map unprotection tutorials to get rid of that "Protection" so I just changed the name
  137.    of that option to "Remove As much WE-only data as possible" with a warning that it will cause World Editor
  138.    to crash when openning the map file.
  139.  - Added a "Keep dummy war3mapunits.doo" option that allows the optimizer to keep a dummy war3mapunits.doo
  140.    in the map when using "Remove As much WE-only data as possible" , this is to prevent wc3sear.ch's map
  141.    upload script to mark the map as 'Corrupted by a Third party software'.
  142.  - Various interface changes.
  143.  - Improved the formatting of the readme.html file
  144.  
  145.  
  146.  
  147.  3.6 :
  148.  - "Merge Initialization" , now saves even more script size and its merge globals process got a speed boost.
  149.  - "Optimize BJ functions" now also fixes a leak on GetCurrentCameraSetup and Adds a faster version of
  150.    PolarProjectionBJ.
  151.  - "Clean slks" no longer removes the special classification of units, cause it is actually considered by
  152.    the "Random Creep Unit Type" function.
  153.  - Added "Force Upper Case" option to "shortest variable/function names possible" it should be used to fix
  154.    a very rare bug that may happen in some maps when using that method.
  155.  
  156.  3.5b:
  157.  - Fixed a chance to LOSE the script file of the map when optimizing widgetized maps, this seems to have
  158.    been caused by a SFMPQ.DLL bug with listfiles when you make plenty of modiffications, or something like
  159.    that.
  160.  - Nothing else besides some minor updates on the readme, Download this version only if you had problems with
  161.    widgetized maps, It might not solve every single problem with widgetized maps, but at least it fixed the
  162.    ones presented in 2 maps I got. More minor updates might be released in the near future until I am sure
  163.    every single bug with widgetizer is fixed.
  164.  
  165.  3.5:
  166.  - Added 'Keep "Open Source"'  option for Remove Editor Only Files.
  167.  - Fixed a bug with "Remove Editor Only Files" making the optimizer freeze and create a big map file when
  168.    being used on ROC files , special thanks to ShofetHaolam for reporting it. I forgot ROC maps when testing
  169.    this feature, sorry.
  170.  - You can now open the readme file from the about dialog.
  171.  - Fixed a bug with "Merge Initializations" not merging functions that were empty.
  172.  - "Shortest Number Representations" no longer requires you to use "Shortest Variable/function names possible"
  173.    and is also used by "Look for other files to obfuscate"
  174.  
  175.  3.4b :
  176.  - Fixed a deadly bug: Remove "World Editor only files" was removing some data required in multiplayer!
  177.  - html readme
  178.  
  179.  3.4 :
  180.  - Fixed a tricky bug that had a chance to appear when using 'Conditions' or 'Remove useless code' , the bug
  181.    was actually blizzard's fault and was really tricky.
  182.  - Fixed bugs with clean BLPs option.
  183.  - Fixed 'Remove Editor only files' not removing the listfile when Buffer size or zlib weren't used.
  184.  - 'Remove Editor only files' now removes the WE data fro item/unit tables, forces, upgrades and ability
  185.    availability.
  186.  - Changed the way 'Make world editor crash' works, it no longers turns the map into an infinite loop but it
  187.    adds less space.
  188.  
  189.  3.3 :
  190.  - Added clean BLPs option.
  191.  - Script optimization removes a lot of more useless spaces than before.
  192.  - Fixed a bug with Remove Editor Suffixes, in some rare situations it could disable an ability. It was
  193.    actually blizzard's fault and seems to be caused by a change in patch 1.18.
  194.  - Fixed various bugs with the "Conditions" method.
  195.  - Improved "Conditions" method now avoids to add unnecesary parenthesis/spaces.
  196.  - Fixed a logic flaw that was making the "Shortest names possible" work only if the "Make sure to clean
  197.    every unused function" method is checked. And it stopped the map from working if you checked the
  198.    Optimize BJ functions method.
  199.  - Merged the "Merge" obfuscation methods (Merge initialization functions, merge global initializations and
  200.    merge arrays init) into one method called "Merge initializations".
  201.  - Fixed a bug wit the "Shortest names possible" method combined with functions that had local variable names
  202.    that started with array, causing map corruption (This is the kind of bug you would only note when optimizing a WEU map)
  203.  - Fixed a bug that was disabling the optimizer to fix a map correctly if it didn't have a war3map.wts (Mostly
  204.    the case of a special kind of widgetized map)
  205.  
  206.  - By popular demand added "Make World Editor Crash" option.
  207.  
  208.  3.2 :
  209.  - New Script Obfuscation Method : "Shortest Number Representations"
  210.  - Fixed a bug with the "Optimize BJ Functions" method that was literally crippling the purpose of the
  211.     enter/leave rect(region) registration functions.
  212.  - Optimize BJ Functions optimizes the CountLivingPlayerUnitsOfTypeId function to a really improved
  213.    version of it.
  214.  - "Merge initialization functions" now also merges InitTechTree and InitUpgrades.
  215.  - Remove useless code also removes !=false
  216.  
  217.  3.1 :
  218.  - New Script Optimization Method: "Optimize BJ Functions"
  219.  
  220.  - Fixed Merge Globals obfuscation method, now it avoids merging values that shouldn't be merged (like bj
  221.    variables that were not initialized)
  222.  - "Remove useless files" and "Remove unit position data were merged" into Remove Editor-Only Files.
  223.  
  224.  
  225.  3.0b :
  226.  - Fixed the damned crash
  227.  
  228.  3.0 :
  229.  - Fixed a lame bug with map scripts that had strings that were x and some number (for example "x3")
  230.  - Fixed a bug with Clean SLKs when reading SLKs that were made using Microsoft Excel.
  231.  - Fixed a bug when optimizing strings and certain interface error messages.
  232.  
  233.  2.9 :
  234.  - Fixed a bug with the script loader and AntiBJ combined that sometimes stopped the map from working.
  235.  - Fixed a bug with AntiBJ actually stopping the Set Unit Ability level function for GUI from working at all.
  236.  - String Optimizing / Remove editor suffixes should work for object strings files too.
  237.  - New Script optimizing method: Option to make sure to clean every unused function/variable.
  238.  - New Map optimizing option: SLK cleaning.
  239.  - Fixed some typos in this file.
  240.  
  241.  2.8 :
  242.  - Works on Widgetized maps without halting now.
  243.  - Fixed bugs with scripts that had \\ at the end of strings.
  244.  - Conditions obfuscation method is faster.
  245.  - No longer loads the map script again when using the 'shortest' obfuscation method
  246.  - 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.
  247.  
  248.  2.7 :
  249.  - Fixed major bugs with maps that had scripts that used /" inside strings.
  250.  - Fixed a bug with shortest variable/function names possible combined with conditions obfuscation
  251.  - Will now consider the strings used on war3map.wtg and war3map.wct in case protection and map preview are unchecked.
  252.  
  253.  2.6 :
  254.  - 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.
  255.  - Rebuildin the map with new buffer size or making Zlib compression should be much faster now.
  256.  - Simple string file optimization is much faster.
  257.  - Fixed a bug when copying the map, was copying the map twice, so it halved the time used for that.
  258.  
  259.  2.5 :
  260.  - 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.
  261.  - Fixed a small bug, maps would generally lose some extra bytes now.
  262.  
  263.  2.4 :
  264.  - AntiBJ and remove useless code now optimize patch 1.18 stuff.
  265.  - Compatibility with other languages, again.
  266.  - Now uses the right places to save options and temporal files (Would fix problems with user restrictions and that stuff in some windows versions)
  267.  
  268.  2.3 :
  269.  - Fixed a horrible bug that would cause total corruption when you had a comment with a " inside in your map.
  270.  - Fixed a with codifications that inserted '?' signs at the start of the maps.
  271.  - Fixed a bug with 'AntiBJ' not working in certain situations
  272.  - Fixed a bug with 'Merge array initializations' not working in certain situations
  273.  
  274.  - It will tell you how much bytes it saved besides of the percentage now.
  275.  
  276.  2.2 :
  277.  - 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.
  278.  - There was a chance of odd I/O errors on certain maps, that was fixed.
  279.  - Fixed a bug with the merge array initializations method.
  280.  - 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.
  281.  
  282.  - Added AUTODETECT to the buffer size level option, and fixed a bug with it, (it wasn't actually using the values you wanted).
  283.  - Merged the Constant function purge method with the remove useless code method.
  284.  - The Remove Useless code method will also merge variable sets with function calls.
  285.  - AntiBJ now deals with calls to BJ swapped functions.
  286.  - 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.
  287.  
  288.  2.1 :
  289.  - Fixed an evil bug with the purge constant functions method that was making any map unplayable
  290.  - Fixed an evil bug, yet not that important that was happening with Big script files.
  291.  
  292.  2.0 :
  293.  - My logic was flawed, again, figured that a function that has a return statement shouldn't be merged, fixed that now.
  294.  - 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.
  295.  - Fixed another bug with AntiBJ, there was a slight chance that it wouldn't change certain functions.
  296.  - Fixed another problem, the merge array initializations method wasn't actually working if the merge functions option was enabled, now its fixed.
  297.  
  298.  - Added the Purge constant functions method.
  299.  
  300.  1.9 :
  301.  - 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)
  302.  - Fixed a rather small frozen time before starting the global merge method.
  303.  - The merge initialization functions method got a major speed boost.
  304.  - Other methods excepting the Merge Array Initializations and the conditions obfuscation were improved speed wise too.
  305.  
  306.  1.8 :
  307.  - Fixed a bug that was causing the merge Initialization functions option to make the map unplayable under certain circunstances.
  308.  - Fixed various bugs in the merge Initialization functions options when strings had carriage returns.
  309.  - 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.
  310.  - Fixed some stuff in the readme file (this file)
  311.  
  312.  1.7 :
  313.  - The function merge methods now are able to merge functions that use local variables, excepting some weird cases.
  314.  - 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.
  315.  - 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.
  316.  - 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.
  317.  
  318.  1.6 :
  319.  - Fixed a bug with the conditions obfuscation method, thanks Karukef for the feedback that helped finding it.
  320.  - Fixed problems with "foreign" characters , thanks a lot to Zoar for this.
  321.  - Reorganized the form so the status label has more space to show information.
  322.  - Hopefully no longer leaves any temp file.
  323.  
  324.  1.5 :
  325.  - Now you can open map files directly, and the program will automatically fix the strings and obfuscate the script of the map.
  326.  - 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.
  327.  - The Interface was changed somehow now that it can open maps too.
  328.  - Now the program is called wc3 map optimizer.
  329.  - Script and Wts file fixing without changing the map are still possible when you open that kind of files.
  330.  - 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.
  331.  - Global initialization merge also works with sounds now.
  332.  - Updated AntiBJ, does its work with more functions, and the new BJ dummies that came with 1.17
  333.  - Added The Conditions Obfuscation Method.
  334.  - You can now associate script files or maps with this program.
  335.  - Temporal files are now created on the same directory of this program.
  336.  
  337.  1.1 :
  338.  - Added the "Merge Global Declarations with initializations" obfuscation method.
  339.  - Added the "Merge Array Initializations" obfuscation method.
  340.  - Added the "Remove useless code" optimization method.
  341.  
  342.  - Added a check/uncheck all check box, since the options are already too many.
  343.  
  344.  0.9 :
  345.  - JASS script obfuscating no longer ignores tabs.
  346.  - Added 3 new obfuscation methods based in merging the initialization functions into a giant one.
  347.  - 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.
  348.  - Fixed a bug in the Anti BJ, was causing it to fix strings instead of non strings after certain circunstances.
  349.  - Anti BJ no longer leaves a temp file.
  350.  - Anti BJ now also replaces the GUI get player number with the native one +1 (so it takes less space)
  351.  - String File Fixer now makes sure it is not removing lines inside the strings.
  352.  
  353.  - The program now tells you how much the file size was reduced.
  354.  - Added a progress bar, new obfuscating methods were too time consuming for me.
  355.  
  356.  0.3 :
  357.  - 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.
  358.  
  359.  0.2 :
  360.  - 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.
  361.  
  362.  0.1 :  (first version)
« Last Edit: December 30, 2017, 10:02:49 AM by moyack »



 

* Random Tools

PJass updates

Views: 3586
Replies: 2
Posted by LeP
December 05, 2014, 02:27:07 PM

Warcraft 3 Art Tools 1.01

Views: 12030
Replies: 0
Posted by moyack
April 28, 2012, 07:55:04 AM

Wc3mapoptimizer 5.0

Views: 5297
Replies: 0
Posted by Vexorian
April 23, 2012, 12:25:49 PM

The Jass NewGen Pack (JNGP) 2.0

Views: 313642
Replies: 225
Posted by moyack
February 19, 2011, 10:16:14 PM

wc3Borderizer

Views: 4479
Replies: 1
Posted by cohadar
November 23, 2010, 07:54:25 PM
Vivir aprendiendo.co - A place for learning stuff, in Spanish   Chaos Realm - The world of Game modders and wc3 addicts   Diplo, a gaming community   Power of Corruption, an altered melee featuring Naga and Demon. Play it now!!!   WC3JASS.com - The JASS Vault + vJASS and Zinc   Jetcraft - A Starcraft II mod   WormTastic Clan (wTc)   Warcraft RESOURCES Reforged: Modelos, mapas, proyectos y mas...