Help! First mod attempt. What am I doing wrong?

oivitto

Platinian
Original poster
Aug 22, 2022
8
2
3
30
brazil
Modding my second game, Rogue Land (first was super protected). It's a libil2cpp based game built on Unity. APK attached.

TL;DR — Tried modding Rogue Land, couldn't get values to work.

Everything was going smooth until I couldn't get any of the values to work. I've read the basic tutorials and searched the comments to decide what are the best tools. Since it's libil based and didn't have any .dll files, I've got my APK Easy Tool, ll2CppDumper GUI, Notepad++ and HxD setup, with armconverter open. I saw people mentioning dnSpy for this method which I setup but couldn't understand how to use, instead opting for the old method.

First, I decompiled the .apk with Easy Tool and made a copy of the libil2cpp.so on my desktop. Then I succesfully dumped with Dumper GUI and opened the dump.cs with Notepad++. There I tried some recommended keywords like atk, attack, get_atk, and variations like get_attack and get_PlayerAttack. I found some // Methods in public class AttackData and thought that was jackpot. They all seemed related to character stats and had the float tag, which if I understood right, is an int data value, so it could be float, bool, double, etc. Basically the value I want to edit.


1664265100959.png


Since it's my first attempt, I tried one value at a time so I knew if it worked or not, first with get_CritChance to see if I would always crit. Took the offset 508AA4 and searched the libil2cpp.so in HxD. Found the line. That's where I think I got lost. For this part I was following Yaskashije's guide, and used the following instruction in arm to hex converter:

mov r0, #0xFFF
bx lr

Which returns as FF 0F 00 E3 1E FF 2F E1, the hex code I used as replacement to the original values on get_CritChance. I don't understand anything about hex coding so I just followed the part where he says this instruction gives a higher value than 1, which is what we want for higher damage, health, etc. I don't know what the #0xFFF value means, so I couldn't figure out a higher value to try. So with that, I saved the .so file, replaced the original with mine in the decompiled game folder, and compiled and signed the .apk with APK Easy Tool. It succesfully installed and ran on non-root Bluestacks 5, but my character was not criting all the time. This game is like Archer Hero or Archer.io where you kill stuff on a stage and level up, getting upgrades like multishot, damage and critical chance. So I thought, maybe I edited the upgrade value, and not my character's. Got the critical chance upgrade (+35% critical chance), but still wasn't criting all the time.

I tried to put out as much information as I could think of here to get help. Any idea on where I messed up? Have you tried modding this game before? If there's anything else I can provide, please let me know in the comments. Thank you!


Sorry, I don't know how to add pretty .apk links like I see around. Here it is.
 

Raebydett

Awesome Active Platinian
Jan 20, 2020
171
58
28
G
Everything seems right maybe just not the right function, just keep looking for others. It isnt just "first try 100% correct" you need to test until u found the right one
 
  • Like
Reactions: oivitto

Vector4

Platinian
Jun 6, 2022
13
14
3
23
Ireland
Float values on ARM32 must be returned in the S0 register.
The VLDR instruction can be used to load a float value, which you can provide a PC-relative offset to.

As far as I can tell, this code should be right:
Code:
vldr s0, . + 8
bx lr
.float N
The letter N can be replaced with any number (that can fit in a float) on armconverter.
For the number 100, I got this:
00 0A 9F ED 1E FF 2F E1 00 00 C8 42