1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  5. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  8. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Codeless Save and Load (Multiplayer) - v3.0.0

Submitted by TriggerHappy
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


[​IMG]
[​IMG]
[​IMG]
[​IMG]


Credits

Pipedream (optimal save system)
Previews
Contents

Codeless Save & Load v1.3.9 (Map)

Codeless Save & Load v3.0.0 (Map)

Reviews
Moderator
Awaiting further review
  1. Sverkerman

    Sverkerman

    Joined:
    Feb 28, 2010
    Messages:
    1,283
    Resources:
    5
    Maps:
    5
    Resources:
    5
    @TriggerHappy What would be the best way to produce a codewipe from one version to the next?
     
  2. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,665
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    As of this post, yes.

    You could save an integer in the player's save code that represents which version their code is from. So if someone tries to load you can say "Sorry, your code is from version X, you must do Y.". I would just start with 1 and increment with each public patch.

    You can also randomize the alphabet which is in the "save system" trigger (charset function).

    You may also be able to change all instances of
    savecode.Save(p, 1)
    to use another integer in the second paramater. Same for the load method.

    I will add an more straight forward way to do this in the next version.
     
  3. Sverkerman

    Sverkerman

    Joined:
    Feb 28, 2010
    Messages:
    1,283
    Resources:
    5
    Maps:
    5
    Resources:
    5
    @TriggerHappy Thank you for the fast and spot on answer, I appreciate it! I will go with your first suggestion.


    Also! Any news/updates/fixes on the *bug* with the preloader native? Atm there is a limit as to how much data you can save in one go.
    I've also found another bug which is either assosiated with your system or the Preloader native. I read here some time ago that someone was having an issue with the Autosave function, he stated that after playing his map for X amount of time his save/load code would get overwritten with a blank/empty save/load code upon saving. I stumbled upon this as well, but not with the autosave function. What I did was to save the game the exact same way that you save using the dialog system and upon saving maybe 30 times in the same game it would overwrite the existing and functioning code with a blank/empty code. I believe that the Preloader native is really at fault here, but I might be wrong, this is all way beyong my coding abilities - but it would be extremely helpful to have this issue resolved and interesting to know what is/what was causing it. Thank you.
     
  4. Kithio

    Kithio

    Joined:
    May 12, 2017
    Messages:
    28
    Resources:
    1
    Template:
    1
    Resources:
    1
    Could you give a bit more details regarding this and how to potentially replicate this, and if you've been able to actively replicate this over multiple sessions, as that would help a lot in trying to figure out what the actual source is and if it's a problem with the Code or a fundamental problem with the Natives
     
  5. Sverkerman

    Sverkerman

    Joined:
    Feb 28, 2010
    Messages:
    1,283
    Resources:
    5
    Maps:
    5
    Resources:
    5
    @Kithio I believe that the issue is related to how much code you are saving. Let me explain: My theory is that every time you save the native adds one character onto itself, if you don't save much code it will take many saves for the native to break (reaching over 259 characters) but if you are saving a long savecode and you are already using 250 characters inside the native (for the native itself and your save/load code) it would only require you to save 9 times before the 10th time would overwrite your code with blank code (Native character limit is 259, now you are attempting to run the native with 260 characters causing it to break, saving blank text as your save/load code)

    I have successfully been able to replicate this several times.
     
  6. Kithio

    Kithio

    Joined:
    May 12, 2017
    Messages:
    28
    Resources:
    1
    Template:
    1
    Resources:
    1
    Would you be able to get a small example map with the code in it where this happens? as I never ran into this in my tests, and I did save testing on my project a while back, during the game I think it had saved nearly 200 times in total (played roughly 11 hours in the map, auto-saving every 3 minutes)
     
  7. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,665
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    There are two issues that will be fixed in an upcoming update.
    1. The
      Preload
      native has a limit of about 200 characters. I have a new version of FileIO which gets around this.
    2. Pipedream's save system has a leak. If you save thousands of times you will get warnings in debug mode.
     
  8. Sverkerman

    Sverkerman

    Joined:
    Feb 28, 2010
    Messages:
    1,283
    Resources:
    5
    Maps:
    5
    Resources:
    5
    @TriggerHappy Excellent! So then we can save as much data as we want in one go and hopefully the issue where if you save too many times in one game the code goes blank gets fixed! Thank you!
     
  9. Sverkerman

    Sverkerman

    Joined:
    Feb 28, 2010
    Messages:
    1,283
    Resources:
    5
    Maps:
    5
    Resources:
    5
  10. Spatulon

    Spatulon

    Joined:
    Oct 28, 2010
    Messages:
    20
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Looking forward to the Sync fix!
     
    Last edited: Dec 26, 2018
  11. Morchog

    Morchog

    Joined:
    Apr 20, 2016
    Messages:
    1
    Resources:
    0
    Resources:
    0
    @TriggerHappy Awesome system, just a quick question. How reliable is it if I want to use 4 separate MapNames 2 of which will be active ingame (depending if SinglePlayer or Multiplayer)?

    I want to save "account" info and character data separately, I have about 20-30 account related integers (up to 1000), not more than 50 items to save and its a 5 Player map.
     
  12. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    435
    Resources:
    0
    Resources:
    0
    Correct me if i'm wrong but this doesn't work without WEX and that doesn't work with the latest patches.

    So i'm assuming the only solution is to downgrade to patch 1.29?

    Or am I just doing something wrong? I'm on the latest patch and I simply copy and pasted the triggers but I get errors for just about everything when I try to save.
     
    Last edited: Jan 23, 2019
  13. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,665
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Last I checked it worked in the standard editor (since patch 1.30). Make sure JassHelper is enabled in the trigger editor.
     
  14. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,665
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    The first screenshot looks like something I may have overlooked. Maybe I forgot to place that 1 GUI variable in a GUI trigger somewhere so it doesn't get copied. You can manually create it in the variable editor and it should compile. However the rest of the screenshots are showing errors from the vanilla syntax checker which should be disabled. You should only see JassHelper/PJASS when saving.
     
  15. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    435
    Resources:
    0
    Resources:
    0
    Deleted my old comments (didn't want to mislead people). I messed around with the system and managed to get it all working properly. Thanks for the help :)
     
  16. Cushq

    Cushq

    Joined:
    Jan 19, 2019
    Messages:
    27
    Resources:
    0
    Resources:
    0
    Hey had some questions,
    How to import this to my map without deleting previous triggers??? any idea? also not sure how to open multiple world edit tabs.
    If anyone could help with either of these things it'd be greatly appreciated.
     
  17. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    435
    Resources:
    0
    Resources:
    0
    What do you mean? Why would you need multiple editor tabs and why would you need to delete previous triggers? Just open this map, copy the save & load folder containing the triggers, open your map, and paste the folder in your triggers tab. You don't have to replace/delete anything, and you can copy from one map and paste in another.
     
  18. krolergmp

    krolergmp

    Joined:
    Aug 24, 2014
    Messages:
    28
    Resources:
    0
    Resources:
    0
    Can someone help me?
    How do I save money and wood?
     
  19. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    435
    Resources:
    0
    Resources:
    0
    It'll look something like the actions below. Remember, in your load trigger you need to load everything in the reverse order of how you saved it. Meaning, if you save the player's gold as the very FIRST thing in your save trigger, then you must load it as the very LAST thing in your load trigger.
    • save action
      • Events
      • Conditions
      • Actions
        • Set SaveCount = (SaveCount + 1)
        • Set SaveValue[SaveCount] = (Player 1 (Red) Current gold)
        • Set SaveMaxValue[SaveCount] = 9999

    • load action
      • Events
      • Conditions
      • Actions
        • Set SaveCount = (SaveCount + 1)
        • Set SaveMaxValue[SaveCount] = 9999
        • Custom script: call SaveHelper.GUILoadNext()
        • Player - Set Player 1 (Red) Current gold to SaveValue[SaveCount]
    Instead of using Player 1 (if you want this to work for multiple players) then use the variable SaveLoadEvent_Player to reference whoever typed -save/-load.
     
  20. krolergmp

    krolergmp

    Joined:
    Aug 24, 2014
    Messages:
    28
    Resources:
    0
    Resources:
    0




    It worked
    Thanks :D +rep
     
    Last edited: Feb 13, 2019