You are on page 1of 9

http://www.freeformatter.com/javascript-escape.

html
010 Editor by Sweetscape.

Encryption Script used to encrypt the sha-1 key. Copy


the script below to a new file and name it encrypt.1sc ( its
a 010 Editor script )
//010 Encryption script
//-------------------------------------//--- 010 Editor v3.2 Script File
//
// File: encrypt
// Author: cynosure
// Revision: 1.0.7
// Purpose: tap titans sha-1 checksum savefile
encryption
//-------------------------------------byte key[9];
key[0]=7; key[1]=3; key[2]=2; key[3]=5; key[4]=4;
key[5]=2; key[6]=5; key[7]=5; key[8]=3;
int actfile = GetFileNum();
int newfile = FileNew();
FileSelect(actfile);

int siz = FileSize();


int place = 0; int addr = 0; int out = 0; uint
data = 0;
while(addr < siz){
FileSelect(actfile);
data = ReadByte(addr++);
FileSelect(newfile);
WriteByte(out, (data + key[out %9]) );
out++;
}

Next is the decrypt code which is optional, only if you


want to check the sha-1 key encryption
//010 Decryption script
//-------------------------------------//--- 010 Editor v3.2 Script File
//
// File: decrypt
// Author: cynosure
// Revision: 1.0.7

// Purpose: tap titans sha-1 checksum savefile


decryption
//-------------------------------------byte key[9];
key[0]=7; key[1]=3; key[2]=2; key[3]=5; key[4]=4;
key[5]=2; key[6]=5; key[7]=5; key[8]=3;
int actfile = GetFileNum();
int newfile = FileNew();
FileSelect(actfile);
int siz = FileSize();
int place = 0; int addr = 0; int out = 0; uint
data = 0;
while(addr < siz){
FileSelect(actfile);
data = ReadByte(addr++);
FileSelect(newfile);
WriteByte(out, (data - key[out %9]) );
out++;
}

Before we begin to mod the save file, lets take a look on the structure,
since I did this mod on Android, I will be using Android file structure as a
base in this article. Youll find the save file
inAndroid/data/com.gamehivecorp.taptitans

there are two similar files, the .adat file and .adat.old file, the old file is
used by the game as a diff checker to prevent modding on the save file. So
we will need to delete this file.
Next is the filesgamedata folder will be containing a live safe if your
game is running, so make sure you quit the game and remove it from task
manager and empty this folder.
Copy the .adat file to your PC and we will start working on the mod using
the 010 Editor. When you open the .adat file youll probably see some
unstructured codes and hex value like in the screenshot below

Hide the Hex view mode by hitting Ctrl+H, this will make editing the
code become easier.
Now the part you need to edit are starting from this line
{\"playerLevel\":\"693\"...
until the closing bracket before this
","lastUsedTexture":"....
, in my case its the
"firstPurchaseMsgShown\":false}

Now, the rule you need to remember when editing the JSON data is the
size. The game come with a cheat prevention using Size Diff checker, in
order for your mod to work you need to make sure if you add 1 character
you also remove 1 character. For example, I have this line
\"playerRelics\":\"0\"
and I want to have 99 relics which means adding 1 extra character, so I
need to remove another character from the file, the safest way would be to
remove 1 character from the name since I can edit the name whenever I
want in the game later.
So lets change the code into
\"playerRelics\":\"9.99E+97\"
this will give you unlimited relics, since the first relic is 0 and I changed
it to 9.99E+97 which mean there are 7 additional characters, I then go
and remove 7 character from, so it will be
\"playerName\":\"Sword\"
from
\"playerName\":\"Sword Master\"
After editing the name, here comes the encryption part. Select and Copy the
code from
{\"playerLevel\":\"693\"...

up to
"firstPurchaseMsgShown\":false}
might be different depend on yours, used the lastUsedTexture text as a base
for the end. Then paste the code in the field
herehttp://www.freeformatter.com/javascript-escape.html, we
need tounescape
\"
from the JSON data.
Create a new file in 010 Editor or hit CTRL+N then copy back
theunescaped string, Select all the string in this new file and hit
CTRL+K, youll prompt to encryption window, only check for SHA1 and hit OK

Below your editing screen youll see the Checksum tab, copy and paste
the value of the Checksum from SHA-1 algorithm to a new file, this time
well use the encryption script. Block or select all the checksum value and
hit CTRL+U this will turn all the letter into lowercase which is a must,
then hit F7 and run the encrypt.1sc file (you may need to open this
file on the 010 editor first).
Now we have get the encrypted string, copy all this string then go to your
.adat file and find lastUsedTexture string, change the value with this
new one. This is the key in this save file mod, the lastUsedTexture value

storing the encrypted save data to prevent cheating or modding on the save
file, by doing our own encryption we pass the texture check.
Last part would be to copy the new .adat file and put it in your
com.gamehivecorp.taptitans folder, just make sure you emptied
filesgamedata and remove .adat.old file.
You can explore more about the save file data, and play with your own
value and experience the game with much more powerful hero :D, good
luck with modding the game.

You might also like