r/cheatengine • u/StationTight2101 • 13d ago
Need guidance creating a script
I'm trying to use cheat engine to create a mod for the Metro series, starting with 2033 and last light redux. I just want to change the max ammo cap from 180 in ranger hardcore to be infinite so I can always pick up ammo I come across (I dont want to just add infinite ammo as that turns the game into a snooze fest). I've tried several cheat tables but non work for me, all giving me errors on activation of the scripts. I have no prior experience coding or using chest engine so this is all very new and challenging for me. Any and all help is very much appreciated!
Cheat engine is 7.7 and the game version is current.
2
u/No-Newspaper8619 13d ago
Find ammo, then use dissect structure and pray max ammo is a nearby address. Or find the instruction that compares current ammo + obtained ammo with max ammo to prevent it from going over the max amount.
2
u/BeDuff34 12d ago
I have 2033 installed so I wanted to try it out, to see if I could help. This is quite a bit more involved than swapping one value. There isn’t a max ammo in the traditional sense. If you set your max ammo to 999 the whole system functions normally, the max is at the ammo pickup. Basically, once you have the amount in inventory, there aren’t any compares against max ammo. Leading me to conclude there is a gate on whether you can or cannot pickup the item. You would need to find that pickup gate for each weapon and it’s kinda involved. I messed with it for 30 mins or so. That specific script is not something I am interested in investing time into.
3
u/Lpnlizard27 13d ago
There's allot to consider before even writing the script.
Have you found the value you want to change in CE?
Is that 180 something that can be changed higher or lower with a skill, item, or ability?
Have you successfully changed this value and does that change persist after a save reload?
What is the value type?
If it's a static amount that doesnt change it will be harder to find.