A way to do partial bab/saving throw bonuses? And hello from a new HL user
Hi folks. First let me say that I'm loving Hero Lab. I'm just now looking around the forums and trying to figure out all that I can do with this application.
Second, I'm wondering if there's a way currently to do partial bab and saving throw bonuses in HL? For instance, if you have a Clr 1/Mk 1, if you add the 0 bab that each class gets the character would of course have a bab of 0. Partial bab says that a Clr 1 and Mnk 1 really have a 3/4 bab, so adding them would give the character a 1.5, rounded down to +1 bab. Similar concept can be applied to saving throw bonuses as well. |
This is do-able, but I'm afraid it's going to be very complex to implement (time consuming and with fiddly math, rather than difficult). I'm afraid we want to get an update for HL out soon, and I'm behind where I should be, so I won't have the time to work out the full script for a few days. In the meantime, I'll give a quick outline of the steps and code involved. Maybe one of your fellow users can run with that and tell you how to write the actual script. If not I'll do so late this week or early next week.
This will all go in an Eval Script on a Mechanic. Start by checking if the character has racial HD: Code:
if (hero.tagis[Hero.RacialHD] <> 0) then Code:
Next, search through all the classes on the hero: Code:
Once that's all done, you can round off the variables, and add the results to the attack and saves. |
Awesome, thanks Mathias. I'm learning my way around the editor still. I'll take a crack at it at some point, after I've gotten all the other stuff for my players set up (custom traits, etc).
|
Quote:
|
I have implemented the script; I think it's OK:
They all go in mechanics, in the post-levels phase (we need to do this after the levels phase, and the post-levels (user) is too late). The script for BAB: Code:
var dummybab as number Code:
var dummyfort as number Now I'm looking for a way to activate/deactivate the mechanic... |
Activation/Deactivation is a simple matter - In the sources option, which is the last thing on any editor entry, assign this mechanic to a new source (probably one in the house rules section) - that way the mechanic will only be active while the source is checked.
Thanks for working this through for me. I apologize that I wasn't able to get back to this. |
In terms of the good saves, the prestige class's good save progression is not equal to the regular class's good save progression - 2.
Also, don't forget that the user might have taken more than one base class, so I don't think you can just give the +2 only once. |
Sorry to hit you again, but once thing that may cut a bit of typing:
in Hero Lab, X = X + Y can be written as: X += Y That means that: hero.child[svFort].field[svBase].value = hero.child[svFort].field[svBase].value +2 can be written as: hero.child[svFort].field[svBase].value += 2 |
Quote:
good : floor ((prc_level+1)/2) poor : floor ((prc_level+1)/3) (in fact, it's just another way to round a non-integer result: Pathfinder don't round down for prc save). Then, the difference between the prc save and the fractional save is: good : 0.5*prc_level - int(0.5*prc_level+0.5) poor : prc_level/3 - int(prc_level/3+1/3) As a related note, sometime I add 0.01 inside the "int" functions. It's because it seems that for the computer, 1/3+1/3+1/3<1, and then int(1/3+1/3+1/3)=0. Therefore I add 0.01: int(1/3+1/3+1/3+0.01)=1. Since the minimum possible difference is 1/6 (the difference between 1/2 and 1/3), and that 0.01 is lower than 1/6, it shouldn't be a problem; but maybe there is a prettiest way. In the case of prc save, it's important at least for a poor save: poor : prc_level/3 - int(prc_level/3+1/3+0.01) Note that the result can be negative (eg for a good save and prc_level=1, or a poor save and prc_level=2); that why I create a floor function afterward (the floor function doesn't seems to be intrinsic). Quote:
gsvcount start at 0, and is increased by 1 each time a race or a base class has a good save; the counter isn't modified by prc. gsvflag start at 0, and if the script find a prc with a good save, the flag becomes 1. Then, at the end of the script: * if gsvcount is 2 or more, we have too many +2 bonus from high save of base class: I remove the difference (2*(gsvcount-1)). * if gsvcount is 0 and gsvflag is 1, there is no base class with high save (since gsvcount is 0), but one prc with good class. If you use the unearthed arcana rule, you should add 2 to the save, but it's debatable in Pathfinder (since the prc don't give the +2 bonus for high save, or even a +1 bonus: Pathfinder didn't intend to add a flat bonus to high save for prc), but I decided to add it. I could do both with only one "if" statement (if (gsvcount>0) then remove 2*(gsvcount-1) (comment: it's 0 if gsvcount=1), elseif (gsvflag=1) (comment: in this case, we have gsvcount=0: no base class with high save) then add 2, endif). :/ Edit: as you see, I'm not a beginner in programing, but I'm a total beginner in XML and hero lab; probably there are some better way to do the same script. ;) Edit 2: the rule I wanted to script (to be sure we use the same): * for each level of a class, add: ** 1/2 for a good save ** 1/3 for a poor save * then, after each contribution of each class have been added, round down. * if at least one class gives a good save (be it a base class or a prestige class), add +2 to the final base save. |
Is this a house rule?
I can't find anywhere in Pathfinder it says that this case even exists...+0+0 = 0. >.> |
All times are GMT -8. The time now is 03:58 AM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.