Save and Load game command

Discussion in 'JS Plugin Requests' started by Ardonie, Dec 3, 2019.

  1. Ardonie

    Ardonie Villager Member

    Messages:
    14
    Likes Received:
    4
    First Language:
    french
    Primarily Uses:
    RMMV
    Hi !

    I'm looking for JS commands to load the game, and another to save it for my game's custom menu.
    I'm also looking for commands to check the value of variables saved in the save file
    then display different images depending on the value with conditions and switch (it's to display the hero's name, members of the party, time and that kind of thing...)

    thank you in advance
     
    #1
  2. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    4,021
    Likes Received:
    10,173
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    DataManager.saveGame(id) and DataManager.loadGame(id)
    as for the remaining question, all relevant info should be inside DataManager.makeSavefileInfo
    and maybe extractSavefileInfo? Don't remember right now. But should be very easy to find.
     
    Last edited: Dec 3, 2019
    #2
  3. Ardonie

    Ardonie Villager Member

    Messages:
    14
    Likes Received:
    4
    First Language:
    french
    Primarily Uses:
    RMMV
    Thanks !
    But i'm not an expert in JS and I use MV recently. I'm used to how XP scripts work so I don't know where to find these files :
    extractSavefileInfo
    Datamanager.saveGame(id)
    do I need a plugin for that?

    [​IMG]

    I also tried scripts command... Did I write something wrong ?
    [​IMG]
    I tried to put the command without the ; too.
    Nothing happened.
     
    Last edited: Dec 3, 2019
    #3
  4. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    4,021
    Likes Received:
    10,173
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Had a typo there. Edited.
     
    #4
  5. Ardonie

    Ardonie Villager Member

    Messages:
    14
    Likes Received:
    4
    First Language:
    french
    Primarily Uses:
    RMMV
    Thank you, it work perfectly ! But I forgot one command to make my Save screen complete :
    the command asking if save already exist
     
    #5
  6. myenemy

    myenemy Veteran Veteran

    Messages:
    40
    Likes Received:
    15
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    StorageManager.exists(id)
     
    #6
  7. Ardonie

    Ardonie Villager Member

    Messages:
    14
    Likes Received:
    4
    First Language:
    french
    Primarily Uses:
    RMMV
    Thank you !
     
    #7

Share This Page