Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Systems] SaveLoad

Discussion in 'Project Development & Idea Factory' started by -Kobas-, Mar 27, 2013.

  1. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,892
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    Code (vJASS):
    /**************************************
    * I worked 6 hours today on SaveLoad system.
    *
    * How it works:
    * - Save
    * (will save progress data into game cache, just like campaign progress is saved)
    * - Load
    * (will load progress data from game cache, your player name must be the same)
    * - Flush
    * (will delete your progress data from game cache)
    *
    * Errors:
    * - Game must be restarted, not just map itself to properly load data.
    *
    * Data handled so far:
    * - Hero Class
    * - Hero Attributes
    * - Hero Experience
    * - Hero Items
    * - Hero Custom Stats (crit...)
    * - Pet Class
    * - Pet Attributes
    * - Pet Experience
    * - Pet Abilities
    * - Pet Skill points
    * - Pet Custom Stats (crit...)
    * - Custom Inventory Data
    * - Environment
    * - Quests
    *
    **************************************/

     
     
    Last edited: Mar 29, 2013
  2. pred1980

    pred1980

    Joined:
    Mar 19, 2010
    Messages:
    842
    Resources:
    1
    Maps:
    1
    Resources:
    1
    why don't you use the system from Nestaurus? I thought it's a system like that?
     
  3. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,892
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    Because there is no need for it.
    Also it's worth to mention that when using both load and later save in game, you run 100% of code created for this.
    That isn't the case with public resources, because as usually there is over 50% useless and unneeded stuff that you don't need for specific problem.

    Nes system is awesome indeed, but this here works just fine, it's much easier to code, and it's allowed only in Single Player mode.

    I was sharing screen with Remixer last night and he saw how system works, with two simple commands "-save" and "-load" you do all the job. There is no need for any kind of code or anything.

    I will add custom inventory stuff into SaveLoad today, and maybe finish it all before new week starts.

    Custom Inventory Data added into Save Load system.
    - System will save/load unequipped items.
    - System will save/load equipped items.
    - System will save/load ability items.

    Multiboard Data added into Save Load system.
    - Custom attributes will save/load.
     
    Last edited: Mar 29, 2013
  4. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,842
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Indeed you have to code your own SL because CSL doesn't support some systems like CustomWindow and CustomInventory
     
  5. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,892
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    Guys I successfully added main quests progress data into SaveLoad system. Everything you do will be saved correctly :)
     
  6. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,842
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Just what i have thought so :D
    It uses Game Cache :D
     
  7. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,892
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    Yeah, only bad thing right now is that if you want few different characters to play at same time, you need to change player name :)

    But I may use
    key id
    in future.
    So for example you could just write:
    -Save 1000
    and then
    -Load 1000

    With another character just
    -Save -40001
    and then
    -Load -40001
    and it will work.
    Same for flush
    -Flush 1000
    ,
    -Flush -40001
    or even
    -Flush ALL
     
  8. FRENGERS

    FRENGERS

    Joined:
    Aug 4, 2012
    Messages:
    970
    Resources:
    4
    Icons:
    3
    Maps:
    1
    Resources:
    4
    I would like use my self made JASS, that was -Kobas- mean....
    I like it, so every update we will not restarted the game....
    And also, what you will do if we has going to chapter 2 and you edited completly chapter 1??
    I mean:
    QuestZ:
    IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    Quest completed:
    IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    Quest that you edited when the next update ( You edited the old quest that has we completed ):
    IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    What will you do??
     
  9. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,892
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    In that case you will load achievements and progress like if you completed them in latest version.
     
  10. FRENGERS

    FRENGERS

    Joined:
    Aug 4, 2012
    Messages:
    970
    Resources:
    4
    Icons:
    3
    Maps:
    1
    Resources:
    4
    Humm.... Nice idea though....
    Well that appreciated ;) ;)