What would you like to see in a Save/Load Code Tutorial?

Effane

Save/Load Code Tutorial
Reaction score
51
I have recently been getting alot of PMs since my quest to build a better save/load engine.

So I think the best way to fix it all or I will spend forever typing back to PMs. Build a decent Save/Load Code tutorial.

Now, what features would people like to see in it? What do you want to save?

I was thinking about these items

Hero Type
Hero Level
Hero Items
Player Gold and Lumber

Then some basic encryption primer and a nice little sample map.

So what do you people think?
 
S

Shinyblade

Guest
I think its great, just make sure you list all the variables and what type they are. It's almost impossible to do it without a complete list lol. Also if you could a way to make it so you could save more than one hero on a single code (like FF Epic) would be nice.


Hope all goes well,
Shinyblade
 

Naminator

Coming Back To Life
Reaction score
76
It would be nice to save hero level nothing else..i wont to know only hero level..

Thanks if you can :D
 

Effane

Save/Load Code Tutorial
Reaction score
51
Also if you could a way to make it so you could save more than one hero on a single code (like FF Epic) would be nice.

Thanks for the feedback. Guess though you wont see the links all over, BUT multiple heroes is easy enough to do. Especially if you know the heroes ahead of time that you need to track and the list is not changing as you play.

It would be nice to save hero level nothing else..i wont to know only hero level..

Thanks if you can

Tutorials are meant to help everyone. not just you. I am not going to make it save just one thing. Sorry.
 

Effane

Save/Load Code Tutorial
Reaction score
51
**Edit in. Hey look, its Chocobo, my favorite Naysayer - Gold and Lumber are useless for most uses I would agree, >>BUT<< they are great for the tutorial. Its a larger number and it will show how to convert numbers larger than just 2 character spaces. Its more a practical exercise than a 100% working and breathing Save/Lord code.**

Built the first two parts of the tutorial. The initialization and the first save code.
Figured I would post the code for people to check for bugs while I work on the last three parts.

Code:
SaveLoadInitialize
    Events
        Time - Elapsed game time is 0.10 seconds
    Conditions
    Actions
        -------- Need to load your number system in here, right now its 36 chars. --------
        Set SaveLoadCharacterSet = 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
        Set SaveLoadMaxCharacters = 36
        -------- Need to load your encryption system in here, right now its 5 sets. --------
        Set SaveLoadEncryptionSet[1] = ABCDEFEGHIJKLMNOPQRSTUVWXYZ0123456789
        Set SaveLoadEncryptionSet[2] = GHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFE
        Set SaveLoadEncryptionSet[3] = ABCDEFPQRSTUVWXYZ012345EGHIJKLMNO6789
        Set SaveLoadEncryptionSet[4] = ASTUVWXYBCJKLMNOPQRZ01234DEFEGHI56789
        Set SaveLoadEncryptionSet[5] = HIJKLABCDEVWXYZ0123FEGM4567NOPQRSTU89
        Set SaveLoadMaxEncryptionSets = 5
        -------- Now time to populate the Number system. this loop will put the characters into an array which acts like a counting system from 0 till MaxChars --------
        For each (Integer A) from 1 to SaveLoadMaxCharacters, do (Actions)
            Loop - Actions
                Set SaveLoadCharacterNumbers[((Integer A) - 1)] = (Substring(SaveLoadCharacterSet, (Integer A), (Integer A)))
        -------- Load the Heroes into an array to make numbers out of them. --------
        Set SaveLoadHeroesStored[1] = Paladin
        Set SaveLoadHeroesStored[2] = Archmage
        Set SaveLoadHeroesStored[3] = Mountain King
        Set SaveLoadHeroesStored[4] = Blood Mage
        Set SaveLoadMaxHeroesStored = 4
        Set SaveLoadSlotsHero = 2
        -------- Load the Items into an array to make numbers out of them. --------
        Set SaveLoadItemsStored[1] = Dust of Appearance
        Set SaveLoadItemsStored[2] = Minor Replenishment Potion
        Set SaveLoadItemsStored[3] = Potion of Speed
        Set SaveLoadItemsStored[4] = Ring of the Archmagi
        Set SaveLoadItemsStored[5] = Cloak of Shadows
        Set SaveLoadItemsStored[6] = Gauntlets of Ogre Strength +3
        Set SaveLoadItemsStored[7] = Mantle of Intelligence +3
        Set SaveLoadItemsStored[8] = Slippers of Agility +3
        Set SaveLoadItemsStored[9] = Manual of Health
        Set SaveLoadItemsStored[10] = Healing Salve
        Set SaveLoadMaxItemsStored = 10
        Set SaveLoadSlotsItem = 2
        -------- Need to setup slots for Gold and Lumber, 4 chars will cover up to 1.6 mill with 36 chars --------
        Set SaveLoadSlotsGold = 4
        Set SaveLoadSlotsLumber = 4
        -------- Set the Block Size, basically the amount of characters between dashes. --------
        Set SaveLoadBlockSize = 4

Code:
SaveModuleSingle
    Events
        Player - Player 1 (Red) types a chat message containing -save as An exact match
    Conditions
    Actions
        -------- This PlayerGroup is so you can broadcast the correct player the message in the end. --------
        Player Group - Add (Triggering player) to SaveLoadPlayerGroupFocus
        -------- Decide how many variables the system will store --------
        Set SaveLoadMaxVariablesStored = 9
        -------- Default everything and load the basic stuff. Needs to happen each trigger activation or bad things happen. --------
        Set SaveLoadChecksumChar = <Empty String>
        Set SaveLoadEncryptedString = <Empty String>
        Set SaveLoadEncryptionKey = <Empty String>
        Set SaveLoadPreEncryptionString = <Empty String>
        Set SaveLoadFinalString = <Empty String>
        For each (Integer A) from 1 to SaveLoadMaxCharacters, do (Actions)
            Loop - Actions
                Set SaveLoadEncryptionNumbers[((Integer A) - 1)] = <Empty String>
        For each (Integer A) from 1 to SaveLoadMaxVariablesStored, do (Actions)
            Loop - Actions
                Set SaveLoadTempStrings[(Integer A)] = <Empty String>
        -------- Setup the encryption for use. --------
        Set SaveLoadEncryptionKeyInt = (Random integer number between 0 and (SaveLoadMaxCharacters - 1))
        Set SaveLoadEncryptionKey = SaveLoadCharacterNumbers[SaveLoadCheckSumInt]
        For each (Integer A) from 1 to SaveLoadMaxCharacters, do (Actions)
            Loop - Actions
                Set SaveLoadEncryptionNumbers[((Integer A) - 1)] = (Substring(SaveLoadEncryptionSet[SaveLoadEncryptionKeyInt], (Integer A), (Integer A)))
        -------- Now to start converting things to save --------
        -------- Final string will be Hero+ItemsX6+Gold+Lumber --------
        -------- Hero first --------
        For each (Integer A) from 1 to SaveLoadMaxHeroesStored, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of SaveLoadPlayerHeroSingle[(Player number of (Triggering player))]) Equal to SaveLoadHeroesStored[(Integer A)]
                    Then - Actions
                        Set SaveLoadConversionInteger = (Integer A)
                    Else - Actions
        For each (Integer A) from 1 to SaveLoadSlotsHero, do (Actions)
            Loop - Actions
                Set SaveLoadPowerOfMaxNumber = 1
                For each (Integer B) from (Integer A) to SaveLoadSlotsItem, do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsHero - (Integer A)) Greater than or equal to 1
                    Then - Actions
                        Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadPowerOfMaxNumber)
                        Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadPowerOfMaxNumber))
                        Set SaveLoadTempStrings[1] = (SaveLoadTempStrings[1] + SaveLoadCharacterNumbers[SaveLoadConversionDividedInt])
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsHero - (Integer A)) Less than 1
                    Then - Actions
                        Set SaveLoadTempStrings[1] = (SaveLoadTempStrings[1] + SaveLoadCharacterNumbers[SaveLoadConversionRemainder])
                    Else - Actions
                Set SaveLoadConversionInteger = SaveLoadConversionRemainder
        -------- Now the Items carried by hero --------
        -------- Item Slot1-6 courtesy the loop C --------
        For each (Integer IntegerC) from 1 to 6, do (Actions)
            Loop - Actions
                For each (Integer A) from 1 to SaveLoadMaxItemsStored, do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Item-type of (Item carried by SaveLoadPlayerHeroSingle[(Player number of (Triggering player))] in slot IntegerC)) Equal to SaveLoadItemsStored[(Integer A)]
                            Then - Actions
                                Set SaveLoadConversionInteger = (Integer A)
                            Else - Actions
                For each (Integer A) from 1 to SaveLoadSlotsItem, do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = 1
                        For each (Integer B) from (Integer A) to SaveLoadSlotsItem, do (Actions)
                            Loop - Actions
                                Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (SaveLoadSlotsItem - (Integer A)) Greater than or equal to 1
                            Then - Actions
                                Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadPowerOfMaxNumber)
                                Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadPowerOfMaxNumber))
                                Set SaveLoadTempStrings[(IntegerC + 1)] = (SaveLoadTempStrings[(IntegerC + 1)] + SaveLoadCharacterNumbers[SaveLoadConversionDividedInt])
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (SaveLoadSlotsItem - (Integer A)) Less than 1
                            Then - Actions
                                Set SaveLoadTempStrings[(IntegerC + 1)] = (SaveLoadTempStrings[(IntegerC + 1)] + SaveLoadCharacterNumbers[SaveLoadConversionRemainder])
                            Else - Actions
                        Set SaveLoadConversionInteger = SaveLoadConversionRemainder
        -------- Now to convert the Gold into the strings --------
        Set SaveLoadConversionInteger = ((Triggering player) Current gold)
        For each (Integer A) from 1 to SaveLoadSlotsGold, do (Actions)
            Loop - Actions
                Set SaveLoadPowerOfMaxNumber = 1
                For each (Integer B) from (Integer A) to SaveLoadSlotsGold, do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsGold - (Integer A)) Greater than or equal to 1
                    Then - Actions
                        Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadPowerOfMaxNumber)
                        Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadPowerOfMaxNumber))
                        Set SaveLoadTempStrings[8] = (SaveLoadTempStrings[8] + SaveLoadCharacterNumbers[SaveLoadConversionDividedInt])
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsGold - (Integer A)) Less than 1
                    Then - Actions
                        Set SaveLoadTempStrings[8] = (SaveLoadTempStrings[8] + SaveLoadCharacterNumbers[SaveLoadConversionRemainder])
                    Else - Actions
                Set SaveLoadConversionInteger = SaveLoadConversionRemainder
        -------- Now to convert the Lumber into the strings --------
        Set SaveLoadConversionInteger = ((Triggering player) Current lumber)
        For each (Integer A) from 1 to SaveLoadSlotsLumber, do (Actions)
            Loop - Actions
                Set SaveLoadPowerOfMaxNumber = 1
                For each (Integer B) from (Integer A) to SaveLoadSlotsLumber, do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsLumber - (Integer A)) Greater than or equal to 1
                    Then - Actions
                        Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadPowerOfMaxNumber)
                        Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadPowerOfMaxNumber))
                        Set SaveLoadTempStrings[9] = (SaveLoadTempStrings[9] + SaveLoadCharacterNumbers[SaveLoadConversionDividedInt])
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsLumber - (Integer A)) Less than 1
                    Then - Actions
                        Set SaveLoadTempStrings[9] = (SaveLoadTempStrings[9] + SaveLoadCharacterNumbers[SaveLoadConversionRemainder])
                    Else - Actions
                Set SaveLoadConversionInteger = SaveLoadConversionRemainder
        -------- Now to combine the current finished strings. --------
        For each (Integer A) from 1 to SaveLoadMaxVariablesStored, do (Actions)
            Loop - Actions
                Set SaveLoadPreEncryptionString = (SaveLoadPreEncryptionString + SaveLoadTempStrings[(Integer A)])
        -------- Now to create a checksum for security, there are many ways to create this number. We will use the previous variables since its easy. --------
        For each (Integer A) from 1 to SaveLoadMaxVariablesStored, do (Actions)
            Loop - Actions
                For each (Integer B) from 1 to SaveLoadMaxCharacters, do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Substring(SaveLoadPreEncryptionString, (Integer A), (Integer A))) Equal to SaveLoadCharacterNumbers[(Integer B)]
                            Then - Actions
                                Set SaveLoadCheckSumInt = (SaveLoadCheckSumInt + (Integer A))
                            Else - Actions
        Set SaveLoadConversionInteger = SaveLoadCheckSumInt
        Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadMaxCharacters)
        Set SaveLoadConversionRemainder = (SaveLoadConversionInteger / (SaveLoadConversionDividedInt x SaveLoadMaxCharacters))
        Set SaveLoadChecksumChar = SaveLoadCharacterNumbers[SaveLoadConversionRemainder]
        -------- Now we have all the characters ready to combine and encrypt fully, then package it pretty. --------
        Set SaveLoadPreEncryptionString = (SaveLoadPreEncryptionString + SaveLoadChecksumChar)
        For each (Integer A) from 1 to (Length of SaveLoadPreEncryptionString), do (Actions)
            Loop - Actions
                Set SaveLoadConversionInteger = (Integer A)
                Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadBlockSize)
                Set SaveLoadConversionRemainder = (SaveLoadConversionInteger / (SaveLoadConversionDividedInt x SaveLoadBlockSize))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        SaveLoadConversionRemainder Equal to 0
                    Then - Actions
                        Set SaveLoadEncryptedString = -
                    Else - Actions
                For each (Integer B) from 1 to SaveLoadMaxCharacters, do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Substring(SaveLoadPreEncryptionString, (Integer A), (Integer A))) Equal to SaveLoadCharacterNumbers[(Integer B)]
                            Then - Actions
                                Set SaveLoadEncryptedString = (SaveLoadEncryptedString + SaveLoadEncryptionNumbers[(Integer B)])
                            Else - Actions
        -------- Now for the final string, which will be the unencrypted key, and the rest of the encrypted information --------
        Set SaveLoadFinalString = ((SaveLoadEncryptionKey + -) + SaveLoadEncryptedString)
        -------- And now to broadcast all the hard work --------
        Game - Display to SaveLoadPlayerGroupFocus for 600.00 seconds the text: SaveLoadFinalString
        Player Group - Remove all players from SaveLoadPlayerGroupFocus
 
D

Duddude

Guest
Also

Also what i would like to see is a deep explanation of how to change every aspect of it ya know? For example how to chnage the amount of gold and lumber...or how many heros to save. :p THX
 

SFilip

Gone but not forgotten
Reaction score
634
by all means a name saving system which would prevent everyone except for the owner of the code and, unfortinatly, his spoofers. and a checksum (anti-cheat).
also perhaps a system that would turn all of the units you have intro gold...some rpgs use expencive mercenaries.
 
D

Duddude

Guest
chocobo, of cource i read the code but the code is so long that sumtimes begginers (like me) get lost and dont have any idea what to change. :p
 

Effane

Save/Load Code Tutorial
Reaction score
51
Most of what it takes to make a save/load code is advanced algebra. It kinda worries me that it confuses people when its written alot clearer.

I will have a full tutorial when I am done, with a long explaination of everything. but right now, I am just fleshing out the load code for the task at hand so I can write the tutorial to explain how its built in a general way. Somehow I just think in a backwards way in this aspect, and I dont want to be switching between code and text as I write the tutorial myself.

To explain it simpler.
THIS TOPIC IS NOT THE TUTORIAL!

SFilip. About the name saving system to keep people from cheating with the code. The biggest issue with it is BNet allows alot of characters for names. And 15 of these characters too. Which means the code would become very huge in just one save of a name. (It would increase the code size by about 30 chars without case). You could save a partial of the name, but that doesnt really stop spoofers and in general its supposed to be the players responsibility to protect that code. IE DONT LOAD IN THE ALL OR ALLY chat. I can do it so its 100% accurate, but you would see alot of more advanced stuff that may not belong in a starter tutorial.

Now what I wanted to know, do the variable names seem to make sense? Is it readable? Are any of the comments not clear or out of place?
 

SFilip

Gone but not forgotten
Reaction score
634
there is an encryption system you can use to encrypt names...very good and hard to break unless you spend alot of time to study it. and just for the record - there isn't really a rule about the size of the code neither there is one that tells you that you can only use numbers. you take a screenshot when you get the code and simply rewrite it. sure it takes time, but you will never spend more than 2 minutes or something...
the system itself works this way:
a=b
b=c
c=d
etc.
or completely random (even better)
a=g
b=s
c=t
etc.
 

Effane

Save/Load Code Tutorial
Reaction score
51
You missed what I was trying to say SFilip.

Now lets say you have these pool of average joe players.

-=Noob$layer=-
WhatsAKeyboard!
I_Cant_Type
JustĂnÖtherPlayerŻ


You could almost see all these Names on Bnet I would bet, or something like them.

Now the first isnt bad, you could make a 64 Char set to get him, in fact all 3 would be doable with that character set. But then again, encryption would be 64 chars and players would have to type that in. I dont know if some people playing even know where a few of these chars are on the keyboard, and I believe that you should never make something so complicated that it becomes a chore.

ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()_+-=,.<>/?;':"[]{}\|`~

Now there is a way around the forcing them to type with the 64 Char system and keep it 36. You can create another conversion array like the Heroes or Item array above and load these chars into the array. Then you convert the 15 character name to a 36 number system.
Now the drawback. You will gain 30 chars. You can shorten it according to string length for player, but you would still need a char to tell you how long its in the code. So that would mean you need either a '-' or a number in a certain location.

Now there is another way, but its not 100%.
You can use the character system above to convert the playername to a combined integer and then create a checksum with it. Checksum would be much shorter, which is a good thing. But bad thing is its possible but not likely the stealing player would have the same checksum from their name. Odds of that? 15 X (Max Characters Bnet allows for names) :: 1.
This would only add 2 chars to the system, but like I said, its not 100%.

Neither of these ways are case sensitive though, stupid WC3 and its inability to detect case right.
 

Effane

Save/Load Code Tutorial
Reaction score
51
Been busy, hard to split time between the ORPG and this tutorial. I still havent typed up the tutorial, but that wont be a huge hurdle to get over.

All the code is complete and well tested. It works nicely and reliably.
The attached map has a quest entered in with basic commands about how to clear, load, randomize and more.

Code:
SaveLoadInitialize
    Events
        Time - Elapsed game time is 0.10 seconds
    Conditions
    Actions
        -------- Need to load your number system in here, right now its 36 chars. --------
        -------- Slot1=36 --------
        -------- Slot2=1296 --------
        -------- Slot2=1296 --------
        -------- Slot3=46656 --------
        -------- Slot4=1679616 --------
        -------- Slot5=60466176 --------
        -------- I like making 0 the actual 0 for the unencrypted system. makes it easier to track stuff later. --------
        Set SaveLoadCharacterSet = 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
        Set SaveLoadMaxCharacters = 36
        -------- Need to load your encryption system in here, right now its 5 sets. Load code will get broken if you use a '-' in the Number system --------
        Set SaveLoadEncryptionSet[1] = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
        Set SaveLoadEncryptionSet[2] = GHIJKLMNOPQRSTUVWXYZ0123456789ABCDEF
        Set SaveLoadEncryptionSet[3] = ABCDEFPQRSTUVWXYZ012345GHIJKLMNO6789
        Set SaveLoadEncryptionSet[4] = ASTUVWXYBCJKLMNOPQRZ01234DFEGHI56789
        Set SaveLoadEncryptionSet[5] = HIJKLABCDEVWXYZ0123FGM4567NOPQRSTU89
        Set SaveLoadMaxEncryptionSets = 5
        -------- Now time to populate the Number system. this loop will put the characters into an array which acts like a counting system from 0 till MaxChars --------
        For each (Integer A) from 1 to SaveLoadMaxCharacters, do (Actions)
            Loop - Actions
                Set SaveLoadCharacterNumbers[((Integer A) - 1)] = (Substring(SaveLoadCharacterSet, (Integer A), (Integer A)))
        -------- Make sure you calculate on paper how many numbers per the amount of slots you get from Characters, this will make it MUCH easier to do slot sizes --------
        -------- Size of Levels to be saved for herolevel --------
        Set SaveLoadSlotsHeroLevel = 2
        -------- Load the Heroes into an array to make numbers out of them. --------
        Set SaveLoadHeroesStored[1] = Paladin
        Set SaveLoadHeroesStored[2] = Archmage
        Set SaveLoadHeroesStored[3] = Mountain King
        Set SaveLoadHeroesStored[4] = Blood Mage
        Set SaveLoadMaxHeroesStored = 4
        Set SaveLoadSlotsHero = 2
        -------- Load the Items into an array to make numbers out of them. --------
        Set SaveLoadItemsStored[1] = Dust of Appearance
        Set SaveLoadItemsStored[2] = Minor Replenishment Potion
        Set SaveLoadItemsStored[3] = Potion of Speed
        Set SaveLoadItemsStored[4] = Ring of the Archmagi
        Set SaveLoadItemsStored[5] = Cloak of Shadows
        Set SaveLoadItemsStored[6] = Gauntlets of Ogre Strength +3
        Set SaveLoadItemsStored[7] = Mantle of Intelligence +3
        Set SaveLoadItemsStored[8] = Slippers of Agility +3
        Set SaveLoadItemsStored[9] = Manual of Health
        Set SaveLoadItemsStored[10] = Healing Salve
        Set SaveLoadMaxItemsStored = 10
        Set SaveLoadSlotsItem = 2
        -------- Need to setup slots for Gold and Lumber, 4 chars will cover up to 1.6 mill with 36 chars --------
        Set SaveLoadSlotsGold = 4
        Set SaveLoadSlotsLumber = 4
        -------- Set the Block Size, basically the amount of characters between dashes. --------
        Set SaveLoadBlockSize = 4
        -------- Set the Variables to be stored size, good time to setup your variable positions. --------
        Set SaveLoadVariablesStored[1] = SaveLoadSlotsHero
        Set SaveLoadVariablesStored[2] = SaveLoadSlotsHeroLevel
        Set SaveLoadVariablesStored[3] = SaveLoadSlotsItem
        Set SaveLoadVariablesStored[4] = SaveLoadSlotsItem
        Set SaveLoadVariablesStored[5] = SaveLoadSlotsItem
        Set SaveLoadVariablesStored[6] = SaveLoadSlotsItem
        Set SaveLoadVariablesStored[7] = SaveLoadSlotsItem
        Set SaveLoadVariablesStored[8] = SaveLoadSlotsItem
        Set SaveLoadVariablesStored[9] = SaveLoadSlotsGold
        Set SaveLoadVariablesStored[10] = SaveLoadSlotsLumber
        -------- This variable stops players from loading again after they load the first time. --------
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                Set SaveLoadHasLoaded[(Integer A)] = False

-------------------------------

Code:
SaveModuleSingle
    Events
        Player - Player 1 (Red) types a chat message containing -save as An exact match
        Player - Player 2 (Blue) types a chat message containing -save as An exact match
        Player - Player 3 (Teal) types a chat message containing -save as An exact match
        Player - Player 4 (Purple) types a chat message containing -save as An exact match
    Conditions
    Actions
        -------- This PlayerGroup is so you can broadcast the correct player the message in the end. --------
        Player Group - Add (Triggering player) to SaveLoadPlayerGroupFocus
        -------- Decide how many variables the system will store --------
        Set SaveLoadMaxVariablesStored = 10
        -------- Default everything and load the basic stuff. Needs to happen each trigger activation or bad things happen. --------
        Set SaveLoadChecksumChar = <Empty String>
        Set SaveLoadEncryptedString = <Empty String>
        Set SaveLoadEncryptionKey = <Empty String>
        Set SaveLoadCheckSumInt = 0
        Set SaveLoadPreEncryptionString = <Empty String>
        Set SaveLoadFinalString = <Empty String>
        For each (Integer A) from 1 to SaveLoadMaxCharacters, do (Actions)
            Loop - Actions
                Set SaveLoadEncryptionNumbers[((Integer A) - 1)] = <Empty String>
        For each (Integer A) from 1 to SaveLoadMaxVariablesStored, do (Actions)
            Loop - Actions
                Set SaveLoadTempStrings[(Integer A)] = <Empty String>
        -------- Setup the encryption for use. --------
        Set SaveLoadEncryptionKeyInt = (Random integer number between 1 and SaveLoadMaxEncryptionSets)
        Set SaveLoadEncryptionKey = SaveLoadCharacterNumbers[SaveLoadEncryptionKeyInt]
        For each (Integer A) from 1 to SaveLoadMaxCharacters, do (Actions)
            Loop - Actions
                Set SaveLoadEncryptionNumbers[((Integer A) - 1)] = (Substring(SaveLoadEncryptionSet[SaveLoadEncryptionKeyInt], (Integer A), (Integer A)))
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadEncryptionKey
        -------- Now to start converting things to save --------
        -------- Final string will be Encryption+Hero+HeroLevel+ItemsX6+Gold+Lumber+Checksum --------
        -------- Hero first --------
        For each (Integer A) from 1 to SaveLoadMaxHeroesStored, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of SaveLoadPlayerHeroSingle[(Player number of (Triggering player))]) Equal to SaveLoadHeroesStored[(Integer A)]
                    Then - Actions
                        Set SaveLoadConversionInteger = (Integer A)
                    Else - Actions
        Set SaveLoadPowerOfCurrent = (SaveLoadSlotsHero - 1)
        For each (Integer A) from 1 to SaveLoadSlotsHero, do (Actions)
            Loop - Actions
                Set SaveLoadPowerOfMaxNumber = 1
                For each (Integer B) from (Integer A) to (SaveLoadSlotsHero - 1), do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsHero - (Integer A)) Greater than or equal to 1
                    Then - Actions
                        Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadPowerOfMaxNumber)
                        Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadPowerOfMaxNumber))
                        Set SaveLoadTempStrings[1] = (SaveLoadTempStrings[1] + SaveLoadCharacterNumbers[SaveLoadConversionDividedInt])
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsHero - (Integer A)) Less than 1
                    Then - Actions
                        Set SaveLoadTempStrings[1] = (SaveLoadTempStrings[1] + SaveLoadCharacterNumbers[SaveLoadConversionRemainder])
                    Else - Actions
                Set SaveLoadConversionInteger = SaveLoadConversionRemainder
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadTempStrings[1]
        -------- now to create the string section for the hero level --------
        Set SaveLoadConversionInteger = (Hero level of SaveLoadPlayerHeroSingle[(Player number of (Triggering player))])
        Set SaveLoadPowerOfCurrent = (SaveLoadSlotsHeroLevel - 1)
        For each (Integer A) from 1 to SaveLoadSlotsHeroLevel, do (Actions)
            Loop - Actions
                Set SaveLoadPowerOfMaxNumber = 1
                For each (Integer B) from (Integer A) to (SaveLoadSlotsHeroLevel - 1), do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsHeroLevel - (Integer A)) Greater than or equal to 1
                    Then - Actions
                        Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadPowerOfMaxNumber)
                        Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadPowerOfMaxNumber))
                        Set SaveLoadTempStrings[2] = (SaveLoadTempStrings[2] + SaveLoadCharacterNumbers[SaveLoadConversionDividedInt])
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsHeroLevel - (Integer A)) Less than 1
                    Then - Actions
                        Set SaveLoadTempStrings[2] = (SaveLoadTempStrings[2] + SaveLoadCharacterNumbers[SaveLoadConversionRemainder])
                    Else - Actions
                Set SaveLoadConversionInteger = SaveLoadConversionRemainder
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadTempStrings[2]
        -------- Now the Items carried by hero --------
        -------- Item Slot1-6 courtesy the loop C --------
        For each (Integer IntegerC) from 1 to 6, do (Actions)
            Loop - Actions
                Set SaveLoadConversionInteger = 0
                For each (Integer A) from 1 to SaveLoadMaxItemsStored, do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Item-type of (Item carried by SaveLoadPlayerHeroSingle[(Player number of (Triggering player))] in slot IntegerC)) Equal to SaveLoadItemsStored[(Integer A)]
                            Then - Actions
                                Set SaveLoadConversionInteger = (Integer A)
                            Else - Actions
                For each (Integer A) from 1 to SaveLoadSlotsItem, do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = 1
                        For each (Integer B) from (Integer A) to (SaveLoadSlotsItem - 1), do (Actions)
                            Loop - Actions
                                Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (SaveLoadSlotsItem - (Integer A)) Greater than or equal to 1
                            Then - Actions
                                Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadPowerOfMaxNumber)
                                Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadPowerOfMaxNumber))
                                Set SaveLoadTempStrings[(IntegerC + 2)] = (SaveLoadTempStrings[(IntegerC + 2)] + SaveLoadCharacterNumbers[SaveLoadConversionDividedInt])
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (SaveLoadSlotsItem - (Integer A)) Less than 1
                            Then - Actions
                                Set SaveLoadTempStrings[(IntegerC + 2)] = (SaveLoadTempStrings[(IntegerC + 2)] + SaveLoadCharacterNumbers[SaveLoadConversionRemainder])
                            Else - Actions
                        Set SaveLoadConversionInteger = SaveLoadConversionRemainder
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadTempStrings[(IntegerC + 2)]
        -------- Now to convert the Gold into the strings --------
        Set SaveLoadConversionInteger = ((Triggering player) Current gold)
        For each (Integer A) from 1 to SaveLoadSlotsGold, do (Actions)
            Loop - Actions
                Set SaveLoadPowerOfMaxNumber = 1
                For each (Integer B) from (Integer A) to (SaveLoadSlotsGold - 1), do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsGold - (Integer A)) Greater than or equal to 1
                    Then - Actions
                        Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadPowerOfMaxNumber)
                        Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadPowerOfMaxNumber))
                        Set SaveLoadTempStrings[9] = (SaveLoadTempStrings[9] + SaveLoadCharacterNumbers[SaveLoadConversionDividedInt])
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsGold - (Integer A)) Less than 1
                    Then - Actions
                        Set SaveLoadTempStrings[9] = (SaveLoadTempStrings[9] + SaveLoadCharacterNumbers[SaveLoadConversionRemainder])
                    Else - Actions
                Set SaveLoadConversionInteger = SaveLoadConversionRemainder
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadTempStrings[9]
        -------- Now to convert the Lumber into the strings --------
        Set SaveLoadConversionInteger = ((Triggering player) Current lumber)
        For each (Integer A) from 1 to SaveLoadSlotsLumber, do (Actions)
            Loop - Actions
                Set SaveLoadPowerOfMaxNumber = 1
                For each (Integer B) from (Integer A) to (SaveLoadSlotsLumber - 1), do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsLumber - (Integer A)) Greater than or equal to 1
                    Then - Actions
                        Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadPowerOfMaxNumber)
                        Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadPowerOfMaxNumber))
                        Set SaveLoadTempStrings[10] = (SaveLoadTempStrings[10] + SaveLoadCharacterNumbers[SaveLoadConversionDividedInt])
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (SaveLoadSlotsLumber - (Integer A)) Less than 1
                    Then - Actions
                        Set SaveLoadTempStrings[10] = (SaveLoadTempStrings[10] + SaveLoadCharacterNumbers[SaveLoadConversionRemainder])
                    Else - Actions
                Set SaveLoadConversionInteger = SaveLoadConversionRemainder
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadTempStrings[10]
        -------- Now to combine the current finished strings. --------
        For each (Integer A) from 1 to SaveLoadMaxVariablesStored, do (Actions)
            Loop - Actions
                Set SaveLoadPreEncryptionString = (SaveLoadPreEncryptionString + SaveLoadTempStrings[(Integer A)])
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadPreEncryptionString
        -------- Now to create a checksum for security, there are many ways to create this number. We will use the previous variables since its easy. --------
        Set SaveLoadCheckSumInt = 0
        For each (Integer A) from 1 to (Length of SaveLoadPreEncryptionString), do (Actions)
            Loop - Actions
                For each (Integer B) from 0 to (SaveLoadMaxCharacters - 1), do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Substring(SaveLoadPreEncryptionString, (Integer A), (Integer A))) Equal to SaveLoadCharacterNumbers[(Integer B)]
                            Then - Actions
                                Set SaveLoadCheckSumInt = (SaveLoadCheckSumInt + (Integer B))
                                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: (String(SaveLoadCheckSumInt))
                            Else - Actions
        Set SaveLoadConversionInteger = SaveLoadCheckSumInt
        Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadMaxCharacters)
        Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadMaxCharacters))
        Set SaveLoadChecksumChar = SaveLoadCharacterNumbers[SaveLoadConversionRemainder]
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadChecksumChar
        -------- Now we have all the characters ready to combine and encrypt fully, then package it pretty. --------
        -------- This will convert the characters to the encrypted data set. It will also place a '-' every specified number of characters. --------
        Set SaveLoadPreEncryptionString = (SaveLoadPreEncryptionString + SaveLoadChecksumChar)
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadPreEncryptionString
        For each (Integer A) from 1 to (Length of SaveLoadPreEncryptionString), do (Actions)
            Loop - Actions
                For each (Integer B) from 0 to (SaveLoadMaxCharacters - 1), do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Substring(SaveLoadPreEncryptionString, (Integer A), (Integer A))) Equal to SaveLoadCharacterNumbers[(Integer B)]
                            Then - Actions
                                Set SaveLoadEncryptedString = (SaveLoadEncryptedString + SaveLoadEncryptionNumbers[(Integer B)])
                            Else - Actions
                Set SaveLoadConversionInteger = (Integer A)
                Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadBlockSize)
                Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadBlockSize))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        SaveLoadConversionRemainder Less than or equal to 0
                    Then - Actions
                        Set SaveLoadEncryptedString = (SaveLoadEncryptedString + -)
                    Else - Actions
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadEncryptedString
        -------- Now for the final string, which will be the unencrypted key, and the rest of the encrypted information --------
        Set SaveLoadFinalString = ((SaveLoadEncryptionKey + -) + SaveLoadEncryptedString)
        -------- And now to broadcast all the hard work --------
        Game - Display to SaveLoadPlayerGroupFocus for 300.00 seconds the text: SaveLoadFinalString
        Player Group - Remove all players from SaveLoadPlayerGroupFocus

-----------------------

Code:
LoadModuleSingle
    Events
        Player - Player 1 (Red) types a chat message containing -load as A substring
        Player - Player 2 (Blue) types a chat message containing -load as A substring
        Player - Player 3 (Teal) types a chat message containing -load as A substring
        Player - Player 4 (Purple) types a chat message containing -load as A substring
    Conditions
        (Substring((Entered chat string), 1, 5)) Equal to -load
    Actions
        -------- This PlayerGroup is so you can broadcast the correct player the message in the end. --------
        Player Group - Add (Triggering player) to SaveLoadPlayerGroupFocus
        -------- This will confirm if the player has loaded before since last reset. --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SaveLoadHasLoaded[(Player number of (Triggering player))] Equal to True
            Then - Actions
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: You have loaded you...
            Else - Actions
        -------- Decide how many variables the system will store --------
        Set SaveLoadMaxVariablesStored = 10
        -------- Default everything and load the basic stuff. Needs to happen each trigger activation or bad things happen. --------
        Set SaveLoadTriggerErrored = False
        Set SaveLoadChecksumChar = <Empty String>
        Set SaveLoadEncryptedString = <Empty String>
        Set SaveLoadEncryptionKey = <Empty String>
        Set SaveLoadPreEncryptionString = <Empty String>
        Set SaveLoadFinalString = <Empty String>
        Set SaveLoadEncryptionKeyInt = 0
        For each (Integer A) from 1 to SaveLoadMaxCharacters, do (Actions)
            Loop - Actions
                Set SaveLoadEncryptionNumbers[((Integer A) - 1)] = <Empty String>
        For each (Integer A) from 1 to SaveLoadMaxVariablesStored, do (Actions)
            Loop - Actions
                Set SaveLoadTempStrings[(Integer A)] = <Empty String>
        -------- Now we need to pick up our load code from the message --------
        Set SaveLoadFinalString = (String((Substring((Entered chat string), 7, (Length of (Entered chat string))))) as Upper case)
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadFinalString
        -------- Now we need to break the string into 2 parts, Encryption set number and encrypted string --------
        Set SaveLoadEncryptionKey = (Substring(SaveLoadFinalString, 1, 1))
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadEncryptionKey
        Set SaveLoadEncryptedString = (Substring(SaveLoadFinalString, 2, (Length of SaveLoadFinalString)))
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadEncryptedString
        -------- Setup the encryption for use. --------
        For each (Integer A) from 0 to (SaveLoadMaxCharacters - 1), do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        SaveLoadEncryptionKey Equal to SaveLoadCharacterNumbers[(Integer A)]
                    Then - Actions
                        Set SaveLoadEncryptionKeyInt = (Integer A)
                        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: (String(SaveLoadEncryptionKeyInt))
                    Else - Actions
        For each (Integer A) from 1 to SaveLoadMaxCharacters, do (Actions)
            Loop - Actions
                Set SaveLoadEncryptionNumbers[((Integer A) - 1)] = (Substring(SaveLoadEncryptionSet[SaveLoadEncryptionKeyInt], (Integer A), (Integer A)))
        -------- Now to Decrypt the Encrypted Section and remove the Dashes --------
        Set SaveLoadPreEncryptionString = <Empty String>
        For each (Integer A) from 1 to (Length of SaveLoadEncryptedString), do (Actions)
            Loop - Actions
                For each (Integer B) from 0 to (SaveLoadMaxCharacters - 1), do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Substring(SaveLoadEncryptedString, (Integer A), (Integer A))) Equal to SaveLoadEncryptionNumbers[(Integer B)]
                            Then - Actions
                                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadCharacterNumbers[(Integer B)]
                                Set SaveLoadPreEncryptionString = (SaveLoadPreEncryptionString + SaveLoadCharacterNumbers[(Integer B)])
                            Else - Actions
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadPreEncryptionString
        -------- Now to seperate the strings out before reading --------
        -------- Workaround for a bug involving String length being used twice in an action. --------
        Set IntegerC = (Length of SaveLoadPreEncryptionString)
        Set SaveLoadChecksumChar = (String((Substring(SaveLoadPreEncryptionString, IntegerC, IntegerC))) as Upper case)
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: (SaveLoadChecksumChar +  = From Load)
        Set SaveLoadPreEncryptionString = (Substring(SaveLoadPreEncryptionString, 1, ((Length of SaveLoadPreEncryptionString) - 1)))
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadPreEncryptionString
        -------- Verify the Checksum to prove the code is correct. 1:MaxChars chance of being an error that would allow code to process. --------
        Set SaveLoadCheckSumInt = 0
        For each (Integer A) from 1 to (Length of SaveLoadPreEncryptionString), do (Actions)
            Loop - Actions
                For each (Integer B) from 0 to (SaveLoadMaxCharacters - 1), do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Substring(SaveLoadPreEncryptionString, (Integer A), (Integer A))) Equal to SaveLoadCharacterNumbers[(Integer B)]
                            Then - Actions
                                Set SaveLoadCheckSumInt = (SaveLoadCheckSumInt + (Integer B))
                                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: (String(SaveLoadCheckSumInt))
                            Else - Actions
        Set SaveLoadConversionInteger = SaveLoadCheckSumInt
        Set SaveLoadConversionDividedInt = (SaveLoadConversionInteger / SaveLoadMaxCharacters)
        Set SaveLoadConversionRemainder = (SaveLoadConversionInteger - (SaveLoadConversionDividedInt x SaveLoadMaxCharacters))
        Set SaveLoadChecksumCharCompare = SaveLoadCharacterNumbers[SaveLoadConversionRemainder]
        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: (SaveLoadChecksumCharCompare +  = Compare)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SaveLoadChecksumChar Not equal to SaveLoadChecksumCharCompare
            Then - Actions
                Game - Display to SaveLoadPlayerGroupFocus the text: Either your code is...
                Set SaveLoadTriggerErrored = True
            Else - Actions
        -------- This IF is to make sure once they fail the checksum they cannot continue through the trigger. --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SaveLoadHasLoaded[(Player number of (Triggering player))] Equal to False
                SaveLoadTriggerErrored Equal to False
            Then - Actions
                -------- Need to break each part of the String apart to each variable stored. --------
                Set IntegerC = 1
                -------- First the hero type --------
                Set SaveLoadTempStrings[1] = (Substring(SaveLoadPreEncryptionString, IntegerC, (IntegerC + (SaveLoadSlotsHero - 1))))
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadTempStrings[1]
                Set IntegerC = (IntegerC + SaveLoadSlotsHero)
                -------- Now the Hero level --------
                Set SaveLoadTempStrings[2] = (Substring(SaveLoadPreEncryptionString, IntegerC, (IntegerC + (SaveLoadSlotsHeroLevel - 1))))
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadTempStrings[2]
                Set IntegerC = (IntegerC + SaveLoadSlotsHeroLevel)
                -------- now the Items X6 --------
                For each (Integer A) from 1 to 6, do (Actions)
                    Loop - Actions
                        Set SaveLoadTempStrings[((Integer A) + 2)] = (Substring(SaveLoadPreEncryptionString, IntegerC, (IntegerC + (SaveLoadSlotsItem - 1))))
                        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadTempStrings[((Integer A) + 2)]
                        Set IntegerC = (IntegerC + SaveLoadSlotsItem)
                -------- Now the Player Gold --------
                Set SaveLoadTempStrings[9] = (Substring(SaveLoadPreEncryptionString, IntegerC, (IntegerC + (SaveLoadSlotsGold - 1))))
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadTempStrings[9]
                Set IntegerC = (IntegerC + SaveLoadSlotsGold)
                -------- Finally the lumber --------
                Set SaveLoadTempStrings[10] = (Substring(SaveLoadPreEncryptionString, IntegerC, (IntegerC + (SaveLoadSlotsLumber - 1))))
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: SaveLoadTempStrings[10]
                Set IntegerC = (IntegerC + SaveLoadSlotsLumber)
                -------- Start performing actions and building the players stuff --------
                -------- The ReBirth of a Hero! --------
                Set SaveLoadMultiple = 0
                For each (Integer A) from 1 to SaveLoadSlotsHero, do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = 1
                        For each (Integer B) from (Integer A) to (SaveLoadSlotsHero - 1), do (Actions)
                            Loop - Actions
                                Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                        For each (Integer B) from 0 to (SaveLoadMaxCharacters - 1), do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Substring(SaveLoadTempStrings[1], (Integer A), (Integer A))) Equal to SaveLoadCharacterNumbers[(Integer B)]
                                    Then - Actions
                                        Set SaveLoadMultiple = (SaveLoadMultiple + ((Integer B) x SaveLoadPowerOfMaxNumber))
                                    Else - Actions
                Unit - Create 1 SaveLoadHeroesStored[SaveLoadMultiple] for (Triggering player) at (Center of Regions[(Random integer number between 1 and 9)]) facing 270.00 degrees
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: (String(SaveLoadMultiple))
                Set SaveLoadPlayerHeroSingle[(Player number of (Triggering player))] = (Last created unit)
                -------- Give that man a raise! --------
                Set SaveLoadMultiple = 0
                For each (Integer A) from 1 to SaveLoadSlotsHeroLevel, do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = 1
                        For each (Integer B) from (Integer A) to (SaveLoadSlotsHeroLevel - 1), do (Actions)
                            Loop - Actions
                                Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                        For each (Integer B) from 0 to (SaveLoadMaxCharacters - 1), do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Substring(SaveLoadTempStrings[2], (Integer A), (Integer A))) Equal to SaveLoadCharacterNumbers[(Integer B)]
                                    Then - Actions
                                        Set SaveLoadMultiple = (SaveLoadMultiple + ((Integer B) x SaveLoadPowerOfMaxNumber))
                                    Else - Actions
                Hero - Set SaveLoadPlayerHeroSingle[(Player number of (Triggering player))] Hero-level to SaveLoadMultiple, Hide level-up graphics
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: (String(SaveLoadMultiple))
                -------- Time to Accessorize! --------
                For each (Integer IntegerC) from 1 to 6, do (Actions)
                    Loop - Actions
                        Set SaveLoadMultiple = 0
                        For each (Integer A) from 1 to SaveLoadSlotsItem, do (Actions)
                            Loop - Actions
                                Set SaveLoadPowerOfMaxNumber = 1
                                For each (Integer B) from (Integer A) to (SaveLoadSlotsItem - 1), do (Actions)
                                    Loop - Actions
                                        Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                                For each (Integer B) from 0 to (SaveLoadMaxCharacters - 1), do (Actions)
                                    Loop - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Substring(SaveLoadTempStrings[(IntegerC + 2)], (Integer A), (Integer A))) Equal to SaveLoadCharacterNumbers[(Integer B)]
                                            Then - Actions
                                                Set SaveLoadMultiple = (SaveLoadMultiple + ((Integer B) x SaveLoadPowerOfMaxNumber))
                                            Else - Actions
                        Hero - Create SaveLoadItemsStored[SaveLoadMultiple] and give it to SaveLoadPlayerHeroSingle[(Player number of (Triggering player))]
                        Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: (String(SaveLoadMultiple))
                -------- Show me the money! --------
                Set SaveLoadMultiple = 0
                For each (Integer A) from 1 to SaveLoadSlotsGold, do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = 1
                        For each (Integer B) from (Integer A) to (SaveLoadSlotsGold - 1), do (Actions)
                            Loop - Actions
                                Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                        For each (Integer B) from 0 to (SaveLoadMaxCharacters - 1), do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Substring(SaveLoadTempStrings[9], (Integer A), (Integer A))) Equal to SaveLoadCharacterNumbers[(Integer B)]
                                    Then - Actions
                                        Set SaveLoadMultiple = (SaveLoadMultiple + ((Integer B) x SaveLoadPowerOfMaxNumber))
                                    Else - Actions
                Player - Set (Triggering player) Current gold to SaveLoadMultiple
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: (String(SaveLoadMultiple))
                -------- How much wood could a woodchuck chuck, if a woodchuck could chuck wood? --------
                Set SaveLoadMultiple = 0
                For each (Integer A) from 1 to SaveLoadSlotsLumber, do (Actions)
                    Loop - Actions
                        Set SaveLoadPowerOfMaxNumber = 1
                        For each (Integer B) from (Integer A) to (SaveLoadSlotsLumber - 1), do (Actions)
                            Loop - Actions
                                Set SaveLoadPowerOfMaxNumber = (SaveLoadPowerOfMaxNumber x SaveLoadMaxCharacters)
                        For each (Integer B) from 0 to (SaveLoadMaxCharacters - 1), do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Substring(SaveLoadTempStrings[10], (Integer A), (Integer A))) Equal to SaveLoadCharacterNumbers[(Integer B)]
                                    Then - Actions
                                        Set SaveLoadMultiple = (SaveLoadMultiple + ((Integer B) x SaveLoadPowerOfMaxNumber))
                                    Else - Actions
                Player - Set (Triggering player) Current lumber to SaveLoadMultiple
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: (String(SaveLoadMultiple))
                -------- All done, now to tell the player how good we did! --------
                Set SaveLoadHasLoaded[(Integer A)] = False
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: Load Successful. We...
            Else - Actions
                Game - Display to SaveLoadPlayerGroupFocus for 30.00 seconds the text: Load Unsuccessful! ...
        Player Group - Remove all players from SaveLoadPlayerGroupFocus


***save/load map moved to the tutorial. Check there for the info and map***
 

Lord_Kakashi

The Wabbits are attacking
Reaction score
27
i might be stupid, but why is it that you need more then 1 of these

SaveLoadEncryptionSet?

and also, how do they work?
 

Effane

Save/Load Code Tutorial
Reaction score
51
An ecryption set is basically a scrambler.

Now why you need more than one is easy. So people will have more trouble decoding the load code and creating thier own hero with stuff.

More of them helps out alot for protecting that code.

Which is harder to modify and read readibly?

1-0110-0102-0304-0506-0799-02AB-O

Or something like this? Especially when you have to think in two layers.

1-IOOI-IOIH-ITIR-IEIS-I9PP-IHC5-L
 

exge

New Member
Reaction score
15
this sounds really stupid but for those that dont want to learn jass can use WEU's advanced->multiplayer->save hero codes and just make a event for it
 

Effane

Save/Load Code Tutorial
Reaction score
51
True, they can. But thats a cookie cutter and once its cracked its done. Also, alot of people arent found of the WEU 500KB addition to the map especially if they are already close the the 4 MB boundary Bnet enforces.

So while its a simple solution, its not a perfect one. Right now there isnt any perfect solution due to the lack of the ability to create textfiles from the WC3 games.
 

jpres

New Member
Reaction score
15
Haha nice code tho Effane.. I might have to use this if I can't get my piece of crap code workin. What are it's limits? (Stats/Gold wise)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top