- Joined
- Mar 16, 2008
- Messages
- 820
Map currently tracks only [a] difficulty (integer 0-6, "easy, normal heroic, mythic, mythic+, impossible"), I want to expand the load/save system to include what hero (4-types of heroes, the four basic night elf ones) and what [c] game mode (integer 0-4, different from difficulty, "standard, exploration, hardcore"). So ideally for example, if a player beat difficulty normal with keeper of the grove on standard game mode, then that specific data will be saved. So they will only unlock more "prestige" skins for the hero they used. possibly someone could help me brain storm what the ideal way is to save these 3 dimensions of data. or point out what lines of these triggers need to be expanded to accommodate this expansion.
Uncle helped me create these auto load/save triggers for Pipedream's save/load system. They seem to work well but I want to expand them and not sure how:
Thanks for any feedback or help.
Uncle helped me create these auto load/save triggers for Pipedream's save/load system. They seem to work well but I want to expand them and not sure how:
-
Autoload
-
Events
- Time - Elapsed game time is 4.00 seconds
- Conditions
-
Actions
-
Player Group - Pick every player in players_grp and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked player) slot status) Equal to Is playing
-
Then - Actions
- Set VariableSet SaveLoadEvent_Player = (Picked player)
- Set VariableSet SaveLoadEvent_PN = (Player number of SaveLoadEvent_Player)
- -------- ------------------- --------
- -------- This runs the Event used in Load Event and tells it to load Save Slot 1 --------
- Custom script: call LoadSaveSlot(udg_SaveLoadEvent_Player, 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Player Group - Pick every player in players_grp and do (Actions)
-
Events
-
Load Event
-
Events
- Game - SaveLoadEvent becomes Equal to 1.00
- Conditions
-
Actions
- -------- Validate: --------
- Set VariableSet SaveCount = 0
- Custom script: set udg_SaveTempInt = integer(Savecode.create())
- Custom script: if not (Savecode(udg_SaveTempInt).Load(udg_SaveLoadEvent_Player, udg_SaveLoadEvent_Code, 1)) then
- Game - Display to (Player group(SaveLoadEvent_Player)) the text: Invalid load code (...
- Skip remaining actions
- Custom script: endif
- Custom script: call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "Loaded " + User[udg_SaveLoadEvent_Player].nameColored)
- -------- --------
- -------- --------
- -------- PUT YOUR LOAD ACTIONS HERE: --------
- Set VariableSet SaveCount = (SaveCount + 1)
- Set VariableSet SaveMaxValue[SaveCount] = 1000
- Custom script: call SaveHelper.GUILoadNext()
- Set VariableSet highest_difficulty_victory[(Player number of SaveLoadEvent_Player)] = SaveValue[SaveCount]
- Game - Display to (Player group(SaveLoadEvent_Player)) for 30.00 seconds the text: (Prestige Loaded: + difficulty_string[highest_difficulty_victory[(Player number of SaveLoadEvent_Player)]])
- -------- STOP --------
- -------- --------
- -------- --------
- Custom script: call Savecode(udg_SaveTempInt).destroy()
-
Events
-
Autosave
- Events
- Conditions
-
Actions
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
- Set VariableSet SaveLoadEvent_Player = (Picked player)
- Set VariableSet SaveLoadEvent_PN = (Player number of SaveLoadEvent_Player)
- -------- --------
- Set VariableSet SaveCount = 0
- -------- --------
- Custom script: call DisplayTextToPlayer(GetTriggerPlayer(), 0, 0, "Saved " + User[udg_SaveLoadEvent_Player].nameColored)
- -------- --------
- -------- --------
- -------- PUT YOUR SAVE ACTIONS HERE: --------
- Set VariableSet SaveCount = (SaveCount + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- difficulty_setting Greater than highest_difficulty_victory[SaveLoadEvent_PN]
-
Then - Actions
- Set VariableSet SaveValue[SaveCount] = difficulty_setting
- Game - Display to (Player group(SaveLoadEvent_Player)) for 15.00 seconds the text: (Prestige saved: + difficulty_string[difficulty_setting])
-
Else - Actions
- Set VariableSet SaveValue[SaveCount] = highest_difficulty_victory[SaveLoadEvent_PN]
- Game - Display to (Player group(SaveLoadEvent_Player)) for 30.00 seconds the text: (Prestige saved: + difficulty_string[SaveLoadEvent_PN])
-
If - Conditions
- Set VariableSet SaveMaxValue[SaveCount] = 1000
- -------- STOP --------
- -------- --------
- -------- --------
- -------- Save to disk: --------
- Custom script: set udg_SaveTempInt = Savecode.create()
-
For each (Integer A) from 0 to SaveCount, do (Actions)
-
Loop - Actions
- Custom script: call Savecode(udg_SaveTempInt).Encode(udg_SaveValue[bj_forLoopAIndex], udg_SaveMaxValue[bj_forLoopAIndex])
-
Loop - Actions
- Set VariableSet SaveTempString = <Empty String>
- Custom script: set udg_SaveTempString = Savecode(udg_SaveTempInt).Save(udg_SaveLoadEvent_Player, 1)
- Custom script: call SaveFile.create(udg_SaveLoadEvent_Player, "Save", 1, udg_SaveTempString)
-
Loop - Actions
-
Player Group - Pick every player in (All players) and do (Actions)
Thanks for any feedback or help.