Codeless Save and Load (Multiplayer) - v3.0.1

This bundle is marked as approved. It works and satisfies the submission rules.
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 8
Joined
Jul 12, 2018
Messages
385
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 17
Joined
Aug 16, 2007
Messages
860
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.
 

TriggerHappy

Spell Moderator
Level 37
Joined
Jun 23, 2007
Messages
4,028
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 17
Joined
Aug 16, 2007
Messages
860
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 4
Joined
Jan 23, 2020
Messages
45
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 3
Joined
Nov 4, 2019
Messages
47
I found a problem, guys. Everything turned out to be much simpler, the problem is not in the patch. You just need to create level 2 for "Amls", because your code is saved there in the tooltip of this ability. After that everything will load.
 
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 3
Joined
Jan 20, 2016
Messages
27
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.
 
Level 24
Joined
Aug 10, 2018
Messages
2,872
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: 56
Last edited:
Level 23
Joined
Mar 15, 2012
Messages
2,664
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:

TriggerHappy

Spell Moderator
Level 37
Joined
Jun 23, 2007
Messages
4,028
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.
 
Level 23
Joined
Mar 15, 2012
Messages
2,664
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.
 
Level 23
Joined
Mar 15, 2012
Messages
2,664
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 2
Joined
Jun 8, 2020
Messages
13
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 2
Joined
Jun 8, 2020
Messages
13
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 2
Joined
Jun 8, 2020
Messages
13
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: 39
  • CodeLess SaveLoad Sys.w3x
    115.9 KB · Views: 37
Level 10
Joined
Aug 6, 2015
Messages
350
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)
 
Top