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

Signature calculation is wrong for simple maps now #6

Open EllaLennox opened 4 months ago

EllaLennox commented 4 months ago

I used the bank sign for "Any simple map" previously and it worked fine. Uploaded a file I previously made with bank sign for "any simple map" and now it creates a different signature for the same data (same bank data, same player ID, same author ID).

Thanks for keeping the BankSign project alive :)

DarthVan commented 4 months ago

Its strange.. But thx for reporting, ill check it soon.

DarthVan commented 4 months ago

Ok, I tested this on the example of runling.

  1. generated a new file
  2. opened any simple map
  3. entered the Author ID
  4. dropped the bank
  5. clicked “update signature” (it has not changed)
  6. downloaded the bank and tested it in the game, everything is correct

2

First, make sure that Player ID, Author ID, Bank Name are correct, because they affect the signature. Additionally, IDs vary by region. if you change the region, you need to enter the appropriate IDs.

Another problem may arise if you use a bank that has special types of keys that may not currently be supported in the editor (for example, a key like point) As far as I remember, the following keys are currently supported: String, Flag, Int, Fixed, Text, Point.

If you want, you can attach the bank here by dragging it into the comment field. I'll check it for unsupported keys.

EllaLennox commented 4 months ago

firefox_NdxUD6HWNk firefox_Vji4zq5Zga explorer_dqi7Q4rfby rushsc2contents.txt

"A47AE903E169EA865AAA008DCFE35349E2B3E1BF" signature is accepted by the map, the other which is generated after hitting "update signature" isn't.

DarthVan commented 4 months ago

Its strange, there are INT and STRING keys only, and they are supported by the editor... What map is this for? Seems I have to run this for some tests.

EllaLennox commented 4 months ago

[>] Its strange, there are INT and STRING keys only, and they are supported by the editor... What map is this for? Seems I have to run this for some tests.

A map called "Kingdom Rush." Tower defense game. battlenet:://starcraft/map/1/176302

It won't let me upload a zip, so here's a link to the sc2map and the galaxy file. https://file.io/I3OyJR2k7COD

Can use MPQedit to open and view the content (parameter tags etc) if needed. https://www.hiveworkshop.com/threads/ladiks-mpq-editor.249562/

DarthVan commented 4 months ago

I found a bug in the section/key sorting algorithm. Your arcade used very unusual key names, and due to incorrect sorting, the signature was incorrect.

The update has already been deployed, I hope everything will work now. I took your statistics and applied them to my account - the bank did not reset to zero in the game.

EllaLennox commented 4 months ago

I found a bug in the section/key sorting algorithm. Your arcade used very unusual key names, and due to incorrect sorting, the signature was incorrect.

The update has already been deployed, I hope everything will work now. I took your statistics and applied them to my account - the bank did not reset to zero in the game.

Ah ha! I'll do some testing with other maps to triple-verify. Thanks for looking into it!

DarthVan commented 4 months ago

Ah ha! I'll do some testing with other maps to triple-verify. Thanks for looking into it!

Ok, thanks. Let me know if you find any bugs again🐛

EllaLennox commented 4 months ago

Seems to work with everything I've tried. :)