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 


AutoAssembler - structs?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
jgoemat
Master Cheater
Reputation: 23

Joined: 25 Sep 2011
Posts: 264

PostPosted: Sat Nov 02, 2024 10:40 pm    Post subject: AutoAssembler - structs? Reply with quote

Arrrggg! Smile

I was having trouble with what I thought was GETMONOSTRUCT which I want to use in my Dredge table with fields like "<Player>k__BackingField". The thing is it seemed to be working for most things, I just had trouble with one struct. Then I cleaned up my table and the whole thing stopped working. I finally figured out it wasn't using the AA struct for that, it was using a structure I defined when fiddling with the game. I didn't know AA could do that...

Anyway it would be nice if GETMONOSTRUCT worked with those also. I might be able to make that change myself, but would want some agreement on what should be done... My thoughts/ideas:

Code:
* Report conflict if AA structure and CE structure have the same name
* Struct is defined ok, maybe assembler needs tweak to handle those names
* Possibly rename those fields in GETMONOSTRUCT, using what's inside <>


Anyone have thoughts? I added this to my mono activate script to create a new function to rename those fields to what's inside <>:

Code:
[enable]
USEMONO()

{$lua}
function monoAA_MYMONOSTRUCT(parameters, syntaxcheckonly)
  local s = monoAA_GETMONOSTRUCT(parameters, syntaxcheckonly)
  return string.gsub(s, "<([^>]+)>k__BackingField:", "%1:")
end

registerAutoAssemblerCommand("MYMONOSTRUCT", monoAA_MYMONOSTRUCT)
{$asm}
[disable]


I did run into an issue and had to change my order because 'GameManager' has a 'Player' field now and if I define GameManager first, the offset is used instead of 'Player' in the parameter:

Code:
MYMONOSTRUCT(GM,GameManager)
MYMONOSTRUCT(P,Player)
// Gives error "MYMONOSTRUCT(P,AC)"
// AC is the offset of GameManager.Player
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 97

Joined: 14 Jul 2007
Posts: 3321

PostPosted: Sun Nov 03, 2024 5:57 am    Post subject: Re: AutoAssembler - structs? Reply with quote

jgoemat wrote:
I finally figured out it wasn't using the AA struct for that, it was using a structure I defined when fiddling with the game. I didn't know AA could do that...

This is actually by design - has been like that for quite a while.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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