A battle cats tool for modifying, encrypting, and decrypting game files
Project description
Battle Cats Game Modding Tool
A python game modding tool for the mobile game The Battle Cats that can decrypt, encrypt, and modify some game files.
It is a pretty much direct port from my C# game modding tool with a few bug fixes.
Join the discord server if you want to suggest new features, report bugs or get help on how to use the modder.
PyPi: https://pypi.org/project/battle-cats-game-modder/
If you want to support me then consider gifting me some ko-fi here: https://ko-fi.com/fieryhenry
Thanks to:
-
EasyMoneko for the original keys for decrypting/encrypting: https://www.reddit.com/r/battlecats/comments/41e4l1/is_there_anyone_able_to_access_bc_files_your_help/
-
Battle Cats Ultimate for what some of the numbers mean in various csvs. https://github.com/battlecatsultimate
-
This resource for unit csvs: https://pastebin.com/JrCTPnUV
-
Vi on discord for enemy csvs
How to use:
I recommed putting adb in your Path system variable. To do that do this:
-
If you are using an emulator: Go to your emulator's install directory, if using LDPlayer it will most likely be in
C:/LDPlayer/LDPlayer4.0. Then findadbin that folder (other emulators might have it in thebindirectory) -
If you aren't using an emulator Download the Android SDK Platform Tools ZIP file for Windows, and unzip it.
-
Copy the path to the directory that you are in
-
Then open the start menu and search:
edit the system environment variablesand press enter. -
Then click on the
Environment Variablesbutton. -
Then in the
System variablesbox find the variable namedPath, then click on theeditbutton. -
Then click
Newand paste the path into it. -
Click
OkthenOkagain thenOkagain. -
Relaunch powershell and maybe restart your whole pc, and try the command again. If this method is too dificult, just use a root file explorer instead and manually get the files that you want. The paths that you will need are:
/data/data/jp.co.ponos.battlecatsen/filesand/data/app/jp.co.ponos.battlecatsen-1
How to edit game data
-
Install python (If you haven't already) https://www.python.org/downloads/
-
Enter the command:
python -m pip install -U battle-cats-game-modderinto cmd or another terminal to install the editor. If that doesn't work then usepyinstead ofpythonin the command -
Unpack the apk file for the game using apktool/APK Easy Tool
-
Get the .pack and .list files that contain the files you want to edit:
-
Most stats are in DataLocal
-
Most text is in resLocal
-
Sprites are in various Server files
-
-
Then enter the command:
python -m BCGM_Pythonto run the tool. If that doesn't work then usepyinstead ofpythonin the command -
Select option to decrypt .pack files
-
Select .pack files that you want, they will be in
/assetsfor local files in the extracted apk, or/data/data/jp.co.ponos.battlecatsen/filesfor downloaded server files -
Once completed the files will be in
/game_filesin your current working directory -
You can manually edit the data, or use the option in the tool that you want
-
Once edited, open the tool and select the
encryptoption -
Select the folder of the game files
-
Once complete the encrypted files will be
/encrypted_filesin your current working directory -
Get your
libnative-lib.sofile for your system architecture. You can find it in:-
/data/app/jp.co.ponos.battlecatsen-1/ -
/data/data/jp.co.ponos.battlecatsen/lib/
-
-
Run the tool and select the option to
Set md5 hashes in libnative-lib.so file -
Select your encrypted files in
/encrypted_filesin your current working directory -
Once done you can either:
-
Say yes to
push your modified libnative-lib.so file to the game -
Replace the libnative file in the apk for a permanent change.
-
The
apkmust be signed -APK Easy Tool- for most devices to install the apk -
Then you must re-install app or replace the apk in
/data/app/jp.co.ponos.battlecats.../base.apk
-
-
Manually replace the libnative file in
/data/app -
Replace the libnative file in
/data/data/jp.co.ponos.battlecatsen/libonly if you modifed server files for your device.
I recommend doing 1 and 2 for local files. And all 3 for server files.
-
-
You now need to put your encrypted files either into:
-
The apk if you modified local files
-
The
apkmust be signed -APK Easy Tool- for most devices to install the apk -
Then you must re-install app or replace the apk in
/data/app/jp.co.ponos.battlecats.../base.apk
-
-
/data/data/jp.co.ponos.battlecatsen/filesif you modified server files
-
-
Open the game and see if it works
-
If you modifed server files, you will need to find the associated
download.tsvfile for your .pack and .list files in the apk in/assets/{language} -
Open the file in notepad, you will see the
nameof the file, then a tab, then thefile sizein bytes, then a tab, then themd5 hashof that file. -
You need to modify that
md5 hashso that the game doesn't re-download the server data -
Go to here: https://emn178.github.io/online-tools/md5_checksum.html and drag and drop the file in
-
Copy the hash and replace the one in the
tsvwith that one. -
Replace the apk in
/data/app/jp.co.ponos.battlecats.../base.apkwith your apk, useapktool/APK Easy Toolto sign the app and pack it into an apk again. -
Open the game and see if it works.
-
If it re-downloads game data maybe also try to replace the
file sizein bytes for the .pack file. Right click->properties->Size (not Size on disk)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file battle-cats-game-modder-1.0.4.tar.gz.
File metadata
- Download URL: battle-cats-game-modder-1.0.4.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d9ecbf60138f2ade1d33fa725f3b930487f3f0ead9ce795328b59acd81c62ca
|
|
| MD5 |
719618acdb84a24f1d7c02f784407614
|
|
| BLAKE2b-256 |
148c6a7b9a2b299d7fb29f5902948f272e60f27436e45cff7528a3e31e71bcc6
|
File details
Details for the file battle_cats_game_modder-1.0.4-py3-none-any.whl.
File metadata
- Download URL: battle_cats_game_modder-1.0.4-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c4870a51cbb8ec764cd134992ce8cdab636a3315cc52f57ea1301acdc287e12
|
|
| MD5 |
b1dfb5d2db9e5b9fecceea0bf636bd51
|
|
| BLAKE2b-256 |
15cdea90c1ed92232e2b5e076f99042a780c52e46a0d5f9134e5044b6d3dbccc
|