Posted: Sat Jan 06, 2018 3:12 pm Post subject: Mono Dissect: How to access baseclass/object fields/pointers
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').
Posted: Mon Jan 08, 2018 11:15 pm Post subject: Figured out
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'
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