• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] [commission] - get load/save system working

Level 18
Joined
Mar 16, 2008
Messages
721
I'm at the point where I've spent over 40 hours on this system and most of that time has been wasted.

This system is supposed to save/load 9 integer data points per player, likely only 2 or 3 datapoints will be to be saved per player, per victory, but every data point will need to be saved for the system to work. Players select 3 modes (Standard 1, Exploration 2, or Hardcore 3) and a difficulty (Easy 1, Normal 2, Heroic 3, Mythic 4, Mythic+ 5, Impossible 6) and a hero (no hero (unit-type no unit), Warden (unit-type), Demon Hunter (unit-type), Priestess of the Moon (unit-type), Keeper of the Grove (unit-type). I think the best way to save all of these is to put them relative to what difficulty they beat (integer 0-6). So for example they beat standard normal with keeper of the grove, used demonic magic.

Requirements
1) commissionee will edit the .w3m file
2) saves 72 integers consistently and accurately - and loads them in future games consistently and accurately, 9 per player
a) udg_highest_no_hero (integer 0-6)
b) udg_highest_warden (integer 0-6)
c) udg_highest_dh (integer 0-6)
d) udg_highest_potm (integer 0-6)
e) udg_highest_kotg (integer 0-6)
f) udg_highest_hardcore (integer 0-6)
g) udg_highest_standard (integer 0-6)
h) udg_highest_exploration (integer 0-6)
i) udg_highest_no_demon_magic (integer 0-6)
3) commissionee will make the system work > 99.99% of the time, in multiplayer or single player or any combination in between
4) system will not overwrite previous data unless it's for that player
5) system auto saves/loads
6) system will need to be extensively tested in a non-lan multiplayer environment to prove it can consistently meet requirements, and reliably functions to save integer data
7) rewards triggers work

  • Custom Auto Save
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in players_grp and do (Actions)
        • Loop - Actions
          • Set VariableSet SaveLoadEvent_Player = (Picked player)
          • Set VariableSet SaveLoadEvent_PN = (Player number of SaveLoadEvent_Player)
          • -------- --------
          • -------- --------
          • -------- --------
          • -------- --------
          • -------- PUT YOUR SAVE ACTIONS HERE: --------
          • Set VariableSet SaveCount = -1
          • -------- --------
          • -------- HIGHEST NO DEMON MAGIC: --------
          • Set VariableSet SaveCount = (SaveCount + 1)
          • Set VariableSet SaveMaxValue[SaveCount] = 10
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • demonic_magic_used[SaveLoadEvent_PN] Equal to 0
            • Then - Actions
              • Set VariableSet SaveValue[SaveCount] = highest_no_demon_magic[SaveLoadEvent_PN]
            • Else - Actions
              • Set VariableSet SaveValue[SaveCount] = difficulty_setting
          • -------- --------
          • -------- HIGHEST STANDARD: --------
          • Set VariableSet SaveCount = (SaveCount + 1)
          • Set VariableSet SaveMaxValue[SaveCount] = 10
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • mode_setting Equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • difficulty_setting Greater than highest_standard[SaveLoadEvent_PN]
                • Then - Actions
                  • Set VariableSet SaveValue[SaveCount] = difficulty_setting
                • Else - Actions
                  • Set VariableSet SaveValue[SaveCount] = highest_standard[SaveLoadEvent_PN]
            • Else - Actions
              • Set VariableSet SaveValue[SaveCount] = highest_standard[SaveLoadEvent_PN]
          • -------- --------
          • -------- HIGHEST EXPLORATION: --------
          • Set VariableSet SaveCount = (SaveCount + 1)
          • Set VariableSet SaveMaxValue[SaveCount] = 10
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • mode_setting Equal to 2
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • difficulty_setting Greater than highest_exploration[SaveLoadEvent_PN]
                • Then - Actions
                  • Set VariableSet SaveValue[SaveCount] = difficulty_setting
                • Else - Actions
                  • Set VariableSet SaveValue[SaveCount] = highest_exploration[SaveLoadEvent_PN]
            • Else - Actions
              • Set VariableSet SaveValue[SaveCount] = highest_exploration[SaveLoadEvent_PN]
          • -------- --------
          • -------- HIGHEST HARDCORE: --------
          • Set VariableSet SaveCount = (SaveCount + 1)
          • Set VariableSet SaveMaxValue[SaveCount] = 10
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • mode_setting Equal to 3
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • difficulty_setting Greater than highest_hardcore[SaveLoadEvent_PN]
                • Then - Actions
                  • Set VariableSet SaveValue[SaveCount] = difficulty_setting
                • Else - Actions
                  • Set VariableSet SaveValue[SaveCount] = highest_hardcore[SaveLoadEvent_PN]
            • Else - Actions
              • Set VariableSet SaveValue[SaveCount] = highest_hardcore[SaveLoadEvent_PN]
          • -------- --------
          • -------- HIGHEST KOTG: --------
          • Set VariableSet SaveCount = (SaveCount + 1)
          • Set VariableSet SaveMaxValue[SaveCount] = 10
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Player_Hero_Type[SaveLoadEvent_PN] Equal to Keeper of the Grove
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • difficulty_setting Greater than highest_kotg[SaveLoadEvent_PN]
                • Then - Actions
                  • Set VariableSet SaveValue[SaveCount] = difficulty_setting
                • Else - Actions
                  • Set VariableSet SaveValue[SaveCount] = highest_kotg[SaveLoadEvent_PN]
            • Else - Actions
              • Set VariableSet SaveValue[SaveCount] = highest_kotg[SaveLoadEvent_PN]
          • -------- --------
          • -------- HIGHEST POTM: --------
          • Set VariableSet SaveCount = (SaveCount + 1)
          • Set VariableSet SaveMaxValue[SaveCount] = 10
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Player_Hero_Type[SaveLoadEvent_PN] Equal to Priestess of the Moon
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • difficulty_setting Greater than highest_potm[SaveLoadEvent_PN]
                • Then - Actions
                  • Set VariableSet SaveValue[SaveCount] = difficulty_setting
                • Else - Actions
                  • Set VariableSet SaveValue[SaveCount] = highest_potm[SaveLoadEvent_PN]
            • Else - Actions
              • Set VariableSet SaveValue[SaveCount] = highest_potm[SaveLoadEvent_PN]
          • -------- --------
          • -------- HIGHEST DH: --------
          • Set VariableSet SaveCount = (SaveCount + 1)
          • Set VariableSet SaveMaxValue[SaveCount] = 10
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Player_Hero_Type[SaveLoadEvent_PN] Equal to Demon Hunter
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • difficulty_setting Greater than highest_dh[SaveLoadEvent_PN]
                • Then - Actions
                  • Set VariableSet SaveValue[SaveCount] = difficulty_setting
                • Else - Actions
                  • Set VariableSet SaveValue[SaveCount] = highest_dh[SaveLoadEvent_PN]
            • Else - Actions
              • Set VariableSet SaveValue[SaveCount] = highest_dh[SaveLoadEvent_PN]
          • -------- --------
          • -------- HIGHEST WARDEN: --------
          • Set VariableSet SaveCount = (SaveCount + 1)
          • Set VariableSet SaveMaxValue[SaveCount] = 10
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Player_Hero_Type[SaveLoadEvent_PN] Equal to Warden (NPC)
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • difficulty_setting Greater than highest_warden[SaveLoadEvent_PN]
                • Then - Actions
                  • Set VariableSet SaveValue[SaveCount] = difficulty_setting
                • Else - Actions
                  • Set VariableSet SaveValue[SaveCount] = highest_warden[SaveLoadEvent_PN]
            • Else - Actions
              • Set VariableSet SaveValue[SaveCount] = highest_warden[SaveLoadEvent_PN]
          • -------- --------
          • -------- HIGHEST NO HERO: --------
          • Set VariableSet SaveCount = (SaveCount + 1)
          • Set VariableSet SaveMaxValue[SaveCount] = 10
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Player_Hero_Type[SaveLoadEvent_PN] Equal to No unit-type
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • difficulty_setting Greater than highest_no_hero[SaveLoadEvent_PN]
                • Then - Actions
                  • Set VariableSet SaveValue[SaveCount] = difficulty_setting
                • Else - Actions
                  • Set VariableSet SaveValue[SaveCount] = highest_no_hero[SaveLoadEvent_PN]
            • Else - Actions
              • Set VariableSet SaveValue[SaveCount] = highest_no_hero[SaveLoadEvent_PN]
          • -------- --------
          • -------- 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])
          • 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)
  • Custom Load Event
    • Events
      • Game - SaveLoadEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • -------- Validate: --------
      • 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
      • -------- --------
      • -------- --------
      • -------- PUT YOUR LOAD ACTIONS HERE (Reverse Order): --------
      • Set VariableSet SaveCount = -1
      • -------- --------
      • -------- HIGHEST NO HERO: --------
      • Set VariableSet SaveCount = (SaveCount + 1)
      • Set VariableSet SaveMaxValue[SaveCount] = 10
      • Custom script: call SaveHelper.GUILoadNext()
      • Set VariableSet highest_no_hero[SaveLoadEvent_PN] = SaveValue[SaveCount]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • highest_no_hero[SaveLoadEvent_PN] Greater than 0
        • Then - Actions
          • Set VariableSet difficulty_highest_load[SaveLoadEvent_PN] = highest_no_hero[SaveLoadEvent_PN]
        • Else - Actions
      • -------- --------
      • -------- HIGHEST WARDEN: --------
      • Set VariableSet SaveCount = (SaveCount + 1)
      • Set VariableSet SaveMaxValue[SaveCount] = 10
      • Custom script: call SaveHelper.GUILoadNext()
      • Set VariableSet highest_warden[SaveLoadEvent_PN] = SaveValue[SaveCount]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • highest_warden[SaveLoadEvent_PN] Greater than highest_no_hero[SaveLoadEvent_PN]
        • Then - Actions
          • Set VariableSet difficulty_highest_load[SaveLoadEvent_PN] = highest_warden[SaveLoadEvent_PN]
        • Else - Actions
      • -------- --------
      • -------- HIGHEST DH: --------
      • Set VariableSet SaveCount = (SaveCount + 1)
      • Set VariableSet SaveMaxValue[SaveCount] = 10
      • Custom script: call SaveHelper.GUILoadNext()
      • Set VariableSet highest_dh[SaveLoadEvent_PN] = SaveValue[SaveCount]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • highest_dh[SaveLoadEvent_PN] Greater than highest_warden[SaveLoadEvent_PN]
        • Then - Actions
          • Set VariableSet difficulty_highest_load[SaveLoadEvent_PN] = highest_dh[SaveLoadEvent_PN]
        • Else - Actions
      • -------- --------
      • -------- HIGHEST POTM: --------
      • Set VariableSet SaveCount = (SaveCount + 1)
      • Set VariableSet SaveMaxValue[SaveCount] = 10
      • Custom script: call SaveHelper.GUILoadNext()
      • Set VariableSet highest_potm[SaveLoadEvent_PN] = SaveValue[SaveCount]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • highest_potm[SaveLoadEvent_PN] Greater than highest_dh[SaveLoadEvent_PN]
        • Then - Actions
          • Set VariableSet difficulty_highest_load[SaveLoadEvent_PN] = highest_potm[SaveLoadEvent_PN]
        • Else - Actions
      • -------- --------
      • -------- HIGHEST KOTG: --------
      • Set VariableSet SaveCount = (SaveCount + 1)
      • Set VariableSet SaveMaxValue[SaveCount] = 10
      • Custom script: call SaveHelper.GUILoadNext()
      • Set VariableSet highest_kotg[SaveLoadEvent_PN] = SaveValue[SaveCount]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • highest_kotg[SaveLoadEvent_PN] Greater than highest_potm[SaveLoadEvent_PN]
        • Then - Actions
          • Set VariableSet difficulty_highest_load[SaveLoadEvent_PN] = highest_kotg[SaveLoadEvent_PN]
        • Else - Actions
      • -------- --------
      • -------- HIGHEST HARDCORE: --------
      • Set VariableSet SaveCount = (SaveCount + 1)
      • Set VariableSet SaveMaxValue[SaveCount] = 10
      • Custom script: call SaveHelper.GUILoadNext()
      • Set VariableSet highest_hardcore[SaveLoadEvent_PN] = SaveValue[SaveCount]
      • -------- --------
      • -------- HIGHEST EXPLORATION: --------
      • Set VariableSet SaveCount = (SaveCount + 1)
      • Set VariableSet SaveMaxValue[SaveCount] = 10
      • Custom script: call SaveHelper.GUILoadNext()
      • Set VariableSet highest_exploration[SaveLoadEvent_PN] = SaveValue[SaveCount]
      • -------- --------
      • -------- HIGHEST STANDARD: --------
      • Set VariableSet SaveCount = (SaveCount + 1)
      • Set VariableSet SaveMaxValue[SaveCount] = 10
      • Custom script: call SaveHelper.GUILoadNext()
      • Set VariableSet highest_standard[SaveLoadEvent_PN] = SaveValue[SaveCount]
      • -------- --------
      • -------- HIGHEST NO DEMON MAGIC: --------
      • Set VariableSet SaveCount = (SaveCount + 1)
      • Set VariableSet SaveMaxValue[SaveCount] = 10
      • Custom script: call SaveHelper.GUILoadNext()
      • Set VariableSet highest_no_demon_magic[SaveLoadEvent_PN] = SaveValue[SaveCount]
      • -------- --------
      • -------- STOP --------
      • -------- --------
      • -------- --------
      • Custom script: call Savecode(udg_SaveTempInt).destroy()
  • Custom Auto Load Start
    • Events
      • Time - Elapsed game time is 4.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in players_grp and do (Actions)
        • Loop - Actions
          • Player Group - Add (Picked player) to load_save_file_group
      • Countdown Timer - Start load_save_file_timer as a Repeating timer that will expire in 0.40 seconds
  • Custom Auto Load Repeat
    • Events
      • Time - load_save_file_timer expires
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in load_save_file_group) Greater than 0
        • Then - Actions
          • Set VariableSet SaveLoadEvent_Player = (Random player from load_save_file_group)
          • Set VariableSet SaveLoadEvent_PN = (Player number of SaveLoadEvent_Player)
          • Player Group - Remove SaveLoadEvent_Player from load_save_file_group.
          • Custom script: call LoadSaveSlot(udg_SaveLoadEvent_Player, 1)
        • Else - Actions
          • -------- All players have loaded: --------
          • Custom script: call DestroyForce( udg_load_save_file_group )
          • Countdown Timer - Pause (Expiring timer)
          • Custom script: call DestroyTimer( GetExpiredTimer() )
  • no rewards
    • Events
      • Time - rewards_timer[0] expires
    • Conditions
    • Actions
      • Player Group - Pick every player in players_grp and do (Actions)
        • Loop - Actions
          • Set VariableSet rewards_pn = (Player number of (Picked player))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • is_playing[rewards_pn] Equal to True
              • difficulty_highest_load[rewards_pn] Equal to 0
            • Then - Actions
              • Unit - Create 1 Prestige Dreaming Bed for player_array[rewards_pn] at easy_reward_pt[rewards_pn] facing Default building facing degrees
              • Game - Display to player_group_array[rewards_pn] the text: (No prestige detected for + (Name of player_array[rewards_pn]))
              • Game - Display to player_group_array[rewards_pn] the text: (Saves reset in v3....
            • Else - Actions
      • Countdown Timer - Start rewards_timer[1] as a One-shot timer that will expire in 5.00 seconds
  • easy rewards
    • Events
      • Time - rewards_timer[1] expires
    • Conditions
    • Actions
      • Player Group - Pick every player in players_grp and do (Actions)
        • Loop - Actions
          • Set VariableSet rewards_pn = (Player number of (Picked player))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • difficulty_highest_load[rewards_pn] Greater than or equal to 1
            • Then - Actions
              • Unit - Create 1 Prestige Trophy: |cffffffffEasy|r for player_array[rewards_pn] at easy_reward_pt[rewards_pn] facing Default building facing degrees
              • Player - Set the current research level of Strength of the Moon (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Strength of the Wild (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Moon Armor (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Reinforced Hides (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Ultravision (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Backpack (Night Elf upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Druid of the Claw Adept Training (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Druid of the Talon Adept Training (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set player_array[rewards_pn].Current gold to ((player_array[rewards_pn] Current gold) + 100)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_warden[rewards_pn] Greater than or equal to 1
                • Then - Actions
                  • Player - Set the current research level of Prestige: Warden |cffffffffEasy|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_potm[rewards_pn] Greater than or equal to 1
                • Then - Actions
                  • Player - Set the current research level of Prestige: Priestess of the Moon |cffffffffEasy|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_dh[rewards_pn] Greater than or equal to 1
                • Then - Actions
                  • Player - Set the current research level of Prestige: Demon Hunter |cffffffffEasy|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_kotg[rewards_pn] Greater than or equal to 1
                • Then - Actions
                  • Player - Set the current research level of Prestige: Keeper of the Grove |cffffffffEasy|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_exploration[rewards_pn] Greater than or equal to 1
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cffffffffEasy|r |cff808080Exploration|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_standard[rewards_pn] Greater than or equal to 1
                • Then - Actions
                  • Player - Set the current research level of Prestige: Standard |cffffffffEasy|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_hardcore[rewards_pn] Greater than or equal to 1
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cffffffffEasy|r |cffff0000Hardcore|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_no_demon_magic[rewards_pn] Greater than or equal to 1
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cffffffffEasy|r |cff80ff80Demonic Abstention|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • Game - Display to player_group_array[rewards_pn] the text: (difficulty_string[1] + Prestige Reward Applied: +100 Starting Gold, Tier 1 Upgrades)
            • Else - Actions
      • Countdown Timer - Start rewards_timer[2] as a One-shot timer that will expire in 5.00 seconds
  • Events
    • Time - rewards_timer[2] expires
  • heroic rewards
    • Events
      • Time - rewards_timer[3] expires
    • Conditions
    • Actions
      • Player Group - Pick every player in players_grp and do (Actions)
        • Loop - Actions
          • Set VariableSet rewards_pn = (Player number of (Picked player))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • difficulty_highest_load[rewards_pn] Greater than or equal to 3
            • Then - Actions
              • Unit - Create 1 Prestige Trophy: |cffff0000Heroic|r (unit type) for player_array[rewards_pn] at heroic_reward_pt[rewards_pn] facing Default building facing degrees
              • Player - Set the current research level of Corrosive Breath (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Druid of the Claw Adept Training (upgrade) to 2 for player_array[rewards_pn]
              • Player - Set the current research level of Druid of the Talon Adept Training (upgrade) to 2 for player_array[rewards_pn]
              • Player - Set the current research level of Well Spring (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Mark of the Claw (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Mark of the Talon (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Resistant Skin (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Hardened Skin (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Upgrade Moon Glaive (upgrade) to 1 for player_array[rewards_pn]
              • Player - Set the current research level of Marksmanship (upgrade) to 1 for player_array[rewards_pn]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_warden[rewards_pn] Greater than or equal to 3
                • Then - Actions
                  • Player - Set the current research level of Prestige: Warden |cffff0000Heroic|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_potm[rewards_pn] Greater than or equal to 3
                • Then - Actions
                  • Player - Set the current research level of Prestige: Priestess of the Moon |cffff0000Heroic|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_dh[rewards_pn] Greater than or equal to 3
                • Then - Actions
                  • Player - Set the current research level of Prestige: Demon Hunter |cffff0000Heroic|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_kotg[rewards_pn] Greater than or equal to 3
                • Then - Actions
                  • Player - Set the current research level of Prestige: Keeper of the Grove |cffff0000Heroic|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_exploration[rewards_pn] Greater than or equal to 3
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cffff0000Heroic|r |cff808080Exploration|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_standard[rewards_pn] Greater than or equal to 3
                • Then - Actions
                  • Player - Set the current research level of Prestige: Standard |cffff0000Heroic|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_hardcore[rewards_pn] Greater than or equal to 3
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cffff0000Heroic|r |cffff0000Hardcore|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_no_demon_magic[rewards_pn] Greater than or equal to 3
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cffff0000Heroic|r |cff80ff80Demonic Abstention|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • Game - Display to player_group_array[rewards_pn] the text: (difficulty_string[3] + Prestige Reward Applied: T-3 Upgrades, Hero Skins, Tech Unlocked)
            • Else - Actions
      • Countdown Timer - Start rewards_timer[4] as a One-shot timer that will expire in 5.00 seconds
  • mythic rewards
    • Events
      • Time - rewards_timer[4] expires
    • Conditions
    • Actions
      • Player Group - Pick every player in players_grp and do (Actions)
        • Loop - Actions
          • Set VariableSet rewards_pn = (Player number of (Picked player))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • difficulty_highest_load[rewards_pn] Greater than or equal to 4
            • Then - Actions
              • Unit - Create 1 Prestige Trophy: |cff990000Mythic|r for player_array[rewards_pn] at mythic_reward_pt[rewards_pn] facing Default building facing degrees
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_warden[rewards_pn] Greater than or equal to 4
                • Then - Actions
                  • Player - Set the current research level of Prestige: Warden |cff990000Mythic|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_potm[rewards_pn] Greater than or equal to 4
                • Then - Actions
                  • Player - Set the current research level of Prestige: Priestess of the Moon |cff990000Mythic|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_dh[rewards_pn] Greater than or equal to 4
                • Then - Actions
                  • Player - Set the current research level of Prestige: Demon Hunter |cff990000Mythic|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_kotg[rewards_pn] Greater than or equal to 4
                • Then - Actions
                  • Player - Set the current research level of Prestige: Keeper of the Grove |cff990000Mythic|r to 1 for player_array[rewards_pn]
                  • Player - Set the current research level of Fel Lumber Essence to 1 for player_array[rewards_pn]
                  • Game - Display to player_group_array[rewards_pn] the text: (difficulty_string[4] + Keeper of the Grove Prestige Applied: Fel Lumber Essence)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_exploration[rewards_pn] Greater than or equal to 4
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff990000Mythic|r |cff808080Exploration|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_standard[rewards_pn] Greater than or equal to 4
                • Then - Actions
                  • Player - Set the current research level of Prestige: Standard |cff990000Mythic|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_hardcore[rewards_pn] Greater than or equal to 4
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff990000Mythic|r |cffff0000Hardcore|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_no_demon_magic[rewards_pn] Greater than or equal to 4
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff990000Mythic|r |cff80ff80Demonic Abstention|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • Game - Display to player_group_array[rewards_pn] the text: (difficulty_string[4] + Prestige Reward Applied: Hero Skins, Tech Unlocked)
            • Else - Actions
      • Countdown Timer - Start rewards_timer[5] as a One-shot timer that will expire in 5.00 seconds
  • mythic plus rewards
    • Events
      • Time - rewards_timer[5] expires
    • Conditions
    • Actions
      • Player Group - Pick every player in players_grp and do (Actions)
        • Loop - Actions
          • Set VariableSet rewards_pn = (Player number of (Picked player))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • difficulty_highest_load[rewards_pn] Greater than or equal to 5
            • Then - Actions
              • Unit - Create 1 Prestige Trophy: |cff660000Mythic+|r for player_array[rewards_pn] at mplus_reward_pt[rewards_pn] facing Default building facing degrees
              • Player - Set the current research level of Strength of the Moon (upgrade) to 3 for player_array[rewards_pn]
              • Player - Set the current research level of Strength of the Wild (upgrade) to 3 for player_array[rewards_pn]
              • Player - Set the current research level of Moon Armor (upgrade) to 3 for player_array[rewards_pn]
              • Player - Set the current research level of Reinforced Hides (upgrade) to 3 for player_array[rewards_pn]
              • Player - Enable Attribute Bonus for player_array[rewards_pn]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_warden[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: Warden |cff660000Mythic+|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_potm[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: Priestess of the Moon |cff660000Mythic+|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_dh[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: Demon Hunter |cff660000Mythic+|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_kotg[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: Keeper of the Grove |cff660000Mythic+|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_exploration[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff660000Mythic+|r |cff808080Exploration|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_standard[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: Standard |cff660000Mythic+|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_hardcore[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff660000Mythic+|r |cffff0000Hardcore|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_no_demon_magic[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff660000Mythic+|r |cff80ff80Demonic Abstention|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • Game - Display to player_group_array[rewards_pn] the text: (difficulty_string[5] + Prestige Reward Applied: Attribute Bonus, Skins, Tech)
            • Else - Actions
      • Countdown Timer - Start rewards_timer[6] as a One-shot timer that will expire in 5.00 seconds
  • mythic plus rewards
    • Events
      • Time - rewards_timer[5] expires
    • Conditions
    • Actions
      • Player Group - Pick every player in players_grp and do (Actions)
        • Loop - Actions
          • Set VariableSet rewards_pn = (Player number of (Picked player))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • difficulty_highest_load[rewards_pn] Greater than or equal to 5
            • Then - Actions
              • Unit - Create 1 Prestige Trophy: |cff660000Mythic+|r for player_array[rewards_pn] at mplus_reward_pt[rewards_pn] facing Default building facing degrees
              • Player - Set the current research level of Strength of the Moon (upgrade) to 3 for player_array[rewards_pn]
              • Player - Set the current research level of Strength of the Wild (upgrade) to 3 for player_array[rewards_pn]
              • Player - Set the current research level of Moon Armor (upgrade) to 3 for player_array[rewards_pn]
              • Player - Set the current research level of Reinforced Hides (upgrade) to 3 for player_array[rewards_pn]
              • Player - Enable Attribute Bonus for player_array[rewards_pn]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_warden[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: Warden |cff660000Mythic+|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_potm[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: Priestess of the Moon |cff660000Mythic+|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_dh[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: Demon Hunter |cff660000Mythic+|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_kotg[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: Keeper of the Grove |cff660000Mythic+|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_exploration[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff660000Mythic+|r |cff808080Exploration|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_standard[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: Standard |cff660000Mythic+|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_hardcore[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff660000Mythic+|r |cffff0000Hardcore|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_no_demon_magic[rewards_pn] Greater than or equal to 5
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff660000Mythic+|r |cff80ff80Demonic Abstention|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • Game - Display to player_group_array[rewards_pn] the text: (difficulty_string[5] + Prestige Reward Applied: Attribute Bonus, Skins, Tech)
            • Else - Actions
      • Countdown Timer - Start rewards_timer[6] as a One-shot timer that will expire in 5.00 seconds
  • impossible rewards
    • Events
      • Time - rewards_timer[6] expires
    • Conditions
    • Actions
      • Player Group - Pick every player in players_grp and do (Actions)
        • Loop - Actions
          • Set VariableSet rewards_pn = (Player number of (Picked player))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • difficulty_highest_load[rewards_pn] Greater than or equal to 6
            • Then - Actions
              • Unit - Create 1 Prestige Trophy: |cff220000Impossible|r for player_array[rewards_pn] at impos_reward_pt[rewards_pn] facing Default building facing degrees
              • Player - Set player_array[rewards_pn].Current gold to ((player_array[rewards_pn] Current gold) + 195)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_warden[rewards_pn] Greater than or equal to 6
                • Then - Actions
                  • Player - Set the current research level of Prestige: Warden |cff220000Impossible|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_potm[rewards_pn] Greater than or equal to 6
                • Then - Actions
                  • Player - Set the current research level of Prestige: Priestess of the Moon |cff220000Impossible|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_dh[rewards_pn] Greater than or equal to 6
                • Then - Actions
                  • Player - Set the current research level of Prestige: Demon Hunter |cff220000Impossible|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_kotg[rewards_pn] Greater than or equal to 6
                • Then - Actions
                  • Player - Set the current research level of Prestige: Keeper of the Grove |cff220000Impossible|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_exploration[rewards_pn] Greater than or equal to 6
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff220000Impossible|r |cff808080Exploration|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_standard[rewards_pn] Greater than or equal to 6
                • Then - Actions
                  • Player - Set the current research level of Prestige: Standard |cff220000Impossible|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_hardcore[rewards_pn] Greater than or equal to 6
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff220000Impossible|r |cffff0000Hardcore|r to 6 for player_array[rewards_pn]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • highest_no_demon_magic[rewards_pn] Greater than or equal to 6
                • Then - Actions
                  • Player - Set the current research level of Prestige: |cff220000Impossible|r |cff80ff80Demonic Abstention|r to 1 for player_array[rewards_pn]
                • Else - Actions
              • Game - Display to player_group_array[rewards_pn] the text: (difficulty_string[6] + Prestige Reward Applied: +195 Gold, Tech Unlocked)
            • Else - Actions

Current problems
the system will overwrite previous saves with lower level saves. For example, if you just beat normal, it will overwrite a previous heroic victory. It will also scramble saves on occasion - such as it will give red players rewards to blue player.

What I am not interested in:
1) suggestions on how to improve the triggers
2) help exclusively consisting of hands-off guidance
3) triggers that only work sometimes
4) telling me this is easy or I could do it myself
5) "just do something you know how to do"

Serious inquiries from highly competient WC3 Editors, please write me on Hive Conversations. Payments will be in $USD.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
I suggest removing those Rewards triggers from your post. They don't really have to do with the Save/Load system and will probably overwhelm people with excess information. That aside, I have some ideas.

You can try using the delayed Loading method that I used in the Autoload trigger for the Autosaving as well. As you can see, I use a Timer to Load players one at a time with an interval of 0.40 seconds between each Load. You can also try increasing this interval to perhaps give more time to sync.

Also, if you still experience the scrambling problem then I think this could work. You add the Player's bnet tag (#1234) to their save file and use that as a way to determine who is who. This is a little complicated and Jass would definitely help here since you'll need to compare a loaded tag to the tags of each player in the game to confirm who the data belongs to. It may also cause problems with non-Reforged or foreign players (is that a thing? players without bnet tags?). Also, the way you store all of the loaded data would need to be done differently. You would introduce a new Integer Array variable that stores up to all 72 loaded Integers. Or rather it would store up to 81 Integers since the tag is a new save value. Then you would look at say LoadedData[1] and see that it contains the tag #1234, then check which Player in the game has that same tag, and when you find a Player you apply LoadedData[1] -> LoadedData[10] to them. So like -> Set Variable highest_no_hero[(Player number of the Player you found)] = LoadedData[10]. Then you repeat this process for LoadedData[11 -> 20], LoadedData[21 -> 30], etc...

Lastly, you should triple check to see if you are ever overwriting any of these variables AFTER loading but BEFORE saving. That could explain some of the problems (Object Manager helps here). I've looked over your Save/Load triggers a few times now and I really don't see how the logic could overwrite anything aside from a failed load.

Other than that, I don't know what else to do. I believe we're using the system correctly but Reforged is a mess that broke many things.
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
Thank you both for your continued generosity. Neither of my approved maps would have been possible with out both of you.
@Uncle might have an expertise on this
Uncle helped me get to this point I just feel I'm asking too much of him and just want to pay someone at this point if that makes sense.
Other than that, I don't know what else to do. I believe we're using the system correctly but Reforged is a mess that broke many things.
I actually just found a "typo" in one of the arrays that was throwing everything off.
JASS:
udg_highestwarden[udg_highest_warden[PN]]
I'll keep testing and update at somepoint.
 
Top