• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Two magic weapons working in tandem?

Paris.Crenshaw

Well-known member
How would you handle a situation where a matched pair of magical swords must both be wielded to gain the benefit of two-weapon fighting (without pre-requisites)?

I am able to get the blades to grant the feat when each is equipped using the bootstrap with the condition: "fieldval:gIsEquip <> 0". I can't figure out the code that will grant it if the blade is in the off hand, though.

I even got it to ignore pre-requisites with the skipprereq thing in the tag.

What I can't figure out how to do (aside from the off-hand option) is tell the program to look for the other weapon and make sure both are equipped (and not care which is the primary or off-hand weapon), before granting the two-weapon fighting feat.

I've tried looking through the online resources and the tutorials. I really could use a reference to tell me how to structure the eval scripts. I'm not at all familiar with Hero Lab's syntax.

Thanks in advance for the help!
 
This script goes on the second sword, the same one that bootstraps the Two Weapon Fighting feat.

First 1000
var bonus as number

~ Check to see if the first sword is equipped in the main hand
if (hero.childfound[wSword1].field[gIsEquip].value <> 0) then
if (hero.childfound[wSword1].tagis[Hero.MainHand] <> 0) then
bonus += 1
endif
endif

~ Check to see if the second sword is equipped in the off hand
if (field[gIsEquip].value <> 0) then
if (tagis[Hero.OffHand] <> 0) then
bonus += 1
endif
endif

~ If our bonus is 2, then change our actUser field value to a number that will fulfill our bootstrap condition.
doneif (bonus < 2)

field[actUser].value = 2



Then bootstrap the TWF feat to the sword with the following Bootstrap Condition

First 1500
fieldval:actUser = 2


Try that on for a start, you might have to fiddle with the phases and priorities, I haven't tested it.
 
Thanks so much for the help, Lawful_g. Now that I see what you've done, it makes sense. I think I have a mental block on the syntax for Hero Lab's language.

I've got the script entered like so:
Code:
var bonus as number

~ Check to see if the first sword is equipped in the main hand
if (hero.childfound[wNQShadow].field[gIsEquip].value <> 0) then
if (hero.childfound[wNQShadow].tagis[Hero.MainHand] <> 0) then
bonus += 1
endif
endif

~ Check to see if the second sword is equipped in the off hand
if (hero.childfound[wNQWhisp].field[gIsEquip].value <> 0) then
if (hero.childfound[wNQWhisp].tagis[Hero.OffHand] <> 0) then
bonus += 1
endif
endif

~ If our bonus is 2, then change our actUser field value to a number that will fulfill our bootstrap condition.
doneif (bonus < 2)

field[actUser].value = 2

But when I try to test the weapon, I get a syntax error telling me that "Only derived fields can generally be modified via scripts (field 'actUser')."

Also, I was thinking that one way to set it up so that either weapon could be mainhand or offhand would be to change the value of the tagis so that

Code:
if (hero.childfound[wNQShadow].tagis[Hero.MainHand] + hero.childfound[wNQShadow].tagis[Hero.OffHand] <> 0) then
bonus += 1
endif

Is it possible to add the two tagis functions like that?
 
Then you'll need to switch actUser to a different field and adjust the bootstrap condition accordingly.

That would work, as long as it doesn't matter which sword is in which hand (for some reason I thought it was important from the first post).
 
Most Things in pathfinder have abValue1,2,3,4. But not everything and I can't remember if weapons have them. If they do they make a great choice for this type of thing.
 
Thanks, guys. I was working on other things, so I haven't had a chance to try abValue1, 2, 3 or 4, yet. I'll let you know what I find out.

Sorry for the confusion, Lawful_g. The requirement is that both weapons be wielded at the same time to grant the two-weapon fighting feat. It doesn't matter which sword is in which hand.

For the timebeing, just allowing one sword to grant the feat wihout pre-requisites is sufficient, because the weapons are used by an NPC. But I do want to be ready if the swords (or others like them) ever fall into the hands of a player. ;-)

Cheers!
Paris
 
Back
Top