• 🏆 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 13
Joined
Jul 12, 2018
Messages
509
Tried this in my GUI map and can't get it to work. I've got a tavern system where the sale of the unit sets it as SavePlayerHero[player # owner of sold unit]. Got the edit done on Aerial Shackles (2 levels + qwerty in "tooltip Level 2"). Got the hero choices, items and abilities for one hero added into save init, got the hero names for that hero entered in HeroNames. Got the Esc dialog showing up and looking good, just not functional. Any ideas?

I can get it to produce a savefile but i can't get it to acknowledge ingame that it exists.
 
Last edited:
Level 19
Joined
Aug 16, 2007
Messages
881
I 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.
Any temporary solution for this bug? Currently roughly 4 out of 5 games don't load anything properly and sometimes the game crashes when loading.

I've tried adding a wait as mentioned here FileIO v1.1.0 fixed, but that didn't help either.
 
Any temporary solution for this bug? Currently roughly 4 out of 5 games don't load anything properly and sometimes the game crashes when loading.

I've tried adding a wait as mentioned here FileIO v1.1.0 fixed, but that didn't help either.

There's a solution but it breaks backwards compatibility. I suppose you can try to loop until the code loads properly.

The bug should be fixed in the next update for Warcraft III.
 
Level 19
Joined
Aug 16, 2007
Messages
881
There's a solution but it breaks backwards compatibility. I suppose you can try to loop until the code loads properly.

The bug should be fixed in the next update for Warcraft III.
It's fine if the solution isn't backwards compatible as I reset the codes between major versions.

The loop could be a solution for failing to gather the save data, but what about the crash? Are you aware of what's causing it?
 
Level 2
Joined
Feb 6, 2020
Messages
6
When trying to save with this I'm unable to get custom heroes to save. I place them in the save init but -save wont produce a code, however when I save a blood mage and overwrite the blood mage's position in the trigger with the custom hero I am able to -load it. Is this due to the aforementioned bugs? If so, would anyone be able to shed some light on what the solution would be to get this working again?
 
Level 5
Joined
Jan 23, 2020
Messages
86
I am getting the "enable local files" but it is enabled. GUI will not display the save slot screen or load screen.
If I manually type -save it creates the folder/files but when I -load it states "no save data"
 
Level 4
Joined
May 24, 2017
Messages
93
Does anybody know of a system that works like this system with out codes but deletes the character when they die?
 
Last edited:
Level 2
Joined
Aug 16, 2018
Messages
11
The deletion of saves isn't working for me, even on a newly downloaded map. Everything else is working though.

Edit: Apparently it loads the deletion after you restart the map
 
Last edited:
Level 3
Joined
Aug 18, 2016
Messages
42
When I try to load my character I get the message "save file not found" What should I do to fix this?
 
Level 4
Joined
Jan 20, 2016
Messages
28
Yup... it seems like the system stops working after copying to a new map?
The only way I made it to work was via copying object data to a new map as well.
An easier workaround would be cool.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,456
Yup... it seems like the system stops working after copying to a new map?
The only way I made it to work was via copying object data to a new map as well.
An easier workaround would be cool.
The Aerial Shackles ability needs 2 levels in order for the system to work.

This is because Aerial Shackles is used in generating the save/load code. The problem: Blizzard made level indices start at 0 in the recent patches, which messed up any existing code that was using 1 to represent 1 (0 now represents 1).

So now the code is attempting to reference level 2 of Aerial Shackles when the ability only has 1 level by default.

Edit: I think you also need to set the Tooltip for level 2 to: "!"

See attached picture!
 

Attachments

  • example fix.png
    example fix.png
    367.9 KB · Views: 196
Last edited:
Can one just keep adding slots? Wondering because using player name to pass the code around has a small limit, is it locked to using player name? Working on a map that saves a lot of data, more then that can be put onto a name at once. Wanted to try a super long string and set the player name a small amount at a time throughout the string. Looks like a better alternative just to somehow link multiple slots together and load them one at a time.
 
Last edited:
Can one just keep adding slots? Wondering because using player name to pass the code around has a small limit, is it locked to using player name? Working on a map that saves a lot of data, more then that can be put onto a name at once. Wanted to try a super long string and set the player name a small amount at a time throughout the string. Looks like a better alternative just to somehow link multiple slots together and load them one at a time.

I am guessing you're talking about v1.3.9 because the system no longer uses player names. The system already loops through the string and sets the player name in chunks so it should work with long strings.
 
I am guessing you're talking about v1.3.9 because the system no longer uses player names. The system already loops through the string and sets the player name in chunks so it should work with long strings.
How does one save strings instead of integers? I am guessing I am hitting the limit of the code generator with using integers to save strings.
 
Have an array of all of the strings and save the index
That's still saving it as an integer, trying to save it as a literal string instead. Edit: the two meaningless loops were there to test near the amount I'd be saving.

[trigger=]
alphabet
Events
Map initialization
Conditions
Actions
Set tempint = 0
-------- --------
-------- In order from A to Z --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = a
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS65.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = b
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS66.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = c
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS67.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = d
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS68.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = e
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS69.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = f
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS70.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = g
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS71.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = h
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS72.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = i
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS73.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = j
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS74.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = k
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS75.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = l
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS76.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = m
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS77.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = n
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS78.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = o
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS79.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = p
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS80.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = q
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS81.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = r
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS82.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = s
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS83.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = t
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS84.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = u
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS85.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = v
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS86.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = w
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS87.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = x
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS88.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = y
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS89.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = z
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS90.blp
-------- --------
-------- Numbers begin here --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 0
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS48.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 1
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS49.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 2
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS50.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 3
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS51.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 4
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS52.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 5
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS53.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 6
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS54.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 7
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS55.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 8
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS56.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = 9
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS57.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = +
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS43.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = -
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS45.blp
-------- --------
Set tempint = (tempint + 1)
Set alphabetchecker[tempint] = .
Set MyAlphabet[tempint] = war3mapImported\TrebuchetMS46.blp
-------- --------
Hashtable - Create a hashtable
Set mytable = (Last created hashtable)
[/trigger]
[trigger=]
Save GUI
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
Player - Player 5 (Yellow) types a chat message containing -save as An exact match
Player - Player 6 (Orange) types a chat message containing -save as An exact match
Player - Player 7 (Green) types a chat message containing -save as An exact match
Player - Player 8 (Pink) types a chat message containing -save as An exact match
Player - Player 9 (Gray) types a chat message containing -save as An exact match
Player - Player 10 (Light Blue) types a chat message containing -save as An exact match
Player - Player 11 (Dark Green) types a chat message containing -save as An exact match
Conditions
(SavePlayerHero[((Player number of (Triggering player)) - 1)] is A Hero) Equal to True
Actions
Game - Display to (All players) the text: (Name of (Triggering player))
-------- ------------------- --------
-------- NOTE: You must load values in the reverse order you saved them in. This is why we save the unit type last. --------
-------- ------------------- --------
Set SaveTempUnit = SavePlayerHero[((Player number of (Triggering player)) - 1)]
Set SaveCount = -1
-------- ------------------- --------
-------- Save Abilities --------
-------- ------------------- --------
For each (Integer SaveTempInt) from 0 to SaveAbilityTypeMax, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of SaveAbilityType[SaveTempInt] for SaveTempUnit) Greater than 0
Then - Actions
-------- Save level of ability --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Level of SaveAbilityType[SaveTempInt] for SaveTempUnit)
Set SaveMaxValue[SaveCount] = 10
-------- Save the array index --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = SaveTempInt
Set SaveMaxValue[SaveCount] = SaveAbilityTypeMax
Else - Actions
-------- Save the number of abilities the unit has --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (SaveCount / 2)
Set SaveMaxValue[SaveCount] = SaveAbilityTypeMax
-------- ------------------- --------
-------- Save Skill Points --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Unspent skill points of SaveTempUnit)
Set SaveMaxValue[SaveCount] = 999
-------- ------------------- --------
-------- Save Items --------
-------- ------------------- --------
For each (Integer SaveTempInt) from 0 to 5, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Custom script: set udg_SaveValue[udg_SaveCount] = SaveCode_I2I(GetItemTypeId(UnitItemInSlot(udg_SaveTempUnit, udg_SaveTempInt)))
Set SaveMaxValue[SaveCount] = SaveItemTypeMax
-------- ------------------- --------
-------- Save Attributes --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Strength of SaveTempUnit (Exclude bonuses))
Set SaveMaxValue[SaveCount] = 999
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Agility of SaveTempUnit (Exclude bonuses))
Set SaveMaxValue[SaveCount] = 999
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Intelligence of SaveTempUnit (Exclude bonuses))
Set SaveMaxValue[SaveCount] = 999
-------- ------------------- --------
-------- Save Experience (%) and Level --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Custom script: set udg_SaveValue[udg_SaveCount] = R2I( (GetHeroXP(udg_SaveTempUnit)) / FindLevelXP(GetHeroLevel(udg_SaveTempUnit)) * 100) // percentage
Set SaveMaxValue[SaveCount] = 100
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Hero level of SaveTempUnit)
Set SaveMaxValue[SaveCount] = 100
-------- ------------------- --------
-------- Save Unit Type --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Custom script: set udg_SaveValue[udg_SaveCount] = SaveCode_U2I(GetUnitTypeId(udg_SaveTempUnit))
Set SaveMaxValue[SaveCount] = SaveUnitTypeMax
-------- ------------------- --------
-------- Name test --------
Set tempstr = wow
Set tempstr = (String(tempstr) as Lower case)
For each (Integer A) from 1 to (Length of tempstr), do (Actions)
Loop - Actions
For each (Integer B) from 1 to 40, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
alphabetchecker[(Integer B)] Equal to (Substring(tempstr, (Integer A), (Integer A)))
Then - Actions
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Integer B)
Set SaveMaxValue[SaveCount] = 99
Custom script: exitwhen true
Else - Actions
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Length of tempstr)
Set SaveMaxValue[SaveCount] = 99
-------- Save to disk --------
For each (Integer A) from 1 to 37, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Random integer number between 90 and 99)
Set SaveMaxValue[SaveCount] = 99
For each (Integer A) from 1 to 99, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveValue[SaveCount] = (Random integer number between 90 and 99)
Set SaveMaxValue[SaveCount] = 99
-------- ------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SaveLoad_Slot Less than 0
Then - Actions
Set SaveLoad_Slot = 11
Else - Actions
Custom script: call SaveCode_Save(GetTriggerPlayer(), udg_SaveLoad_Slot)
[/trigger]
[trigger=]
Load GUI2
Events
Game - SaveLoadEvent becomes Equal to 1.00
Conditions
Actions
Set SaveCount = -1
-------- ------------------- --------
-------- NOTE: You must load values in the reverse order you saved them in --------
-------- ------------------- --------
-------- 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
Custom script: call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "Loaded " + User[udg_SaveLoadEvent_Player].nameColored + "'s character in " + R2S(udg_SaveTempReal) + " seconds!")
-------- ------------------- --------
Game - Display to (All players) the text: (String((Length of SaveLoadEvent_Code)))
Game - Display to (All players) the text: SaveLoadEvent_Code
Game - Display to (All players) the text: (String((Length of SaveTempString)))
For each (Integer A) from 1 to 99, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 99
Custom script: call SaveCode_LoadNextValue()
Player - Set Player 1 (Red) Current lumber to 0
Player - Add SaveValue[SaveCount] to Player 1 (Red) Current lumber
Game - Display to (All players) the text: (String(SaveValue[SaveCount]))
For each (Integer A) from 1 to 37, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 99
Custom script: call SaveCode_LoadNextValue()
Player - Set Player 1 (Red) Current gold to 0
Player - Add SaveValue[SaveCount] to Player 1 (Red) Current gold
Game - Display to (All players) the text: (String(SaveValue[SaveCount]))
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 99
Custom script: call SaveCode_LoadNextValue()
Game - Display to (All players) the text: (String(SaveValue[SaveCount]))
Set tempint = SaveValue[SaveCount]
-------- ------------------- --------
Set tempstr = <Empty String>
For each (Integer A) from 1 to tempint, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 99
Custom script: call SaveCode_LoadNextValue()
Set tempstr = (tempstr + alphabetchecker[SaveValue[SaveCount]])
Game - Display to (All players) the text: tempstr
-------- Load Hero --------
Game - Display to (All players) the text: tempstr
-------- ------------------- --------
Unit - Remove SavePlayerHero[((Player number of SaveLoadEvent_Player) - 1)] from the game
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = SaveUnitTypeMax
Custom script: call SaveCode_LoadNextValue()
-------- ------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SaveUnitType[SaveValue[SaveCount]] is A Hero) Equal to True
SaveHeroName Equal to True
Then - Actions
Custom script: set udg_SaveTempUnit = SaveCode_LoadHeroWithProperName(udg_SaveLoadEvent_Player, udg_SaveUnitType[udg_SaveValue[udg_SaveCount]], 0, 0, 0)
Else - Actions
Unit - Create 1 SaveUnitType[SaveValue[SaveCount]] for SaveLoadEvent_Player at (Center of (Playable map area)) facing Default building facing degrees
Set SaveTempUnit = (Last created unit)
Set SavePlayerHero[((Player number of SaveLoadEvent_Player) - 1)] = SaveTempUnit
Selection - Select SaveTempUnit for SaveLoadEvent_Player
-------- ------------------- --------
-------- Load Experience and Level --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 100
Custom script: call SaveCode_LoadNextValue()
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 100
Custom script: call SaveCode_LoadNextValue()
Custom script: set udg_SaveTempReal = FindLevelXP(udg_SaveValue[udg_SaveCount-1])
Hero - Set SaveTempUnit experience to (Integer((((Real(SaveValue[SaveCount])) / 100.00) x SaveTempReal))), Hide level-up graphics
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Hero level of SaveTempUnit) Not equal to SaveValue[(SaveCount - 1)]
Then - Actions
Hero - Set SaveTempUnit Hero-level to SaveValue[(SaveCount - 1)], Hide level-up graphics
Else - Actions
-------- ------------------- --------
-------- Load Attributes --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 999
Custom script: call SaveCode_LoadNextValue()
Hero - Modify Intelligence of SaveTempUnit: Set to SaveValue[SaveCount]
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 999
Custom script: call SaveCode_LoadNextValue()
Hero - Modify Agility of SaveTempUnit: Set to SaveValue[SaveCount]
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 999
Custom script: call SaveCode_LoadNextValue()
Hero - Modify Strength of SaveTempUnit: Set to SaveValue[SaveCount]
-------- ------------------- --------
-------- Load Items --------
-------- ------------------- --------
For each (Integer A) from 0 to 5, do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = SaveItemTypeMax
Custom script: call SaveCode_LoadNextValue()
Hero - Create SaveItemType[SaveValue[SaveCount]] and give it to SaveTempUnit
-------- ------------------- --------
-------- Load Skill Points --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 999
Custom script: call SaveCode_LoadNextValue()
Hero - Modify unspent skill points of SaveTempUnit: Set to 0 points
Hero - Modify unspent skill points of SaveTempUnit: Set to (SaveValue[SaveCount] - (Unspent skill points of SaveTempUnit)) points
-------- ------------------- --------
-------- Load Abilities --------
-------- ------------------- --------
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = SaveAbilityTypeMax
Custom script: call SaveCode_LoadNextValue()
Set SaveTempReal = (Real(SaveValue[SaveCount]))
For each (Integer A) from 0 to (Integer(SaveTempReal)), do (Actions)
Loop - Actions
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = SaveAbilityTypeMax
Custom script: call SaveCode_LoadNextValue()
Unit - Add SaveAbilityType[SaveValue[SaveCount]] to SaveTempUnit
Set SaveCount = (SaveCount + 1)
Set SaveMaxValue[SaveCount] = 10
Custom script: call SaveCode_LoadNextValue()
Unit - Set level of SaveAbilityType[SaveValue[(SaveCount - 1)]] for SaveTempUnit to SaveValue[SaveCount]
Custom script: call Savecode(udg_SaveTempInt).destroy()
[/trigger]
Thinking maybe multiple slots linked to each other would be the solution, but not exactly sure how to go about that yet.
 
Last edited:
Level 1
Joined
Feb 12, 2020
Messages
3
I am getting the "enable local files" but it is enabled. GUI will not display the save slot screen or load screen.
If I manually type -save it creates the folder/files but when I -load it states "no save data"

I have this exact problem also.
Have it working perfectly fine with both Save and Load by typing -save or -load. But cannot get the Dialogue boxes to work.
I have tried manually setting bool safe to true, which makes it work but it never saves a character to a slot.
The only slot that works is 'SaveSlot_Manual'. No matter which slot I save it to, it will always save to Manual and will never be able to be loaded.

Any help is appreciated!
 
Level 4
Joined
Jun 8, 2020
Messages
28
Guys i have some problem with it and probably with every JASS triggers transfer. My Map doesnt load any more after i transfer Jass trigger. Just starting game and that is it... and i also noticed thet if i edit original map with this system, even just add some item or unit, map won`t start any more. Can any 1 help me please?
 
Level 4
Joined
Jun 8, 2020
Messages
28
Managed to make it running on ma map. There was some syntax mistake in one of triggers in codeless folder.
Also did some upgrades GUI save load system:
Added gold and lumber to be saved.
Save code doesnt show any more. Insted Just massage that hero succcesfuly stored.
Loading of hero can be only once per game.
I can share triggers for those Who need.
 
Level 1
Joined
Feb 12, 2020
Messages
3
Managed to make it running on ma map. There was some syntax mistake in one of triggers in codeless folder.
Also did some upgrades GUI save load system:
Added gold and lumber to be saved.
Save code doesnt show any more. Insted Just massage that hero succcesfuly stored.
Loading of hero can be only once per game.
I can share triggers for those Who need.

Yeah if you could share them that would be awesome, still having trouble getting this to work when porting it over for some reason. The GUI [Dialogue Boxs] never seem to work.
 
Level 4
Joined
Jun 8, 2020
Messages
28
First of all make sure you have correct Jass New Gen Pack. I uploaded if you not sure that yours is working fine.

There is map and 1 folder only. There is comment inside. It will help you to adjust save trigger. This is easy.
 

Attachments

  • JNGP 5d.rar
    9.9 MB · Views: 200
  • CodeLess SaveLoad Sys.w3x
    115.9 KB · Views: 163
Level 31
Joined
Aug 6, 2015
Messages
628
Can someone please help me with that system?
I want to save stats for
How much a player killed in N games - and give the player a reward when reaching needed number.
If Player completed difficulty Nr 1 - give the player the reward.
If Player completed difficulty Nr 2 - give the player the reward.
also an command for players to check their stats
(something like -check and players can see how many kills or what difficulty he completed or didnt)
(i am a gui user , and i don't know jass or lua at all)
 
Level 7
Joined
Sep 27, 2016
Messages
68
Sir i have problem..

Here is my chronology.. I set up your system.. everything seem fine.. so i test.. i try purchase 1/2 items, gained small amount of golds and lumbers, increases some levels.. then i save it (generates one line short code) -> i restart the game -> i load = Fine, i get what i want.. then i try again, i purchase many items, 6 items in my Inventory, 6 items in Equipment, 6 items in Storage (Total 18 items).. with additional code for item's Charges (SaveMaxValue: 99) and Custom Value (SaveMaxValue: 9) .. next, i increases my level to 70 (SaveMaxValue: 99), additional 3 units (SaveMaxValue: 999) and each unit's level (SaveMaxValue: 99), i have 4 units are saved and each unit have its own level.. then i save it (generates one line code) -> i restart the game -> i load = everything messed up .. is there any chance that your system is cannot generate a large code?
 
Level 7
Joined
Nov 6, 2019
Messages
185
~Hey Any help, i use -save, and it says saved, and creates save file, but when i then go new game and try load the code with -load, it says save file not found
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,456
~Hey Any help, i use -save, and it says saved, and creates save file, but when i then go new game and try load the code with -load, it says save file not found
Make sure you setup the Aerial Shackles ability so that it has 2 levels. To be safe, check out how the ability is setup in the demo map and copy that exactly.
 
Level 7
Joined
Nov 6, 2019
Messages
185
Make sure you setup the Aerial Shackles ability so that it has 2 levels. To be safe, check out how the ability is setup in the demo map and copy that exactly.
TY, Kinda Annoys me now, i been trying to get this to work since Jan 31st 2020, i was told by you it dont work on 1.32 saved map, and to make Ariel a level 2 ability, and i did and didnt work

And all i had to do was add a ! into level 2 tooltip of that spell, no one told me that nearly 2 years ago.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,456
TY, Kind Annoys me now, i been trying to get this to work since Jan 31st 2020, i was told by you it dont work on 1.32 saved map, and to make Ariel a level 2 ability, and i did and didnt work

And all i had to do was add a ! into level 2 tooltip of that spell, no one told me that nearly back in the day.
It's strange behavior, I don't see why the tooltip would need to be changed but it works o_O

I definitely didn't say it doesn't work on 1.32 though. I can find like 10 different posts by me saying that you need to edit this ability.
 
Last edited:
Level 7
Joined
Nov 6, 2019
Messages
185
You Did

Okay, I found the problem. I created a new map on 1.32 and got the same error as you, "save file not found". I believe the reason my Example maps work is because they were made on 1.31.

The Codeless Save and Load system must be bugged on any map made using the current 1.32 version. I think you'll have to wait for some bug fixes/a new patch before we can use this system. Hopefully Blizzard doesn't take their sweet time.

Anywho Last Question on here, is it possible to force the save command to trigger when condition is met, eg Timer Expires, and is there a way to make load trigger to auto load, when loading game/choosing difficulty on Dialog.

EDIT: i Figured it out, it now auto saves and auto loads.
 
Last edited:
Level 1
Joined
Jul 2, 2018
Messages
4
Does it need JNGP to work on 1.31 or work on this patch at all? Tags says vJass, but when i save or try test example map with vJass enabled, i get trillion syntax errors.
 
Level 28
Joined
May 14, 2021
Messages
1,095
Does it need JNGP to work on 1.31 or work on this patch at all? Tags says vJass, but when i save or try test example map with vJass enabled, i get trillion syntax errors.
JNGP/WEX is deprecated on the most recent versions of WC3. Most of the features, particularly the vJass, were included in the latest versions of vanilla WE.
 
Level 1
Joined
Jul 2, 2018
Messages
4
JNGP/WEX is deprecated on the most recent versions of WC3. Most of the features, particularly the vJass, were included in the latest versions of vanilla WE.
Both versions of system doesn't work for me on vanilla WE with vJass enabled (and disabled) due hundreds of syntax errors on save. Cant import it to my map either, for same reasons.
 
Level 13
Joined
Jul 12, 2018
Messages
509
One way you can fail at this that i learned painfully is that the hero has to be saved as SavePlayerHero playernumber minus one, not the actual playernumber of the player. So 6 for player 7, etcetera. Easy thing to miss.
 
Level 9
Joined
Dec 16, 2017
Messages
339
Does anyone know why this doesn't work on patch 1.28.5 using sharpcraft editor?
I get tons of error, if i disable the "addons" and if i let enabled only vjass, i can start it, but before it starts to load, it crashes and exits wc3.
Screenshot 2022-01-31 173241.png
Screenshot 2022-01-31 173216.png
 
I noticed in both 1.3.9 and 3.0.1 that dialog examples saves and loads don't update until you restart the game, for example blood mage level 4 with 4 items then re-save with level 5 and it'll still load only level 4 instead until a new game. The same applies to deletes, slots won't be cleared until a new game.

Both have no decent GUI codeless example, 3.0.1 has a one slot only save/load slot when using chat commands however it seems to be elsewhere and not in the dialog slot system. Trying to go from a dialog to something like a visual selection window for multiple characters however with 1.3.9 so older patches can be supported. Stumbled on that speed comparison and 1.26 actually looks like it'd be better asking players to load 10 times by chat until an amazing player offers a 3rd party tool to auto-type 10 split notepad files while 1.28.5 seems acceptable.

I'll probably figure it out eventually, though out of curiosity in an attempt to speed my efforts up... I noticed the main system and dialog example is in vjass which probably makes it pointless for trying to put it in custom script for a gui trigger version.
 
Top