Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
DaggerdaleDM
Member
 
Join Date: Dec 2006
Posts: 62

Old November 24th, 2007, 05:39 PM
I am now working on a special ability that has a bonus that increments at a different rate for each class. It is a reputation bonus.

As an example the Assassin's Reputation bonus is:
levels 1 - 3 +0
levels 4 - 7 +1
levels 8 - 11 +2 and so on.

I want the output for the special abilities on the Character sheet to show "Reputation Bonus" with the correct number. Is this possible? Anyone know how to do this? I am just a DM that can sort of hack his way around some very basic scripting.

If this is possible I could use this type of thing for other custom abilities that are just numbers.
DaggerdaleDM is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 25th, 2007, 07:43 AM
Look at the Barbarian's Rage (1/day) - that shows how the number of uses per day is calculated based on level. The dwarven defender's AC Bonus +1 shows a similar bonus being used to alter the character's stats (Dodge AC in that case, but you can figure out how to apply it to whatever skills or other things the rep bonus modifies).
Mathias is online now   #2 Reply With Quote
DaggerdaleDM
Member
 
Join Date: Dec 2006
Posts: 62

Old November 25th, 2007, 08:40 AM
Thank you, I'll look at those examples.
DaggerdaleDM is offline   #3 Reply With Quote
DaggerdaleDM
Member
 
Join Date: Dec 2006
Posts: 62

Old November 25th, 2007, 09:31 AM
After hacking through the examples you pointed me to, I came up with the following which does the job nicely.

~ Get Level
var level as number
level = field[xTotalLev].value

~ Reputation Bonus.
var total as number
total = 0 + (level / 4)
total = round(total, 0, -1)
field[hTotal].value += total
field[livename].text = "Reputation + " & total & ""


But now I am stumped on the next issue. Lets say I have a character that is multi classed. Each class has a reputation bonus progression as above and they have 4 levels in each class. How do I get the Reputation bonus to add up for each class and display properly?
DaggerdaleDM is offline   #4 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old November 25th, 2007, 12:47 PM
At 10:31 AM 11/25/2007, you wrote:
Quote:
var total as number
total = 0 + (level / 4)
total = round(total, 0, -1)
FYI. A faster solution would be to eliminate the use of "round", which would look like the following:

total = (level - level % 4) / 4

The "level % 4" gives you the remainder after dividing by 4. For a value of 3, the remainder is 3. For a value of 6, the remainder is 2.

Subtracting the remainder from the initial value leaves a number that is equally divisible by 4 and yields the value you want, without having to round off a fractional value.

If using "round" makes more sense to you, it's fine to use it. I just figured I would throw out this suggestion in case it's clearer.
rob is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 25th, 2007, 04:15 PM
I haven't played around with something like that, yet, but it sounds similar to the way sneak attack or turn undead are handled, since those can come from multiple classes.

Quote:
Originally Posted by DaggerdaleDM
But now I am stumped on the next issue. Lets say I have a character that is multi classed. Each class has a reputation bonus progression as above and they have 4 levels in each class. How do I get the Reputation bonus to add up for each class and display properly?
Mathias is online now   #6 Reply With Quote
huntercc
Senior Member
 
Join Date: Jul 2007
Location: Syracuse, NY (USA)
Posts: 213

Old November 25th, 2007, 05:43 PM
Looks like all you need to do is create a "Special" in the editor, call it Reputation. You can hit "New (Copy)" and choose Sneak Attack, then modify as you need to. Then go into each class and copy the class specials for Sneak Attack, but make them apply to Reputation instead.

You may have to experiment with the eval code to get the right results if you want the overall bonus to be based on the sum of the class levels. For example, a character with 6 levels of Assassin and 6 levels of Rogue would have 12 class levels... by your math above, this character would get a +2 instead of a +3. You can get it to calculate a +3 if you put the eval code on the initial Reputation thing rather than the class specials, then you could get rid of the class specials and just bootstrap the Reputation thing. I just don't know how that would be affected by monster class levels.
huntercc is offline   #7 Reply With Quote
Reply


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 08:06 PM.


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