****************************************
*                                      *
*  Wc3 Text File Optimizer 4.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.

Index:

  • Wc3 map Optimizer F.A.Q
  • Final Notes
  • Credits and Special thanks
  • In the future
  • Legal stuff
  • Version history

    What does it do?

    Is able to optimize the strings file, the map script and/or the map mpq itself to save space. Includes plenty of Script optimization methods that can be really useful to save space, improve execution and also work as an effective anti GUI reconstructor method (GUI reconstructors are what some people call map unprotectors)

    Note that this program wasn't really designed for map protection, map protection and unprotection are urban legends without any meaning, none of them exist, it has the option to remove the files used only by the world editor, but that's only to save space, it is not the author's fault that world editor isn't able to open and edit maps that warcraft III can without problems, in case you don't want to "protect" the map, don't use the Remove Useless files option or use the "Allow map preview" option.

    It is true that the script optimization options included in this program, are really effective against GUI reconstructors (aka Self Proclaimed Map Unprotectors), but that isn't their main objective, their objective is to improve performance and save space, It is not the author's fault if "map unprotectors" are unable to beat them. Anyone with a basic and kind of cheap programming knowledge and plenty of time to waste, may be able to make a program that "unprotects" maps affected by the script optimization methods included, though that program doesn't exist at this moment. And it is very unlikely that a person with those talents will waste them on such a lame tool, GUI reconstructors are after all a total aberration, direct JASS is better to edit a map.

    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.

    Map Optimization Options:

    Options that require Map MPQ reconstruction:

    Using any of these options will force the optimizer to rebuild the map's mpq. Keep in mind that it means that the optimizer needs to know all the paths of the files in the map to prevent losing them. World Editor automatically adds a (listfile) to the map that points to every file in the mpq, but if you happen to have removed it you will have to use an Auxiliar Listfile (see bellow).

    Auxiliar ListFile:

    In the case your map's mpq doesn't have a correct listfile (you should know about this in that case, if you are totally clueless about what I am talking about then you probably don't have to use this option) Use this option to give the optimizer an external listfile to be able to browse the map's mpq, and more importantly, be able to rebuild the mpq without losing any file when using ZLIB deflate, Buffer Size or Mantain (attributes).

    Miscelaneous Options

    Extra cleaning options

    These options are probably the ones that offer the best reduction in map space, but they have some secondary effects like making the map not open correctly or with loss of data in World Editor.

    Script Optimization Methods

    The script optimization methods are the feature that make this program unique, they have 3 important objectives:
    1. Reduce map space
    2. Improve Performance
    3. Screw GUI reconstructors.

    Simple Map Obfuscation methods

    Each of these methods is kind of worthless alone, but you can tell a difference with 3 or 4 at the same time. In case you don't really understand what each does, It is recommended to use all of them. Unless you find problems that's the moment where toggling some is a good idea.

    The "Shortest variable / function names possible" method

    This option replaces the function and variable names in the map with the shortest values possible, this method was my goal since the day Grater found out that the length of names in JASS has an influence in map speed, it also cuts some important kilobytes depending on the size of your map script. WARNING: As a secondary effect makes the map's script much more difficult to understand or change.

    Extprotect and Heavylocker had an option like this, but this program's version also takes care of strings, many JASS systems like my caster system, my templates system, InVx, AIAndy's classes system, and a lot more, use ExecuteFunc , a function that takes a function's name (in string format) as argument to execute it in another thread. When you use Extprotect or heavylocker on a map with any of those systems the map would crash, that doesn't happen with the Map Optimizer's one.

    As a bonus, it will try to remove unused global variables and functions, it would only remove functions if they take arguments though to prevent issues with ExecuteFunc, you can check certain option to make it clean every unused function, but I don't recommend to do that unless you are sure you don't have any ExecuteFunc based system on your map.

    This method needs to first parse common.j and blizzard.j before doing anything, if you are willing to use this program to optimize your custom blizzard.j , just give it an empty file for blizzard.j.

    To determine which common.j and blizzard.j files to use you have two choices:
    - Use warcraft's folder war3patch.mpq : will extract them from war3patch.mpq when needed.
    - Determine the location of the j files directly.

    Most likelly if you don't know which option to use there, you should use the war3patch.mpq one.

    So before using this method, you have to choose the location of those files, if everything goes allright, the program will automatically ask you for them when you activate the option, in case it doesn't, or you already gave the program the locations and wish to change them, you should click that "common.j / blizzard.j location ..." button.

    Notes:

    Extra options for the "shortest names" script optimization method

    Another important thing about this method is that it has a couple of extra features that you can select:

    NOTE: DON'T use next OPTIONS unless you are SURE that you don't have functions in your map called by a combination of ExecuteFunc and concatenation or something weird.

    Wc3 Map Optimizer F.A.Q.

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

    When you are optimizing a map it is recommended to use every obfuscation option excepting the ones marked with "not recommended".

    What to do if the optimized map doesn't work correctly?

    In case f you are using the 'Shortest variable/function names' method and your map does nott load correctly in wc3 then it is most likely it is a known blizzard-caused flaw causing issues, to fix it simply check the "Force uppercase names" option. If it doesn't solve the problem then it is an optimizer bug:

    Whenever you find a problem, please report them to Vexorian@gmail.com , 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 extra map script obfuscation. If the new map works, then the problem was caused by one of the obfuscation methods. In that case, Try with different combinations of obfuscation options, I recomend trying with all the obfuscation methods enabled excepting the last three which have the most chances of malfunctioning, the merge and anti bj methods are 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).

    2) In case it doesn't work even without the extra obfuscation 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.

    What to do if X trigger on the map doesn't work correctly in the optimized version, while it does in the original version?

    This is surelly caused by one of the obfuscation methods, in this case, I will really appreciate if you send me your map's script, and you tell me which is the trigger that malfunctions.

    The obfuscation methods that have more chances to cause this are 'AntiBJ' and 'Conditions' .

    If you are using any of the Not recommended methods then try unchecking them.

    If you are using the 'Remove useless code' or 'Conditions' methods then try enabling 'Safe IsUnitType'

    If you are using the 'Shortest variable/function names' method then try enabling 'Force uppercase names'

    What to do if the optimized map becomes BIGGER than original?

    Map size increasement, might be caused by various reasons:

    - WAVE sound files in the map, the optimizer's features compress them wrongly. I decided to do not fix this because WAVE sounds should be removed from the surface of earth and replaced by MP3, get LAME or another sound compressor to replace your WAVE sounds to the mp3 format. If you were replacing sounds in the game with other sounds and can't have .mp3 as extension of them, don't worry, it is safe to import mp3 files as wav files, the game is able to recognize them.

    - A bug in the obfuscation methods, I've never seen this, but in theory a bug in any of the obfuscation methods may cause the script to increase on size a lot, this is really unprobable though, just try the map without any extra obfuscation method, and see if the map's size is reducing now. In case you find it is caused by the obfuscation methods, please send Vexorian at wc3campaigns your map's script, I will really appreciate it,

    - The only option that you used was "Keep (Attributes)" , that's supposed to support the other options, using it alone is just a bad idea.

    I can't upload the optimizer to certain site

    If the map can be used correctly by warcraft III but can't be uploaded to a site, then it is a bug of that site and it is up to its admins to fix their upload scripts.

    Widgetizer

    Widgetizer is a tool by Pitzermike that basically converts the object data into slks and txts , this greatly improves loading time, but it also reduces the chances to get a better compression.

    When you use a map on widgetizer, it will actually reduce its size most of the times, but this is actually because widgetizer already uses the buffer size feature.

    Using the optimizer on a widgetized map, will reduce the map's size but not as much as it would reduce the size on a non widgetized map, just take that in mind.

    Also the 'Optimize Strings' will have no effect on a widgetized map, since widgetizer converts them to slks, and it already inlines the strings. But Remove Editor Suffixes will work.

    There might be problems with the final result when optimizing a widgetized map, in that case try unchecking "Optimize Strings", if it doesn't work I would need you to send me your original version of the map.

    There is also a Widgetizer problem caused by blizzard, the destructables become boxes some times, just uncheck [x] Destructables and [x] doodads when using widgetizer on a map, that should fix the problem.

    Another optimizer option that may cause problems with widgetizer maps is the clean slks options, in case you have troubles try unchecking it.

    Either way please send me the original version of your map so I can fix the bugs.

    Some tests

    This information may help you decide what combination is better for you:

    Tested Map : Vexorian Hero Arena 0.507 (not released yet)

    Map Size Loading Time 
    Original File

    1227 KB

    2 min 32.45 sec
    Map Optimizer

    655 KB

    2 min 17.24 sec
    Widgetizer

    1142 KB

    1 min 13.68 sec
    Widgetizer+Optimizer 

    888 KB

    1 min 11.25 sec

    Granted Widgetizer and Optimizer make a great synergy with a 339KB reduction and 81.2 less loading time seconds.

    One thing to note is the 233KB difference between the combined Widgetizer and Optimizer and the Optimizer alone, and the 1 minute 5 seconds difference in loading time. What is more important Map Size or loading time? If the map is for LAN or Single player, then you should just focus on loading time, but if the map is for bnet you should reconsider, since Bigger map size means bigger download time, certain maps may grow bigger than others depending on their object data, so you have to double check if the extra size isn't causing a download time increment bigger than the loading time reduction.

    Optimizer seems to decrease loading time a little after Widgetizer, but consider that the difference (2 seconds) is not meaningful and that it is in the Error range of the test. I used an external timer for that and because of lack of time I only did one test per version of the map. It should have sense that Map optimizer decreases loading time though, because of the Script optimizations.

    The loading time of my map seems to be big after both optimizations, it is because those optimizations are based on object data (both the strings optimization from the Optimizer and what the Widgetizer does) , my map has thousands of lines at map initialization to declare values of spell templates, horadric cube recipes and other stuff.

    Error Messages:


    - I/O Exception, unable to open file, and similars, The file you want to replace is currently opened by another program, or your disk is damaged.
    - Too Much lines on file : Certain obfuscation methods have a limit of JASS lines in the file, the actual value is 30000 lines, I don't think a map script with more lines than 30000 will ever appear, but in case your map script has more than 30000 lines, tell me so I can increase the value (thus making the program use more memory)
    - Merge Error: Function to merge never ends! : the map script, either because of the original file or may be the obfuscation methods made before, doesn't have its correspondant endfunction, If you are using a map script this shouldn't happen, in that case I'll ask you to send me your map script (just the script not the map) , to see what is happening.
    - Other error messages: Please report them.

    Final Notes:

    - You can associate map, and map script files with this program now, in case you want to associate string files with it too use the -wts argument before the %1
    - This is not a 'map protection' program, besides the fact that map protection and map unprotection are myths, This is a program which main objective is Map Optimizing and beating GUI reconstructors which are an awful aberration.
    - The program used to come with the source code, but not anymore, the reason is that I got tired to keep sorting out the source code files into rar files, it is kind of an annoyance after so many versions. And I don't think anybody actually found the code useful at all. IF you'd like source code request it by email.

    Credits and special thanks

    Program Author: Vexorian (Víctor Hugo Solíz Kúncar)
    Uses the wonderful SFMPQ.DLL Library by ShadowFlare

    Special thanks to:
    - Pitzermike and StarcraftFreak for the huge help they gave me about mpq manipulation.
    - BlackDick for helping so much.
    - AIAndy for keeping updating pjass which helps testing and finding bugs with the obfuscation methods.
    - Zoar for telling me about the fact that blizzard uses UTF8
    - PantoCrator, eScpy, Tyler Blank, ArcanisteR, Karukef, Archael, ShadowWolf, IceFrog, ShofetHaolam, Gotenkz, Hexenlord, Sud, adjack and many more for helping me find and fix bugs.
    - BlackDick (again), DJBnJack, PitzerMike (again), StonedStoopid, Ziutek and most specially Zepir for the War3 file specifications document.

    The Ultimate Packer for eXecutables :

    Copyright (c) 1996-2002 Markus Oberhumer & Laszlo Molnar
    http://upx.sourceforge.net

    In the future :


    - More Obfuscation methods will keep getting released.
    - Make Anti BJ also replace the functions that just swap the arguments' positions for functions that have 3 arguments, and for function return values.
    - Add an option to change the quality of the minimap image.
    - Options for campaign file optimizing will be added.

    Legal stuff

    I found out that you can copyright maps and files inside maps according to the EULA so some stuff about using this optimizer and licensed stuff:

    - I, vexorian grant any ownership of files modiffied by the optimizer like maps, their slks and their scripts to the original authors of them. In other words you can copyright stuff optimized by the optimizer, as long as it wasn't copyrighted before, in that case it is still the original owner's property as long as it doesn't have any modiffication clause, in that case using map optimizer is not allowed.

    Version History

    
     4.0 : 
     - 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.
    
     3.9d :
     - 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.
    
    
     3.9c :
     - 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.
     
     3.9b :
     - 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
    
     3.9 :
     - 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.
     
     
     3.8b:
     - 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.
    
     3.8 :
     - 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
       scripts.
    
    
     3.7 :
     - 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
    
    
    
     3.6 :
     - "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
       PolarProjectionBJ.
     - "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.
    
     3.5b:
     - 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
       that.
     - 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.
    
     3.5:
     - 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"
    
     3.4b :
     - Fixed a deadly bug: Remove "World Editor only files" was removing some data required in multiplayer!
     - html readme
    
     3.4 :
     - 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
       availability.
     - Changed the way 'Make world editor crash' works, it no longers turns the map into an infinite loop but it
       adds less space.
    
     3.3 :
     - 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.
    
     3.2 :
     - 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
    
     3.1 :
     - 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.
    
    
     3.0b :
     - Fixed the damned crash
    
     3.0 :
     - 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.
    
     2.9 :
     - 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.
    
     2.8 :
     - 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.
    
     2.7 :
     - 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.
    
     2.6 :
     - 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.
    
     2.5 :
     - 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.
    
     2.4 :
     - 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)
    
     2.3 :
     - 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.
    
     2.2 :
     - 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.
    
     2.1 :
     - 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.
    
     2.0 :
     - 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.
    
     1.9 :
     - 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.
    
     1.8 :
     - 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)
    
     1.7 :
     - 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.
    
     1.6 :
     - 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.
    
     1.5 :
     - 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.
    
     1.1 :
     - 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.
    
     0.9 :
     - 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.
    
     0.3 :
     - 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.
    
     0.2 :
     - 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)