Page 1 of 1

Refreshing a value

Posted: Fri Oct 07, 2022 10:31 pm
by Traziks
Hi, I am trying to mass upgrade something in a single-player game and the cost to upgrade is 2.15B (capped) and the max money you can have is 4.29B- conveniently not enough to buy twice and update the value allowing me to buy endlessly. Is there a way to have the game update my money value so I can buy it multiple times? It grays out after purchasing once even though the value is persistently set to 4.2B in CE.

Re: Refreshing a value

Posted: Fri Oct 07, 2022 10:44 pm
by Traziks
Or if anyone knows how to increase the max money you can have at once in the game.

Re: Refreshing a value

Posted: Sat Oct 08, 2022 6:46 am
by Marc
You cannot get past 4.2b because of 2^32 = 4,294,967,295
For larger numbers, you'd have to rewrite the game in 64 Bit, hehe

So, to solve your problem: find out which code(s) are writing to the address of your money. you'll find something like

Code: Select all

sub eax, ecx  // some subtraction
mov [ebx],eax // and writing back the value to your address
at first, simply try to NOP out the SUB command. If you are lucky, that will be sufficient because there is no money spent.
If not you'll have to dig through the surrounding code and find out the code which is responsible for graying out the buy-button.

good luck,
Marc

Re: Refreshing a value

Posted: Sat Oct 08, 2022 5:28 pm
by Traziks
Thank you.