cheat_me Newbie cheater
Reputation: 0
Joined: 18 Aug 2012 Posts: 10
|
Posted: Mon Oct 24, 2016 2:00 pm Post subject: Invulnerability (big health) in RTS and similar |
|
|
The guy here cheatengine.org/tables/moreinfo.php?tid=1559 asked me how I did that hack (God mode for real time strategies). Actually that is one of the quickest hacks I've ever done.
Attack your unit, find the memory address of it's HP field.
Make sure no units are selected, no units are under the mouse cursor.
Go to CE click on the HP value you found previously, then "find out what accesses this address".
The window will open. Remember it's content, or make a screenshot.
Go to the game, select that unit. Go to CE, see what new items were added to the window (there should be some).
The trick is that to display HP bar of every selected unit, the game has to call a separate piece of code for that unit. This code (lets call it a function) is not called for units whose HP bars are not displayed. Therefore I can determine which units are selected at the moment.
Then I make a script and add code to that function. In that code I increase health of the selected units to the very high value (10000 times bigger than current for ex), which of course exceeds their maximum health, and could cause a game to glitch, but in the case of Command & Conquer Generals it just makes the health bar very long. The game is perfectly playable.
The health increase is executed only once on the next call of the function. To prevent repeated execution I make a trigger with a variable. When a combination of keys is pressed (shift+z) I set the variable to 1. Then in the code I check if it is 1, if so, the code is executed once, and the variable is set back to 0.
This scheme can also be applied to all later C&C games. I didn't publish tables for those games, because their EXEs are sometimes updated, making the tables outdated. But taking the table from C&C Generals as a template, you can create your own hack in 5 mins.
|
|