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

Offering money to install Save/Load for me

Status
Not open for further replies.
Level 13
Joined
Jul 12, 2018
Messages
510
I've spent a lot of time on an RPG map, and now it needs a Save-Load system to become what it's supposed to be.

I have tried to install TriggerHappy's Codeless Save Load three times and failed each time. I know it's possible because The Black Road uses it and it works beautifully there, but it's beyond my capabilities as a GUI mapper to install it. The instrux are not complete, or i'm missing something every time.

So, i need a system that will work and that i will be able to install without jass skills.

Alternately, i'll pay someone $100 over paypal to install TriggerHappy's Codeless save/load for me or walk me through it, must have done it before in a map i can download to see.
 
Last edited:

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
As much as I would like 100$ it kinda goes against the spirit of the site to take payment for help.

Anyway, the system you are mentioning probably is the easiest one to set up.
I suggest that you make a mostly empty map, attempt to set it up and then post it here so we can see what you are doing wrong.

Alternatively, you could just post the triggers.
 
Level 13
Joined
Jul 12, 2018
Messages
510
As much as I would like 100$ it kinda goes against the spirit of the site to take payment for help.

Anyway, the system you are mentioning probably is the easiest one to set up.
I suggest that you make a mostly empty map, attempt to set it up and then post it here so we can see what you are doing wrong.

Alternatively, you could just post the triggers.
Thanks for the suggestion. i'll do as you ask re the empty map, that is a good idea.

i don't think it should be any interference with my existing triggers because they're nearly all gui. I've got a tavern system where i set the variable for the hero to be saved at the same time i set the variable that my own stuff uses for player's hero, and ive tried to jump through the hoops as far as i can read and understand them in the thread and in the triggers from the example map. it just doesn't save anything although it says saved successfully.
 
Level 13
Joined
Jul 12, 2018
Messages
510
As much as I would like 100$ it kinda goes against the spirit of the site to take payment for help.

Anyway, the system you are mentioning probably is the easiest one to set up.
I suggest that you make a mostly empty map, attempt to set it up and then post it here so we can see what you are doing wrong.

Alternatively, you could just post the triggers.
Here is an example map.
 

Attachments

  • CodelessTrialMap_saveload1.w3m
    180 KB · Views: 9

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
Small but important mistake in the following trigger:
  • Hero sell
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to New Tavern
    • Actions
      • Set VariableSet HeroOfPlayer = (Sold unit)
      • Set VariableSet SavePlayerHero[((Player number of (Owner of (Buying unit))) - 1)] = (Sold unit)
      • Trigger - Add to Hero dies <gen> the event (Unit - (Sold unit) Dies)
      • Unit - Remove (Buying unit) from the game
Note the - 1.
This is because you typically start at 0 instead of 1 in jass.
 
Level 13
Joined
Jul 12, 2018
Messages
510
Small but important mistake in the following trigger:
  • Hero sell
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to New Tavern
    • Actions
      • Set VariableSet HeroOfPlayer = (Sold unit)
      • Set VariableSet SavePlayerHero[((Player number of (Owner of (Buying unit))) - 1)] = (Sold unit)
      • Trigger - Add to Hero dies <gen> the event (Unit - (Sold unit) Dies)
      • Unit - Remove (Buying unit) from the game
Note the - 1.
This is because you typically start at 0 instead of 1 in jass.
Holy cow, it worked! You have no idea how much frustration ive had around this, funny such a simple thing would be the fix. I feel like i was right about instructions being incomplete though, that's a bit unintuitive for gui users to figure out.

Some interactions are still weird after i fix it, but i'm sure i'll get those squared away once i dive into the load trigger and adjust it more.
Thank you sir, you are a scholar and a gentleman.
 
Level 13
Joined
Jul 12, 2018
Messages
510
Sorry to be back so soon, I just don't have a clue how to troubleshoot this thing. I installed it in my real map, same exact procedure except one of my custom heroes instead of the Otter Hero from the demo map obvs, and it's giving me load trouble. I can save, but when i try to load it tells me Invalid load code (check your name).

Any ideas on where to start on that? I don't have any triggers in the map that do anything with the player names. The hero names of the custom hero are all added to the heronames trigger.
Still very open to paying someone to install this all the way, i feel certain once im past this hurdle there's gonna be more i have to ask about.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
This sounds very much like an issue I debugged long ago. I forget the details but in that case there was an error in the save/load system itself causing it to decode specific values incorrectly and report a corrupted code as a result. However I thought/expected that to be fixed.

If you send me the map via PM (as I assume you do not want it posted publicly) I could try to debug what is going wrong.
 
Level 13
Joined
Jul 12, 2018
Messages
510
This sounds very much like an issue I debugged long ago. I forget the details but in that case there was an error in the save/load system itself causing it to decode specific values incorrectly and report a corrupted code as a result. However I thought/expected that to be fixed.

If you send me the map via PM (as I assume you do not want it posted publicly) I could try to debug what is going wrong.

Thanks for offering to look at it, i PM'd you. In TriggerHappy's own thread about the system on the last page there is a user named Ouro who said he discovered some syntax errors in the code, i've tried installing his version too but it doesn't work for me either so i went back to the 3.0.1 version which i got a little further with. Please let me know if there's anything i can do to help you along.

In the map i sent, only Aeromancer hero is added to the save system, and when testing you must type -rpg or .rpg in the first 9 seconds of the game to get the SavePlayerHero to get saved right, the map has a couple of modes and i only want saving and loading for RPG mode.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Trigger type Re ally is destroying specific player constant player groups. This breaks them.
Trigger Basic_init_trigger is destroying the constant global "all players" player group. This breaks it so it will not work from then on.

The following line in Save GUI is causing a thread crash during saving due to division by 0.
Code:
Custom script:   set udg_SaveValue[udg_SaveCount] = R2I( (GetHeroXP(udg_SaveTempUnit)) / SaveHelper.GetLevelXP(GetHeroLevel(udg_SaveTempUnit)) * 100) // percentage
You set the following...
Code:
Set VariableSet HeroXPLevelFactor = 0
Which causes GetLevelXP to return 0. This is clearly not correct for your map and they should be set to...
Code:
Set VariableSet HeroXPConstant = 100
Set VariableSet HeroXPLevelFactor = 164
After making these changes a valid save code is produced that can be loaded.
 
Level 13
Joined
Jul 12, 2018
Messages
510
Trigger type Re ally is destroying specific player constant player groups. This breaks them.
Trigger Basic_init_trigger is destroying the constant global "all players" player group. This breaks it so it will not work from then on.

The following line in Save GUI is causing a thread crash during saving due to division by 0.
Code:
Custom script:   set udg_SaveValue[udg_SaveCount] = R2I( (GetHeroXP(udg_SaveTempUnit)) / SaveHelper.GetLevelXP(GetHeroLevel(udg_SaveTempUnit)) * 100) // percentage
You set the following...
Code:
Set VariableSet HeroXPLevelFactor = 0
Which causes GetLevelXP to return 0. This is clearly not correct for your map and they should be set to...
Code:
Set VariableSet HeroXPConstant = 100
Set VariableSet HeroXPLevelFactor = 164
After making these changes a valid save code is produced that can be loaded.
Thank you muchly sir, you are a boss. Gonna try this now. I think the XP factors are the ones that came with the system. I did mess with them a bit but then realized they weren't 1 to 1 with the gameplay constants and tried to restore them to original.


Make sure your Aether Shackles ability is setup properly. This ability is used by the system and unfortunately it's never mentioned anywhere outside of comments.
Thanks, i did have this part covered as it was mentioned there in the thread. There's also a dummy unit called "Detect Leave" that isn't mentioned anywhere but that exists in the demo map so i copied it over from the object editor just to be sure. Don't know if it does anything.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Thank you muchly sir, you are a boss. Gonna try this now. I think the XP factors are the ones that came with the system. I did mess with them a bit but then realized they weren't 1 to 1 with the gameplay constants and tried to restore them to original.
I did not check if the constant's behaviour matches the way that calculation works. I only assumed it did. If not then you might want to change it so that it saves hero experience directly rather than a level and percentage pair.

Thanks, i did have this part covered as it was mentioned there in the thread. There's also a dummy unit called "Detect Leave" that isn't mentioned anywhere but that exists in the demo map so i copied it over from the object editor just to be sure. Don't know if it does anything.
If these abilities are referenced by triggers then simply copying the abilities to the map is probably not enough due to them having different type IDs. You will need to update the trigger references to those abilities to point at the type IDs used in your map and not the demo map. For JASS/vJASS triggers the type ID is usually specified in a constant at the top of the script using a 4 letter code, e.g. `A001`, which you can look up using raw data view in the object editor. For GUI references you can re-select the ability from the ability list.
 
Level 13
Joined
Jul 12, 2018
Messages
510
I did not check if the constant's behaviour matches the way that calculation works. I only assumed it did. If not then you might want to change it so that it saves hero experience directly rather than a level and percentage pair.


If these abilities are referenced by triggers then simply copying the abilities to the map is probably not enough due to them having different type IDs. You will need to update the trigger references to those abilities to point at the type IDs used in your map and not the demo map. For JASS/vJASS triggers the type ID is usually specified in a constant at the top of the script using a 4 letter code, e.g. `A001`, which you can look up using raw data view in the object editor. For GUI references you can re-select the ability from the ability list.
Appreciate the tips and the help, i will probably end up saving xp manually and i think i know how, got the concept of how the save gui and load gui triggers work.
Right now i've input all my items, hero types, names and abilities into the save init and HeroNames triggers, and after doing the changes you suggested in your previous post the codes are never invalid. So i've got it saving and loading a hero of the correct type, level and name, and i found where to set the spawnpoint.

The issue i've got now is that abils and items are a mess after loading. Abils doesn't really matter for my map, i can just disable the part that loads them in Load Gui and then set the available skillpoints by herolevel. Let it take the user 15 seconds to pick skills. The items are a bigger problem though, i need those to load faithfully for players to have a good experience.
I havent figured out exactly what it's doing yet, but based on 3-4 tests it appears to save and correctly load one item out of the full backpack. Sometimes it loads items the hero didn't have before.
Any inkling as to what might be happening there?
Ive input 431 saveable items into the Save Init trigger, left some out, and changed the SaveItemTypeMax to 9999 to give myself some room to grow without code wipes. In Load GUI ive modified the available abil points.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
The issue i've got now is that abils and items are a mess after loading. Abils doesn't really matter for my map, i can just disable the part that loads them in Load Gui and then set the available skillpoints by herolevel. Let it take the user 15 seconds to pick skills.
In that case you can remove all logic associated with saving unspent skill points and hero abilities. This would significantly reduce the size of the code.

Any inkling as to what might be happening there?
I am guessing the save and load values are not aligned correctly. Possibly because the for loops factor in 0 as a starting index.
 
Level 13
Joined
Jul 12, 2018
Messages
510
In that case you can remove all logic associated with saving unspent skill points and hero abilities. This would significantly reduce the size of the code.


I am guessing the save and load values are not aligned correctly. Possibly because the for loops factor in 0 as a starting index.
So it was, hadn't synced all of the maxes in the load trigger with what i had set in the save trigger. Still have some stuff to work out regarding how to use more than one slot and still wrestling with saving some of my own values, but item loading appears to work beautifully now. Thank you for the help.
 
Status
Not open for further replies.
Top