Lose 25% of gold on death

I am looking for a way to cause the player to lose 25% of gold when they die in battle. All my battles are evented if that makes it easier. RPG Maker MZ.
set a variable to the amount of gold they have
control variable: other : gold
control variable again to divide by 4
then change gold: decrees: variable amount
in battle processing, select "can loose" to prevent the automatic game over
then in the branch "on loose" use control variable to get current gold, calculate 25% and substract it

edit: partially ninja'd, but @Tiamat-86 forgot that without the on-loose the battledeath is an automatic game over
@Andar
I don't know if the OP uses the regular battle-system since they said that their battles are evented.
Of course this is only true if I interpreted that statement correctly.

So there is no need for the "can lose" option.
Well, just saying the battles are evented doesn't actually tell us anything (neither does "the player die," in fact - does that mean the entire party, or the actor representing the "player character" protagonist?). They can be started by events, as opposed to random encounters, but still use the engine's combat system.

So...best to give all information and ask for clarifying details ¯\_(ツ)_/¯
Yeah so I was asking for Full party death and by evented I use an event that walks around the map and when it touches you you enter battel. But yeah with the on losing part of the and the divide by 4 should get what I needed. Thank you all.
when it touches you you enter batte
that still doesn't tell anyone what kind of battle you enter - defaut battlescreen, a battle where you simulate the result with event commands without ever entering battlescreen, or a battlesystem modified by plugins. That is all possible and is what was speculated about above because it all requires different handling.

But if you found the correct solution between the options given that is OK, just remember at your next question that in the modern RPG-Makers, anything can be changed and we can't read your mind as what you have done in your project.
that still doesn't tell anyone what kind of battle you enter - defaut battlescreen, a battle where you simulate the result with event commands without ever entering battlescreen, or a battlesystem modified by plugins. That is all possible and is what was speculated about above because it all requires different handling.

But if you found the correct solution between the options given that is OK, just remember at your next question that in the modern RPG-Makers, anything can be changed and we can't read your mind as what you have done in your project.
Oh yeah forgot that part. It is the default battle screen modified by the VS battle core. But yes Since my events use the battle processing built-in I have the If Win, If Escape, and If Lose so using the Variables like suggested I was able to get it to remove 25% of the gold the player has when the party loses a battle. I built a Bank system so I wanted to entice the player to use it. The bank also has loans with a credit score to change the amount you can borrow and how much you end up paying back. And my wife said I should add a weapon payment program where if you don't pay they repossess your weapon.
so even in a video game you've still gotta deal with student loans and Leons?
can you pay in instalments for them to just give you materials and a crafting recipe too? lmao
so even in a video game you've still gotta deal with student loans and Leons?
can you pay in instalments for them to just give you materials and a crafting recipe too? lmao
Loans are 1 at a time and yes you pay them off as you can. Gonna have it as an option at points so you got a helping hand if things get tough

Original thread: https://forums.rpgmakerweb.com/threads/lose-25-of-gold-on-death.136891/