Cave - RPG bankedit

Ruvelia

Member
Hey folks,

Lurker of original D3scene. Looking for a way to read encryption on this map. I've downloaded Visual Studio code with galaxy addon but unable to find the map due to being locked, and tried finding it under hidden files on my PC to see how the encryption works. Also I have 0 experience with this so I was trying to figure it out on my own.

Looking to find a way to max out gold. It *looks* simple as gold is listed under statistics and then statistics is protected by encryption in other lines in the same file, as well as one of the last backup files, just haven't figured out how to connect them.

Any help is appreciated.

Thanks.
 

Ruvelia

Member
I did some diving and here's where I'm stuck in the bank files:

I merely changed gold by buying something and destroying it and left everything else, so the only number that changed was gold, and then I compared the files in excel to find the differences.

<Key name="Encrypt2"><Key name="Encrypt2">
<Value string="-2081075704"/><Value string="2106260952"/>

<Key name="Statistics"><Key name="Statistics">
<Value string=" 700602 667732 5438 12121 23 19 191 5727812 2622413 20439 859836 221 10961 210 149 23 4 0 133 18 3 0 0 0 38 0 0 33 0 1 16465 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"/><Value string=" 666933 667732 5438 12127 24 20 191 5727812 2622413 20439 859836 221 10961 210 149 23 4 0 133 18 3 0 0 0 38 0 0 33 0 1 16475 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"/>

<Key name="Statistics0"><Key name="Statistics0">
<Value string="150697"/><Value string="151039"/>

<Key name="Encrypt"><Key name="Encrypt">
<Value string="316680"/><Value string="686040"/>


Every other layer of encryption was unchanged. These ones were just a few lines apart. Bolded text is the gold change. The other bolds might be the amount of games played as that's tracked as well.
 

Ruvelia

Member
So I tried that, and searched where to find the map. Forum posts from 2015-16 said that you have to search hidden files, Program Data, and maps are stored there.

I have been unable to find it in that location and none of those map files open in staredit besides maps that aren't locked and Blizzard maps.

Any guidance would be helpful.
 

500faults

Member
The dev of this map went to a lot of effort to make it hard to crack, at one point he in fact said he would give his map to someone who cracks the bank file.
 

Ruvelia

Member
Must be a certain condition, because I have seen on the discord I think it was someone admitting to changing the stats on gear to better suit them, but not anything other than that.
 

Ruvelia

Member
Thank you, much appreciated.

While I'm super new to this, I'll do what has been working and doing things in reverse, basically comparing my current bankfile to this and seeing where the values come from, such as the "Encrypt2" number generating from lines 800-915. But I just need to read what flags each number.
 

Sterillium

Cleaner
Global Moderator
Thank you, much appreciated.

While I'm super new to this, I'll do what has been working and doing things in reverse, basically comparing my current bankfile to this and seeing where the values come from, such as the "Encrypt2" number generating from lines 800-915. But I just need to read what flags each number.
i looked at it now for a bit.
im sorry to for a newbie, this is almost impossible, but i give you 3 options u got to hack this:

1) you make the map playable in offline mode and debug the numbers.
2) you make a own programm, take the mapcode where it loads the bank data, rewrite it, then just reproduce it
3) you make a own program, take some partsof the code, rewrite it, take the mainstring, and bruteforce it against the "checking" values.

also helpful: (Convert Galaxy Code to C#)
C#:
        string StringWord(string s, int i) { return s.Split(' ')[i]; }
C#:
        int ModI(int a, int b) { return a % b; }
C#:
        string StringSub(string val, int start, int end) {
            string result = string.Empty;
            try { return val.Substring(start - 1, end - start + 1); } catch { result = string.Empty; }
            return result;
        }
C#:
        int StringToInt(string val) { try { return int.Parse(val); } catch { return 0; } }
C#:
        string IntToString(int val) { return val.ToString(); }
C#:
        int StringLength(string val) { return val.Length; }
Edit: Here the full code to work with (tested and working). Good Luck!
 

Attachments

Last edited:

Ruvelia

Member
I'm a brute force/reverse engineer type. I managed to get gold to work but once I hit the first achievement or go over a certain limit it breaks, and that only works on a brand new file and not my current one.

I appreciate the help so far though, you're the MVP around here but I also don't like wasting peoples time, haha, so I'll figure it out from here hopefully.

Thanks again.
 

Sterillium

Cleaner
Global Moderator
that code up there includes everything you need, i cut the unseless stuff off too.
bruteforce the codes against the maincode it generates :) good luck.
 

magni

Member
1) you make the map playable in offline mode
Hey, Im trying to make a arcade map playable offline


Now the C# code that Sterillium posted in there has nothing regarding that in it, so I went in to the actual map files.
I saw it has lines containing “GameIsOnline() == true” in multiple locations, but even when u flip all of those it still crashes when I start it offline.
It would be awsomone if somone was willing to give me some advice, what I have missed to make it playable offline?



@Sterillium Also what tool did u use to convert galaxy code to C code ?


attached is my attempt to make it working offline
 

Attachments

Sterillium

Cleaner
Global Moderator
Hey, Im trying to make a arcade map playable offline


Now the C# code that Sterillium posted in there has nothing regarding that in it, so I went in to the actual map files.
I saw it has lines containing “GameIsOnline() == true” in multiple locations, but even when u flip all of those it still crashes when I start it offline.
It would be awsomone if somone was willing to give me some advice, what I have missed to make it playable offline?



@Sterillium Also what tool did u use to convert galaxy code to C code ?


attached is my attempt to make it working offline
Uh, big theme.
First: GameIsOnline() == true - you dont set this to false, you delete it and everything whats in the method.
Second: there is no tool to translate to C, you need to understand both languages. (galaxy is VERY similar to C)
Third: you need to look for GameIsTestMap() too.
 
Last edited:

magni

Member
First: GameIsOnline() == true - you dont set this to false, you delete it and everything whats in the method.
Third: you need to look for GameIsTestMap() too.
Thanks a lot for your help
I have tested this today, but when i start the game, it crashes sc2 afther the loading screen.
Here is the version i made with your advice that still crashes when i try to play it offline.
Im not sure if it's a logic flaw in my thinking, or just a small mistake somwhere,would u mind having a look at it ?
 

Attachments

Glorn2

Member
Hey guys, map dev here! Always excited to see who can crack the map open, so I will give you some tips, and you tell me where you are falling short.

Sterillium is correct, that if you want to edit the map offline, you must find and delete all of the "game is online" and "game is test map" lines. You must also find the "handle =! "" " portions and remove them. If you are playing offline, you have no handle. Part of the encryption uses your handle though, so if you want the game to automatically encrypt your new data for you, you will need to use a handle spoofer off-line. There are more of those lines hidden within the mod files for the game though; so you will also have to download the mods, remove those lines, and re-upload your own versions of the mods without the lines in it, and link them properly in the dependencies file. You cannot simply remove the mods though, because they contain attribute values used to calculate the 4th set of final encryption values, known as "Enc".

Let me know where you guys get stuck if you make it past this part, and I will offer what I can!
 

Fergall

Member
Leave the village and go to the eastern part. There are containers, a revolver, and a lot of firewood at the gorge. It is better not to go into the gorge because there will be mutants there, which are not so easy to defeat. If they sided with the Northerners, then it was necessary to get rid of the defenders of the Labor City. Eliminate eight people at the checkpoint. In the building on the left side at the checkpoint, go to the generator and turn on the electromagnetic explosives. The "Seventh Heaven" eliminates six people and two warriors in armor. I deleted the map at the beginning of the game, but then the guys salvagedata.com. It was restored to me, and I go to it without any problems.
 
Last edited:
Top