1. The results for Texturing Contest #28 are out! Step by to congratulate our winners!
    Dismiss Notice
  2. Join us in our custom games night on Saturday, July 14. If you'd like to create a map for the night, check out the map challenge!
    Dismiss Notice
  3. Join in on Icon Contest #17 and show your interpretation of a legendary equipment set!
    Dismiss Notice
  4. We've created the Staff Job Openings thread. We're currently in need of icon, video production, and social/multimedia positions to be filled. Thank you!
    Dismiss Notice
  5. Music Contest #10 Retro is out! Join us for some retro/vintage fun!
    Dismiss Notice
  6. Don't be stagnant - embrace change! The time has come to evolve and join the Techtree Contest #12 - Evolution.
    Dismiss Notice
  7. On May 20th a new law about privacy and data processing comes into work in the EU. I am no lawyer and I need help figuring out if we comply and if not, what we must do about it. Please message me if you can provide any assistance. Read more. Ralle
    Dismiss Notice

[MemoryHacks] NewGen Integration

Discussion in 'The Lab' started by TriggerHappy, Nov 19, 2016.

  1. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,342
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    This thread contains a download of Jass NewGen Pack with support for the API @DracoL1ch recently posted. The API allows for basically unlimited possibilities in modding, without the need for 3rd party tools, and should work on Battle.net.

    Memory Hack API (description)
    Memory hack

    Previously you had to manually edit your maps script, but now with this package you can make use of the API from within the editor, and while using vJass. For now, I attached a basic demo map. Later I'll improve on it. You can run the demo straight from your normal Warcraft III installation, or you can open it in the JNGP I provided below.

    Download Jass NewGen Pack

    The core of this package is a preprocessor which modifies your maps script and add the required code to use the API.

    Source Code: GitHub - triggerhappy187/MemoryAPI-Installer
     

    Attached Files:

    Last edited: Nov 30, 2016
  2. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    9,993
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    Never clicked a thread so fast.
    Downloading right away.


    edit: both attachments are broken. Are they private or something?
     
  3. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,342
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    I might have been editing the thread. They both work for me.
     
  4. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    9,993
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    Yup they work now.
    When I try to save your demo map I get the following error though:
    img
    [​IMG]


    Yes, I am running the JNGP you provided.
     
  5. DracoL1ch

    DracoL1ch

    Joined:
    Dec 12, 2010
    Messages:
    1,568
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    great job
    whole library barely useful normally, since it contains way too much weight from unused (by rest) APIs like http or blp-basis.
    @karaulov still up to provide restore-only sublib :D
     
  6. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,342
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Did you "Enable JASS Memory Hacks" from the Extensions tab? I will make it the default option next time.

    I was going to clean up the API, since like ytou said it's very bloated. Unless you're planning on doing that yourself.

    BTW many things don't work for me (like you mentioned http), but mainly GetCurrentMapDir is what I need for File IO without admin rights (local folder).
     
  7. DracoL1ch

    DracoL1ch

    Joined:
    Dec 12, 2010
    Messages:
    1,568
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    'cause it requires DLL, as can be seen from it's code
     
  8. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    9,993
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    Oh. Yeah it works if I enable it.
    I also suggest adding all the new functions to the function list.

    edit: what does function GetMouseEnv do?
     
    Last edited: Nov 19, 2016
  9. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,342
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Update
    • Significantly reduced package filesize.
    • Added logging to the script installer.
    • Memory hacks enabled by default.
    • Removed Cohadars JH options from the menu.
    • Reorganized the MemoryHacks folder and now has less clutter.
     
  10. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,353
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Praise the lord.
     
  11. Trigger.edge

    Trigger.edge

    Joined:
    Jun 21, 2012
    Messages:
    424
    Resources:
    0
    Resources:
    0
    You could upload the tool files, for manually installation?
     
  12. Emm-A-

    Emm-A-

    Joined:
    Jul 1, 2008
    Messages:
    1,314
    Resources:
    0
    Resources:
    0
    this is really great, bu just to clarify, these are the kind of hacks that we are not sure, if they will survive the next patch, right?
     
  13. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    9,993
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    Might as well enjoy it for a dozen years or so before that gets released.
     
  14. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,342
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    The source code is linked in the first post and the executable is located at "JNGP/MemoryHack/installhack.exe".

    installhack.exe map.w3x

    I'll have more detailed instructions later. You can look at how I do it in wehack.lua.

    Correct.
     
  15. DracoL1ch

    DracoL1ch

    Joined:
    Dec 12, 2010
    Messages:
    1,568
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    like something forces you to update.. oh wait, there's no reason at all
     
  16. Trigger.edge

    Trigger.edge

    Joined:
    Jun 21, 2012
    Messages:
    424
    Resources:
    0
    Resources:
    0
    Hey Trigger.

    Does not seem to work at 100%.

    The code that goes in the header is integrated correctly, but the rest as main.j does not work for me:

    [​IMG]

    And also the script file is very large, has many spaces between lines:

    [​IMG]

    I was thinking that the source code of JassHelper its free, it would be better if it were adapted to work with MemoryHack?, in my opinion...
     

    Attached Files:

    • 1.png
      1.png
      File size:
      44 KB
      Views:
      630
    • 2.png
      2.png
      File size:
      70.1 KB
      Views:
      612
  17. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,342
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Redownload the package. It got removed from THW and I accidentally uploaded a broken one.

    and I think it's better as a seperate tool. It's unrelated to JassHelper.

    The many spaces are also caused by JassHelper, not my program.
     
  18. Trigger.edge

    Trigger.edge

    Joined:
    Jun 21, 2012
    Messages:
    424
    Resources:
    0
    Resources:
    0
    Okay I will test it.

    But if I disable "Enable Jass MH" the compiled script does not have so many spaces between lines!

    EDIT:

    The new package gives me an error:

    [​IMG]

    If I disable the library, later a similar error appears again, something like:
    set u=GetTriggerUnit() call SomeFunction()
    in same line.
     

    Attached Files:

    • test.png
      test.png
      File size:
      34.9 KB
      Views:
      629
    Last edited: Nov 21, 2016
  19. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,342
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Update
    • Fixed a bug where multiple redundant newlines could be added to the map script.
    • Removed many of the useless or unused functions and globals from the API.
    • Renamed global variables that could easily conflict with others.

    Yeah sorry my program added some newlines that can't be seen in some editors, but it fixed an issue I had.

    It's fixed now, though JassHelper does the same thing so it will still happen somewhat.

    Can I see your map or your war3map.j?

    Also try the newest update.
     
  20. Kakerate

    Kakerate

    Joined:
    Oct 18, 2013
    Messages:
    437
    Resources:
    0
    Resources:
    0
    on my Win7 computer, JASSHelper popups from Compile Errors freeze WorldEdit