codeshaunted / monke Goto Github PK
View Code? Open in Web Editor NEWCommand line packing/unpacking tool for Bloons TD 6 save files
License: Apache License 2.0
Command line packing/unpacking tool for Bloons TD 6 save files
License: Apache License 2.0
ERRORS:
BTD6 seems to crash whenever the compiled Profile.Save is put in the save directory.
I removed everything from the save directory, signed in and had an option between the local save and the cloud save. The game crashes when choosing the local save with the compiled Profile.Save.
It decompiles fine and I use Notepad++ to edit the text. I changed one number on a monkey's XP to test it and it still crashes.
I even left the text unformatted, changed one number and it still crashed. It just rolls back to the cloud save no matter the change.
Hello,
Bloons Adventure Time TD uses the same engine (Unity) as BTD6 and also the same encryption method for the Profile.save. I've tried simply guessing passwords for this game but not a single number between 12 - 50 works (it shouldn't be anywhere near 50, it should be <20 but it isn't). Also 8 & 11 don't work, obviously.
I've also noticed that the encrypted BATTD Profile.save is 9KB, while (in my case) BTD6's is 26KB. Much smaller for some reason.
So then that made me wonder: what steps did you take to find Kingdom Rush's and BTD6's passwords?
Hey, can't create the executable here ;(, tried on wsl, debian and ubuntu lol actually crying.
Can you help me ? :)
the command:
cmake --build .
the error:
c++: warning: CRYPTOPP_DATA_DIR=/home/tim/Downloads/monke/third_party/cryptopp/TestData: linker input file unused because linking not done
c++: error: CRYPTOPP_DATA_DIR=/home/tim/Downloads/monke/third_party/cryptopp/TestData: linker input file not found: No such file or directory
gmake[2]: *** [third_party/cryptopp-cmake/CMakeFiles/cryptopp-object.dir/build.make:76: third_party/cryptopp-cmake/CMakeFiles/cryptopp-object.dir//cryptopp/cryptlib.cpp.o] Error 1
gmake[2]: *** Deleting file 'third_party/cryptopp-cmake/CMakeFiles/cryptopp-object.dir//cryptopp/cryptlib.cpp.o'
gmake[1]: *** [CMakeFiles/Makefile2:149: third_party/cryptopp-cmake/CMakeFiles/cryptopp-object.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
I am having trouble understanding what the format is here. I know the format comes out JSON, but I am trying to understand how you are unpacking it.
To be clear, the problem is not with your code, it is with my understanding of the code! I just have a habit of rewriting stuff like this in python. Doesn't help that my C++ sucks and my crypto experience is limited to TLS/SSL certs for webservers.
Description | Size | Data Type |
---|---|---|
Dummy Header | 44 | Unknown |
password index | 8 | uint64 |
Password Salt | 24 | char[24] |
Encrypted save data | The rest | ???? |
so is the order of operations:
Or should 4/5 be switched?
If I am reading it right, it would be something like this:
def _read_file(self, file: Path) -> FILE_PIECES:
with file.open("rb") as fp:
# Unpack a char[44]
header = struct.unpack("44s", fp.read(self._DUMMY_HEADER_LENGTH))[0]
# Unpack a uint64
password_index = struct.unpack("Q", fp.read(self._PASSWORD_INDEX_LENGTH))[0]
# Unpack a char[24]
salt = struct.unpack("24s", fp.read(self._SALT_LENGTH))[0]
# The rest is encrypted data, just read the rest
payload = fp.read()
return header, password_index, salt, payload
I am not able to entirely replicate it and comparing values in memory with the debugger in CLion vs PyCharm is not apparently straight forward. Does this seem like the right direction?
(to codeshaunted) This is not an issue, more like a guide to whoever want to do something similar in the future. Doing this since there's not "wiki" section to this repo.
(to everyone else) This is a somewhat illegal of a guide on how to add, edit or remove your insta monkeys. So like what codeshaunted stated with using this repo's code and release program, use at your own risk.
After unpacking your save file (aka Profile.Save), your list of insta monkeys is saved as something similar to this
"instaTowers":{"'insert tower name here'":[1024,2176,7184,...],...}
The "tower name" part is basically... the tower's name. That's it, it is pretty simple and self-explanatory. If you don't have a insta monkey of any tower you want before, just check the "towerXp" part at the beginning of the unpacked save file for its name.
The array of number after the tower's name is the list of insta monkeys of that specific tower. The crosspath and the number of insta monkeys with that exact crosspath? All saved as integers in that array.
So, after hours and hours of testing*, the integers follow one simple binary pattern:
Number of Insta(s) | Bottom Path Upgrade(s) | Middle Path Upgrade(s) | Top Path Upgrade(s) | isNew? | |
---|---|---|---|---|---|
Bit(s) | 22** | 3 | 3 | 3 | 1 |
Values | More than 0 | 000 - 101 0 - 5 upgrades |
000 - 101 0 - 5 upgrades |
000 - 101 0 - 5 upgrades |
0 - false 1 - true |
For non-programmers and less tech-savvy people, just put this formula in your calculator:
number of insta x 1024 + bottom path upgrade x 128 + middle path upgrade x 16 + top path upgrade x 2 = result
(isNew usually doesn't matter, so add 1 to your result if you want a big red exclamation on the top corner of your shiny new insta, more power to you I guess)
Example (top-middle-bottom crosspath):
Notes:
*Actually just 30 minutes of trials and errors in reality lmao
**I only test up to 6 bits or 63 instas (with the bits behind it, in total 16 bits or 2 bytes) but theoretically, it should be able to goes up to 4+ million (unsigned int) or 2+ million (signed int)
In Bloons TD 6 the game will reset the save back to the one stored in the cloud after a small amount of game play. Is there a way to fix this? This issue really makes this program essentially useless because the modded save will only stay modded while you aren't doing anything. As soon as you jump into a single player game, the game reloads your account, and the modified changes are gone.
The video that shows what im experiencing
https://streamable.com/sa1il5
Everytime I write the correct command this error shows up in cmd:
'monke' is not recognized as an internal or external command,
operable program or batch file.
atrius@main:~/.local/share/Steam/userdata/1315454642/960090/local/link/PRODUCTION/current$ wine monke unpack Profile.Save a 11
wineserver: using server-side synchronization.
002c:fixme:winediag:LdrInitializeThunk Wine TkG (staging) 7.12 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please don't report bugs about it on winehq.org and use https://github.com/Frogging-Family/wine-tkg-git/issues instead.
002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2).
abnormal program termination
can someone give me a guide or something because all the readme says is that it has 2 commands, unpack and pack, and i've tried searching for the files of which i should use the program on but it's not on my btd6 steam folder
first of all thanks for your amazing work (( seriously you are amazing ))
secondly i have no experience in C++ so its probably my fault
i just downloaded the exe from release and when i open it close instantly
so is it require something to load normally ?
Title is explanitory
Error in configuration process, project files may be invalid
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.