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 


Quick tip to get rid of k__BackingField with GETMONOSTRUCT

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

Joined: 25 Sep 2011
Posts: 265

PostPosted: Thu Mar 26, 2026 6:34 pm    Post subject: Quick tip to get rid of k__BackingField with GETMONOSTRUCT Reply with quote

This comes up a lot for me, I like scripts to use these functions to be more resilient in the face of updates when the offsets might change. Some games have a lot of fields that CE mono reports like '<ResearchCost>k__BackingField'. This will replace those:

Code:
{$lua}
-- this replaces GETMONOSTRUCT(RecipeEntity)
return monoAA_GETMONOSTRUCT("RecipeEntity"):gsub("<([a-zA-Z0-9]+)>k__BackingField", "%1")
{$asm}
[/code]
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 98

Joined: 14 Jul 2007
Posts: 3372

PostPosted: Fri Mar 27, 2026 3:36 pm    Post subject: Reply with quote

Why'd you replace those? They are backing fields Wink
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 Lua Scripting 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