Leaving certain switches/variables/items in place when loading

Good afternoon,

I have been away from the RPGMaker scene for a few years. In the interval I learned Java.
When I came back to this program needless to say I felt the urge to script a little myself.

I have been messing with the existing scripts and those released by some of the better scripters. It's pretty straightforward,
but I'm still looking to figure out a few things.

I have this idea for a game where, when you die you can upgrade your character before trying again. This means that I would have
to remember certain variables over a re-load so they can be reapplied. Or an alternate way of saving that this makes it possible.

I could figure something out with eventing, but I think this is a nice challenge for myself as a new RGGS3 scripter.

I'm not requestng someone makes this for me. Just looking if someone is willing to aid me to get this done.
🙂
I think the easiest way to implement this would be to overwrite the game over class so that, instead of a game over/dump to title screen it teleports you to a map where you can spend upgrade points (maybe by talking to NPC's in the afterlife?), then they could talk to someone to warp back to the beginning? This way you wouldn't need the system to save certain variables/switches, instead you would need to clear out the ones you don't want kept as the system would think this is all one run of the same game.
That's probably the best way to go about it. I'd need to set up a massive common event to put back the switches and variables to pre-game stauts, but that's fine.
Would it be possible to combine this with a save option? I mean probably if you have savepoints and remember the player's x and y position...
That's probably the best way to go about it. I'd need to set up a massive common event to put back the switches and variables to pre-game stauts, but that's fine.


Would it be possible to combine this with a save option? I mean probably if you have savepoints and remember the player's x and y position...
On the savepoint have this:
x_49.png



Set up the variables like this:


x_48.png
Yeah that's exactly what I was thinking. I think it would just be a headache to make sure all the variables and switches. All the inventory and etc is reset as well to the correct point. The idea is that at the very start of the game you wouldn't have any kind of interface and that is something you can buy using a currency you earn during the multiple lives.

Original thread: https://forums.rpgmakerweb.com/threads/leaving-certain-switches-variables-items-in-place-when-loading.42264/