I am in the middle of coding a class ability that is supposed to allow this gunslinger archetype to use two two-handed firearms as per conventional two-handed fighting with the Two-Weapon Fighting feat under certain circumstances. Essentially, it would make the main hand gun the equivalent of a One-Handed weapon and the off-hand gun a Light weapon.
My idea to try to accomplish this was with the following code snippet:
The idea being that, after checking to see if two 2-handed firearms are being wielded, to alter the wClass tags on each directly. So far, while not giving an error, this code is not altering the tags of items on a character appropriately equipped. It may be a timing error ... I set the timing based on the timing of the field calculation for wClass, but I don't know for sure.
At the *worst*, I could simply add bonuses with the right weapon equipped configuration to make up for the penalties, but if anyone can find the error in this more elegant solution, please let me know! Thank you!
My idea to try to accomplish this was with the following code snippet:
Code:
Pre-levels/5000
foreach pick in hero from BaseWep where "wProfReq.Firearm2"
if (eachpick.tagis[Hero.MainHand] + eachpick.tagis[Hero.OffHand] = 2) then
perform hero.assign[Hero.TwoWep]
if (eachpick.tagis[Hero.MainHand] = 1) then
perform eachpick.delete[wClass.TwoHanded]
perform eachpick.assign[wClass.OneHanded]
endif
if (eachpick.tagis[Hero.OffHand] = 1) then
perform eachpick.delete[wClass.TwoHanded]
perform eachpick.assign[wClass.OneHanded]
if (eachpick.field[gSizeMod].value = 0) then
perform eachpick.delete[wClass.OneHanded]
perform eachpick.assign[wClass.Light]
endif
endif
endif
nexteach
The idea being that, after checking to see if two 2-handed firearms are being wielded, to alter the wClass tags on each directly. So far, while not giving an error, this code is not altering the tags of items on a character appropriately equipped. It may be a timing error ... I set the timing based on the timing of the field calculation for wClass, but I don't know for sure.
At the *worst*, I could simply add bonuses with the right weapon equipped configuration to make up for the penalties, but if anyone can find the error in this more elegant solution, please let me know! Thank you!