Colen, thank you for the response.
I am trying to make the dual wielder feat that was posted
here work a little bit better.
If I may, I have a few questions.
(1).
Is there a way to get at what's in a hero's hands directly rather than iterating through the entire list of weapons in the character's inventory? I see that if a weapon is equipped in a hero's main hand, it has the tag Hero.MainHand, and the same for the off hand with Her
ffHand.
I was trying to find a syntax where I could basically say:
if (the weapon currently in the hero's main hand is !wProperty.TwoHanded and wCategory.Melee)
(2).
Can you combine expressions with logical operators for if-blocks with this scripting language? I altered the dual wielder feat as follows:
~exit if disabled
doneif (tagis[Helper.Disable] <> 0)
~exit if fewer than two weapons are equipped
~keeps feat from triggering if a one-handed weapon
~is equipped in both hands
doneif (hero.tagcount[Hero.EquipWep] < 2)
~counter variable
field[abValue].value = 0
~add up total number of weapons in character's inventory
~that are equipped in the main hand and the off hand
foreach pick in hero from BaseWep where "(wCategory.Melee)"
if (eachpick.field[gIsEquip].value = 1) then
field[abValue].value += 1
endif
if (eachpick.field[wIs2nd].value = 1)then
field[abValue].value += 1
endif
nexteach
~exit if there isn't a weapon in both the main hand
~and the off hand
doneif (field[abValue].value < 2)
~add 1 to armor class
hero.childfound[ArmorClass].field[Bonus].value += 1
But the presence of two if-blocks feels awkward to me. I wanted to combine the conditions with something like this:
if (eachpick.field[gIsEquip].value = 1 or eachpick.field[wIs2nd].value = 1)
I tried nesting each condition in its own parentheses. I tried 'or' and '||'. Is there a syntax to make this happen?
(3).
The way I have the feat listed above, putting a non-light weapon in each hand will trigger a validation error. The OP of the dual wielder feat solved this by manually attaching the wProperty.Light tag to the weapon, but admitted it was an inelegant solution. In addition to being an inelegant solution, it also has the potential to cause issues outside of the feat that are intended to trigger on weapons based on the presence or absence of the wProperty.Light tag. Is there a more "proper" way to solve this problem?
Thank you very much for any help.
Jamie (CNYGamer)