Simple Cheat Code Loader

Discussion in 'Wii U - Hacking & Backup Loaders' started by Onion_Knight, Sep 8, 2015.

  1. Onion_Knight
    OP

    Onion_Knight GBAtemp Advanced Fan

    Member
    878
    832
    Feb 6, 2014
    I threw this up in the Post your cheat codes thread, but I fixed a couple bugs. Anyway,

    ***CHANGE LOG***
    Added a simple check to ensure to ignore cheats or recheats file that has codes in it. This way it won't error out on zero length lists.
    Added some simple error detection and provided some level of feedback on the activity.
    Revised parsing logic to use Regular Expresions.
    Parses Pointer Codes with Offsets See below for examples of offsets.

    *****************************************************************************************************
    Make sure you change the WiiU IP Address in Line: 4
    ******************************************************************************************************

    This is a simple Cheat Code Loader. Just unzip and install in the PyGecko folder. Run the Kernel exploit and PyGecko Code Handler on the Wii U. Once you've loaded your game and your cheats are in the files you want. Just double click "cheats.py".

    If you are using someone's hosted kernel exploit and tcpgecko handler, than you will still need to download pyGecko from the github. Its at: https://github.com/wiiudev/pyGecko Download the zip folder and install wherever you want, unzip the file I attached into that folder. You will also need at Python 2.7 installed. To run it, connect to the hosted site, run the kernel exploit, the tcpgecko installer and than go to the main menu and launch your game. Once you've launched the game, you can double click cheat.py and it will auto auto connect, grab the codes in cheat.txt, and recheat.txt and load the codes into memory.


    This has to have files included, "cheats.txt" and "recheats.txt". This codes stored in cheats.txt are one time run only required, such as infinite lives for Mario 3d World, which uses a pointer code. The codes stored in recheats.txt are ones that you want to keep constant. Example in the recheat is for Mario 3d World, sets the time to not reduce and autoloads a P-Leaf in your 2nd container.

    To be clear, any line in cheats or recheats.txt thats with a # is a comment and is ignored by the script. Any code you want to run is must be in this example:

    Examples Codes:

    This is a simple address/value code. Just adjust the value at this address:
    Code:
    378D6AD4 0000FFFF
    

    This is a simple Pointer address/value code. It resolves the address in the brackets and uses that as the address/value
    Code:
    [378D3738] 0000FFFF
    
    This is a complex Pointer address/value code. It will resolve the address in the brackets and than adds the hex value to it. This code is where the adjustment is a value that is part of a structure.
    Code:
    [2E341062 + 34] 0000FFFF
       or:
    [2E341062] + 34 0000FFFF
    
    This is a complex Pointer in Pointer address/value code.It resolves the address in the brackets, and adds the Modifier to it. It than it resolves that Pointer code and than subtracts the offset. It uses the result of that expression as the address/value
    Code:
    [[1158342B + 34] - 6F] 0000FFFF
    

    Any code that is in the format of [xxxxxxxx] is a pointer code. It is recursive dereference as many pointers as necessary.




    I don't know if anyone finds it useful, but if you do, credits belong to others. This is mostly a wrapper for some functions already in pygecko, with some simple file parsing.

    Marionumber1
    NWPlayer123
    Mathew_Wi
    CosmoCourtney
    Cyan
     

    Attached Files:

    Last edited by Onion_Knight, Sep 30, 2015


  2. BENETNATH

    BENETNATH Advanced Member

    Newcomer
    67
    36
    Nov 21, 2014
    France
    good, so the recheat is constantly modifying the same value again and again ?
    do you have the possibility to modify the time interval ?
     
  3. Onion_Knight
    OP

    Onion_Knight GBAtemp Advanced Fan

    Member
    878
    832
    Feb 6, 2014
    Its relatively simple to do, depending on your time delay. If your looking for less than a second delay, than your fine with what is here.
     
    eco95 and BENETNATH like this.
  4. Skeet1983

    Skeet1983 GBAtemp Addict

    Member
    2,666
    185
    Apr 22, 2012
    United States
    Somewhere, out there...
    What is difference between TCPGecko and PyGecko? Also, how do I setup PyGecko? I am new to Wii U hacking...
     
  5. Reecey

    Reecey Mario 64 (favorite game of all time)

    Member
    4,339
    1,121
    Mar 7, 2010
    At Home :)
    So if I wanted max health in Zelda Wind Waker I would change what? or do I just copy & paste the code in anywhere in the .txt file and then click on python/cheat:-

    # Example
    # Offset Pointer Addr Addr Value
    # 378D3738 [378D6A38] -> 378D6A38 0000ffff

    #Super Mario 3D World

    #Infinite Lives
    #[378D3738] 0000ffff
    #Change time to 999
    378D6AD4 0000FFFF
    378D6B9C 00000006

    ZWW Max Life addr.> 15073BC3 00000050

    Is it not just easier to use Gecko instead? could do with a bit more explaining in OP for people that are not sure ;)
     
    Last edited by Reecey, Sep 8, 2015
  6. Onion_Knight
    OP

    Onion_Knight GBAtemp Advanced Fan

    Member
    878
    832
    Feb 6, 2014
    #comment out the Mario codes or delete them. I'm assuming this is not a pointer value. If you want it to keep your hearts at a constant value. Add the code
    15073bc3 00000050
    To the recheats.txt
     
    eco95 and Reecey like this.
  7. Reecey

    Reecey Mario 64 (favorite game of all time)

    Member
    4,339
    1,121
    Mar 7, 2010
    At Home :)
    so I just delete all that and add the code with a # and that's it, just then click on python/cheat or do you have to write all the #Mario/offset pointer addr. stuff as well?
     
  8. Onion_Knight
    OP

    Onion_Knight GBAtemp Advanced Fan

    Member
    878
    832
    Feb 6, 2014
    Anything with a # is treated as a comment. Codes you want run should have no comment
     
    eco95 likes this.
  9. Reecey

    Reecey Mario 64 (favorite game of all time)

    Member
    4,339
    1,121
    Mar 7, 2010
    At Home :)
    So you have no # with the code or not? is getting a tad confusing. Just put the code in> 15073BC3 00000050 and that's it, nothing else.
     
  10. Onion_Knight
    OP

    Onion_Knight GBAtemp Advanced Fan

    Member
    878
    832
    Feb 6, 2014
    Simply delete everything in recheats except your code. The # just lets the script know it should ignore the line
     
    eco95 and Reecey like this.
  11. Reecey

    Reecey Mario 64 (favorite game of all time)

    Member
    4,339
    1,121
    Mar 7, 2010
    At Home :)
    OK, cool thanks. Maybe you should just update the OP, just to make things clear on the .txt files bit :)
     
  12. Onion_Knight
    OP

    Onion_Knight GBAtemp Advanced Fan

    Member
    878
    832
    Feb 6, 2014
    I will later, on my phone at the moment.

    You will also want remove anything from the cheats so those codes aren't run
     
    eco95 likes this.
  13. Reecey

    Reecey Mario 64 (favorite game of all time)

    Member
    4,339
    1,121
    Mar 7, 2010
    At Home :)
    Sorry don't want to come across annoying or nothing keep asking but would this be ok then for SM3DW for recheats in the txt file:-
    378D6AD4 0000FFFF
    378D7E04 0000FFFF
    378D6B9C 00000002

    That's all I would write and then click on the cheat?
     
  14. Onion_Knight
    OP

    Onion_Knight GBAtemp Advanced Fan

    Member
    878
    832
    Feb 6, 2014
    what codes are those?
    I recognize the Secondary modifier to always have a bell. The second looks like infinite lives
    for the second profile. Is the first the unlimited time?
     
    eco95 likes this.
  15. Reecey

    Reecey Mario 64 (favorite game of all time)

    Member
    4,339
    1,121
    Mar 7, 2010
    At Home :)
    I didn't want to write next to them in case you got confused and then said no you write nothing next to the codes in the txt file.

    Last one bell, first one 999, middle one infinite lives.
     
  16. Onion_Knight
    OP

    Onion_Knight GBAtemp Advanced Fan

    Member
    878
    832
    Feb 6, 2014
    Don't use the infinite life one. The code in cheats.txt is a pointer code for all save profiles that will give you unlimited lives in any profile and is only needed to run once. It gets saved into your profile and survives reboits
     
    eco95 likes this.
  17. Reecey

    Reecey Mario 64 (favorite game of all time)

    Member
    4,339
    1,121
    Mar 7, 2010
    At Home :)
    I'm lost dude, serious. Its ok I will wait for you to update.

    I think I may have it> you don't want to put infinite lives into recheats cause that only needs booting once so say for example put 999 into recheats so the counter keeps resetting?, is that about correct?
     
  18. Onion_Knight
    OP

    Onion_Knight GBAtemp Advanced Fan

    Member
    878
    832
    Feb 6, 2014
    Right, it's not necessary. You can do it, but you don't have to.
    Once your codes in cheat and recheats are aet the way you want your good to go.
     
    eco95 and Reecey like this.
  19. Skeet1983

    Skeet1983 GBAtemp Addict

    Member
    2,666
    185
    Apr 22, 2012
    United States
    Somewhere, out there...
    Can someone explain how to do this and use PyGecko?
     
  20. Onion_Knight
    OP

    Onion_Knight GBAtemp Advanced Fan

    Member
    878
    832
    Feb 6, 2014

    If you have built and are hosting the Wii U Kernel Exploit at home, and are using TCPGecko, you already have the files you need. Just unzip the file in your pyGecko directory as it uses tcpgecko.py.

    If you are using someone's hosted kernel exploit and tcpgecko handler, than you will still need to download pyGecko from the github. Its at: https://github.com/wiiudev/pyGecko Download the zip folder and install wherever you want, unzip the file I attached into that folder. You will also need at Python 2.7 installed. To run it, connect to the hosted site, run the kernel exploit, the tcpgecko installer and than go to the main menu and launch your game. Once you've launched the game, you can double click cheat.py and it will auto auto connect, grab the codes in cheat.txt, and recheat.txt and load the codes into memory.
     
    eco95 and Magnus Hydra like this.