The International Simutrans Forum


Author Topic: Simutrans Trainer  (Read 4745 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
Simutrans Trainer
« on: October 13, 2009, 06:00:21 AM »
I am trying to make a simutrans trainer.
Ie so you can control how much money etc you have during the game.
Can someone tell me where the memory address is for the money?
is this value even stored in the ram?
Thanks, Jack

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4711
  • Languages: EN, DE, AT
Re: Simutrans Trainer
« Reply #1 on: October 13, 2009, 07:32:46 AM »
Just use freeplay mode.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Simutrans Trainer
« Reply #2 on: October 13, 2009, 07:47:35 AM »
I am afraid this is technically unfeasible. In short, there is no "memory address of money in Simutrans", you have to append "revision ABCD compiled with XYZ". Simutrans itself is an ongoing project (perhaps better said never ending). Code is being changed all the time and people compile it in at least two vastly different environments (mingw & msvc++). It would be shooting a moving target at best.

If you want such functionality, perhaps it might be a better idea to actually extend the game itself.

Plus, as Dwachs notes, there is already something similar. Beginner and Freeplay modes. Starting money can be also set...

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
Re: Simutrans Trainer
« Reply #3 on: October 13, 2009, 10:20:01 AM »
Most trainers scan through memory to try and find values which are the same as the current value in the game, this is because the games you usually use them on are closed source so a more direct method of modifying the amount of money you have isn't possible.

Given that Simutrans is open source you could easily (or at least more easily than writing another application to scan memory locations) add a button to give yourself more money, rendering a trainer pointless. Even easier, compile a vehicle with a negative cost, then buy a bunch of them in-game. You'll make money quickly that way.

Or, as others have said, play with -freeplay turned on so that money doesn't matter, or set the starting money to a very high number.