None.

Staredit Network > Forums > SC1 Map Showcase > Topic: Warbible Online [Persistent Real-Time EXP Added]

New Region (Map) Added:

https://warbibleonline.com/maps/warbible-rpg/

Choose either Rune Region or Brama Region. Load existing progress on BOTH maps!

SEASON 3 STARTS.

Post has been edited 1 time(s), last time on May 9 2018, 6:30 am by lifebot.

https://warbibleonline.com/maps/warbible-rpg/

Choose either Rune Region or Brama Region. Load existing progress on BOTH maps!

SEASON 3 STARTS.

Post has been edited 1 time(s), last time on May 9 2018, 6:30 am by lifebot.

None.

Persistent Real-time EXP Status in % added

Post has been edited 1 time(s), last time on May 22 2018, 12:28 am by lifebot.

None.

I am especially curious about the save/load mechanic. What went into making it? I assume that the map connects to some sort of SQL database?

I created and implemented the save / load mechanic. It works as a 1-way hash. There are 10 code points you have to enter, which are the numbers 1, 2, 3 and 4 on the map. Normal triggers are used to detect which symbol the defiler has cast the dark swarm on.

The 4 different values have got large integer numbers associated with them: 1 = 954437177, 2 = 1908874353, 3 = 2863311530, 4 = 3817748708. A passcode consists of 10 values between 1 and 4, eg a code might be 1113323242, so there are 1,048,576 possible unique codes.

Each index in the passcode has the xth lowest prime number associated with it, so:

index 1 = 2

i2 = 3

i3 = 5

i4 = 7

i5 = 11

i6 = 13

i7 = 17

i8 = 19

i9 = 23

i10 = 29

The formula to calculate the final hash value is cumulative and takes the previous steps result, adds the current code value and then multiplies it by the index, so using 1113323242 as the code:

(0 + 954437177) * 2 = 1908874354

(1908874354 + 954437177) * 3 = 8589934593

(8589934593 + 954437177) * 5 = 47721858850

(47721858850 + 2863311530) * 7 = 354096192660

(354096192660 + 2863311530) * 11 = 3926554546090

(3926554546090 + 1908874353) * 13 = 51070024465759

(51070024465759 + 2863311530) * 17 = 868239092213913

(868239092213913 + 1908874353) * 19 = 16496579020677054

(16496579020677054 + 3817748708) * 23 = 379421405283792526

(379421405283792526 + 1908874353) * 29 = 11003220808587339491

Triggers are implemented to calculate all of the above as the player enters their passcode, so in sharing the above I haven't given away anything that you couldn't find out from reading the triggers in the map. Because SC only handles 32 bit numbers, each value greater than 2^32 is (automatically) MODed by 2^32, so the final value is 11003220808587339491 MOD 2^32 = 554,231,523 . Then we have a trigger that says "if hashinput is exactly 554231523, set player level to 40, class/EXP/minerals to whatever". Obviously if there are 12 character classes and 100 levels, then there are 1200 of these triggers, 1 for each level and character class.

If you were to unprotect the map and look at the triggers, you can work out the above calculation algorithm, but the map itself does NOT store the original input codes. All you know is the algorithm used to calculate the hash and the final hash values for the 1200 different triggers. But because it's a 1-way hash, it's impossible to look at the value 554,231,523 and work backwards to determine what the original passcode is, because the 32-bit integer wrap around (automatic MOD operation) discards data at every step, while retaining enough data to make the final value unique.

For a given final hash code, the only way to work out the passcode is to brute-force all possible 1,048,576 passcodes, to see which one results in that hash (or, in the specific case of 554231523, read this post).

Post has been edited 2 time(s), last time on May 19 2018, 11:47 pm by Lanthanide.

The 4 different values have got large integer numbers associated with them: 1 = 954437177, 2 = 1908874353, 3 = 2863311530, 4 = 3817748708. A passcode consists of 10 values between 1 and 4, eg a code might be 1113323242, so there are 1,048,576 possible unique codes.

Each index in the passcode has the xth lowest prime number associated with it, so:

index 1 = 2

i2 = 3

i3 = 5

i4 = 7

i5 = 11

i6 = 13

i7 = 17

i8 = 19

i9 = 23

i10 = 29

The formula to calculate the final hash value is cumulative and takes the previous steps result, adds the current code value and then multiplies it by the index, so using 1113323242 as the code:

(0 + 954437177) * 2 = 1908874354

(1908874354 + 954437177) * 3 = 8589934593

(8589934593 + 954437177) * 5 = 47721858850

(47721858850 + 2863311530) * 7 = 354096192660

(354096192660 + 2863311530) * 11 = 3926554546090

(3926554546090 + 1908874353) * 13 = 51070024465759

(51070024465759 + 2863311530) * 17 = 868239092213913

(868239092213913 + 1908874353) * 19 = 16496579020677054

(16496579020677054 + 3817748708) * 23 = 379421405283792526

(379421405283792526 + 1908874353) * 29 = 11003220808587339491

Triggers are implemented to calculate all of the above as the player enters their passcode, so in sharing the above I haven't given away anything that you couldn't find out from reading the triggers in the map. Because SC only handles 32 bit numbers, each value greater than 2^32 is (automatically) MODed by 2^32, so the final value is 11003220808587339491 MOD 2^32 = 554,231,523 . Then we have a trigger that says "if hashinput is exactly 554231523, set player level to 40, class/EXP/minerals to whatever". Obviously if there are 12 character classes and 100 levels, then there are 1200 of these triggers, 1 for each level and character class.

If you were to unprotect the map and look at the triggers, you can work out the above calculation algorithm, but the map itself does NOT store the original input codes. All you know is the algorithm used to calculate the hash and the final hash values for the 1200 different triggers. But because it's a 1-way hash, it's impossible to look at the value 554,231,523 and work backwards to determine what the original passcode is, because the 32-bit integer wrap around (automatic MOD operation) discards data at every step, while retaining enough data to make the final value unique.

For a given final hash code, the only way to work out the passcode is to brute-force all possible 1,048,576 passcodes, to see which one results in that hash (or, in the specific case of 554231523, read this post).

Post has been edited 2 time(s), last time on May 19 2018, 11:47 pm by Lanthanide.

None.

Nope, **I created the save/load system and it's design & implementation** He has confused himself there

The save system is based on 10 digit codes which recalls 100 different level states.

Lanthanide encrypted the load part by using the 1-way hash he explained above but it is only used to secure the lvl 100 code atm.

Lanthanide also improved the load system a little bit by adding countdown timer for every input made during load process.

The encryption Lanthinde has done is work that is quantified to be way larger than the save system itself though.

The save system is based on 10 digit codes which recalls 100 different level states.

Lanthanide encrypted the load part by using the 1-way hash he explained above but it is only used to secure the lvl 100 code atm.

Lanthanide also improved the load system a little bit by adding countdown timer for every input made during load process.

The encryption Lanthinde has done is work that is quantified to be way larger than the save system itself though.

None.

Considering that I re-wrote all of the triggers for the load system, and substantially improved the save triggers, I stand by my statement.

None.

Yes and I certainly agree. The current system used in the map is indeed your re-work version of the save/load system. I just wanted to clarify though that I created it first, which worked pretty much the same as it is now. The map at the time displayed codes in-game up to level 16 only, and 16-100 were protected by your 1-way hash encryption. This meant that if someone was to unprotect the map, the highest level code that can be obtained from looking at the display text triggers would be level 16 unless the encryption was cracked.

The newest version of the map displays codes up to level 99 in-game through the display text trigger, essentially relying mostly on the newest freeze protection that wasn't available before. The 100 level is still encrypted by your 1-way hash, which means if someone unprotected the map level 99 can be obtained but not 100. It is definitely way less secure now, but the decision to do this was mostly due to authenticating saves becoming too much work for me. Now I only need to authenticate level 100, reducing the workload substantially. I was hoping you if you could suggest a possible way to make it stronger, but for now it seems secure enough.

Post has been edited 2 time(s), last time on May 21 2018, 5:55 am by lifebot.

The newest version of the map displays codes up to level 99 in-game through the display text trigger, essentially relying mostly on the newest freeze protection that wasn't available before. The 100 level is still encrypted by your 1-way hash, which means if someone unprotected the map level 99 can be obtained but not 100. It is definitely way less secure now, but the decision to do this was mostly due to authenticating saves becoming too much work for me. Now I only need to authenticate level 100, reducing the workload substantially. I was hoping you if you could suggest a possible way to make it stronger, but for now it seems secure enough.

Post has been edited 2 time(s), last time on May 21 2018, 5:55 am by lifebot.

None.

New Patch - Lvl 100 EXP bar bug was fixed.

Season 4 is live. Season 5 starts when Fortnite Season 5 starts.

Post has been edited 1 time(s), last time on May 22 2018, 12:31 am by lifebot.

Season 4 is live. Season 5 starts when Fortnite Season 5 starts.

Post has been edited 1 time(s), last time on May 22 2018, 12:31 am by lifebot.

None.

Options

[01:33 pm]

Mini Moose 2707 -- Also things marked as changed even when just opening the map. 0.8.0 opens/saves fine tho smh[01:25 pm]

Mini Moose 2707 -- "Exception raised while loading the MPQ. The MPQ appears to be in an unsupported format." This is an odd error to get from a map I just saved in SCMD2. It wrote this MPQ lmao[10:22 pm]

Suicidal Insanity -- Hmm, may be a side effect from turning it into a OLE automation server[07:42 pm]

Mini Moose 2707 -- SMH, newest SMCD2 dies when I try to open it from the command line, which is kind of important for being able to make it the default app lmao