Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

W3Protect - Jass and Lua map optimizer

Discussion in 'Warcraft Editing Tools' started by Frotty, Sep 26, 2019.

  1. BLOKKADE

    BLOKKADE

    Joined:
    May 18, 2018
    Messages:
    21
    Resources:
    0
    Resources:
    0
    The 0.6.0 version works great on my map, haven't found any issues after play-testing a few times! It also reduces the filesize the most out of all the tools I've tried. Thank you!
     
  2. deutonight

    deutonight

    Joined:
    Feb 1, 2020
    Messages:
    1
    Resources:
    0
    Resources:
    0
    I'm having problem after protecting my map since my map contains characters other than English. I messed with some settings and found out it was caused by the feature "Inline Trigger Strings". It seems when running with this feature checked, the encoding will mess up the texts in triggers. Other than that, it is working fine :)
     
  3. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,479
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    If you send me the map I can take a look
     
  4. BradPittlord

    BradPittlord

    Joined:
    Apr 1, 2019
    Messages:
    119
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Hey trying to protect my map it just gets stuck on Parsing Script forever, I gave it 2 hours two times with Extreme Compression and Without.
    My map
    -v1.31
    -45,214 lines of code
    -Lua
    -25mb loads of Imports, models, Icons, wav, Mp3, textures
     
  5. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,479
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    Attach/send map. That info alone doesn't really help too much, but thanks for the report.
    You can also run from console to see further output. It won#t ever take more than ~5 minutes so no need to wait that long.
     
  6. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,479
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    Uploaded 0.6.1 to first pos.

    @BradPittlord I fixed a bug and updated luamin dependencies - w3p succeeds on your map now, but I couldn't test whether the map still runs correctly.
    Please retry with 0.6.1 and let me know.
     
  7. BradPittlord

    BradPittlord

    Joined:
    Apr 1, 2019
    Messages:
    119
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Thanks,
    I'm trying it and it still just does Parsing Script forever v0.6.1
     
  8. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,479
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    What options are you using? I just tested with the uploaded version and only "minify lua" and it 100% works.
     
  9. BradPittlord

    BradPittlord

    Joined:
    Apr 1, 2019
    Messages:
    119
    Resources:
    1
    Maps:
    1
    Resources:
    1
    -with/without extreme compression
    -remove world editor data
    -inline trigger strings
    -Minify Lua

    Edit, if I use "Inline Trigger Strings" it gets stuck on Parsing Script. Everything Else works

    Using only "Minify Lua" I can open in the editor but in map lobby when I select it I get the error "There was an error reading the map file"
     
    Last edited: Feb 4, 2020
  10. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,479
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    I see, the "Inline Trigger Strings" option is probably screwing up the lua code.
    If only "minify lua" doesn't load, it must mean that it makes the map code invalid for some reason. Will have to further investigate this.
     
  11. JaysProjex

    JaysProjex

    Joined:
    Mar 17, 2007
    Messages:
    418
    Resources:
    4
    Maps:
    4
    Resources:
    4
    I couldn't extract the .jar file because the operation would break everytime (even tried open with) so I had someone send me the .jar file which worked fine.
     
  12. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,479
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    If you can't extract a .zip archive I'm not sure how to help you :/
     
  13. JaysProjex

    JaysProjex

    Joined:
    Mar 17, 2007
    Messages:
    418
    Resources:
    4
    Maps:
    4
    Resources:
    4
    Thanks for trying to understand my issue.
     
  14. Hannibal

    Hannibal

    Joined:
    Apr 25, 2013
    Messages:
    37
    Resources:
    0
    Resources:
    0
    I'm having the same problem champ.

    If I hit Try Again it just repeats, if I hit skip I get an empty folder. I am looking forward to trying out the program though.

    *Solved*: Had to download 7zip to unzip the file. The Windows Extract All when you right click wont work.
     
    Last edited: Mar 15, 2020
  15. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,479
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    Looks like windows doesn't support the .zip format properly then :/ I never expected ppl to use that tbh.
    Thanks for the report tho, it works with other tools (winrar, unzip) which I tried, so I will probably pack it differently in the future.
     
  16. Planetary

    Planetary

    Joined:
    Feb 7, 2020
    Messages:
    291
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    I get the same issue with minify/inline but the rest seems to work. Didn't think I'd find a tool that actually works with Lua maps!
    +rep to author
     
  17. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,479
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    Thanks. I only tested an empty map and that worked fine iirc.
    So send me the map or provide more detailed info on what's wrong in the lua file, an I can attempt fixing it.
     
  18. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    255
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Same I had to use 7zip to extract, windows kept failing.

    After the recent wc3 update the old wc3 optimizer i use now increases map file size by 20,000% from a 5mb file to a 1gb file.

    --This protector seems to get stuck on Parsing Script...
    it could be because my map has a ridiculous amount of GUI code (the entire game minus like one or two small ability scripts are GUI)
    Using Extreme Compression, Optimize Code, Obfuscate Script, remove world editor data and inline trigger strings, turned off lua minify as with almost no lua in my game theres no reason to do anything to it.

    The old protector would give me a w3x.j file that would contain all gui code, it was 46 thousand lines.

    Disabling obfuscate script still seems to get stuck on parsing, really hard to tell if its actually working on it or frozen.
     
    Last edited: Apr 29, 2020
  19. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,793
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    If your maps scripting mode is set to Lua have you have a ton of GUI code, then you also have a ton of Lua as GUI is compiled to whatever scripting language you have set.

    If you are talking about Vexorian's map optimizer then with the right settings it should work.
     
  20. lolreported

    lolreported

    Joined:
    Aug 16, 2007
    Messages:
    841
    Resources:
    13
    Tools:
    1
    Maps:
    6
    Spells:
    6
    Resources:
    13
    Hey, I've found an issue with this tool.

    The following code will result in "Code has Errors!" when protecting the map.
    Code
    Code (vJASS):

    function b takes string s returns nothing
      call ExecuteFunc(s)
    endfunction

    function a takes nothing returns nothing
        call b("string argument to use with ExecuteFunc doesn't work")
    endfunction
     

    Would a fix be possible?

    Thanks.
     
    Last edited: May 1, 2020