• 🏆 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!

Codeless Save and Load (Multiplayer) - v3.0.1

Information

If you've ever wanted to transfer progress between multiplayer maps, you probably needed to type in a long code.

That is no longer needed with this system. This will allow you to read save data from your WC3 folder and sync it to all other players in the map.

The demo map features:
  1. Load without typing anything
  2. Save Hero
    • Level/XP
    • Items
    • Abilities
    • Hero Name

  3. 5 Save Slots
* Everything is customizable and you can make the system save & load anything you want.

* This system is intended for GUI users.

Installation

To import the system, all you have to do is copy the trigger folders over to your map and save it.

Screenshots


untitled5-png.241496

untitled3-png.241494

untitled4-png.241495

113935-913340d9135dcfb50a7ac3b3dff3e424.png



Credits

Pipedream (optimal save system)
Previews
Contents

Codeless Save & Load v1.3.9 (Map)

Codeless Save & Load v3.0.1 (Map)

Reviews
Awaiting further review
Level 19
Joined
Aug 16, 2007
Messages
881
I've just updated to v3.0.0 from v2.0.0 and I had no issues importing; however, the new version will crash the game if you attempt to load a file that doesn't exist. Not sure if it's the system or my way of loading. Could be worth looking in to and add a fail-safe. I did not have this issue in v2.0.0 and my way of loading/saving is unchanged.

Thank you for this system!
 
Level 1
Joined
Jan 20, 2019
Messages
6
I seem to be getting the local files loading message when trying to save in my map, the system works in the sample map however.
 
Level 19
Joined
Aug 16, 2007
Messages
881
I seem to be getting the local files loading message when trying to save in my map, the system works in the sample map however.
If you haven't, try update FileIO to version 1.1.0. I had this issue before I updated.


@TriggerHappy
If you're able to, could you provide a temporary solution to prevent the crash when loading a file that doesn't exist? The crash happen in your demo map as well if you load an empty slot.

Would it be possible to check if the file exists without causing the crash? If yes, how?
 
Level 5
Joined
Feb 13, 2019
Messages
128
Look under the examples for GUI Saving you will find there how to define what to save. In this case its not what hero is "selected" but what hero is pointed at by a variable.


Wait how exactly do I point this to my Hero? o_O

(SavePlayerHero[((Player number of (Triggering player)) - 1)] is A Hero) Equal to True

^ That right ? o_O
 
Level 4
Joined
Sep 10, 2013
Messages
39
It's possible, to just autosave everything every 10 seconds (with GUI), saves all at 1 slot and load this slot with map initialization?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,534
Its realy no one out there, who can help me with this?

  • Autosave
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Set SaveLoadEvent_Player = Player 1 (Red)
      • -------- ------------------- --------
      • Set SaveCount = 0
      • -------- ------------------- --------
      • -------- PUT YOUR SAVE ACTIONS HERE --------
      • -------- ------------------- --------
      • -------- 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 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)
  • Autoload
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set SaveLoadEvent_Player = Player 1 (Red)
      • -------- ------------------- --------
      • -------- This runs the Event used in Load GUI and tells it to load Save Slot 1 --------
      • Custom script: call LoadSaveSlot(udg_SaveLoadEvent_Player, 1)
Check out the map I posted. I got rid of the multiple save slots/hero requirement/dialog stuff. It will load Save Slot 1 at the start of the game for the selected player. Then it will save to Save Slot 1 every 10 seconds for the selected player.

I use Gold as an example in the map. Press ESCAPE to add 1 Gold and you'll see that your Gold is saved/loaded between games. (Can only save up to 1000 gold)

To customize what you save/load you will have to edit the "Autosave" and "Load GUI" triggers. Make sure to load everything in the reverse order.

Since I deleted a bunch of stuff from the original system then you probably want to only import the Autosave, Autoload, and Load GUI triggers into your map. Keep everything else the same. Then edit those triggers to work for you.
 

Attachments

  • Save and Load Example.w3x
    145.5 KB · Views: 92
Last edited:
Level 4
Joined
Sep 10, 2013
Messages
39
Thank you man, i will try it out. Currently with just copy and pasting everything into my map, i get the message "invalid code (check your name"
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,534
Thank you man, i will try it out. Currently with just copy and pasting everything into my map, i get the message "invalid code (check your name"

You don't want to copy and paste everything. I deleted a bunch of stuff from the system in my map that you probably use in your map. Just import the "Autosave", "Autoload", and "Load GUI" triggers from my map. Then edit "Autosave" and "Load GUI" so that they save/load what you want.

Also, you might want to change the Event on Autoload to Time Elapsed 0.00 seconds instead of Map Initialization because if Autoload runs BEFORE Save Init it will cause problems. Or you could run the Autoload trigger at the end of the Save Init trigger like this:
  • Save Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- This willl be the directory the save codes will be saved to. Set it to your Map Name. --------
      • Set MapName = CodelessDemo
      • -------- ------------------- --------
      • -------- This message will display to players who don't have local files enabled --------
      • Set LocalFiles_WarningMessage = |cffe53b3bYou need to enable local files to load your character from disk on patches prior to 1.30!
      • Custom script: set udg_LocalFiles_WarningMessage = udg_LocalFiles_WarningMessage + "\n\n"
      • -------- ------------------- --------
      • Trigger - Run Autoload <gen> (ignoring conditions)
 
Last edited:
Level 4
Joined
Sep 10, 2013
Messages
39
And then i have to create my own saveini with everything i wanna make saveable, right?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,534
And then i have to create my own saveini with everything i wanna make saveable, right?
Correct. Keep all of the triggers you had before and then replace the "Save GUI" and "Load GUI Manual" triggers with my "Autosave" and "Autoload" triggers. This way the Player can no longer type -save/-load and instead it autosaves every X seconds and loads at the start of the map.

And if you don't want the the Dialog Menu for saving/loading then delete the "Dialog System" trigger.

Also, check out my previous post, I added some stuff to the bottom that you might want to do. If Autoload runs BEFORE Save Init it will cause problems.
 
Last edited:
Level 4
Joined
Sep 10, 2013
Messages
39
Yes!!!
It works, thank you :*

Will this work too, with a loop or "Pick all Player and do actions"? For Autosave/load each player with just these triggers?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,534
Yes!!!
It works, thank you :*

Will this work too, with a loop or "Pick all Player and do actions"? For Autosave/load each player with just these triggers?

Create 2 new triggers:
  • Autosave All Players
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set SaveLoadEvent_Player = (Picked player)
          • Trigger - Run Autosave <gen> (ignoring conditions)
  • Autoload All Players
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set SaveLoadEvent_Player = (Picked player)
          • Trigger - Run Autoload <gen> (ignoring conditions)
Then delete the Events in Autosave/Autoload and delete this Action from them:
  • Set SaveLoadEvent_Player = Player 1 (Red)
 
Last edited:
Level 5
Joined
Sep 15, 2019
Messages
67
Hey, I would like to use this save/ load system for a 4 player rpg I have been working on. Problem is I keep getting errors when i try to save my map. I put the triggers in with my triggers as copy/ paste.
Please any help/ suggestions would be great!
 

Attachments

  • Screenshot (27).png
    Screenshot (27).png
    1.4 MB · Views: 160
  • Screenshot (28).png
    Screenshot (28).png
    3.1 MB · Views: 176

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,534
Hey, I would like to use this save/ load system for a 4 player rpg I have been working on. Problem is I keep getting errors when i try to save my map. I put the triggers in with my triggers as copy/ paste.
Please any help/ suggestions would be great!
Are you using the latest warcraft 3 patch and do you have JassHelper/vJass enabled? Check the attached picture (JassHelper) to see what I mean.

Can someone show me how to save additional variables in this system?
I attached two pictures (Deadreyo Save/Load) to show you how to add your own variables.
 

Attachments

  • JassHelper.png
    JassHelper.png
    15.9 KB · Views: 262
  • Deadreyo Load.png
    Deadreyo Load.png
    163 KB · Views: 279
  • Deadreyo Save.png
    Deadreyo Save.png
    166 KB · Views: 189
Last edited:

NightKnight

Hosted Project RUID
Level 14
Joined
Sep 3, 2014
Messages
222
@Uncle Thanks for your reply. I am going to use the Autosave/load trigger you made in page 12. I have already messed around a little with what I save and load, however how can I remove the necessity of having a hero to save? As without a hero the save file name is Empty and so crashes on loading (Default, didn't use your autosave yet.)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,534
@Uncle Thanks for your reply. I am going to use the Autosave/load trigger you made in page 12. I have already messed around a little with what I save and load, however how can I remove the necessity of having a hero to save? As without a hero the save file name is Empty and so crashes on loading (Default, didn't use your autosave yet.)
Use the autosave map, it doesn't require a Hero. And if you want, I can show you how to have up to 5 different save slots without needing a Hero either. Like you can type -save 1 and -load 1 or -save 5 and -load 5 to save/load to 1 of 5 slots.
 
Updated, 3.0.1.
  • Fixed multiple crashes.
  • Removed JASS specific code for saving and loading. This system is intended for GUI users.
I also tested the system in Reforged and it seems to work. There is a bug that can sometimes occur when reading files but hopefully Blizzard will fix it by the time Reforged releases. If not, there are other solutions but they will break backwards compatibility.
 

Attachments

  • reforged.jpg
    reforged.jpg
    2.6 MB · Views: 306
Level 5
Joined
Sep 15, 2019
Messages
67
Hey I am new to variables and map creation as a whole but I cannot seem to find the trigger that gives me a demon hunter instead of my hero in my map. It adds me demon hunter with chaos damage which I do not want. I have 4 preset characters for 4 different colors in my map and would like to save "those" preset heroes without adding your heroes at start. Thanks if you can reply :)
 
Hey I am new to variables and map creation as a whole but I cannot seem to find the trigger that gives me a demon hunter instead of my hero in my map. It adds me demon hunter with chaos damage which I do not want. I have 4 preset characters for 4 different colors in my map and would like to save "those" preset heroes without adding your heroes at start. Thanks if you can reply :)

There is a demo trigger that runs on map start which creates the demo heroes. In order to add new types of heroes that can be saved you need to edit the Save Init trigger.
 
Top