Need help configuring AceHart's save/load code

a j j bones

New Member
Reaction score
3
i am trying to use aceharts save/load code system (it is in the systems section) and it says to do a whole bunch of stuff that i dont understand :D. i imported all the triggers and stuff but the only thing i edited was the hereos. when i type save it gives me a code but when i load it only says some lines from the trigger, not the actual code. can someone help me configure this to make it work. thanks a ton.

Code:
SaveLoad Initialization
    Events
        Map initialization
    Conditions
    Actions
        -------- List of Heroes --------
        Set SaveLoad_Heroes[1] = Blood Elf Pheonix Archer
        Set SaveLoad_Heroes[2] = Blood Elf Crusader
        Set SaveLoad_Heroes[3] = Bloodelf Paladin
        Set SaveLoad_Heroes[4] = Hero Crusader
        Set SaveLoad_Heroes[5] = Blood Elf Warrior
        Set SaveLoad_Heroes[6] = Blood Elf Guard
        Set SaveLoad_Heroes[7] = Chaos Orc Bowman
        Set SaveLoad_Heroes[8] = Death Knight
        Set SaveLoad_Heroes[9] = Felhound Rider
        Set SaveLoad_Heroes[10] = Gnome Warlock
        Set SaveLoad_Heroes[11] = Draconion Spear Thrower
        Set SaveLoad_Heroes[12] = Draconion Witch Hunter
        Set SaveLoad_Heroes[13] = Draconion Zealot
        Set SaveLoad_Heroes[14] = Shadow Assasin
        -------- Number of Heroes --------
        Set SaveLoad_Heroes_LastIndex = 14
        -------- List of Items --------
        Set SaveLoad_Items[1] = Claws of Attack +15
        Set SaveLoad_Items[2] = Cheese
        Set SaveLoad_Items[3] = Wand of Lightning Shield
        Set SaveLoad_Items[4] = Magic Key Chain
        -------- Number of Items --------
        Set SaveLoad_Items_LastIndex = 4
        -------- List of Abilities --------
        Set SaveLoad_Abilities[1] = Banish
        Set SaveLoad_Abilities[2] = Flame Strike
        Set SaveLoad_Abilities[3] = Phoenix
        Set SaveLoad_Abilities[4] = Siphon Mana
        -------- Number of Abilities --------
        Set SaveLoad_Abilities_LastIndex = 4
        -------- These three lines may be changed if needed --------
        Set SaveLoad_Alphabet = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
        Set SaveLoad_CaseSensitive = False
        Set SaveLoad_UsePlayername = True
        -------- Required: false --------
        Set SaveLoad_Initialized = False
        -------- Leave as is. Used to autocreate variables when copy & pasting to a new map --------
        Set Code = AceHart
        Set Save[1] = 0
        Set SaveCount = 1
        Set Validate = False
        Set SaveLoad_Compress[1] = 0
        Set SaveLoad_Uncompress[1] = 0

Code:
SaveLoad Save
    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
        -------- Those values need saving --------
        Set Save[1] = 123
        Set Save[2] = 456
        Set Save[3] = 7890
        -------- The number of values we have --------
        Set SaveCount = 3
        -------- Turn values into code --------
        Custom script:   set udg_Code = SaveLoad_Encode()
        -------- Show code to player --------
        Quest - Display to (Player group((Triggering player))) the Secret message: Your code:
        Game - Display to (Player group((Triggering player))) for 60.00 seconds the text: Code

Code:
SaveLoad Load
    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, 6)) Equal to (Matched chat string)
        (Length of (Entered chat string)) Greater than 6
    Actions
        -------- Try to decode what was typed --------
        Set Code = (Substring((Entered chat string), 7, (Length of (Entered chat string))))
        Custom script:   set udg_Validate = SaveLoad_Decode( udg_Code )
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Validate Equal to True
            Then - Actions
                -------- It worked, let's do something with it --------
                For each (Integer A) from 1 to SaveCount, do (Actions)
                    Loop - Actions
                        Game - Display to (Player group((Triggering player))) the text: (Decode:  + (String(Save[(Integer A)])))
            Else - Actions
                -------- Invalid code --------
                Game - Display to (Player group((Triggering player))) the text: There's some error ...
 

a j j bones

New Member
Reaction score
3
ok thanks ill do that in like 15 mins cause i gotta go do somthin real fast

ill tell ya if it works
 

a j j bones

New Member
Reaction score
3
yea i know but im just tellin you so you arent waiting for a reply :)

so i just copy the hero version into my map and i dont have to edit anything?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
You probably want a different Hero list.
Though, it will work too if your Hero isn't in that list...

Anyway, why don't you just try it?
 

a j j bones

New Member
Reaction score
3
i did, and it worked as far as i can tell, i just need to change the region they load to and it should all be workin

thanks for the help :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top