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 


Mono Dissect: How to access baseclass/object fields/pointers

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
peddroelm
Advanced Cheater
Reputation: 0

Joined: 03 Oct 2014
Posts: 84

PostPosted: Sat Jan 06, 2018 3:12 pm    Post subject: Mono Dissect: How to access baseclass/object fields/pointers Reply with quote

The Class 'CombatFighter' has some initiative fields I care about. (trying to figure out combat order mechanics) .

The base class of 'CombatFighter' is 'BaseFighter'.

'BaseFighter' has fields/pointers towards 'FighterStats' [bunch of calculated stats Attack Power, Evade, Crit Chance, HitPoints, Etc ..] has fields/pointers towards 'FighterRecord' [base stats/ CHARACTER NAME Stamina/base health/ etc].

-----------
Using dissect structure / find instances of object I've been able to build pointer chains from a 'FighterStats' base address all the way to a character's name.

My current problem is how do I reach the character's name from a 'CombatFighter' object?

Dissecting 'CombatFighter' structure doesn't also add its baseobject's fields ('BaseFighter').
Back to top
View user's profile Send private message
peddroelm
Advanced Cheater
Reputation: 0

Joined: 03 Oct 2014
Posts: 84

PostPosted: Mon Jan 08, 2018 11:15 pm    Post subject: Figured out Reply with quote

I figured out .... eventually .

Turned to be trivial just as I 'feared'. So trivial in fact that I wonder why CE doesn't do it automatically (add the base object fields also on dissection)

I've eventually noticed the offsets for fields in the child structure start a bit further than usual. ( Because the beginning offsets are reserved for the base class and its base class and so forth )..

ALL I HAD TO DO WAS:

[7:11 AM] peddroelm: just right click add element
[7:11 AM] peddroelm: get offset from base class
[7:11 AM] peddroelm: m_record name it
[7:12 AM] peddroelm: type pointer
[7:12 AM] peddroelm: point to structure of type FighterRecord 0 offset (add / dissect that structure before too)
repeat for FigtherStats structure
[7:12 AM] peddroelm: and BAM!
[7:13 AM] peddroelm: from combatfighter all the way to name under 60 seconds
[7:13 AM] peddroelm: this guy is named 'Regulator'

Mono Magic is stronk !
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 Discussions 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