1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Campaign Optimizier?

Discussion in 'Warcraft Editing Tools' started by Soul Reaver, Aug 8, 2011.

  1. Soul Reaver

    Soul Reaver

    Joined:
    Jul 15, 2005
    Messages:
    334
    Resources:
    8
    Maps:
    8
    Resources:
    8
    As you probably know, Vexorian made an awesome map optimizer program that compressed imported blp files, cleaned up code, got rid of WE-only data and generally saved a lot of space.

    However, as far as I can see it doesn't seem to support .w3n (ie, campaign) files.

    Is there any program that does a similar thing for campaign files?
     
  2. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,805
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Yes, vexorian's optimizer should work fine on the maps inside the campaign file.

    1. Export map.
    2. Optimize map (remember to leave in all editor files so you can still open it in the editor).
    3. Import optimized map back into campaign.

    Or atleast it should work in theory. Unless WC3 resaves the map when it gets imported.

    You can later use a .mpq editor (or any program that can edit campaigns) to remove the editor only files from it to save more space.

    The important part of vexorian's optimize for campaigns is the script optimization as that boosts the perfromacne of the jass interpreter. All the file space optimizations and protection are irrilivent.
     
  3. Soul Reaver

    Soul Reaver

    Joined:
    Jul 15, 2005
    Messages:
    334
    Resources:
    8
    Maps:
    8
    Resources:
    8
    I was actually hoping for an optimizer that would work on the w3n file itself so that it would help optimize the files imported there, but from your post and my own research it looks like that doesn't exist.

    However, it's good to know that the individual map files can be optimized and still function, since that gives me the performance boost from optimization (even if it doesn't cut down the overall w3n file size quite as much as I was hoping for).

    So thanks for the useful info, I appreciate it.
     
  4. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,121
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Keep in mind, if you use "shorten names" the optimizer kills native declarations -
    natives like "UnitAlive" are common in vJass scripts.

    "Shorten names" also kills ExecuteFunc and TriggerRegisterVariableEvent. It's pretty
    bad.
     
  5. Aeroblyctos

    Aeroblyctos

    Joined:
    Aug 14, 2006
    Messages:
    6,597
    Resources:
    24
    Models:
    1
    Packs:
    1
    Maps:
    22
    Resources:
    24
    That would be a dream come true for many map makers if someone would create a program like that.

    It's pure nightmare for my project to export and then import 10 to 20 maps and optimize them all for every single version(and I won't do that for obvious reasons).

    (The optimizer would shorten the loading time for The Chosen Ones probably a lot as it's so huge already)
     
  6. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,805
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    I have seen evidence proving the contary. It will ignore optimizing such string unless they are created via concatination (hard to predict at save time).
     
  7. Aeroblyctos

    Aeroblyctos

    Joined:
    Aug 14, 2006
    Messages:
    6,597
    Resources:
    24
    Models:
    1
    Packs:
    1
    Maps:
    22
    Resources:
    24
    Well you can't use vJASS in campaigns anyway?
     
  8. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,805
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    You can... Atleast when I tried.

    Ofcourse, its not easy to do (needs a lot of importing and exporting maps) but still is possible.
     
  9. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,121
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    I tested this last weekend with the optimizer and it shortened my global name but the string passed into TriggerRegisterVariableEvent still had the udg_ prefix and its variable name. I did not test this with ExecuteFunc.
     
  10. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    An optimizer for campaigns will be nice... but adding full vJASS support to campaign maps will be really cool (as current methods for applying vJASS on campaigns is pretty much a lot of work...)
     
  11. Aeroblyctos

    Aeroblyctos

    Joined:
    Aug 14, 2006
    Messages:
    6,597
    Resources:
    24
    Models:
    1
    Packs:
    1
    Maps:
    22
    Resources:
    24
    And now we must search a person who could actually make a program like that.

    Any volunteers?
     
  12. busterkomo

    busterkomo

    Joined:
    Jun 17, 2007
    Messages:
    1,423
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    And the optimizer is more useful than any vJASS script, so oh well.
     
  13. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,121
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Then throw out the native and maybe even ExecuteFunc but the variable event in GUI
    is an irreplaceable thing.

    Just don't use "shorten names" and everything is fine.
     
  14. Shadow Daemon

    Shadow Daemon

    Joined:
    Nov 23, 2008
    Messages:
    184
    Resources:
    3
    Tools:
    3
    Resources:
    3
    There's a plug-in for JNGP that allows to compile campaign maps within editor. It's called ScExp. I could submit it here.

    It's not a problem to write a program, which extracts and processes maps through Vexo's tool, since it supports command line. The bad thing is in lacking flexibility of command line arguments.
    Also, in specific cases "Clean BLPs" option in map optimizer increases file size.
     
  15. Aeroblyctos

    Aeroblyctos

    Joined:
    Aug 14, 2006
    Messages:
    6,597
    Resources:
    24
    Models:
    1
    Packs:
    1
    Maps:
    22
    Resources:
    24
    I'm probably soon going to make a request someone could really make such a program. It would be gigantic help for my project but as well as for other projects.

    People have blamed about how slow the project I'm making loads. I've tried my best to make things more faster but it isn't enough: I need that program.
     
  16. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    It's "Compress Names" not shorten names Bribe :D