Need to remove entire inventory on death

Status
Not open for further replies.

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
54
Reaction score
3
First Language
english
Primarily Uses
Hey all,
I'm looking for a way to remove my character's inventory on death. Just take it and throw it into the void. I've got the gold part handled, but I'm not seeing a way to remove everything else. Conditional branches aren't ideal as the game is heavily loot dependent, I'd have 20 million branches to get everything off. Anyone know of a way to simply strip everything either through eventing or a plugin? There's only one player character in this project if that helps at all.
 

M.I.A.

Goofball Extraordinaire
Veteran
Joined
Jul 13, 2012
Messages
835
Reaction score
645
First Language
English
Primarily Uses
Set a conditional branched common event that's parallel to trigger upon character death..
Then remove equipment from actor. Then you can remove all the items (one at a time) from the inventory.
If you have hundreds of items, then this will take a while.. but if you have 30 or so, it's easily accomplished.

Your list would carry so on and so on, for every obtainable item and every equipable slot, but hopefully you catch the drift.
:)
-MIA
 

Attachments

MDZ

Villager
Member
Joined
Oct 26, 2019
Messages
15
Reaction score
10
First Language
English
Primarily Uses
RMMV
I was getting ready to say that.
A simple common even with change items for all items -x
Would do the trick
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
54
Reaction score
3
First Language
english
Primarily Uses
you can wipe all items in the inventory by using this scriptcall

$gameParty._items = {};
THAT is what I was looking for! Thanks so much!


Edit: Doesn't seem to work, though...
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,012
Reaction score
318
First Language
Dutch
Primarily Uses
RMMV
if { } dont work, try [ ], its one of those. but it will clear ALL items, items, equips, keyitems etc
 

BK-tdm

Manga Maker
Veteran
Joined
Jun 21, 2018
Messages
110
Reaction score
93
First Language
English
Primarily Uses
RMMV
You can also try Hime's multiple inventories, just set a common event that on death switches your inventory to a blank one.
http://himeworks.com/2015/11/multiple-inventories/

I dont remember if gold is removed but thats a simple 2 step process where variable= current gold, then current gold - variable
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
54
Reaction score
3
First Language
english
Primarily Uses
Neither { } nor [ ] are working. I'll look into Hime's plugin. I just need the inventory bit, the script call to remove gold is working just fine.

Edit: Not really understanding Hime's plugin, a lot is left unexplained in the help section. I posted a question in the plugin thread about it, but considering it was last replied to like 2 years ago I'm not holding out much hope. I guess line by line it is.
 
Last edited:

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
54
Reaction score
3
First Language
english
Primarily Uses
Problem solved - took some additional searching, but I came across these two script calls:

$gameActors.actor(1).clearEquipments();
$gameParty.initAllItems();

And those do the job.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
5,874
Reaction score
4,212
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

A wave of cold air has hit Canada... I know it's "always cold", but this one is especially cold... I'm freezing to death lol.
Have fun with English: a "fire grenade" is not portable napalm but a fire extinguisher tool.
2 days ago someone tried to convert me to Islam. Today youtube tried to convert me to Catholicism. The only thing left would be to meet sone Jehova's witnesses.
I just successfully tested changing music by region, and changing it between continents on the world map after getting on/off the airship. I had to override the default audio transitions with eventing to make it change smoothly but it worked.
Stream will be going live shortly with some more Witcher 3, then we will switch to another game! Feel free to drop by~

Forum statistics

Threads
93,419
Messages
912,210
Members
122,926
Latest member
JoetSmith
Top