Member
Join Date: Jul 2011
Posts: 56
|
Hi all,
I am trying to add a class special from the old Conan RPG, working on a dataset for a pathfinder game here, so converting it over more or less. The special ability is called Seductive Art. What it does is at level 2 it adds a +1 to several skills. It does this every 4 levels thereafter as well. Now I seem to have the bonuses working fine, except that when it adds the bonus it is adding a +2 each time instead of just a +1. What am I doing wrong or not doing? This is the code i am using: Code:
var levels as number levels = #levelcount[temptress] if (levels >= 2) then hero.child[skDiplo].field[BonComp].value += 1 hero.child[skIntim].field[BonComp].value += 1 hero.child[AllPerform].field[BonComp].value += 1 hero.child[skSenseMot].field[BonComp].value += 1 endif if (levels >= 6) then hero.child[skDiplo].field[BonComp].value += 1 hero.child[skIntim].field[BonComp].value += 1 hero.child[AllPerform].field[BonComp].value += 1 hero.child[skSenseMot].field[BonComp].value += 1 endif if (levels >= 10) then hero.child[skDiplo].field[BonComp].value += 1 hero.child[skIntim].field[BonComp].value += 1 hero.child[AllPerform].field[BonComp].value += 1 hero.child[skSenseMot].field[BonComp].value += 1 endif if (levels >= 14) then hero.child[skDiplo].field[BonComp].value += 1 hero.child[skIntim].field[BonComp].value += 1 hero.child[AllPerform].field[BonComp].value += 1 hero.child[skSenseMot].field[BonComp].value += 1 endif if (levels >= 18) then hero.child[skDiplo].field[BonComp].value += 1 hero.child[skIntim].field[BonComp].value += 1 hero.child[AllPerform].field[BonComp].value += 1 hero.child[skSenseMot].field[BonComp].value += 1 endif |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
That script is sort of the "brunt" force approach to doing class abilities.
Use this script which is the same script you will use for 80% of class abilities. It runs at Post-Level/10000. Then you just bootstrap the ability to the class multiple times at the correct levels and each time it increases its bonus by 1. Way easier to use generic scripts than ones with hard-coded class ids and stuf as it prevents you from ever re-using the class ability with a different class, PrC, or Archetype. Code:
~ Set the list name field[listname].text = field[thingname].text & " " & signed(field[xIndex].value) ~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] <> 1) ~ if we've been disabled, get out now doneif (tagis[Helper.SpcDisable] <> 0) ~ Calculate our "plus" here based on level and how many times ~ we are bootstrapped to the class. field[abValue].value += field[xCount].value field[livename].text = field[thingname].text & " " & signed(field[abValue].value) ~ The following should only happen once on the first copy doneif (tagis[Helper.FirstCopy] = 0) hero.child[skDiplo].field[BonComp].value += field[abValue].value hero.child[skIntim].field[BonComp].value += field[abValue].value hero.child[AllPerform].field[BonComp].value += field[abValue].value hero.child[skSenseMot].field[BonComp].value += field[abValue].value 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. |
#2 |
Member
Join Date: Jul 2011
Posts: 56
|
OK, thanks. I'm not a programmer so i just take from what i can find and modify as much as I can. I'm not really past brute forcing something to work
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
You just need to change the logic to your specific class ability after this: Code:
~ The following should only happen once on the first copy doneif (tagis[Helper.FirstCopy] = 0) 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. |
|
#4 |
|
|