Shed Skin (Armor strip skill)

Hey all, back with another dumb noob question lol
I want to make a skill where the user removes their currently equipped armor for several turns, and then puts the armor back on when the state is removed. This will increase their agility and decrease defense for the duration of the effect. Is that possible through some sort of fancy script or plugin?
1653100047297.png


A simple, stat-based method of achieving this would be to create a skill for your Shed Skin move, and then adding a buff for agility in the "effects" section, and a debuff for defense. It won't actually remove your equipped armor, but it can give the illusion of it.

By using common events, there's a way to actually remove equipped armor, but you can only put on a specified armor back after a certain number of turns, without it remembering what armor your player was wearing before.
Good question.
It seems using Seal Equipment will remove an actor's armor, returning it to the inventory.
It also seems to override the Lock Equipment trait too. I wonder if this is a bug?

So if you had a temporary party member with locked equipment and a one-of-a-kind sword. The player could actually get that sword off the party member by using a Seal Equipment status.
View attachment 226896

A simple, stat-based method of achieving this would be to create a skill for your Shed Skin move, and then adding a buff for agility in the "effects" section, and a debuff for defense. It won't actually remove your equipped armor, but it can give the illusion of it.

By using common events, there's a way to actually remove equipped armor, but you can only put on a specified armor back after a certain number of turns, without it remembering what armor your player was wearing before.
that is unfortunate, I was hoping to make it more elaborate than just a basic stat change effect.
UPDATED!

What we'll need:

YEP_BuffsStatesCore
1 Common Event per Actor
Variables for each Actor's Armor Slots (The default number of Armor Slots is 4, so in that scenario you'd need 4 Variables per Actor.)


Common Event (Per Actor):
Spoiler: Common Event Setup
JavaScript:
If : Harold is affected by Shed Skin
 Control Variables : HaroldArmor1 = var w = $gameActors.actor(1).armors()[0]; w ? w.id : 0
 Control Variables : HaroldArmor2 = var w = $gameActors.actor(1).armors()[1]; w ? w.id : 0
 Change Equipment : Harold, Armor1 = None
 Change Equipment : Harold, Armor2 = None
else
 Script : $gameActors.actor(1).changeEquip(1, $dataArmors[$gameVariables.value(1)]);
        : $gameActors.actor(1).changeEquip(2, $dataArmors[$gameVariables.value(2)]);
end


The State's Note Box (Add for every Actor):
Spoiler: State Setup
Code:
<Custom Apply Effect>
 if (user._actorId == 1){
  $gameTemp.reserveCommonEvent(1);
}
 if (user._actorId == 2){
  $gameTemp.reserveCommonEvent(2);
}
</Custom Apply Effect>


<Custom Leave Effect>
 if (user._actorId == 1){
  $gameTemp.reserveCommonEvent(1);
}
 if (user._actorId == 2){
  $gameTemp.reserveCommonEvent(2);
}
</Custom Leave Effect>


Also, it's worth noting that given the way this works if you win/exit the battle while the State is still in effect it won't re-equip your Armor. So you'll have to set up some form of 'end battle event process' to account for this.
I don't know if you're using YEP_BuffsStatesCore, but we can use that to pull this off. To keep things simple we'll use two Common Events and one State.

Common Event 1:
JavaScript:
Control Variables : #0001 = var w = $gameActors.actor(1).armors()[0]; w ? w.id : 0
Control Variables : #0002 = var w = $gameActors.actor(1).armors()[1]; w ? w.id : 0
Change Equipment : Harold, Armor1 = None
Change Equipment : Harold, Armor2 = None
Do this for however many Armor Slots you're using.


Common Event 2:
JavaScript:
Script : $gameActors.actor(1).changeEquip(1, $dataArmors[$gameVariables.value(1)]);
       : $gameActors.actor(1).changeEquip(1, $dataArmors[$gameVariables.value(2)]);


Next, we create our "Armor Strip" State and place in its Note Box:
JavaScript:
<Custom Apply Effect>
 $gameTemp.reserveCommonEvent(1);
</Custom Apply Effect>

<Custom Leave Effect>
 $gameTemp.reserveCommonEvent(2);
</Custom Leave Effect>


When the "Armor Strip" State is 'Applied' Common Event 1 will get the currently equipped Armor, store it in a Variable and then unequip it.

When the State expires, (Assuming that's how you want it to work.) Common Event 2 will re-equip the Armor. You never stated if this is a character-exclusive Skill or not, so this set up is for solo use.
Unfortunately it is meant to be a class specific skill (Knights) so I would need it to target the user rather than a specific actor. Sounds like this solution wouldn't be able to do that?
^ See updated original post above. ^
Sooo, the simple workaround would be to create duplicate States (Assuming there aren't too many playable characters), for each character , have the Skill apply all of them and simply make each character immune to all but the specific State that needs to be applied to them. Do this for the Common Events and Variables as well. The player would never see any difference and it's only a bit more work if your roster isn't huge.

I'll still be looking into it in the meanwhile for a more... "graceful" approach.
[move[MV Support[/move]
just to be clear: do you have any method that indicates to the player that the armor is gone?

i can see you wanting to strip the armor defense value from the actors defense, but i fail to understand why the armor needs to be actually removed if you can give that impression by other means.
I don't know the details, but I imagine it's so you also lose any other bonuses the armor may grant like poison immunity, hp regen, or the like. You can't disable those kind of effects if they're attached to a piece of equipment.
just to be clear: do you have any method that indicates to the player that the armor is gone?

i can see you wanting to strip the armor defense value from the actors defense, but i fail to understand why the armor needs to be actually removed if you can give that impression by other means.
I don't know the details, but I imagine it's so you also lose any other bonuses the armor may grant like poison immunity, hp regen, or the like. You can't disable those kind of effects if they're attached to a piece of equipment.
BlackGoldSaw You hit it on the head. Every one of my armor pieces has a variance as far as what types of stats they change. For example, my heavy armor greatly decreases agility. If I can make a skill which simply removes the armor temporarily, it will decrease their defense and increase their agility by the exact amount defined by their outfit. In addition, I want bonuses such as health regen and critical rate increase to be removed during this time as well.
BlackGoldSaw You hit it on the head. Every one of my armor pieces has a variance as far as what types of stats they change. For example, my heavy armor greatly decreases agility. If I can make a skill which simply removes the armor temporarily, it will decrease their defense and increase their agility by the exact amount defined by their outfit. In addition, I want bonuses such as health regen and critical rate increase to be removed during this time as well.
By the way, did you see my updated initial post for the setup?

Original thread: https://forums.rpgmakerweb.com/threads/shed-skin-armor-strip-skill.147778/