Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Invulnerability (big health) in RTS and similar

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
cheat_me
Newbie cheater
Reputation: 0

Joined: 18 Aug 2012
Posts: 10

PostPosted: Mon Oct 24, 2016 2:00 pm    Post subject: Invulnerability (big health) in RTS and similar Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites