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 


Structure dissect loading wrong mono structure

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Wed Jun 22, 2016 1:53 pm    Post subject: Structure dissect loading wrong mono structure Reply with quote

Mono game "Wasted", HP is inside of "Base Character" structure. Found the BaseCharacter:IsAlive code segment which checks HP for death. When I use the structure dissector on this it loads the "Player" structure, which coincidentally neatly falls in right after the BaseCharacter structure (BaseCharacter 0-32C, player 330-410). So I added 0, told it to fill gaps, which gives me fields to see, but they arent auto populated/named according to the mono structure.

How can I fix the designation that the structure dissector is using from Player to Base Character?
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Thu Jun 23, 2016 4:30 pm    Post subject: Reply with quote

No solution? Is my question unclear? I could rephrase it if no one understands.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Thu Jun 23, 2016 5:56 pm    Post subject: Reply with quote

My apologies, but I really don't get what you're asking. From what you've said, the base character structure and player structure are two different structures. Why are you trying to treat them like they're a single structure?

If you want to view both at once, you can open up a new structure dissect window by going to File -> New window.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Jun 23, 2016 6:01 pm    Post subject: Reply with quote

Guess Dark Byte forgot to add the super classes to the structure dissector like he did to the Mono dissector.
Seems like something simple enough to add... if you know CE's Mono source code.
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Thu Jun 23, 2016 6:27 pm    Post subject: Reply with quote

My issue is that the structure "Base Character" has a pointer at 0 to "Player", so when the structure dissector attempts to load the related mono, it assigns the structure "player" instead of the structure "Base Character".

For instance, when HP is accessed, [eax+1A0], the structure dissector looks at eax and sees "player" when it is actually supposed to be seeing "Base Character". I want it to see "Base Character", Because there are some 300 odd values in this structure, I didnt want to manually add the values in.

Since there was no solution, i just manually added the values to the list.
This was made more difficult because mono dissector doesn't chronologically order the entries!
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Thu Jun 23, 2016 6:58 pm    Post subject: Reply with quote

It shouldn't be doing that. At least I've never noticed that behavior before.

Try putting the virtual address directly into it instead of any symbols (e.g. if health address is 0FF24CC0, put in 0FF24B20), make sure mono features are active (i.e. no breakpoints are set), and make a new structure. Select "Yes" in the conformation window, and the window that follows should contain the name of the structure that HP is in. Make sure you don't have square brackets around the address, or CE will dereference that address and use that value as the base of the structure it's dissecting.

Out of curiosity, does the Player class inherit from Base Character? Expand the "base class" field of a class in the mono dissect window to see the hierarchy.

If none of this helps, some pictures might.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 941

PostPosted: Thu Jun 23, 2016 9:14 pm    Post subject: This post has 1 review(s) Reply with quote

Slightly modified the original monoscript's registerStructureDissectOverride function.
When enter the struct name, add a suffix like '@Base' to dissect till a parent class name matching the text following '@', ie. '@Base' can match up to parent class 'BaseCharacter' etc.

The original DissectOverride function is still there to get primary(?) class instance fields.

bye~



monoDissectParentClass.lua
 Description:
allow dissect mono parent class, tested only on ce 6.5+

Download
 Filename:  monoDissectParentClass.lua
 Filesize:  2.61 KB
 Downloaded:  431 Time(s)


_________________
- Retarded.
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Fri Jun 24, 2016 1:00 pm    Post subject: Reply with quote

ParkourPenguin wrote:

Out of curiosity, does the Player class inherit from Base Character? Expand the "base class" field of a class in the mono dissect window to see the hierarchy.

Player does inherit Base Character

panraven wrote:
Slightly modified the original monoscript's registerStructureDissectOverride function.
When enter the struct name, add a suffix like '@Base' to dissect till a parent class name matching the text following '@', ie. '@Base' can match up to parent class 'BaseCharacter' etc.

The original DissectOverride function is still there to get primary(?) class instance fields.


Do I just paste this into one of the mono related luas?
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 941

PostPosted: Fri Jun 24, 2016 2:50 pm    Post subject: Reply with quote

It can be placed alone in and run once from autorun directory.
There should be no side effect in non mono target.

bye~

_________________
- Retarded.
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Sat Jun 25, 2016 9:01 pm    Post subject: Reply with quote

Worked perfectly, I appreciate your assistance!
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