DarthVan / StarCraft2-Bank-Restorer

Demo version of simple StarCraft 2 custom maps bank editor
https://darthvan.github.io/StarCraft2-Bank-Restorer/
13 stars 2 forks source link

Port support for Viroslaught 4 from C into this utility. (if anyone is interested) #7

Open mumu1000 opened 4 months ago

mumu1000 commented 4 months ago

Cracked custom signature from Viroslaught 4 EXP a while back, maybe someone would be interested in porting the C code I made back then to work with this web utility ?


#include <stdio.h>  

// This code gives AK & AN bank values, these determine the EXP value of the bank, be aware that other stats (like hero levels) affect AK & AN
// Thus this code can only be used to generate new bank files with an arbitrary EXP amount, it cannot work on existing bank files...
// (EXP being the most time consuming aspect of this map, I don't think resetting hero levels is so much of an issue)

// It is very important that integer division is used without decimal part, successive division/multiplication is used as a rounding operation:
// var = var / 100 * 100 isn't a NOOP, it's rounding down var's value to the nearest 100

int main()
{
    int XP_TO_SAVE = 150000000;
    int temp0;
    int AN_TO_SAVE;
    int AK_TO_SAVE;
    int temp1;
    printf("Hello World\n");
    XP_TO_SAVE = ((XP_TO_SAVE ) * 7);
    temp0 = ((XP_TO_SAVE / 1000000000) * 100000000);
    AN_TO_SAVE = (temp0 + ((11 * (10000000 - 1000000)) + 1000000000));
    temp0 = (XP_TO_SAVE - (temp0 * 10));
    temp1 = temp0;
    temp0 = ((temp0 / 100000000) * 100000);
    AN_TO_SAVE += (temp0 + (9 * 10000));
    temp0 = (temp1 - (temp0 * 1000));
    temp1 = temp0;
    temp0 = ((temp0 / 100000) * 10);
    AN_TO_SAVE += (temp0 + 9);
    temp0 = (temp1 - (temp0 * 10000));
    temp1 = temp0;
    temp0 = ((temp0 / 10000) * 100000000);
    AK_TO_SAVE = (temp0 + ((9 * 10000000) + 1000000000));
    temp0 = (temp1 - (temp0 / 10000));
    temp1 = temp0;
    temp0 = ((temp0 / 100) * 100000);
    AK_TO_SAVE += (temp0 + (14 * (10000 - (1000 * 3))));
    temp0 = ((temp1 - (temp0 / 1000)) * 10);
    AK_TO_SAVE += (temp0 + 9);
    printf("AK: %d\nAN: %d\n",AK_TO_SAVE,AN_TO_SAVE);

    return 0;
}```
DarthVan commented 4 months ago

I don't understand anything, but it's interesting Is "Viroslaught 4 EXP" an arcade game from SC2?

printf("Hello World\n"); 😄

mumu1000 commented 4 months ago

Sry it was so cryptic ^^'

Virsolaught 4 : the name of the map ! I only cracked the code enough to be able to make a bank from scratch with any amount of experience (EXP) into it. Experience is the core of the grind of this map, litterally tens of thousands of hours of (quite repetitive) gameplay to have a chance at approaching the max level (lvl 1000).

Despite that, the map itself is quite a fun macro/PvE focused map, so I think more people would play it if it wasn't so hard to level up :X

About the code itself, there isn't really anything complex about it (apart from the eye scratching syntax). If anybody wants to use it but has trouble with C syntax, just reply here and I'll try to clear it up ^^ (tbf, galaxy script is quite close to C)

The dev tried to make it hard to retro engineer so he used a lot of cryptic names in the bank variable names (AN, AK etc...) and the galaxy code itself is quite a mess (took me a while to break it)

If nobody finds the courage and the patience to integrate my code into your utility it's fine, at least the code is out there and somebody stumbling upon this map and finding it too grindy for his liking has a hint at a solution now :'D

DarthVan commented 4 months ago

Ok, thanks. May be will port this in future to js