• 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

Increasing to hit value with each ability gained

jmc69

Member
Hi,

First let me give kudos to the creators/designers of Hero Lab, it is an impressive and useful program.

OK, I've fairly new to this, and I'm attempting to add a couple classes in for a group. I've been able to put together most of the information by searching through other classes/abilities, but I'm having one problem, I can't seem to get an ability to increase the "to hit" bonus each time it is gained.

For those who may know, this is from the Ancestral Avenger (AA) class from Dragon Magazine, and one of the abilities is Drow Bane. The AA gains Drow Bane at level one with a +2 to hit, and +2d6 to damage vs. Drow. At level 4 it gains +3 to hit, lvl 7 +4, and lvl 10 +5. The 2d6 damage bonus does not increase at any time.

I can get each one to show up, but there is four of them in the class abilities, instead of a single one at the appropriately gained level.

I did note in the Sneak Attack base abilities is this script:

~ Add our level / 2 to our sneak attack damage.
var sneak as number
sneak = field[xTotalLev].value / 2
sneak = round(sneak, 0, -1)
hero.child[xSneakAtt].field[Value].value = hero.child[xSneakAtt].field[Value].value + sneak
field[livename].text = "Sneak Attack +" & sneak & "d6"
field[CustDesc].text = "+" & sneak & "d6 to your Sneak Attack damage."

But I can't seem to get this to work with Drow Bane, and what is messing me up is the xSneakAtt script in the Bootstrap - how do I create this? And how would I write the script for Drow Bane to work right?

Any help would be greatly appreciated!
 
Last edited:
Ok, I think I got it to work correctly now:

~ Generate our new name
var level as number
level = field[xTotalLev].value
var total as number
if (level < 4) then
total = 2
elseif (level < 7) then
total = 3
elseif (level < 10) then
total = 4
elseif (level = 10) then
total = 5
endif
field[livename].text = "Drow Bane +" & total & " and +2d6 damage"
 
Thanks Lawful.

For curiosity's sake, how does one create something like xSneakAtt for the bootstrap, as in the rogue ability eval script above? I can't seem to figure that one out...


Thanks.
 
You can go to the specials tab and copy the xSneakAtt thing, give it a new unique ID, rename it, mess about with it to the hearts content. The thing that sets it apart from other specials is it has an Eval Script that says "call CalcValue" which gives it a new field, called "Value".

This is useful if, for example, there are many different things that can add to your special, rather than it being set based only on one class/prestige class. Sudden Strike is an ability of the Ninja class, but it also shows up in some prestige classes (Unseen Seer, Dread Commando). Skirmish is from the Scout class, but there are feats that depend on it having a certain value as a pre-req. For these two abilities I made specials that call a CalcValue so that I could bootstrap them to a particular class/feat/whatever, and then have that whatever add to a single unified special.

Imagine if each class that gave Sneak attack listed it's own sneak attack bonus and no others. Your Rogue/Blackguard/Assassin would have 3 different entries for sneak attack, which you would have to mentally add up each time you made such an attack. Furthermore, if you wanted to take a feat requiring 4d6 sneak attack, how would you check? Unifying it makes things much easier.
 
CalcValue also lets you count class levels before the Levels phase, in case you need that number earlier that it otherwise would be available, but that is a bit of an obscure trick.
 
Back
Top