So I've been using the <On Creation Eval> for my weapons for some time now with great success. Now, I want to use the same approach for armor as well. Basically, I add the following to each piece of armor in the game:
This is all fine and good since I'm using independent items. Now the issue comes to when I want to utilize the "_armorVal" I just created. I use YEP_ArmorScaling as well and need to find the sum of all the "_armorVal" that the actor has equipped. If I were simply trying to reference, say the Body slot, then it would be as simple as:
But I need to find the sum of all the equipped items... (and I don't think nesting a bunch of if statements would be the way to go, surely there's a better way).
<On Creation Eval>
item._armorVal = 10;
</On Creation Eval>This is all fine and good since I'm using independent items. Now the issue comes to when I want to utilize the "_armorVal" I just created. I use YEP_ArmorScaling as well and need to find the sum of all the "_armorVal" that the actor has equipped. If I were simply trying to reference, say the Body slot, then it would be as simple as:
target.isActor && target.equips()[3] ? target.equips()[3]._armorVal : target.level * 10;But I need to find the sum of all the equipped items... (and I don't think nesting a bunch of if statements would be the way to go, surely there's a better way).