Battle Stances

i hope I'm posting ths in the right place, but I assume this will come down to scripting which is why it's here.

Anyway, I'm trying to allow a few classes in my game to change battle stances between fights that will raise/lower stats etc, you know the drill. just wondering the best way to go about it. As of right now I'm already using neonblack's passive skill script, and i think i have an idea but not sure if it's the most efficient way to go. here is the script first off:

Spoiler
##-----------------------------------------------------------------------------
# CP Passive Skills v1.1
# Created by Neon Black
# v1.1 - 12.9.2014 - Slight optimization
# v1.0b - 9.5.2012 - Slight bug fix
# v1.0 - 9.5.2012 - Wrote and debugged main script
# For both commercial and non-commercial use as long as credit is given to
# Neon Black and any additional authors. Licensed under Creative Commons
# CC BY 4.0 - http://creativecommons.org/licenses/by/4.0/
##-----------------------------------------------------------------------------

##-----------------------------------------------------------------------------
# Instructions:
# Place this script in the "Materials" section of the scripts above main.
# This script has no customization options and is plug and play. To use this
# script just follow two fairly simple steps.
# 1. Create a state with the passive buffs you would like a skill to add.
# 2. Add the line "passive[x]" without the quotes to a skill's notebox where
# "x" is the ID of the state to be applied while the skill is learned.
# Note that passives do not apply to enemies.
##-----------------------------------------------------------------------------


##-----------------------------------------------------------------------------
# The following lines are the actual core code of the script. While you are
# certainly invited to look, modifying it may result in undesirable results.
# Modify at your own risk!
##-----------------------------------------------------------------------------


$imported ||= {}
$imported["CP_PASSIVES"] = 1.1

class Game_BattlerBase ## Alias the feature objects to get states and passives.
alias cp_passive_f_objects feature_objects
def feature_objects
return cp_passive_f_objects if @passover
return cp_passive_f_objects + passives
end

def passives ## Returns an empty passive array for all battlers.
return []
end
end

class Game_Actor < Game_Battler ## Gets passive states on a character.
def passives
res = []
@passover = true
skills.each do |skill|
next if skill.passives.empty?
res += skill.passives
end
@passover = false
return res.collect {|ps| $data_states[ps]}
end
end

class RPG::Skill < RPG::UsableItem
def passives
return @passives if @passives
@passives = []
self.note.split(/[\r\n]+/).each do |line|
case line
when /passive\[(\d+)\]/i
@passives.push($1.to_i)
end
end
@passives
end
end


##-----------------------------------------------------------------------------
# End of script.
##-----------------------------------------------------------------------------
this script has worked flawlessly for some skill-tree related passives that are always there once  learned, what im trying to do is allow the player to choose between stances from the menu though. what i was thinking was to create a skill type "Stances" and make a skill for each stance which is only usable from the menu and hidden during battle (no problem so far). let's use "Berserk" as an example. So the player goes to their skill menu and under the Stances heading has a list of learned stances, and that player chooses berserker. that skill would call a common event which turns on a switch "Player 1 Berserker on" or whatever. then on each menu i believe i would have to have a parallel process common event to check which switch is on, and then teach that character that skill which will activate the passive state. and vice versa to turn the stance off or change stances. I shouldn't have a problem doing any of that and i think it will work, but i can see it turning into a very large common event to check all available states on every party member, and i'm worried about lag etc.

so to sum up, i guess i'm just wondering if anyone knows of r can come up with a more efficient way to implement this system. thanks

Original thread: https://forums.rpgmakerweb.com/threads/battle-stances.50689/