Jump to content

1 Screenshot

About This File

Template for automatic finding of the values to modify from the class strings and fields offsets

This gameguardian script to help automatize fields modifications, from the info you have found into the global-metadata file.

have been tested only in this configuration:
- original phone android 11, no-root
- virtualxposed + gameguardian

Now it help me as a base when I try a new game
-> only need to indicate the classes and fields names I want to look for

Notes:
- to use it you need to edit the script and adapt it for your specific game -> it is a template
- must know what is global-metadata file + a bit of lua script language (not too much)
- it is searching the fields into the anonymous A region (often in my android phone fields values are there)
- if the game upgrade, possible that classes names and fields offsets are modified so you must upgrade your script too
 

How to use and modify the template

 1. open the global-metada file [see below to know how to get it], and find the classes and fields you are interested in -> it is the hard stuff

image.thumb.png.6c5e0ee32728250d8e58ed802ef8eacf.png
in this example are selected two fields I want to alterate the values:
- classname is LockDrillerMinigameParameters
- field SafeAngle, that is a float, with offset 0x40
- field ShakeModifierIncreasingRate, a float too, offset 0x44
 

2. edit the metadata_fields_modifier script (on the phone I use Acode), but to be faster can be done on the PC (open with notepad and copy-paste the data directly from global-metadata)

from line 55 in the script, modify the classes_and_fields to fit your data, the example gives:

metadata_fields_modifier-2.thumb.png.956f65b7053804aba53af59d97db7865.png

(before it was line 20 but now line 55)

local classes_and_fields = {
  LockDrillerMinigameParameters=
  {fields={
    {'SafeAngle' , gg.TYPE_FLOAT, 0x40 , 32},
    {'ShakeModifier' , gg.TYPE_FLOAT , 0x44 , 0.001}
  }},
}

for each field you have:
{'field name', data type, offset, eventual replaced value}

data type possibilities, according what global-metadata indicates
  -- gg.TYPE_FLOAT for float
  -- gg.TYPE_BYTE for bool
  -- gg.TYPE_DWORD for int

Note:
-> "replaced value" is optional, can put only {'SafeAngle',gg.TYPE_FLOAT,0x40}
   a) indeed at the beginning you do not know what field is impacting the game, so with this script you can put many classes (ex: 10) and all the int/float fields that seems interesting (ex: 5 for each classes)
   b) then running the script in the game, it will find and load each field in gameguardian without modification
   c) next you can try to modify the value of each of these fields to look for the best to use, and what values to put
   d) edit the script again and this time you can specify the "replaced value" at the end like in my example {'SafeAngle',gg.TYPE_FLOAT,0x40 , 0x32}
 

3. open the game + run the metadata_fields_modifier script in the game
-> it will ask you what class to search for

Then if successful, the results class and fields data, will be loaded in the gameguardian interface (save tab) so you can check what has be done and modified

metadata_fields_modifier-3.thumb.png.f26d8aa46dd548626d22d6f790249afd.png

 

=> Hope this script will help you make some great modifications on the games you like.
 

Extra info about getting global-metadata
- I use the great libil2cpp.so and metadata.dat dumping script (LibDumper by @Lover1500) -> get both needed files (script can be found on this site)
https://gameguardian.net/forum/files/file/2740-libil2cppso-and-metadatadat-dumping-script/?tab=comments#comment-9358
- then I use "il2cppdumper gui" on my phone (dont remember where I found the app apk) to convert both files -> finally got the global-metdata file (named dump.cs)
- seeing it is a very big file not easily readable on the phone -> I send it to the PC to search for some interesting classes to alterate


 

image.png

metadata_fields_modifier-2.png

metadata_fields_modifier-3.png

Edited by veh


What's New in Version 1.2   See changelog

Released

Added support for more environments


User Feedback

Recommended Comments

THETWINSOFFICIAL

Posted

Script ended:

Script error: luaj.o: /storage/emulated/0/metadata_fields_modifier.lua:87

`if #class_instances==0 then`

attempt to get length of a nil value (local 'class_instances')

level = 1, const = 65, proto = 0, upval = 1, vars = 26, code = 263

LEN v10 v9

 ; PC 177 CODE 04800295 OP 21 A 10 B 9 C 0 Bx 4608 sBx -126463

stack traceback:

 /storage/emulated/0/metadata_fields_modifier.lua:87 in main chunk

 [Java]: in ?

 at luaj.LuaValue.a(src:2835)

 at luaj.LuaValue.K(src:1989)

 at luaj.LuaClosure.a(src:456)

 at luaj.LuaClosure.l(src:160)

 at android.ext.Script.d(src:6056)

 at android.ext.Script$ScriptThread.run(src:5785)

veh

Posted

On 11/19/2022 at 9:34 PM, Alessa- said:

Script ended:

Script error: luaj.o: /storage/emulated/0/metadata_fields_modifier.lua:87

`if #class_instances==0 then`

attempt to get length of a nil value (local 'class_instances')

level = 1, const = 65, proto = 0, upval = 1, vars = 26, code = 263

LEN v10 v9

 ; PC 177 CODE 04800295 OP 21 A 10 B 9 C 0 Bx 4608 sBx -126463

stack traceback:

 /storage/emulated/0/metadata_fields_modifier.lua:87 in main chunk

 [Java]: in ?

 at luaj.LuaValue.a(src:2835)

 at luaj.LuaValue.K(src:1989)

 at luaj.LuaClosure.a(src:456)

 at luaj.LuaClosure.l(src:160)

 at android.ext.Script.d(src:6056)

 at android.ext.Script$ScriptThread.run(src:5785)

I modified the script not to get the error when the class is not found in the game memory.

THETWINSOFFICIAL

Posted

1 hour ago, veh said:

I modified the script not to get the error when the class is not found in the game memory.

Script only for 32bit or 64 ?

THETWINSOFFICIAL

Posted

2 hours ago, veh said:

I modified the script not to get the error when the class is not found in the game memory.

 

Not found value ..

 

spacer.png

2 hours ago, veh said:

I modified the script not to get the error when the class is not found in the game memory.

You use emulator android ?

THETWINSOFFICIAL

Posted

spacer.png

 

 

the script will not find a value if there is no region ca 

 

In the script I see region 0 to REGION A, in android phone not found so to fix it 

 

This way REGION O to REGION CA and to REGION A

veh

Posted

For info I use virtualxposed with game guardian in it and the games too
do not know if 32 or 64 bits

it only scan O region for class and then A region to find the fields, other memory regions are not scanned (neither ca, jh or else)

(the games I have modified has values often in A so I make it that way)
-> so if your game has a very little A region, probably game values are not there and so the script will not find them

THETWINSOFFICIAL

Posted

22 minutes ago, veh said:

For info I use virtualxposed with game guardian in it and the games too
do not know if 32 or 64 bits

it only scan O region for class and then A region to find the fields, other memory regions are not scanned (neither ca, jh or else)

(the games I have modified has values often in A so I make it that way)
-> so if your game has a very little A region, probably game values are not there and so the script will not find them

Okay the script uses pointers because it uses class I can see that your pointer script doesn't work for me or other people either Because there is no region ca I tried pointers and yes found the final value in region A , and I used this method 0 to CA to A And the value is found, when I enter class and filed into your script and run it I get not 

Yes I will get not found if there is no region 

Ca region

veh

Posted

2 minutes ago, Alessa- said:

Okay the script uses pointers because it uses class I can see that your pointer script doesn't work for me or other people either Because there is no region ca I tried pointers and yes found the final value in region A , and I used this method 0 to CA to A And the value is found, when I enter class and filed into your script and run it I get not 

Yes I will get not found if there is no region 

Ca region

So you would like it to scan Ca region instead of O region to find the class pointer (strings) ?
I cannot test because I have never used the Ca region for that, do you think it is virtualxposed that switch memory region ?

THETWINSOFFICIAL

Posted

Just now, veh said:

So you would like it to scan Ca region instead of O region to find the class pointer (strings) ?
I cannot test because I have never used the Ca region for that, do you think it is virtualxposed that switch memory region ?

I think so I tried Tampa virtual because my phone was already rooted

Maybe your script works in virtual space

I'm glad if you fix this problem

THETWINSOFFICIAL

Posted

On 11/24/2022 at 3:59 AM, veh said:

So you would like it to scan Ca region instead of O region to find the class pointer (strings) ?
I cannot test because I have never used the Ca region for that, do you think it is virtualxposed that switch memory region ?

Can you hide class name on your script ?

veh

Posted

On 11/23/2022 at 8:01 PM, Alessa- said:

I think so I tried Tampa virtual because my phone was already rooted

Maybe your script works in virtual space

I'm glad if you fix this problem

yes i will put a new version soon, in few days I think

THETWINSOFFICIAL

Posted

5 hours ago, veh said:

yes i will put a new version soon, in few days I think

And hide the class name 

veh

Posted

15 hours ago, Alessa- said:

And hide the class name 

I keep it, because some times in game the class must be modified only at specific moment (ex: match starting)
but maybe I will create a second script that can load all classes at once if other people need this feature

THETWINSOFFICIAL

Posted

46 minutes ago, veh said:

I keep it, because some times in game the class must be modified only at specific moment (ex: match starting)
but maybe I will create a second script that can load all classes at once if other people need this feature

yes, and hide the class name too so people don't find out

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.