How to make trainer for that game

Discussion in 'Computer Programming, Emulation, and Game Modding' started by Gagarin, Jan 2, 2012.

Jan 2, 2012
  1. Gagarin
    OP

    Member Gagarin GBAtemp Advanced Fan

    Joined:
    Oct 11, 2007
    Messages:
    938
    Location:
    USA
    Country:
    United States
  2. Tom Bombadildo

    Contributor Tom Bombadildo Honk!

    pip
    Joined:
    Jul 11, 2009
    Messages:
    8,771
    Location:
    I forgot
    Country:
    United States
    SURE, BY NOT BEING A BITCH AND BEATING IT USING SKILL.


    But really I'm not...100% sure. All most trainers do is just edit values in game right? So...hex editor maybe? Find the values you want to change and change them? You probably shouldn't trust my answer for this, as it is from an assumed thought and not fact...
     
  3. marcus134

    Member marcus134 GBAtemp Advanced Fan

    Joined:
    May 7, 2011
    Messages:
    584
    Location:
    Québec
    Country:
    Canada
    you can use cheat engine, it comes with a nice little tutorial on how to change value in programs/games
     
    shakirmoledina likes this.
  4. coolness

    Banned coolness PSN: Dutch_DarkLord

    Joined:
    Jun 14, 2009
    Messages:
    2,016
    Location:
    Rotterdam Bitches!!
    Country:
    Netherlands
    try using a source that may have the same controls and build the trainer with visual basic
     
  5. Gagarin
    OP

    Member Gagarin GBAtemp Advanced Fan

    Joined:
    Oct 11, 2007
    Messages:
    938
    Location:
    USA
    Country:
    United States
    I tried Cheat Engine, but since game has no Pause I don't know how to edit its values.
     
  6. Rydian

    Member Rydian Resident Furvert™

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
    Could only manage to get score and lives... might be able to get save times, but too lazy to keep playing to find that value. The other values (such as powerup state) don't really seem to be kept the same way.

    http://www.mediafire.com/?25yiqax2yja1x2b
     
  7. Zetta_x

    Member Zetta_x The Insane Statistician

    Joined:
    Mar 4, 2010
    Messages:
    1,844
    Country:
    United States

    I'm guessing scores were a multiple of some number (IE the score 290 was not seen by 290 in the game?)

    Is there an invincibility timer after you get hit? That's also a perfect value to find.
    Levels would be another thing
    The Powerup state will be complicated because of the different combinations you can have, but an assumption that the value increases when you have a powerup and decreases when you have none may help.
    The location in the level may also be a good value to find
    X-Y positions are fun too

    But I have had bad luck with cheat engine
     
  8. Rydian

    Member Rydian Resident Furvert™

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
    Scores and lives were stored normally, there's no invincibility (one-hit kill game), attack levels didn't seem to be stored as normal integers (neither the powerups collected to increase the level or the level itself), didn't find much use on the coordinates since shit to kill you can exist anywhere. XD
     
  9. Zetta_x

    Member Zetta_x The Insane Statistician

    Joined:
    Mar 4, 2010
    Messages:
    1,844
    Country:
    United States
    Ahh, I'm used to 8bit NES games where theoretically scores that high were impossible so it was stored across multiple addresses or they just added a 0 or so to the actual value =P
     
  10. Gagarin
    OP

    Member Gagarin GBAtemp Advanced Fan

    Joined:
    Oct 11, 2007
    Messages:
    938
    Location:
    USA
    Country:
    United States
    Thanx a lot Rydian, anyone knows how to make it invincible?
     
  11. Zetta_x

    Member Zetta_x The Insane Statistician

    Joined:
    Mar 4, 2010
    Messages:
    1,844
    Country:
    United States
    Usually invincibility comes from ingame functions. The only way I can see it done here is to force the game kill collision detection.

    Of course it may be impossible to destroy things =P
     
  12. Rydian

    Member Rydian Resident Furvert™

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
    There is temporary invincibility only after losing your sheild, but that's a rare powerup to get in the first place and my attempts to find/lock the value (either the shield or the resulting invincibility timer) have gone empty.

    It's weird, the health and lives are low static addresses, but none of the other values seem to be.
     
  13. Zetta_x

    Member Zetta_x The Insane Statistician

    Joined:
    Mar 4, 2010
    Messages:
    1,844
    Country:
    United States
    Heh, That's retarded. Got to find those pointers lol
     
  14. Rydian

    Member Rydian Resident Furvert™

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
    The issue is not that the addresses change, it's that I can't find them in the first place.
     
  15. Mazor

    Member Mazor Z80 master arch

    Joined:
    Feb 14, 2008
    Messages:
    547
    Country:
    Sweden
    Here's a small trainer I made for you. Invincibility sounded extremely pointless so I didn't go for that, instead I made it so the trainer sets your life count to a high number and overwrites the instruction that decrements the life count. So the result is that there won't be any game overs ever, but you will still die if you get hit.

    I GPL'd it, so it includes the extremely well documented source code. Adding more stuff is as easy as adding two lines; one at the top of hax.c for the buffer to inject and one in hax_process() function in hax.c for the WriteProcessMemory() to inject it (as demonstrated in hax.c).

    EDIT: Screenshot of the haxbeauty, I love the maximize button:
    [​IMG]
     
  16. Rydian

    Member Rydian Resident Furvert™

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
    Wordwrap fails your secret define.
    inb4 "word wrap in a code editor: BLSPHEMY"
    Also agreed on smash bros.

    Any clues/info on the powerup levels? I really wanna' know WTF's going on in those. I even tried watching the RAM around the lives and score addresses assuming they'd be at least somewhat close to those, but nope.
     
  17. Mazor

    Member Mazor Z80 master arch

    Joined:
    Feb 14, 2008
    Messages:
    547
    Country:
    Sweden
    Interestingly I wrote this in vim which also wraps lines.

    I didn't actually play the game past the first 30 seconds so I don't know about powerups.
     
  18. Rydian

    Member Rydian Resident Furvert™

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
    I made it to the map stage and starting the second level... didn't really care past that since I kept restarting to try to find those values.
     
  19. Gagarin
    OP

    Member Gagarin GBAtemp Advanced Fan

    Joined:
    Oct 11, 2007
    Messages:
    938
    Location:
    USA
    Country:
    United States
    Sorry for resurrecting that thread:
    There is a new version of that game (1.1), and there is a save option now (in level select).
    I learned that you can key_config.ini with that line:
    Code:
    [achievement]
    iamatruehero=yesyouare
    
    And you will get a shield for one life, however I can not find its value for Cheat Engine to make it permanent.
    Also, I don't know how to find values for weapon upgrades.
    Anybody? Game is awesome.
     
  20. Rydian

    Member Rydian Resident Furvert™

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
    Well, I got the temporary invincibility timer value...

    [​IMG]

    ...from the invincibility special weapon, which means you need that weapon, it starts upon activation, and doesn't last past changing a room/screen/level. I could probably get the invincibility timer for shield loss too, but the issue there is still that you need a shield in the first place, so it's about as useful as this one.

    So I used a long-ass search (all types and relative over a few games) to narrow down the addresses that changed when you gained or lost a shield... and there's a lot, so I decided to check which line of code modified them. The majority were modified by this.

    [​IMG]

    Which... turns out to be the script update function for Game Maker games (older versions before it stopped being an interpreter and started actually compiling the scripts). That explains a lot about why I wasn't able to do this.

    Outside of the few built-in values that are normal ints (health, score, and lives IIRC), everything else is custom and handled with floating-point stuff and changed with the script update function. And that's way too complicated for me, I've never been able to modify something like this. From what I've read, most people just take the scripts out of GM games and modify them since it's way easier, but Idunno' how that would be done... found this.

    No clue if it'll rebuild properly and all that jazz, way too lazy to actually install Game Maker.
     

Share This Page