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 


Cheat Engine MONO Feature: The Class could not be found.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Vlad-00003
Cheater
Reputation: 0

Joined: 21 Jul 2015
Posts: 36

PostPosted: Wed Feb 24, 2016 10:03 am    Post subject: Cheat Engine MONO Feature: The Class could not be found. Reply with quote

Hello everybody!
I'm not really sure that this is right thread, but hey - I'm sure that this is something about cheat engine Wink

I've never used mono features before, and was unable to find any tutorials that could help me with this problem - CE don't wanna find the class...

No idea if it matters, but the game made with Unity

Here is what I've done:
    1)Decompile part of the game dlls and found the class I want to modify
    2)Using Cheat Engine mono dissector found it
    3)Tried to use it in my scripts:
    Code:
    usemono()
    getmonostruct(PlayerStats) -- this one works lika a charm
    getmonostruct(TheForest.Items.Inventory.InventoryItem) -- this one doesn't seems to work.

    4)Got stucked.

Lua engine telling me this:
Code:
return monoAA_GETMONOSTRUCT("TheForest.Items.Inventory:InventoryItem", syntaxcheck)

:nil
:The class :TheForest.Items.Inventory:InventoryItem could not be found


I've tried many ways(due to I was out of ideas) -
Code:
InventoryItem
TheForest.Items.Inventory:InventoryItem
TheForest.Items.Inventory.InventoryItem

But CE keep telling me - The class
Quote:
:TheForest.Items.Inventory.InventoryItem could not be found....


Can anybody help me with that?

And while I'm here I got 2 more questions:
How can I find the structure start in memory? AoB's only?
What is the simplest way to modify mono structure fields?



ce_Mono.png
 Description:
 Filesize:  267.13 KB
 Viewed:  12281 Time(s)

ce_Mono.png


Back to top
View user's profile Send private message Send e-mail
Vlad-00003
Cheater
Reputation: 0

Joined: 21 Jul 2015
Posts: 36

PostPosted: Thu Feb 25, 2016 7:30 am    Post subject: Reply with quote

Anyone?(
Back to top
View user's profile Send private message Send e-mail
panraven
Grandmaster Cheater
Reputation: 62

Joined: 01 Oct 2008
Posts: 959

PostPosted: Thu Feb 25, 2016 9:44 am    Post subject: Reply with quote

The GetMonoStruct AA command has two form,
when the class can be refer without namespace,
Code:
GetMonoStruct(InventoryItem)

then the AA symbol for the generated structure is the same as class name, ie. InventoryItem.

If the class must be refer with namespace,then the 2nd form must be use:

Code:
GetMonoStruct(item,TheForest.Items.Inventory:InventoryItem)


the AA symbol is 'item', could be any valid identifier, the namespace should be '.' seperated, as usual, but the separator between namespace and class has to be ':'.

Note that some field having special character may not be referred, eg. some property with unspecified getter/setter will be a 'backing field', its field name is like "<NPCManager>k__BackingField" (instead of 'NPCManager'), this cannot be refer in AA on my knowledge.

_________________
- Retarded.
Back to top
View user's profile Send private message
Vlad-00003
Cheater
Reputation: 0

Joined: 21 Jul 2015
Posts: 36

PostPosted: Thu Feb 25, 2016 4:54 pm    Post subject: Reply with quote

Thanks, panraven!
It did the trick, but right now - any time I'm activating this script annoying lua window pop-up saying "Format 2". Is there any way to avoid it?

I've found a way to do what I want without getting this structure, but hey - you should use any chance to learn new stuff, right?
Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25833
Location: The netherlands

PostPosted: Thu Feb 25, 2016 5:04 pm    Post subject: Reply with quote

add this to your autoassembler script:
Code:

{$lua}
local i
for i=0, getFormCount()-1 do
  local f=getForm(i)
  if f.ClassName=="TfrmLuaEngine" then
    f.cbShowOnPrint.Checked=false

  end
end
processMessages()
{$asm}


alternatively, copy the whole function monoAA_GETMONOSTRUCT(parameters, syntaxcheckonly) from monoscript.lua and comment out that print("Format 2") line

or use Items.Inventory:InventoryItem or Inventory:InventoryItem

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Vlad-00003
Cheater
Reputation: 0

Joined: 21 Jul 2015
Posts: 36

PostPosted: Fri Feb 26, 2016 5:59 am    Post subject: Reply with quote

Dark Byte wrote:
add this to your autoassembler script:
Code:

{$lua}
local i
for i=0, getFormCount()-1 do
  local f=getForm(i)
  if f.ClassName=="TfrmLuaEngine" then
    f.cbShowOnPrint.Checked=false

  end
end
processMessages()
{$asm}


alternatively, copy the whole function monoAA_GETMONOSTRUCT(parameters, syntaxcheckonly) from monoscript.lua and comment out that print("Format 2") line

or use Items.Inventory:InventoryItem or Inventory:InventoryItem


Thanks Dark Byte!

Would try next time I'll update my table =3
*but I'm pretty sure that this'll do the trick anyway*
Back to top
View user's profile Send private message Send e-mail
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