Member
Join Date: Feb 2010
Posts: 33
|
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. |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
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? |
#2 |
Member
Join Date: Feb 2010
Posts: 33
|
Thanks for the suggestion. Will see if I can get something to work!
|
#3 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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[] 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 |
#4 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
Did anyone get the BAB working for this?
Thanks |
#5 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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.
|
#6 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
How do I add the condition box to the chart?
Also thanks for the reply. Nevermind I just had to restart HeroLab Last edited by Provos; August 14th, 2011 at 11:15 PM. Reason: clarification |
#7 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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. |
#8 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#9 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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.
|
#10 |
|
|