Souls System?

Is it possible to create a system in RPG Maker that leaves all the player's gold at the point where he died?

For example, the player carries 50 gold, when he dies he will have 0 and he will have to go back to the point where he died to recover it.
This is entirely possible, but it may be best to use a script/plugin that supports event spawning so that you can create an interactable gold object that'll give your original money back.
This is entirely possible, but it may be best to use a script/plugin that supports event spawning so that you can create an interactable gold object that'll give your original money back.
Maybe it can be done using only conditional events, but how to store the amount of gold?
Maybe it can be done using only conditional events, but how to store the amount of gold?
You can set a variable to the player's gold amount using the game data operand.

It is theoretically possible with conditional events, but you'd need a "lost gold" event on every map and when you place a new one you'd have to unset every other one so you don't end up with multiple piles.
You could repurpose map vehicles if you're not using them. Because their location can be set and save on any map.
So you can set a vehicle to the player's death point.
When the player returns to it, you could have a common event as a parallel process watching to see if the player ever gets "on" a vehicle. Then just clear the vehicle, and acquire lost gold and whatnot.

I don't recommend using the [on/off vehicle] event command. If you've ever done it outside of water, the player will zip to the nearest edge. Which is surprising. With the airship, the game can lock up getting on and off simultaneously.
So instead, I'd use a script call inside the conditional branch that checks if the player is on a vehicle
JavaScript:
$gamePlayer._vehicleGettingOn = false;
$gamePlayer._vehicleGettingOff = false;
$gamePlayer._vehicleType = "walk";
This way the player character will walk onto the vehicle, but not appear to board.
You could repurpose map vehicles if you're not using them. Because their location can be set and save on any map.
So you can set a vehicle to the player's death point.
When the player returns to it, you could have a common event as a parallel process watching to see if the player ever gets "on" a vehicle. Then just clear the vehicle, and acquire lost gold and whatnot.

I don't recommend using the [on/off vehicle] event command. If you've ever done it outside of water, the player will zip to the nearest edge. Which is surprising. With the airship, the game can lock up getting on and off simultaneously.
So instead, I'd use a script call inside the conditional branch that checks if the player is on a vehicle
JavaScript:
$gamePlayer._vehicleGettingOn = false;
$gamePlayer._vehicleGettingOff = false;
$gamePlayer._vehicleType = "walk";
This way the player character will walk onto the vehicle, but not appear to board.
I thought of the same thing but I figured it might cause some weird graphical issues.
I feel like a single event on each map, using autorun checking for a switch and comparing variables, and a single common event handling the switch and a variables would suffice.

When the player dies, flip switch_1 ON. The common event will then write to variable_1 the RegionID of the top-left tile. Next, store the players gold into Variable_3. Then the common event flips switch_2 ON, and turns switch_1 OFF.

On every map, the top-left corner should have a different region ID, 1 for map 1, 2 for map 2, etc..
Then in that same spot put an event that is set to auto-run and the look for switch_2. It'll then write to variable_2 the RegionID of the top-left tile. Next, it'll run a conditional branch to check if Variable_1 == Variable_2. If it does, move the event to the location of the player, turn Self-Switch A ON. If it doesn't, erase the event. Then on the event page that is listening for Self-Switch A, you just change it's sprite, make it same as chracter, and action trigger. Then you make it give the player gold that was previously stored in variable_3. Lastly, turn switch_2 off and erase the event.

I'm 99% certain this should work and would allow for 255 maps (since that's the regionId count by default). Not at my project station so I can't test it.
I feel like a single event on each map, using autorun checking for a switch and comparing variables, and a single common event handling the switch and a variables would suffice.

When the player dies, flip switch_1 ON. The common event will then write to variable_1 the RegionID of the top-left tile. Next, store the players gold into Variable_3. Then the common event flips switch_2 ON, and turns switch_1 OFF.

On every map, the top-left corner should have a different region ID, 1 for map 1, 2 for map 2, etc..
Then in that same spot put an event that is set to auto-run and the look for switch_2. It'll then write to variable_2 the RegionID of the top-left tile. Next, it'll run a conditional branch to check if Variable_1 == Variable_2. If it does, move the event to the location of the player, turn Self-Switch A ON. If it doesn't, erase the event. Then on the event page that is listening for Self-Switch A, you just change it's sprite, make it same as chracter, and action trigger. Then you make it give the player gold that was previously stored in variable_3. Lastly, turn switch_2 off and erase the event.

I'm 99% certain this should work and would allow for 255 maps (since that's the regionId count by default). Not at my project station so I can't test it.
That seems overcomplicated for a system that will only really serve to limit your max map count to me. I'd probably use a notetag in the name field and a self switch on the gold events and then just have a placement common event that turns off that self switch on all events with that tag before placing the current one. Then you wouldn't need to worry about region ID limits.
That seems overcomplicated for a system that will only really serve to limit your max map count to me. I'd probably use a notetag in the name field and a self switch on the gold events and then just have a placement common event that turns off that self switch on all events with that tag before placing the current one. Then you wouldn't need to worry about region ID limits.
Yea it's a bit complicated, but I was trying to go for a method that wouldn't require any script writing of any sort. Mainly because I can't recall the proper $gameX or $dataX to grab the information. I usually have to mess around on the console to get that information. Can't remember them by heart yet.
I have this exact system a side project I've been working on: https://voidmoon-studio.itch.io/the-depths-of-delmora

Basically, if you die it drops all your essence (gold) into a glowing orb that shows up on the map exactly where you died. If you recover it without dying by interacting with it, you gain 1/2 your essence back and the orb disappears. I did this all with just eventing, and the only convoluted thing was having the glowing orb event having to be event #1 on every map.
and the only convoluted thing was having the glowing orb event having to be event #1 on every map.
^ that's actually a pretty clever way of doing it without any scripting.

Original thread: https://forums.rpgmakerweb.com/threads/souls-system.154692/