Skill that unequips or destroys equipped items

kj3400

Hmph Master
Veteran
Joined
Nov 29, 2013
Messages
553
Reaction score
75
First Language
English
Primarily Uses
RMVXA
Forgive me if this topic has been discussed before, but I was wondering if there was a way for a skill to disable, unequip or even destroy equipment or accessories as an effect, either by script or some way I haven't seen yet.
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
3,095
Reaction score
2,360
First Language
English
Primarily Uses
RMMV
Link a common event to the skill that unequips the item from the user (and then discards it).
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,461
Reaction score
625
First Language
Italian
Primarily Uses
RMVXA
As it has been said you can use a common event to remove that said items from the user/target equipment and then delete it.

This is one way of doing this.

Here are few more ways of doing it.
  • Skill Formula: you can use skill formula to check and remove that said item.
  • Script call in a skill formula: this is basically the same as doing it with a skill formula but allows usage of many more characters (that usually do not fit in the formula box). To do this you have to add a little script containing what you would usually write in the skill formula and then call it in the formula box.
  • Script Call in a common event: you can use a script call in a common event to check your skill target and then remove the said item. This does more or less the same you do when using event commands but without unnecessary operations.
Honestly speaking I would recommend NOT using a script for such a thing. This is quite a simple matter and having to debug a script just because of something like this is not worth the effort in my opinion. Of course the final decision is up to you.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,114
Reaction score
5,879
First Language
English
Primarily Uses
RMVXA
You'll need to use a script call to figure out which piece of equipment you had equipped, so that (if you want to destroy it and not just unequip it) you can remove that equip from your inventory after unequipping it.

I believe the correct syntax for this is:
if a.equips[n] == nil; $game_variables[x] = 0; else; $game_variables[x] = a.equips[n].id; end; ((damage formula here))
Replace n with the slot of the equipment (0 for weapon, 1-4 for armor slots 1-4), and x with the Variable you want to use to track which armor item was unequipped. Then, in your common event, you can use that variable to know which item to discard from the inventory. If the variable is not 0, use the following code line to do this easily: $game_party.gain_item($data_armors[$game_variables[x]], -1, false).
 

kj3400

Hmph Master
Veteran
Joined
Nov 29, 2013
Messages
553
Reaction score
75
First Language
English
Primarily Uses
RMVXA
These are all good for unequipping or destroying equipment, but what if I just want to disable the effects of said equipment for the battle without unequipping it? Is that possible?
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,114
Reaction score
5,879
First Language
English
Primarily Uses
RMVXA
These are all good for unequipping or destroying equipment, but what if I just want to disable the effects of said equipment for the battle without unequipping it? Is that possible?

Much harder to do. You would need to create a script to disable the effects of equipment per se, without unequipping it.

Of course, you could unequip it, and using a very similar technique to what I described above, immediately re-equip it after the battle using a Common Event. That would give you the same effect as disabling it for the remainder of the battle.
 

Harosata

Dramatic Lightning's BFF
Veteran
Joined
Aug 20, 2015
Messages
250
Reaction score
84
First Language
English
Primarily Uses
RMMV
Question: Wouldn't a Seal Equipment feature on a state do this for Unequipping, considering Seal Equipment forbids items being equipped in that slot? (like how a Two-Handed Sword removes the shield) The state doesn't even have to last more than one turn for that, I bet.
 

Latest Threads

Latest Posts

Latest Profile Posts

Voice.gif
The Voice... They usually show up to talk to you about leaving your mark on the world, which is one of the major themes of my game... How will you be remembered by society.
The only time my brother shows me any kind of support is by liking or LOL my Facebook Comments.
I finally finished the Coliseum for my game. Love how it looks. Credits for the assets goes to Kokoro Reflections, @Starbird_Resources, and @megumi014.
Colossuem.png
Mimics! Mimics everywhere!

Forum statistics

Threads
124,511
Messages
1,164,163
Members
163,348
Latest member
bongdaso
Top