MV How do I make the player lose all equipment and certain items upon death? (RMMV)

V
So I'm trying to create a dungeon crawler with light 'roguelike' elements where the player will lose all equipment found on their dungeon run upon death. Are there any in game or plugin solutions for this?
You can get a game over common event plugin and remove those items via that comon event. As for which items to remove.... I think you can put the items and quantities into arrays and then get rid of those specific items. Idk if there's an easier way.
By far the easiest way is to use the following script:
Code:
$gameParty.initAllItems()
This will remove all your items, weapons, and armors. Note that this won't remove any piece of equipment currently worn by your actors. For that, you'll need to add another script:
Code:
$gameParty.members().forEach(function(actor){ actor._equips = [] })
This will remove all equipment of all actors. Alternatively, you can use:
Code:
$gameParty.members().forEach(function(actor){ actor.initEquips($dataActors[actor._actorId].equips) })
Which will revert all actors' equipment to their default equipment as defined in the RPG Maker database.
By far the easiest way is to use the following script:
Code:
$gameParty.initAllItems()
This will remove all your items, weapons, and armors. Note that this won't remove any piece of equipment currently worn by your actors. For that, you'll need to add another script:
Code:
$gameParty.members().forEach(function(actor){ actor._equips = [] })
This will remove all equipment of all actors. Alternatively, you can use:
Code:
$gameParty.members().forEach(function(actor){ actor.initEquips($dataActors[actor._actorId].equips) })
Which will revert all actors' equipment to their default equipment as defined in the RPG Maker database.
I'm a total noob, so sorry for asking. I'm supposed to use these commands as script calls to common events, right?
There is a manual that comes with Rpg Maker, it has a section that explains each event command, in your case it is the penultimate of the list, see here if you prefer:
Goto:

Good Luck
Moved to: Plugin Requests

The issue here is that these are script calls, and on death in battle, no further event commands are executed.

So a plugin is needed to force something to happen instead of gameover.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-the-player-lose-all-equipment-and-certain-items-upon-death-rmmv.136092/