• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Help Understanding TriggerHappys Codeless save/load

Status
Not open for further replies.
Level 2
Joined
Feb 12, 2020
Messages
3
Ill start by saying i am pretty new to triggers and scripts but have been using the world editor for a bit of time. I have been able to do everything i've needed so far with triggers but I am having issues properly understanding Triggerhappys codeless save/load system. I've been looking over it for a few hours trying to understand where everything is and how it works but I feel like I'm just bashing my head against a wall.

What i need the system to do is to save and load a bunch of Integer variables that range from 0-100.
These variables correlate to hero levels which have been saved internally as variables

I Believe my biggest issue is trying to remove what i don't need from the system, since i only need to save variables that are already defined, the demo that shows how to save an entire hero, its level and its inventory is a bit much to grasp for me.

I have tried looking through the forums and even through the thread on the save/load file itself and all i've managed to find is "its easy, just copy and paste and edit to what you need"

Ive figured out how to remove what i don't need from the GUI sections but when it comes to removing it from the savehelper i haven't gotten anywhere

Any help/ advice would be very much apreciated.

Extra info:
How i intend progression to work:

Level up hero > unlock new hero when reaching a specific level > change to new hero > repeat.

so far this all works fine internally. when swapping to a new hero your previous heroes level is saved as a variable which is called on when swapping back to a hero you have used. This internal system "should" allow me to just save and load (using triggerhappys codeless save/load system) the variables that are internally saved, instead of loading it directly to the hero in game.
 

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,908
There's some issues with the save and load system at the moment. Still, try this map and see if it works, it's TriggerHappy's system but I stripped it of most of the extra stuff. It will save to Slot 1 and Load from Slot 1, but you can modify it using the custom script in Type Save and Type Load triggers.

Type Save:
  • Custom script: call SaveFile.create(udg_SaveLoadEvent_Player, "Save", 1, udg_SaveTempString)
^ The 1 represents Save File 1. I think his system allows up to 5 save files so you could tweak the trigger to save to any file from 1 to 5.

Type Load:
  • Custom script: call LoadSaveSlot(udg_SaveLoadEvent_Player, 1)
^ The 1 represents Save File 1.
 

Attachments

  • Save and Load Example.w3x
    148.1 KB · Views: 54
Level 2
Joined
Feb 12, 2020
Messages
3
Thanks. This has helped me alot and is just what i needed. I was able to tweak it to save what i need but it does not load.

When i moved over some variables into your example map the save/load worked fine.

It seems the new maps made by the reforged editor are not compatible with the save/load system.

I also noticed the icons for the reforged maps use the icon for Reign of Chaos maps. Codeless save load being TriggerHappy's Demo Map and the Save and Load Example being your example map. "Test Map" being my map made from reforged editor.
Example.png


Im about to try and find an old editor exe (which im sure i have) make a new map using it and then loading it in reforged to see if it will save and load.

Edit: Since im waiting for the post to be approved ill add it here

For some reason my older warcraft game folders dont wanna open editor.

So i ported over all my triggers/ variables/ units / bla bla into your map and everything worked perfectly. Definitely looks like the new maps made with reforged editor are not compatible but ones made on the older editors (like yours) still work fine.
 
Last edited:
Level 4
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.
 
Status
Not open for further replies.
Top