I'm wondering if there's a script that will force a save to a particular save slot without the save menu showing up.
Force Save without menu
RGSS3 Script Requestsit's just one line of code:
DataManager.save_game(1)where 1 is index of the save slot
Oh. I see. Thanks. I wouldn't have been able to know that by myself, since I don't dabble with the scripts directly if I don't have to.
Is there a way to have it return a value if it succeeds? Or is that too much to ask?
Is there a way to have it return a value if it succeeds? Or is that too much to ask?
It returns true or false by default.
It will also delete any previous save if the operation fails.
...Okay. Let me approach this a different way. Say I had a use-able event that would do this, and then throw a textbox on whether it worked or not. How would I hook up the return to an if event, then?
Ohhh. I see now. Thanks. That'll be it.
The only delema whould be your current save slot vs game you are playing.
DataManager.save_game(1) works good if you are only allowing one save spot. Otherwise you will need a way to keep track of which save slot to save over. So in other words its not just a one liner. You will need a script that allows you to have global variables to keep track of how many new profiles you have and the one for each profile to hold its own value.
DataManager.save_game(1) works good if you are only allowing one save spot. Otherwise you will need a way to keep track of which save slot to save over. So in other words its not just a one liner. You will need a script that allows you to have global variables to keep track of how many new profiles you have and the one for each profile to hold its own value.
Naturally. I had only intended for one save slot anyways.
Sorry to necropost (if 6 years later qualifies), but I happen to know a way to keep track of which save slot was the last one that any one specific game used (In short, it tells which game slot the player is using for this game), which could be helpful for anyone who comes across this.
Ruby:
$game_variables[1] = DataManager.last_savefile_index
Using these two ideas together,
Ruby:
$game_variables[1] = DataManager.last_savefile_index
DataManager.save_game($game_variables[1])
Ruby:
DataManager.save_game(DataManager.last_savefile_index)
Original thread: https://forums.rpgmakerweb.com/threads/force-save-without-menu.35124/
