- Joined
- Mar 19, 2019
- Messages
- 2
- Reaction score
- 0
- First Language
- French
- Primarily Uses
- RMMV
Hello! I'm new here and
(I don't speak english very well, so I'll try my best to be understable)
I wonder how to know what savefile is loaded with a script call.
I'm trying to make if the player die somewhere, when he'll load the game again and go back where he was died, he'll be alble to see blood where he died before.
I already tried Jackkel's Persistent Switches , but it affect all savesfiles. (and i would like that switches and variables are saved only one the actual savefile used by the player)
Then I found Olivia's Meta Controls, but the problem is the same, because even <Local Meta> affect all the save in the same in playthrough.
So I almost found a solution by combine Meta Controls and Autosave:
I already know "$gameSystem.onBeforeSave();DataManager.saveGame(x);". But in fact, I would like to make a save on the last loaded file (the file used by the player)
I tried "$gameSystem.onBeforeSave();DataManager.saveGame(DataManager.latestSavefileId());", but it works only with the last saved file so if I save my game in 3 slots (so there are 3 savefiles), then if I quit the game and I load the 2nd file, and I make an autosave by event with this script call, it will be saved on the 3rd, because it is the last saved file.)
So to solve this problem, I should force a 2nd save when the player loaded his file (So it will be the last saved file). But how i could guess what file was loaded by the player?
So is it posible to make a sort of conditional call script like this?
If slot 2 is loaded
script call: $gameSystem.onBeforeSave();DataManager.saveGame(2)
If slot 1 is loaded
script call: $gameSystem.onBeforeSave();DataManager.saveGame(1)
If slot 3 is loaded
script call: $gameSystem.onBeforeSave();DataManager.saveGame(3)
Or is there another solution to save only switches and variables values by script call or something?
I think I should make only one save slot in the game but i think it would be annoying to make a new game to have another end...
Thanks for your answer.
(I don't speak english very well, so I'll try my best to be understable)
I wonder how to know what savefile is loaded with a script call.
I'm trying to make if the player die somewhere, when he'll load the game again and go back where he was died, he'll be alble to see blood where he died before.
I already tried Jackkel's Persistent Switches , but it affect all savesfiles. (and i would like that switches and variables are saved only one the actual savefile used by the player)
Then I found Olivia's Meta Controls, but the problem is the same, because even <Local Meta> affect all the save in the same in playthrough.
So I almost found a solution by combine Meta Controls and Autosave:
I already know "$gameSystem.onBeforeSave();DataManager.saveGame(x);". But in fact, I would like to make a save on the last loaded file (the file used by the player)
I tried "$gameSystem.onBeforeSave();DataManager.saveGame(DataManager.latestSavefileId());", but it works only with the last saved file so if I save my game in 3 slots (so there are 3 savefiles), then if I quit the game and I load the 2nd file, and I make an autosave by event with this script call, it will be saved on the 3rd, because it is the last saved file.)
So to solve this problem, I should force a 2nd save when the player loaded his file (So it will be the last saved file). But how i could guess what file was loaded by the player?
So is it posible to make a sort of conditional call script like this?
If slot 2 is loaded
script call: $gameSystem.onBeforeSave();DataManager.saveGame(2)
If slot 1 is loaded
script call: $gameSystem.onBeforeSave();DataManager.saveGame(1)
If slot 3 is loaded
script call: $gameSystem.onBeforeSave();DataManager.saveGame(3)
Or is there another solution to save only switches and variables values by script call or something?
I think I should make only one save slot in the game but i think it would be annoying to make a new game to have another end...
Thanks for your answer.

