Hello,
I am looking to add a specific Skill Type through a state using notetags rather than the default Add Skill Type trait. I am attempting this so that if statements based on equipment determine which Skill Type is added.
What would the correct code be to add a Skill Type through a notetag? I am using YEP_AutoPassiveStates, but I am not sure this is the correct plugin for this, as I have had trouble running code from the notebox with this plugin before.
Below is a rough draft, which simply activates the state based on what equipment is being held. While this could work, it would require a few hundred states to do so, one for each Skill Type. Naturally, I would much prefer running the eval in a single state and providing the skill type per if statement.
I am looking to add a specific Skill Type through a state using notetags rather than the default Add Skill Type trait. I am attempting this so that if statements based on equipment determine which Skill Type is added.
What would the correct code be to add a Skill Type through a notetag? I am using YEP_AutoPassiveStates, but I am not sure this is the correct plugin for this, as I have had trouble running code from the notebox with this plugin before.
Below is a rough draft, which simply activates the state based on what equipment is being held. While this could work, it would require a few hundred states to do so, one for each Skill Type. Naturally, I would much prefer running the eval in a single state and providing the skill type per if statement.
Code:
<Custom Passive Condition>
if (
user.equips()[0] && user.equips()[0].wtypeId === 141)
{
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>