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

wwwgippal

Villager
Member
Joined
Jan 6, 2021
Messages
8
Reaction score
1
First Language
English
Primarily Uses
RMMZ
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?
 

Hyouryuu-Na

Very very lazy
Veteran
Joined
Jun 15, 2017
Messages
1,095
Reaction score
2,756
First Language
Not English
Primarily Uses
RMMV
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.
 

Nolonar

Veteran
Veteran
Joined
Feb 18, 2018
Messages
210
Reaction score
321
First Language
French, German
Primarily Uses
RMMZ
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.
 

wwwgippal

Villager
Member
Joined
Jan 6, 2021
Messages
8
Reaction score
1
First Language
English
Primarily Uses
RMMZ
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?
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
585
Reaction score
253
First Language
PT-BR
Primarily Uses
RM2k3
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
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,509
Reaction score
14,847
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.



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.
 

Latest Posts

Latest Profile Posts

Quite the versatile cast so far :p

chars.PNG

Edit: Sprites are made by Alexdraws and TheMightyPalm. I just edited them.
Degica Games Turn Komodo | RPG Maker News #77

Well, rats. Was really looking forward to trying out FPS Creator, but trying to install and set it up was pretty much impossible for my tiny brain to comprehend. So much for that, then.
Ah, home once more! I think I can safely work on my games now.
Let's hope power remains on for the day

Forum statistics

Threads
112,412
Messages
1,068,120
Members
146,062
Latest member
BuckyBattleBorn
Top