Throwing Away Weapons/Armors as a Skill?

This is a skill I wish to implement to one of my playable characters. Designed to be a High Risk/High Reward character, I wish to create a skill that does the following:

  • Remove a piece of equipment from her equipment list
  • Deal heavy damage based off of the equipment's stats, a la Final Fantasy's Throw
  • Remain unequipped for the duration of the battle, or possibly provide a skill that allows her to 'rearm' the fallen equipment at the cost of a turn, and possibly a debuff that lowers her defenses as she retrieves said weapon/armor.
Preferably without any scripts. Would anyone be inclined to help out?
I can help with the first and third points. You would have to create two Common Events: one that lets the player choose which equipment to use and remove it, and one that re-equips the same equipment.

For the first Common Event, you'll need select Show Choices and add each equipment category as a choice (Weapon, Shield, Head, etc.) For each choice, make a switch for the type of equipment thrown (ex. a switch for selecting the Weapon called "Weapon Throw", a switch for shield called "Shield Throw, etc.) and make sure it's ON. This is important for the second Common Event.

Then for each choice, select Control Variables. Choose a variable to store which equipment was chosen and under the Script field, type in this:

$game_actors[1].equips[0].idWhere "1" is the number of the character who has the skill and "0" corresponds to the equipment slot

0 is Weapon

1 is Shield

2 is Head

3 is Body\

4 is Accessory.

Then you would select Change Equipment and make it so the character equips "None" for the corresponding equipment.

After that, select Change Skills to make the character forget the "throw" skill, then select Change Skills again to make the character learn the "rearm" skill. Call this Common Event on the "throw" skill's page in the Skills tab.

For the second Common Event, Make Conditional Branches for each switch that was created in the first Common Event. Then add a script call that looks like this for each Conditional Branch:

x = $game_variables[2]$game_actors[1].change_equip(0,$data_weapons[x])Where "2" would be the number of the variable you stored the equipment data in, "1" would be the number of the Actor, and "0" would, again, be the equipment slot. $data_weapons would change to $data_armor when dealing with equipment that's not a weapon.

After that, select Change Skills to make the character forget the "rearm" skill, then select Change Skills again to make the character learn the "throw" skill. Make sure to turn the equipment switch OFF after all this.

In the Skill tab, call this Common Skill in the "rearm" skill's page and add the defense debuff.

I think I covered everything I could. I hope this helps!
There is a hidden difficulty in that though, and that is how to determine the actor? If you're gonna be choosing equipment once the skill is actually used, then you can use the damage formula to set the variable to the skill user and another variable to set the target to ease things up. But that also means that you need to somehow associate the removed equipment variable to the actor that used the skill to avoid problems...

You will also need to decide on the most efficient way for you to determine how much damage is to be dealt. If you go pure event, that you will probably end up using TONS of If-blocks, which would be time consuming to do and not pleasing to the eyes and will be a pain to edit later on.

And so on...

So yeah you can do it without "scripts" (coz nothing is done without scripts, after all everything that RM runs are run via scripts), but I don't think that would be optimal.
Honestly, the easiest way would be to use Yanfly's Custom Cost script, or something like it. You can set skills to cost money, items, health, etc.
Thank you for all of the help.

Suffice to say, I've done something similar to PKLpikachu's response a while back. 

Original thread: https://forums.rpgmakerweb.com/threads/throwing-away-weapons-armors-as-a-skill.35852/