This script allows you to “preserve” data throughout the game without requiring
the user to save the game. For example, if a player enters a room and a switch
is turned on, you can preserve the state of the switch even if the player
chooses to reload.
You can preserve variables and switches, and the values of the data will
carry over across game loads. However, this only applies to the most
recently saved/loaded file.
If the player starts a new game, and there is already a save file in the first
slot, that will be treated as the “last saved” file.
Script: download here
Place this script below Materials and above Main
Use this script call in an event to save any data that should be preserved.
More generally, you can use this call outside of the interpreter
In the configuration, enter all of the ID’s for the switches and variables
that should be preserved when you choose to preserve data.
What do you mean “load from a certain file”?
In your script you say “However, this only applies to the most recently saved/loaded file.”
I want to be able to load data from an exact load file (for example load always from save03.rvdata2 )
If I may, I will explain my need for the script, so you can determine if you can help me or not. I have multiple endings in my game. When an ending is activated I want to preserve (with your script) a switch that enables an extra button in my custom title menu which leads to a collectors menu where all my endings are displayed (if they are unlocked). Your script cannot help me do this because it only loads data from the most recent save file. But if I can load data from a selected save file, I can ask the player to save a file just for the collector switch.
Yes, as this script is not meant to be a global data manager. It doesn’t provide any functionality for you to actually access save file data. I have a script in development that addresses global data.
Thanks for your time. Can you possibly direct me to a script that may help me?
Is it possible to make the script be able to load from a certain load file and not necessarily from the last?
Um…, this script looks like 回想領域’s ゲーム内共有変数( public_data:http://kaisou-ryouiki.sakura.ne.jp/material/rgss3/public_data.txt ) but is more difficult to use…..
All you write is “preserve_data” in a script call. I am not sure why that would be difficult.
It is not a “global” save file, it simply prevents people from saving and re-loading.
Oh！I know,I‘m sorry for my poor comprehension!
I haven’t realized it can prevent the player from saving and re-loading so I only see it as a global switches/variables ….I understand how to use this script now.