1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  4. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  5. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Save Load Map

Discussion in 'World Editor Help Zone' started by marcos candine, May 12, 2020.

  1. marcos candine

    marcos candine

    Joined:
    Feb 20, 2020
    Messages:
    86
    Resources:
    0
    Resources:
    0
    Hello,
    Anyone have a save / load code or map with that code implemented that works for MULTIplayer to save MULTIPLE units?
    i already tryed codeless save load... its not what i want...
    i need something like monster master code...
    Thanks
     
  2. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    1,531
    Resources:
    0
    Resources:
    0
    What does saving multiple units mean? Saving their positions? Levels? Please be more specific.

    And codeless save and load can save anything you want.

    I attached a map that uses the codeless Save and Load system. I modified it to remove most of the unwanted features.

    Press Escape to spawn a random unit from either a Footman, Rifleman, or Knight.

    Type -save to save these units. Type -load to load these units.

    To properly test it out, spawn a bunch of units using Escape and then type -save. Then restart the map and type -load and you'll get the same units from the previous game. This should work on bnet as well.

    Note that the Save and Load system can only save/load Integer values, but with clever use of variables/triggers you can save any type of data you want.
     

    Attached Files:

    Last edited: May 12, 2020
  3. marcos candine

    marcos candine

    Joined:
    Feb 20, 2020
    Messages:
    86
    Resources:
    0
    Resources:
    0
    well what i need is... save a bunch of heroes (7 heroes in total)
    1 hero, exp, 4 items
    6 others heroes, exp 2 items each
    gold and lumber
    dont need to save position of the heroes
    because when you load them, 6 will go to a player area (player 1 - area 1) (player 2 - area 2) and so on
    and the last thing i need is the code to be saved in the player warcraft folder
    also i need the code to work in multiplayer...
    Could you help me with that, please?
     
  4. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    1,531
    Resources:
    0
    Resources:
    0
    I hope you can open this map.

    I added everything you listed. Although, I only setup the variables for Player 1 and Player 2.

    Look through all of my triggers, see what I did for Player 1 and Player 2, and repeat what I was doing but for the rest of the Players.

    You'll have to add the other Players to these triggers:
    Set TempHeroes Save
    Set TempHeroes Load


    And you'll have to modify this trigger, adding variables for all of your Hero Unit-Types and Item-Types as well as keeping track of each Player's Heroes (from 1 to 7):
    Setup Save Variables

    There's instructions in the triggers, hopefully it's not too confusing.

    You should definitely try to learn how to use the system yourself. Look at how I save/load Gold and Lumber since those are lot less complicated than the Heroes. You don't need a deep understanding of how it works in order to use it.
     

    Attached Files:

    Last edited: May 13, 2020
  5. marcos candine

    marcos candine

    Joined:
    Feb 20, 2020
    Messages:
    86
    Resources:
    0
    Resources:
    0
    I tested that in single player, it is working!! i have now to test with multiplayer...
    but thank you a lot!
    one last question, this system can save hidden skills? like attribute bonus level?
     
  6. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    1,531
    Resources:
    0
    Resources:
    0
    Do you want to save each of the Heroes skills? Like Paladin's Holy Light, Divine Shield, Devotion Aura, etc...? Or just a few hidden skills?

    Regardless, it can save just about anything since Integers can be used to represent other types of data. Skills are a bit tricky though.

    It would work similar to how I was saving Item-Types. You need to store each Skill that you want to save in an Ability Array.

    Set Setup_Total_Skills = X
    Set Setup_Skill[1] = Attribute Bonus
    Set Setup_Skill[2] = ...
    etc...

    Then save the Number of skills your Hero has, save the Index [] for each of these skills, and save the Level for each of these skills.
     
  7. marcos candine

    marcos candine

    Joined:
    Feb 20, 2020
    Messages:
    86
    Resources:
    0
    Resources:
    0
    Well i want to save 3 hidden attribute bonus level (for str only, agility only and int only), so 3 integers!
    Every hero will have the 3, it will work just like the IV from pokemon... its a random number between 1 and 15... basically i save that hidden "level" and load that level, dont need to save the skill...
    I will try something that i used in the other save load i was working... and see if it works...
     
  8. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    1,531
    Resources:
    0
    Resources:
    0
    Ah, that makes life a lot easier. I can add that to the example map very quickly.
     
  9. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    1,531
    Resources:
    0
    Resources:
    0
    Here you go. Remember to configure Setup Save Variables to work for your map since it will use different Heroes/Abilities/etc...
     

    Attached Files:

  10. marcos candine

    marcos candine

    Joined:
    Feb 20, 2020
    Messages:
    86
    Resources:
    0
    Resources:
    0
    thank you a lot!! i will try that right now!
     
  11. marcos candine

    marcos candine

    Joined:
    Feb 20, 2020
    Messages:
    86
    Resources:
    0
    Resources:
    0
    well... something is wrong... it doesn't create the map folder anymore, neither the load works...
    could you take a look for me?
    i will send you my map :X
     

    Attached Files:

  12. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    1,531
    Resources:
    0
    Resources:
    0
    Alright, I fixed it.

    I may have undone some of your work (apologies in advance) but you should be able to copy and paste the missing stuff into this new version.

    Some fixes:
    -I added my PlayerX_Heroes variables to your New Trainer / Buy Monster triggers.
    -I added a new variable, Player_TotalHeroes which keeps track of how many Heroes you have.
    -This one is IMPORTANT, I edited the Aerial Shackles ability, do NOT change this ability! You can copy and paste it and create new abilities based on it but don't change the original! The Save and Load system uses this ability.

    Keep in mind you never added the 3 Starter Monsters to Setup Save Variables. So make sure to add the 3 starters and then you can test it properly.

    It will break if you try to Save anything that isn't added to the variables.

    Edit:
    Uploaded v2. See if this one works.
     

    Attached Files:

    Last edited: May 14, 2020
  13. marcos candine

    marcos candine

    Joined:
    Feb 20, 2020
    Messages:
    86
    Resources:
    0
    Resources:
    0
    what do you mean?
    in the setup save variable trigger, have only that :
    set variableset player region...
     
  14. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    1,531
    Resources:
    0
    Resources:
    0
    Re-uploaded it. I think this version (2) should work properly.

    And I had a bunch of variables like this:
    • Set VariableSet Player1_Heroes[1] = Paladin 0001 <gen>

    But it shouldn't be an issue now.
     
  15. marcos candine

    marcos candine

    Joined:
    Feb 20, 2020
    Messages:
    86
    Resources:
    0
    Resources:
    0
    -I added a new variable, Player_TotalHeroes which keeps track of how many Heroes you have.

    well i have already a variable to see that... but doesnot mind.

    -This one is IMPORTANT, I edited the Aerial Shackles ability, do NOT change this ability! You can copy and paste it and create new abilities based on it but don't change the original! The Save and Load system uses this ability.

    humm

    Keep in mind you never added the 3 Starter Monsters to Setup Save Variables. So make sure to add the 3 starters and then you can test it properly.

    they are all set... :X
     
  16. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    1,531
    Resources:
    0
    Resources:
    0
    I don't see their names but maybe I'm just not seeing properly. And unless you edit the system to use YOUR variables you'll have to use the variables I provided, otherwise how will the system know.

    Edit: Oh I see now, I was looking for Paladin in the starter name since that's what it says ingame.
     
  17. marcos candine

    marcos candine

    Joined:
    Feb 20, 2020
    Messages:
    86
    Resources:
    0
    Resources:
    0
    • Setup Save Variables
      • Events
        • Map initialization
      • Conditions
      • Actions
        • -------- Keep track of all of the Heroes --------
        • Set VariableSet Setup_Total_UnitTypes = 42
        • Set VariableSet Setup_UnitType[1] = |cff0000ffAquatic|r / |cff008000Nature|r Coreal
        • Set VariableSet Setup_UnitType[2] = |cff0000ffAquatic|r / |cff008000Nature|r Grejum
        • Set VariableSet Setup_UnitType[3] = |cff0000ffAquatic|r / |cff008000Nature|r Lydreef
        • Set VariableSet Setup_UnitType[4] = |cff0000ffAquatic|r / |cff008000Nature|r Murceres
        • Set VariableSet Setup_UnitType[5] = |cff0000ffAquatic|r / |cffd45e19Beast|r Lobsta
        • Set VariableSet Setup_UnitType[6] = |cff0000ffAquatic|r / |cffd45e19Beast|r Lobstord
        • Set VariableSet Setup_UnitType[7] = |cff0000ffAquatic|r Crabbo
        • Set VariableSet Setup_UnitType[8] = |cff0000ffAquatic|r Cruby
        • Set VariableSet Setup_UnitType[9] = |cff0000ffAquatic|r Froggan
        • Set VariableSet Setup_UnitType[10] = |cff0000ffAquatic|r Froggior
        • Set VariableSet Setup_UnitType[11] = |cff0000ffAquatic|r Froggy
        • Set VariableSet Setup_UnitType[12] = |cff0000ffAquatic|r Golsh
        • Set VariableSet Setup_UnitType[13] = |cff0000ffAquatic|r Kinrub
        • Set VariableSet Setup_UnitType[14] = |cff008000Nature|r / |cff00ffffAir|r Moonfree
        • Set VariableSet Setup_UnitType[15] = |cff008000Nature|r / |cff00ffffAir|r Wespah
        • Set VariableSet Setup_UnitType[16] = |cff008000Nature|r Capod
        • Set VariableSet Setup_UnitType[17] = |cff008000Nature|r Crocun
        • Set VariableSet Setup_UnitType[18] = |cff008000Nature|r Lorvi
        • Set VariableSet Setup_UnitType[19] = |cff008000Nature|r Lurvin
        • Set VariableSet Setup_UnitType[20] = |cff008000Nature|r Trent
        • Set VariableSet Setup_UnitType[21] = |cff008000Nature|r Trentop
        • Set VariableSet Setup_UnitType[22] = |cff008000Nature|r Trentus
        • Set VariableSet Setup_UnitType[23] = |cff008000Nature|r Woonster
        • Set VariableSet Setup_UnitType[24] = |cffff0000Flame|r Anaconas
        • Set VariableSet Setup_UnitType[25] = |cffff0000Flame|r Conas
        • Set VariableSet Setup_UnitType[26] = |cffff0000Flame|r Kenas
        • Set VariableSet Setup_UnitType[27] = |cff00ffffAir|r Brosky
        • Set VariableSet Setup_UnitType[28] = |cff00ffffAir|r Kinsky
        • Set VariableSet Setup_UnitType[29] = |cff00ffffAir|r Resky
        • Set VariableSet Setup_UnitType[30] = |cffff0000Flame|r Peebli
        • Set VariableSet Setup_UnitType[31] = |cffff0000Flame|r Rockli
        • Set VariableSet Setup_UnitType[32] = |cffff0000Flame|r Meteoris
        • Set VariableSet Setup_UnitType[33] = |cff00ffffAir|r / |cff6f2583Shadow|r Batvil
        • Set VariableSet Setup_UnitType[34] = |cff00ffffAir|r / |cff6f2583Shadow|r Gargvil
        • Set VariableSet Setup_UnitType[35] = |cff00ffffAir|r / |cff6f2583Shadow|r Blust
        • Set VariableSet Setup_UnitType[36] = |cff00ffffAir|r / |cff6f2583Shadow|r Spairt
        • Set VariableSet Setup_UnitType[37] = |cff6f2583Shadow|r / |cff00ffffAir|r Jynst
        • Set VariableSet Setup_UnitType[38] = |cff6f2583Shadow|r / |cff00ffffAir|r Spectron
        • Set VariableSet Setup_UnitType[39] = |cffd45e19Beast|r Porcus
        • Set VariableSet Setup_UnitType[40] = |cffd45e19Beast|r Tuskier
        • Set VariableSet Setup_UnitType[41] = |cff00ffffAir|r / |cffd45e19Beast|r Birdra
        • Set VariableSet Setup_UnitType[42] = |cff00ffffAir|r / |cffd45e19Beast|r Garudra
        • -------- --------
        • -------- Keep track of all of the Items --------
        • Set VariableSet Setup_Total_ItemTypes = 29
        • Set VariableSet Setup_ItemType[1] = Claws of Attack
        • Set VariableSet Setup_ItemType[2] = Gauntlets of Strength
        • Set VariableSet Setup_ItemType[3] = Mantle of Intelligence
        • Set VariableSet Setup_ItemType[4] = Old Amulet
        • Set VariableSet Setup_ItemType[5] = Pendant of Energy
        • Set VariableSet Setup_ItemType[6] = Periapt of Vitality
        • Set VariableSet Setup_ItemType[7] = Ring of Protection
        • Set VariableSet Setup_ItemType[8] = Slippers of Agility
        • Set VariableSet Setup_ItemType[9] = Small Ring
        • Set VariableSet Setup_ItemType[10] = Ugly Doll
        • Set VariableSet Setup_ItemType[11] = Wooden Stick
        • Set VariableSet Setup_ItemType[12] = Catchball
        • Set VariableSet Setup_ItemType[13] = Great Catchball
        • Set VariableSet Setup_ItemType[14] = Ultra Catchball
        • Set VariableSet Setup_ItemType[15] = Healing Potion
        • Set VariableSet Setup_ItemType[16] = Greater Healing Potion
        • Set VariableSet Setup_ItemType[17] = Greater Dual Potion
        • Set VariableSet Setup_ItemType[18] = Greater Mana Potion
        • Set VariableSet Setup_ItemType[19] = Mana Potion
        • Set VariableSet Setup_ItemType[20] = Dual Potion
        • Set VariableSet Setup_ItemType[21] = Trainer's Journal
        • Set VariableSet Setup_ItemType[22] = Trainer's Journal
        • Set VariableSet Setup_ItemType[23] = Trainer's Journal
        • Set VariableSet Setup_ItemType[24] = Trainer's Journal
        • Set VariableSet Setup_ItemType[25] = Trainer's Journal
        • Set VariableSet Setup_ItemType[26] = Trainer's Journal
        • Set VariableSet Setup_ItemType[27] = Trainer's Journal
        • Set VariableSet Setup_ItemType[28] = Trainer's Journal
        • Set VariableSet Setup_ItemType[29] = Trainer's Journal
        • -------- --------
        • -------- Keep track of Player 1's 7 Heroes and their Spawn Region --------
        • Set VariableSet Player_Region[1] = Player 1 <gen>
        • -------- --------
        • -------- Keep track of Player 2's 7 Heroes and their Spawn Region --------
        • Set VariableSet Player_Region[2] = Player 4 <gen>
        • -------- --------
        • -------- Keep track of the rest of the Player's Heroes/Regions --------
        • Set VariableSet Setup_Total_HiddenAbilities = 3
        • Set VariableSet Setup_HiddenAbilities[1] = Individual Value (Dexterity)
        • Set VariableSet Setup_HiddenAbilities[2] = Individual Value (Spirit)
        • Set VariableSet Setup_HiddenAbilities[3] = Individual Value (Stamina)
     
  18. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    1,531
    Resources:
    0
    Resources:
    0
    Have you tried the new version out, lol. None of this stuff matters anymore if it works :p
     
  19. marcos candine

    marcos candine

    Joined:
    Feb 20, 2020
    Messages:
    86
    Resources:
    0
    Resources:
    0
    ok i will try this now
     
  20. marcos candine

    marcos candine

    Joined:
    Feb 20, 2020
    Messages:
    86
    Resources:
    0
    Resources:
    0
    well it loaded other stuff... :X
    i will take a look at the triggers and see why its loading the trainer at the "monsters" region
    and loaded another monster...
    idk why its not working :/
     
    Last edited: May 14, 2020