• 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

help with attack bonus adjustment (Divine Power)

clavin123

Active member
I have a cleric that uses Divine Power a lot and was trying to set-up a custom "condition" that I can just check when he activates it.

The HP and Strength enhancement are working fine, but I can't get the bonus to Base Attack to work correctly. I have no trouble simply adding to the attack bonus, but when I try to make the system increase the actual base attack bonus (so that the extra attack will appear if applicable), I can't do it.

Here is what I have coded, can someone with a lot more experience tell me what I am doing wrong?

~ Make our Base Attack Bonus equal to total character level

if (hero.child[Attack].field[tAtkBase].value < #totallevelcount[]) then
hero.child[Attack].field[tAtkBase].value = #totallevelcount[]
endif

(I am pretty sure the "if/then" is not necessary, but just it is possible to have a tAtkBase that is greater than total levels, I put in there.)

I think my problem is linked to priority level given how I am coding this.

Using an 11th level pure cleric as my test case (#totallevelcount[] = 11 while the tAtkBase = 8). The bonus should be a 3, adding an extra attack, but it is not working.

When I set priority at "pre-levels" the bonus applied is that of the #totallevelcount[]. (The result is Base Attack of +19/+14/+9/+4.) This makes sense to me as it is setting the AtkBase at 11 and then adding the 8 additional points from his cleric levels.

However, when I set the priority to anything later (and I tried each of the user priority levels), something happens, but it is wrong. I end up with Base Attack of +8/+3/-2. It is pretty clearly adding a bonus that then triggers (correctly) the 3rd attack, but then it does not apply the bonus (or the bonus gets stripped out later).

Help would be greatly appreciated.
 
I made this code to add extra attacks from BAB to the Kolyarut's natural attacks.

foreach pick in hero from BaseWep where "SpecSource.rIneKolyar"
each.field[wNumAttTbl].arrayvalue[0] += 1
nexteach

Maybe you can find a way to modify the script to look at each weapon, compare the BAB and add the appropriate number of attacks? The important thing is how to modify the number on the table, right?
 
I have this working thusly:

Post-Levels/9000 (this is key, since at 10000 the attack bonuses are calculated)
Code:
~ If we're not enabled, get out now.
doneif (field[pIsOn].value = 0)

~ Add to our Strength.
#enhancementbonus[hero.child[aSTR], 6]

~ Change our base attack bonus.
hero.child[Attack].field[tAtkBase].value = #totallevelcount[]

And this bit for the temporary hit points.
Final Phase/10000
Code:
~ If we're not enabled, get out now.
doneif (field[pIsOn].value = 0)

~ Add temporary hit points.
herofield[tCurrentHP].value += field[pAdjust].value
 
As far as I can tell, what I have listed is working for me. It is changing the Base Attack as well as the other things. It's all with the timing there.
 
How do I add the condition box to the chart?

Also thanks for the reply.

Nevermind I just had to restart HeroLab
 
Last edited:
One caveat, I haven't really found a good way to do the temporary hit points. What I mean is, I've found out that adding to the temporary hit points doesn't work exactly like temporary hit points.

For example, let's say you have 10 hit points, and you get 8 temporary hit points. If you then take 4 damage, then you lose the temporary hit points (essentially turn it off), it doesn't set your hit points back to 10, but sets it at 6. Therefore, even though I have coded it thusly, it might be better implemented to track the temporary hit points outside of the divine power, such that when divine power goes down, you don't need to uncheck the temporary hit points as well and won't need to adjust them unless your hit points still exceed your maximum. Food for thought.
 
For the Spell Adjustments I built for Pathfinder I use the counter to set the number of Temp HP a spell gives. Then my note to the gamers is to LOWER the counter first to represent the idea of Losing Temp HP first.

So Using your example the Counter would be set to 8 and then when they took 4 damage you lower the counter to 4. If you have any left over damage you have to apply to to the normal HP In-Play tab area.

Its not perfect but it does work. From play testing in my game it has worked out "ok" but nothing else seemed to be any better.

The only difference would be what I did for the Stoneskin adjustment. I added a Tracker that set its value to the Counter amount of the adjustment. This way the tracker shows up in the In-Play tab right where the HP gets tracked. Again not sure this works as well in d20 as the Tabs are laid out different.
 
In the d20 stuff, I'm not aware of being able to create a tracker. I wish it was, but I've used a charge to track the Stoneskin effect. Not perfect I know. As for temporary hit points, I've done the same thing in the past, but I find it easier to just do it from one source, the HP. If the current HP are greater than the maximum HP when the effect expires, rather than uncheck it, I just bring the current HP down to the maximum HP, otherwise, I don't do anything. Much easier to do IMHO.
 
I have divine power fully scripted in my spell adjustments project. It adds temp Hp using the tracker mechanism. It'll be in dropbox for v1.7 release!
 
That is cool. In the meantime would you mind sharing how did you add the temp Hp to the tracker?

Apologies, I meant the tracker increases the actual hit point total not the temp Hp total. As it's based on caster level I decided to increment the tracker to the correct level then decrease it accordingly to simulate the temp hit point loss.
 
I am trying to figure out how to adjust the eval script to not add the strength bonus on the to hit if the character is using weapon finesse. Any ideas?
 
Last edited:
You shouldn't have to script this, Weapon Finesse when active will always use the Dex bonus (if it is higher than the Str bonus) while using a finesse weapon. My guess is, since the Str bonus usually ends up higher than the Dex bonus while using Divine Power, it defaults to the Str bonus.

Weapon Finesse doesn't enforce usage of the Dex bonus, it only says you "may" use it instead, and defaults to the higher bonus.

Try a test by increasing the Dex bonus to higher than the Str bonus, I think you'll find the Weapon Finesse will kick back in on the Dex bonus.
 
Thanks bodrin. I had a "working copy" it was just that the difference was so large I thought it had to be wrong. Now that I look the difference between the two is that you added strength pre and adjusted bab post.
 
Hey provos i've attached my work in progress Spell adjustments file it includes Divine Power.

Bodrin (et. al.)...

As I mentioned in a private message to Bodrin, I've also been adding adjustments and the like to my own files. I've attached a file of them here. Would appreciate any comments and if they look good (particularly the spell ones, but the feats and class abilities, too), I'll push them forward for the 1.7 user content release.

Thanks.

Jonathan
 

Attachments

Back
Top