jgoemat Master Cheater
Reputation: 23
Joined: 25 Sep 2011 Posts: 265
|
Posted: Thu Mar 26, 2026 6:34 pm Post subject: Quick tip to get rid of k__BackingField with GETMONOSTRUCT |
|
|
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]
|
|