View previous topic :: View next topic |
Author |
Message |
selectpgo How do I cheat?
Reputation: 0
Joined: 16 Feb 2022 Posts: 2
|
Posted: Wed Feb 16, 2022 5:39 am Post subject: editing all same type of units value in RTS |
|
|
for example, In Starcraft , i'd like to change all existing minerals and gases amount in map. Any easy way to do?
|
|
Back to top |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Wed Feb 16, 2022 7:20 am Post subject: |
|
|
Do you mean the resources that are placed throughout the map which the player can harvest?
If so, there is no easy way to do that. If you mean just changing the amount of resources you have then you can do that much easier. You will want to scan the value of the resource you want to change, change the value in-game, scan for new value repeat those steps until you have narrowed it down. Change the value and see if the changes take effect. If they have then you have found your resource value.
|
|
Back to top |
|
 |
selectpgo How do I cheat?
Reputation: 0
Joined: 16 Feb 2022 Posts: 2
|
Posted: Wed Feb 16, 2022 7:44 am Post subject: |
|
|
I meant placed resources. editing them each map one by one is very painful.
|
|
Back to top |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Wed Feb 16, 2022 10:33 am Post subject: |
|
|
selectpgo wrote: | I meant placed resources. editing them each map one by one is very painful. |
You could edit the collected resource value instead.
|
|
Back to top |
|
 |
cooleko Grandmaster Cheater
Reputation: 11
Joined: 04 May 2016 Posts: 717
|
Posted: Tue Mar 01, 2022 8:52 pm Post subject: |
|
|
This is a pretty fun endeavor, imo. The last game I did this in I started with the low hanging fruit of editing the pool of resources. This is pretty basic memory editing.
After that, I went after how many resources were generated each harvesting period. The first way was finding where the game stored the value for cumulative resources gained each period. For example, if you have two mines, one harvesting 10 units and another 15, you will have a cumulative gain of 25. If the game reports it to you, it tracks it.
I then backtraced the instruction that set it to see where it accumulates the different mines' contributions to the cumulative gain. Find out what that address accesses and you can see each individual contributor. If it is just 2, that is awesome. Dissect the structure and see if you can find the value for total remaining resources. From here the sky is the limit, you can max out resources, apply a multiplier to resources harvested each period, or any other devious improvement you desire!
Adding new resources is a little harder. Once you see that you have two resources, and have their structure, you need to find where they are stored. Generally it is a dynamic list where there is a base address, and integer with length, and then every 4/8 bytes is a pointer to the next resources structure up to the length defined.
You can add a resource there, increment the length, and see what happens, but that usually will crash your game because the resource isnt properly registered everywhere. So instead, see what edits the number of resources by building one yourself or depleting one and making it disappear. This reveals the code that adds/removes from the map where you can now call the function yourself to add anything you want and it is properly registered.
|
|
Back to top |
|
 |
|