Yanfly's Passive States script lets the user add a <passive state x> note on actors, classes, equipment, and enemies. While I may use some of these is the future, I'm trying to modify the script to also search for the tag in skills the actor has. I know there are already scripts that do this but while the mild programming background I have helps me get the general idea of what a script is doing, I'm trying to modify this to gain an understanding. Here's Yanfly's script :
link
I can see on line 116 that it is searching for the tag in the various categories so I added the the data for the skills like so:
groups = [$data_actors, $data_classes, $data_weapons, $data_armors, $data_enemies, $data_skills] After I tried this and it didn't work I checked again, and it looks like later in the script it checks everything again when it actually applies the state. So I tried to copy it down by line 198, adding a for statement for self.skills.passive_states making mine looks like this:
for state_id in self.actor.passive_states array.push($data_states[state_id]) if passive_state_addable?(state_id) end for state_id in self.class.passive_states array.push($data_states[state_id]) if passive_state_addable?(state_id) end for state_id in self.skills.passive_states array.push($data_states[state_id]) if passive_state_addable?(state_id) end for equip in equips next if equip.nil? for state_id in equip.passive_states array.push($data_states[state_id]) if passive_state_addable?(state_id) end endThis however results in a "SystemStackError occurred. stack level too deep"
Anyone who knows more than I see my error? Sorry if this is long winded, first post.