Member
Join Date: Oct 2011
Location: Browns Mills, NJ
Posts: 75
|
I'm working on a class that grants an initiative bonus as it increases in level. I tried both
hero.child[Initiative].field[Bonus].value += 1 & #applybonus[BonTrait,hero.child[Initiative],1] and both seem to give the test character the combined total of the bonuses at 1st level, rather than as they go up in level. Is there a way to do this? |
#1 |
Member
Join Date: Oct 2011
Location: Browns Mills, NJ
Posts: 75
|
I'm going to guess not on this one? The class in question gains an initiative bonus at level 1, 5, 10, 15, and 20; I can't seem to find an ability code-string that doesn't grant the whole +5 bonus as soon as you take a level in the class.
|
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
If you are doing a +1 Initiative per level, why are just adding 1 to it? It will only add the bonus once this way, You should try setting it equal to #levelcount["class"] where "class" = the name of the class you're building. This will give it the bonus equal to the class level, basically getting the incrementation you are seeking.
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
The important parts are to use the xCount and xIndex fields so that you don't have to even know or care what class you are bootstrapped to. Then its to check for the "Helper.ShowSpec" tag as that is what controls the being active at a specific level. Post Level 10,000 Code:
~if we've been replaced, get out now doneif (tagis[Helper.SpcReplace] <> 0) ~Set the list name field[listname].text = field[thingname].text & " (" & field[xIndex].value & "/cold iron)" ~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] = 0) ~ Set count value to abValue so we can be adjusted by outside things field[abValue].value += field[xCount].value ~ Change live name to include the amount of DR field[livename].text = field[thingname].text & " (" & field[abValue].value & "/cold iron)" ~ Actually apply the DR amount to the hero #applydr[xDamRdIron,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. Last edited by ShadowChemosh; August 14th, 2012 at 09:39 PM. |
|
#4 |
Member
Join Date: Oct 2011
Location: Browns Mills, NJ
Posts: 75
|
Quote:
I've tried just using hero.child[Initiative].field[Bonus].value += 1 (incrementing it individually at each level, but even when I use ClSpecWhen it still gives the total accumulated bonus at 1st level). |
|
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
So try just: Code:
hero.child[Initiative].field[Bonus].value += field[abValue].value So in example you have a feat that gives a +1 bonus to this class ability. The feat could then be coded as so: Code:
hero.childfound[cTHING_ID].field[abValue].value += 1 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. Last edited by ShadowChemosh; August 16th, 2012 at 02:37 PM. |
|
#6 |
Member
Join Date: Oct 2011
Location: Browns Mills, NJ
Posts: 75
|
Quote:
Say I have a Class Special Ability called Quick to Act (+1) and four copies (+2 - +5) that the character gains as they go up in level. The first class special, cQ2A1, gets hero.childfound[cQ2A1].field[abValue].value += 1 hero.child[Initiative].field[Bonus].value += field[abValue].value and then the next class special, cQ2A2 gets just hero.childfound[cQ2A1].field[abValue].value += 1 ? I tried that and it just seemed to give the first character level a +5 init bonus. (both in eval-scripts, yes?) |
|
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
So your class thing is called "cQ2A1". You only need this class ability ONE TIME. You don't need to make multiple copies of the same class ability. You bootstrap cQ2A1 five times to your Class setting the level it becomes active (ie 1,4,7,10,13). The exact levels do not matter. The script does not care what level you bootstrap too. You can change those levels as often as you want and not have to change the script at all. I could later change to be 1,2,3,4,5 and it will work just the same with no changes to the script. Then on your one class Thing, cQ2A1, you put the following script at post-levels 10,000: Code:
~if we've been replaced, get out now doneif (tagis[Helper.SpcReplace] <> 0) ~Set the list name field[listname].text = field[thingname].text & " (+" & field[xIndex].value & ")" ~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] = 0) ~ Set count value to abValue so we can be adjusted by outside things field[abValue].value += field[xCount].value ~ Change live name to include the amount of DR field[livename].text = field[thingname].text & " (+" & field[abValue].value & ")" ~ Actually apply the init amount to the hero hero.child[Initiative].field[Bonus].value += field[abValue].value So the above is the FULL script you use. All of it as is. The only part you where meant to change was the very last line to instead of giving DR you gave a bonus to init. Otherwise the code is meant to only activate on the levels it has been bootstrapped too. The lines with a ~ in front are comments as an FYI so if you read them it should help explain what the actual code is doing. I hope this is more clear and I am sorry if not. I am sure how else right now to present the info. I attached a picture to this post. It shows where I have bootstrapped the same class Thing multiple times. Yet in the class itself it shows each instance of the same ability improving from DR 1 to DR 5 and its all working using the script I posted above. 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. |
|
#8 |
Member
Join Date: Oct 2011
Location: Browns Mills, NJ
Posts: 75
|
Thank you so much. You have all been a great help!
|
#9 |
Thread Tools | |
Display Modes | |
|
|