Help! Need Help Modding Currency Multiplier

elementgear

Platinian
Original poster
Nov 7, 2023
21
9
3
Hey everyone,

I hope you're all doing well. I'm fairly new to modding, and after successfully modding a game (City Defense) with a boolean offset, I decided to take on a new challenge. I'm currently trying to create a mod for a game that involves a currency multiplier. I want the in-game currency not to decrease when spending, but rather multiply.

I came across this mod for Lily's Garden Lily’s Garden Ver. 2.66.2 MOD MENU | Currency Doesn't Decrease - Platinmods.com - Android & iOS MODs, Mobile Games & Apps which is exactly what I'm trying to achieve. Even if you spend coins, they don't decrease; instead, they multiply.

Given my previous experience with City Defense, I feel a bit lost when it comes to dealing with a currency multiplier, especially since Lily's Garden mod seems more complex. I'd greatly appreciate it if someone could guide me on where to start or share any relevant tutorials or resources.

If anyone has experience with currency multiplier mods or has tackled a similar challenge, your insights would be much appreciated. I'm eager to learn and would be grateful for any help or advice you can provide.

Thank you in advance!
 

elementgear

Platinian
Original poster
Nov 7, 2023
21
9
3
Find a method that deals with money spending and hook it. Then return a high negative number like -999
Put a negative value to the function brother
Hey dollaz and nowhere222,

Thanks a ton for your quick responses and guidance! Just to clarify, when you mention "hooking" the method that deals with money spending, are you referring to finding the specific function or method responsible for deducting the in-game currency?

If so, do you happen to know of any tutorials or resources that could help me understand the process of hooking and modifying such functions? I'm still relatively new to this, and a step-by-step guide or example would be incredibly beneficial.

Additionally, both of you mentioned returning a high negative number like -999 or putting a negative value to the function. Could you elaborate a bit more on this step?

I appreciate your patience and assistance as I navigate through this learning process. Looking forward to your insights!
 
  • Like
Reactions: nowhere_222

·҉ dollaz·҉. .

Approved iModder
Approved iModder
Mar 26, 2021
159
1,819
193
Somewhere
Hey dollaz and nowhere222,

Thanks a ton for your quick responses and guidance! Just to clarify, when you mention "hooking" the method that deals with money spending, are you referring to finding the specific function or method responsible for deducting the in-game currency?

If so, do you happen to know of any tutorials or resources that could help me understand the process of hooking and modifying such functions? I'm still relatively new to this, and a step-by-step guide or example would be incredibly beneficial.

Additionally, both of you mentioned returning a high negative number like -999 or putting a negative value to the function. Could you elaborate a bit more on this step?

I appreciate your patience and assistance as I navigate through this learning process. Looking forward to your insights!
Some shit like this for a mod menu or something
Code:
int(*old_function)(void *instance);
int function(void *instance)
{
    if (instance != NULL)
    {
        if (boolean)
        {
            return -99;
        }
    }
    return old_function(instance);
}
or to return -99 in a hex patch use this shit
6200E0E31EFF2FE1
 

elementgear

Platinian
Original poster
Nov 7, 2023
21
9
3
Some shit like this for a mod menu or something
Code:
int(*old_function)(void *instance);
int function(void *instance)
{
    if (instance != NULL)
    {
        if (boolean)
        {
            return -99;
        }
    }
    return old_function(instance);
}
or to return -99 in a hex patch use this shit
6200E0E31EFF2FE1
Firstly, thanks a bunch for sharing that code snippet and shedding some light on the process! I gave it a shot, but unfortunately, it doesn't seem to be working for the game I'm trying to mod, Cyber Dude: Dev Tycoon.

I've tried using offset testers with various coins-related methods, but no luck so far. It seems like the methods might be encrypted or obfuscated in some way, making it challenging to locate the specific function responsible for currency spending.

Considering that someone has already modded an older version of this game with the multiplier, do you think the encryption or protection mechanisms could have been enhanced in the newer version, making it more difficult to locate the relevant methods?

If anyone has experience modding Cyber Dude: Dev Tycoon or dealing with similar encryption challenges, your insights would be highly valuable. I'm determined to crack this and appreciate any guidance you can provide.

Thanks again for your help!
 
  • Like
Reactions: nowhere_222

nowhere_222

Just Crazy
Jul 29, 2022
480
6,070
193
22
Inner Peace 🕊️
Firstly, thanks a bunch for sharing that code snippet and shedding some light on the process! I gave it a shot, but unfortunately, it doesn't seem to be working for the game I'm trying to mod, Cyber Dude: Dev Tycoon.

I've tried using offset testers with various coins-related methods, but no luck so far. It seems like the methods might be encrypted or obfuscated in some way, making it challenging to locate the specific function responsible for currency spending.

Considering that someone has already modded an older version of this game with the multiplier, do you think the encryption or protection mechanisms could have been enhanced in the newer version, making it more difficult to locate the relevant methods?

If anyone has experience modding Cyber Dude: Dev Tycoon or dealing with similar encryption challenges, your insights would be highly valuable. I'm determined to crack this and appreciate any guidance you can provide.

Thanks again for your help!
Hello 😊, try to find a similar function that use that currency, for example a spend function or consume function, or any function that spend the currency and freeze it with no operation HEX value

nop
bx lr

in ARM32

nop
ret

in ARM64

Another solution would be to locate a method that use the currency value and return the field offset to a high negative value

If the original method not doing anything, try to debug the game with MatLog and locate the Unity functions that are used when u touch the screen ;)

Here is my HEX CODES thread btw;

 
  • Like
Reactions: elementgear

elementgear

Platinian
Original poster
Nov 7, 2023
21
9
3
Hello 😊, try to find a similar function that use that currency, for example a spend function or consume function, or any function that spend the currency and freeze it with no operation HEX value

nop
bx lr

in ARM32

nop
ret

in ARM64

Another solution would be to locate a method that use the currency value and return the field offset to a high negative value

If the original method not doing anything, try to debug the game with MatLog and locate the Unity functions that are used when u touch the screen ;)

Here is my HEX CODES thread btw;

Thanks for reply :)
I've made some progress on my modding journey, but I've hit a bit of a roadblock. I found an offset (0x5A9EFC) in the Cyber Dude: Dev Tycoon game that seems to be related to object destruction. When I directly edit this offset with a hex value, the mod works as intended. However, when I try to incorporate it into my LGL menu with a boolean, it doesn't seem to have the desired effect.

Here's the code snippet I've been working with:
PATCH_LIB_SWITCH("libil2cpp.so", "0x5A9EFC", "B2 14 45 E3 1E FF 2F E1", boolean);

The offset itself isn't of type int, bool, or float. It appears to be related to a method DestroyObject(). Directly hex editing works, but when integrated into the LGL MOD Menu with a boolean, it doesn't.

Any ideas on what I might be doing wrong or how to adapt this for use in the LGL menu? I'm open to suggestions and appreciate any insights you can provide.

Thanks in advance!
 
  • Like
Reactions: nowhere_222

nowhere_222

Just Crazy
Jul 29, 2022
480
6,070
193
22
Inner Peace 🕊️
Thanks for reply :)
I've made some progress on my modding journey, but I've hit a bit of a roadblock. I found an offset (0x5A9EFC) in the Cyber Dude: Dev Tycoon game that seems to be related to object destruction. When I directly edit this offset with a hex value, the mod works as intended. However, when I try to incorporate it into my LGL menu with a boolean, it doesn't seem to have the desired effect.

Here's the code snippet I've been working with:
PATCH_LIB_SWITCH("libil2cpp.so", "0x5A9EFC", "B2 14 45 E3 1E FF 2F E1", boolean);

The offset itself isn't of type int, bool, or float. It appears to be related to a method DestroyObject(). Directly hex editing works, but when integrated into the LGL MOD Menu with a boolean, it doesn't.

Any ideas on what I might be doing wrong or how to adapt this for use in the LGL menu? I'm open to suggestions and appreciate any insights you can provide.

Thanks in advance!
Use LGL Mod Menu 2.9, it's the best version and still have the good things for hex patching, the latest is bad 😍
 
  • Like
Reactions: elementgear

nowhere_222

Just Crazy
Jul 29, 2022
480
6,070
193
22
Inner Peace 🕊️
Thanks for reply :)
I've made some progress on my modding journey, but I've hit a bit of a roadblock. I found an offset (0x5A9EFC) in the Cyber Dude: Dev Tycoon game that seems to be related to object destruction. When I directly edit this offset with a hex value, the mod works as intended. However, when I try to incorporate it into my LGL menu with a boolean, it doesn't seem to have the desired effect.

Here's the code snippet I've been working with:
PATCH_LIB_SWITCH("libil2cpp.so", "0x5A9EFC", "B2 14 45 E3 1E FF 2F E1", boolean);

The offset itself isn't of type int, bool, or float. It appears to be related to a method DestroyObject(). Directly hex editing works, but when integrated into the LGL MOD Menu with a boolean, it doesn't.

Any ideas on what I might be doing wrong or how to adapt this for use in the LGL menu? I'm open to suggestions and appreciate any insights you can provide.

Thanks in advance!
BTW;

the hex code you're using for a void method is bad, use the nop code instead!
 
  • Like
Reactions: elementgear