// Namespace: entity
public class LifeSkillDefs // TypeDefIndex: 11527
{
// Fields
public const int COOKING_SKILL_ID = 51008;
public const int FISHING_SKILL_ID = 51007;
public const int MUSIC_SKILL_ID = 51009;
public const int COST_SP = 5;
// Methods
// RVA: 0x14AC724 Offset: 0x14AC724 VA: 0x14AC724
public void .ctor() { }
}
I'm sorry if I bother you, but I'm new to c++, I understand hooking, but it's for something that has an offset, I don't know how to hook the field class, if you please, can you give me a little idea how to do it? it helped me a lot, and here is where it's called, i didn't find anything else, but it doesn't have an id offsetOf course you can you need to find where it’s called and hook it to cost_sp. Are u familiar with C++?
// Namespace: entity
public class ProductionItemBase // TypeDefIndex: 11645
{
// Fields
public int id; // 0x10
public int skill_id; // 0x14
public int res_id; // 0x18
public string equip_ids; // 0x20
private ArrayList __equip_ids; // 0x28
public string consume_equips; // 0x30
private ArrayList __consume_equips; // 0x38
public int drop_id; // 0x40
public string intro; // 0x48
public string sound_id; // 0x50
public int act_id; // 0x58
public int cost_sp; // 0x5C
public int show_equip_id; // 0x60
public string sort_str; // 0x68
// Properties
public ArrayList equip_ids_val { get; }
public ArrayList consume_equips_val { get; }
// Methods
// RVA: 0x1ABF360 Offset: 0x1ABF360 VA: 0x1ABF360
public ArrayList get_equip_ids_val() { }
// RVA: 0x1ABF3B4 Offset: 0x1ABF3B4 VA: 0x1ABF3B4
public ArrayList get_consume_equips_val() { }
// RVA: 0x1ABF408 Offset: 0x1ABF408 VA: 0x1ABF408
public void .ctor() { }
}
sorry bro, I have read from this forum and tried a few things especially hooking constructor class to change static field, I found similar forum topic about arraylist hooking but no answer there, before creating this topic I have explored this forum, and searched search site but minimal about thisTheres alot tuto hook field around, how about u read them all and come back later? lol
You should read them first before asking but u doing the opposite way
not working, i had trying beforeI guess u not finding things with your eyes ?
How to unlink functions in IL2CPP and other native games
~Read this tutorial first: Basic Hooking Tutorial ~Use this template to do this: LGLTeam/Android-Mod-Menu ~You need some knowledge of C++ to understand this (You can learn C++ on sites such as Geeks For Geeks, TutorialsPoint, Youtube etc. or from apps in the Play Store) Before I start, what do...platinmods.com
Show the code u did if its actually not workingnot working, i had trying before
bool GodMode = false;
// MainRoleControl
void (*old_MainRoleControl)(void *instance);
void MainRoleControl(void *instance) {
if (instance != NULL)
{
if (RoleControl != false)
{
//private long _main_hp; // 0x78
void* _main_hp = *(void**) ((uint64_t) instance + 0x78);
if (_main_hp != NULL)
{
*(long *) ((uint64_t) instance + 0x78) = 999999999;
}
//private int _main_sp; // 0x80
void* _main_sp = *(void**) ((uint64_t) instance + 0x80);
if (_main_sp != NULL)
{
*(int *) ((uint64_t) instance + 0x80) = 999999;
}
//private int _main_mp; // 0x84
void* _main_mp = *(void**) ((uint64_t) instance + 0x84);
if (_main_mp != NULL)
{
*(int *) ((uint64_t) instance + 0x84) = 999999;
}
//private int _main_hp_level; // 0x88
void* _main_hpl = *(void**) ((uint64_t) instance + 0x88);
if (_main_hpl != NULL)
{
*(int *) ((uint64_t) instance + 0x88) = 999999;
}
}
} old_MainRoleControl(instance);
}
// internal class MainRoleControl : Control
// RVA: 0x1599964 Offset: 0x1599964 VA: 0x1599964
// public void Update() { }
A64HookFunction((void*)getAbsoluteAddress("libil2cpp.so", 0x1599964),(void*)MainRoleControl, (void**)&old_MainRoleControl);
case 1004:
RoleControl = !RoleControl;
break;
i'm sorry about that, but can you spesific where is wrong?Lol you definitely doing it wrong, maybe read again. All is about try and error, practice.
Ignore this guy @Raebydett he clearly doesn't know what he's talking about or what you were asking about for that matter, all his answers were rubbish and will confuse you.. This isn't a normal field where you can just hook something and then access it...i'm sorry about that, but can you spesific where is wrong?
look second post there are class with cost_sp field, i try find other class but didn't find, in second post there only get function, nothing any update function, i trying unlink constructor but not workIgnore this guy @Raebydett he clearly doesn't know what he's talking about or what you were asking about for that matter, all his answers were rubbish and will confuse you.. This isn't a normal field where you can just hook something and then access it...
Anyways.
Since its constant and doesnt have an offset, it might be possible that once its converted into C++ cost_sp is being optimized away.
Can you find any functions that are supposed to make use of cost_sp? if you are familiar with dissassembly and Arm see if you can find where it should be used, I have a feeling you might find a 5 hardcoded in the arm assembly when checked with IDA/Ghidra etc.
Also send the link of the game or game name
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies