Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,264

Old March 8th, 2009, 11:20 AM
At the moment my campaign is the Age of worms, in it this feat has cropped up and I am trying to get it into hero lab however I can script it so it works with all the pre reqs assigned but I don't know how to check for one handed Slashing weapons only on the Weapon Focus feat.

I've ticked the Restrict to picks on hero and select from all weapons but how can I restrict it to only show one handed Slashing weapons only?

Code:
{b}Prerequisites{/b}: Weapon finesse, Weapon Focus (Any one handed Slashing Weapon), Base Attack Bonus +1.

{b}Benefit{/b}: If you do not wield a shield or weapon in your off-hand you treat your chosen weapon as a light weapon.

If you do not wield a shield or weapon in your off-hand, you also gain a +1 shield bonus to your AC while wielding your chosen weapon.

When you are fighting defensively or using the total defense action, this shield bonus increases to +2

{b}Special{/b}: A fighter may select Improved Buckler Defense as one of his fighter bonus feats.

You may take this feat more than once, each time you do, it applies to a new one-handed slashing weapon you have weapon focus in.

{b}{i}Age Of Worms Feat{/i}{/b}
Code:
Eval script
     ~ If we're disabled, do nothing
      if (tagis[Helper.FtDisable] <> 0) then
        done
        endif

      ~ If we're wearing armor or wearing a Buckler, we're disabled.
      if (hero.tagis[Hero.EquipArmor] + hero.tagis[Hero.EquipShld] <> 0) then
        var result as number
        result = assign[Helper.SpcDisable]
        done
        endif   

      ~ Check to see if we have something equipped in main hand only
      if (hero.tagis[Hero.EquipMain] < 1) then
        done
        endif

      ~ Check to see that we dont have at two weapons equipped, or a double
      ~ weapon
      if (hero.tagcount[Hero.EquipWep] > 1) then
      done
      endif

      ~ Check to see if our Unarmed Strike is selected in either main or off
      ~ hands
      if (hero.child[wUnarmed].tagis[Hero.MainHand] + hero.child[wUnarmed].tagis[Hero.OffHand] < 0) then
        done
        endif

      ~ Otherwise, add a +1 Shield bonus to our AC
      hero.child[ArmorClass].field[tACShield].value = maximum(hero.child[ArmorClass].field[tACShield].value, 1)
bodrin is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,585

Old March 8th, 2009, 11:40 AM
In this case, you'll need a custom expression for selection. First, add a couple of weapons, and look at their tags until you've figured out that one handed is the wClass.OneHanded tag, and slashing is the wType.Slashing tag.

So, you don't want anything in "Select From". In "Custom Expression", you'll need a search string which finds things which are weapons, and are one-handed and slashing.

Looking at the code for "Select From...Weapons" (which isn't something you'd have available), the custom expression it generates is:

Code:
component.BaseWep & !Helper.NoSelect & !component.Specific & !wCategory.Ammunition
That finds weapons, but excludes special weapons which shouldn't be available, then excludes named magic weapons (such as Frost Brand), and excludes ammunition.

Starting with that, & on the tags we need:
Code:
component.BaseWep & !Helper.NoSelect & !component.Specific & !wCategory.Ammunition & wClass.OneHanded & wType.Slashing
Now, for weapon focus, first, make sure you've selected "Restrict To...Picks on Hero", then add on the tag for weapon focus to the long expression:
Code:
 
component.BaseWep & !Helper.NoSelect & !component.Specific & !wCategory.Ammunition & wClass.OneHanded & wType.Slashing & Broadcast.WepFocus
Mathias is online now   #2 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,264

Old March 9th, 2009, 10:23 AM
I tried adding this to the custom expression but I keep getting this error message.
"existence tagexpr for pick 'fGracEdge' is scheduled after primary condition test is scheduled'

I've tried changing the timing from pre levels to post levels to final phase users but to no avail.

However if I don't add Graceful edge as a Bonus feat it displays correctly in the feat panel but when i try to select the weapon "Scimitar" the pick box says "Nothing to Select!"

So if added as a fighter bonus feat I get the error former error, but if added as a normal feat i get the "Nothing to select!" error?

Restrict to Picks on hero ticked, Select from... None allocated.

Quote:
Originally Posted by mgehl View Post
In this case, you'll need a custom expression for selection. First, add a couple of weapons, and look at their tags until you've figured out that one handed is the wClass.OneHanded tag, and slashing is the wType.Slashing tag.

So, you don't want anything in "Select From". In "Custom Expression", you'll need a search string which finds things which are weapons, and are one-handed and slashing.

Looking at the code for "Select From...Weapons" (which isn't something you'd have available), the custom expression it generates is:

Code:
component.BaseWep & !Helper.NoSelect & !component.Specific & !wCategory.Ammunition
That finds weapons, but excludes special weapons which shouldn't be available, then excludes named magic weapons (such as Frost Brand), and excludes ammunition.

Starting with that, & on the tags we need:
Code:
component.BaseWep & !Helper.NoSelect & !component.Specific & !wCategory.Ammunition & wClass.OneHanded & wType.Slashing
Now, for weapon focus, first, make sure you've selected "Restrict To...Picks on Hero", then add on the tag for weapon focus to the long expression:
Code:
 
component.BaseWep & !Helper.NoSelect & !component.Specific & !wCategory.Ammunition & wClass.OneHanded & wType.Slashing & Broadcast.WepFocus

Last edited by bodrin; March 9th, 2009 at 10:28 AM.
bodrin is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,585

Old March 9th, 2009, 01:10 PM
It's probably the bonus feat part that's causing your timing problem. Do you have a condition expression for the bootstrap that's placing the feat on your character? If so, move its timing back. First, 10000 usually works (and, since a version or two ago, that's been the default (the default used to be First, 100)).

If you want to test for weapon focus, you'll need to have "restrict to...picks on hero" selected, and then the script will only find the weapons your hero owns - because the weapon focus feat can't put a tag on something that hasn't been added yet. So, you'll have to buy a scimitar before that will work. If you want to enforce the restriction on weapon focus with the pre-req or an eval rule, you can go with the previous tag expression I gave you, and not restrict the picks available.
Mathias is online now   #4 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,264

Old March 11th, 2009, 03:13 AM
Quote:
Originally Posted by mgehl View Post
It's probably the bonus feat part that's causing your timing problem. Do you have a condition expression for the bootstrap that's placing the feat on your character? If so, move its timing back. First, 10000 usually works (and, since a version or two ago, that's been the default (the default used to be First, 100)).

If you want to test for weapon focus, you'll need to have "restrict to...picks on hero" selected, and then the script will only find the weapons your hero owns - because the weapon focus feat can't put a tag on something that hasn't been added yet. So, you'll have to buy a scimitar before that will work. If you want to enforce the restriction on weapon focus with the pre-req or an eval rule, you can go with the previous tag expression I gave you, and not restrict the picks available.
I have ticked the restrict to picks on hero box but it doesn't show anything other than Nothing to select even if I already have a weapon equipped and Weapon focus Scimitar allocated!

Bootstrap? I haven't messed around with scripting a bootstrap and I wouldn't know how to, any tips on Bootstraps and their uses greatly appreciated.

I've only added the feat via the eval scripts whilst copying similar feats and changing the relevant data.

Last edited by bodrin; March 11th, 2009 at 03:33 AM.
bodrin is offline   #5 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,264

Old March 24th, 2009, 03:43 PM
Quote:
It's probably the bonus feat part that's causing your timing problem. Do you have a condition expression for the bootstrap that's placing the feat on your character
How do I assign a bootstrap condition expression to this feat?

This is the custom expression next to Restrict to picks on hero. It's pasted directly into the field.

Code:
component.BaseWep & !Helper.NoSelect & !component.Specific & !wCategory.Ammunition & wClass.OneHanded & wType.Slashing  & Broadcast.WepFocus
This is the eval script for the actual feat itself

Code:
 ~ If we're disabled, do nothing
      if (tagis[Helper.FtDisable] <> 0) then
        done
        endif

      ~ If we're wearing armor or wearing a Buckler, we're disabled.
      if (hero.tagis[Hero.EquipArmor] + hero.tagis[Hero.EquipShld] <> 0) then
        var result as number
        result = assign[Helper.SpcDisable]
        done
        endif   

      ~ Check to see if we have something equipped in one hand
      if (hero.tagis[Hero.EquipMain] < 1) then
        done
        endif

      ~ Check to see that we don't have two weapons equipped, or a double
      ~ weapon
      if (hero.tagcount[Hero.EquipWep] > 1) then
      done
      endif

      ~ Check to see if our Unarmed Strike isn't selected in either main or off
      ~ hands
      if (hero.child[wUnarmed].tagis[Hero.MainHand] + hero.child[wUnarmed].tagis[Hero.OffHand] < 0) then
        done
        endif

      ~ Otherwise, add a +1 Shield bonus to our AC
      hero.child[ArmorClass].field[tACShield].value = maximum(hero.child[ArmorClass].field[tACShield].value, 1)
I still get Nothing to Select in the Graceful Edge feat drop down box!
bodrin is offline   #6 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:11 PM.


Powered by vBulletin® - Copyright ©2000 - 2019, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.