Creating a cheat table for mono Unity roguelike game.

Creating a cheat table for mono Unity roguelike game.

A section for all general discussions related to any topic subject.


Post Reply
ChronosMrk1
Curious
Curious
Posts: 9
Joined: Sun Dec 22, 2024 9:27 pm
Answers: 0

Creating a cheat table for mono Unity roguelike game.

Post by ChronosMrk1 »

The game is a single player rogue-like and I can find the values I want pretty easily after starting a run but it's a pain to have to do it every time so I want to make a table. I tried to use pointer scanning to make a table first but I couldn't find the pointers to the variables and found out that you can't pointer scan for unity games. This is the first table I've ever tried to make I apologize for my noobiness and I'd appreciate it if you can help me out with this. I do know how to code (mostly python, SQL, and R).

What I've done so far:
I've used ILSpy to find the public class "CharacterScript" where the private float variable called "stamina" is located. I go to cheat engine attach it to the game and activate mono features. I use the mono dissector to find the variable in the class "stamina". (It has an offset of 170 but the offset is useless in this case because for mono unity games you can't use offset, I think?) I find instances of class while the game is open and before a run has started and I find three (there are three characters in the game). But because the run hasn't started all their stamina values are 0. When I start a run There are now 7 instances. I find the 3 instances that correspond to the 3 characters. I add the addresses of those three instances to my address list as well as their stamina addresses.

But at this point I don't know what do do next. I tried to see what accesses the instance addresses and I got a list when I checked to see what writes to this address I get nothing. For the stamina values when I check to see what writes to this address for the stamina values then I get the address to the CharacterScript:ChangeStamina function with the code: # movss [rsi+00000170],xmm5. When I start a new run new instances are created and I don't know where they're coming from, pointer-wise. Every time it runs it calls the InitializeCharacter function and sets the stamina at max. So I know I can just edit the code there so that the characters always start with 9999 stamina. Or if I removed the ChangeStamina function the characters stamina wouldn't change but I want to be able to set and freeze the values at will, so I need a way to add the variable to the table on every run and on every start up.

I'd really appreciate any help anyone would be willing to give me. Or maybe a some hints at least. I didn't find any resources that pertained to my situation and I've been looking for a long while. :?:


User avatar
JustcallmemrX
Apprentice Hacker
Apprentice Hacker
Posts: 75
Joined: Sun Mar 09, 2025 1:07 am
Answers: 0
Location: Everywhere @ Nowhere 😶‍🌫️
x 8

Re: Creating a cheat table for mono Unity roguelike game.

Post by JustcallmemrX »

ChronosMrk1 wrote: Mon Dec 23, 2024 11:08 pm

The game is a single player rogue-like and I can find the values I want pretty easily after starting a run but it's a pain to have to do it every time so I want to make a table. I tried to use pointer scanning to make a table first but I couldn't find the pointers to the variables and found out that you can't pointer scan for unity games. This is the first table I've ever tried to make I apologize for my noobiness and I'd appreciate it if you can help me out with this. I do know how to code (mostly python, SQL, and R).

What I've done so far:
I've used ILSpy to find the public class "CharacterScript" where the private float variable called "stamina" is located. I go to cheat engine attach it to the game and activate mono features. I use the mono dissector to find the variable in the class "stamina". (It has an offset of 170 but the offset is useless in this case because for mono unity games you can't use offset, I think?) I find instances of class while the game is open and before a run has started and I find three (there are three characters in the game). But because the run hasn't started all their stamina values are 0. When I start a run There are now 7 instances. I find the 3 instances that correspond to the 3 characters. I add the addresses of those three instances to my address list as well as their stamina addresses.

But at this point I don't know what do do next. I tried to see what accesses the instance addresses and I got a list when I checked to see what writes to this address I get nothing. For the stamina values when I check to see what writes to this address for the stamina values then I get the address to the CharacterScript:ChangeStamina function with the code: # movss [rsi+00000170],xmm5. When I start a new run new instances are created and I don't know where they're coming from, pointer-wise. Every time it runs it calls the InitializeCharacter function and sets the stamina at max. So I know I can just edit the code there so that the characters always start with 9999 stamina. Or if I removed the ChangeStamina function the characters stamina wouldn't change but I want to be able to set and freeze the values at will, so I need a way to add the variable to the table on every run and on every start up.

I'd really appreciate any help anyone would be willing to give me. Or maybe a some hints at least. I didn't find any resources that pertained to my situation and I've been looking for a long while. :?:

For me if it’s a mono game, it’s allot easier for me to use tools to extract the assets from the(.assets) files as text and mod the (.text) files, then merge the modded text files back into the (.assets) files than using cheat engine as finding pointers is some times a pain and I don’t know how to make complex scripts. The assets that have all the good stuff that has to do with health, ammo etc. are in assets called MonoBehaviour. Some times they will be in bundle files (.bundle) which you will have to put a little more work into extracting them.
If my computer wasn’t broken I would give you my big collection of assets extracting tools and help you learn how to do it yourself. You have to be careful when doing this because if you accidentally make a space, delete something or put a value to high for the byte type the game won’t load. You can see the byte type if you extract them as (.json) files. Always make a backup of all the (.assets) files in case something goes wrong.
NOTE1: when you do asset mods, the cheats are permanent and will always be in the game.
NOTE2: Some games you might only extract over 2,000 and others, you might extract over 100,000.
Yes, it’s allot of work but it’s worth it if you want permanent cheats. Allot of the extracted files will be png and other crap you can delete which will cut down the amount of assets to look through.
I used to mod assets for games and let people download them long ago, I’m better at modding assets then cheat engine.
Sorry I can’t help more with this right now. :(


Post Reply