Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
TalMeta
Member
 
Join Date: Oct 2011
Location: Browns Mills, NJ
Posts: 75

Old August 12th, 2012, 05:28 PM
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?
TalMeta is offline   #1 Reply With Quote
TalMeta
Member
 
Join Date: Oct 2011
Location: Browns Mills, NJ
Posts: 75

Old August 14th, 2012, 06:14 PM
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.
TalMeta is offline   #2 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old August 14th, 2012, 07:25 PM
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.
RavenX is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old August 14th, 2012, 09:18 PM
Quote:
Originally Posted by TalMeta View Post
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.
Here is one of my basic Class scripts that gives a character DR Cold Iron. What happens to give it DR 2 is you bootstrap the same class special a 2nd time and give it a new level which I think you did based on your list of 1,5,10,15. In this case the class special is set for level 5 and 8. So the first time at level 5 you get DR 1/cold iron. At level 8 you get DR 2/cold iron. I could easily change the bootstraps to be different levels and not have to change the script.

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]
Does that help get you in the right direction? Maybe change out the very end where I apply the DR to instead give the bonus in field[abValue].value to Initiative instead.

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.
ShadowChemosh is offline   #4 Reply With Quote
TalMeta
Member
 
Join Date: Oct 2011
Location: Browns Mills, NJ
Posts: 75

Old August 16th, 2012, 11:59 AM
Quote:
Originally Posted by ShadowChemosh View Post
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]
Does that help get you in the right direction? Maybe change out the very end where I apply the DR to instead give the bonus in field[abValue].value to Initiative instead.
I guess I'm stumbling on the very last line, as none of the other initiative modifying strings I've encountered use language even remotely similar. Is there an analog for initiative for #applydr[xDamRdiron?

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).
TalMeta is offline   #5 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old August 16th, 2012, 02:33 PM
Quote:
Originally Posted by TalMeta View Post
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).
The point is your not trying to add ONE your trying to add the xCount value which is placed into field[abValue].value. This is a totally soft-coded script that you can use for many different things. So in my example I used it for DR but your doing it for a bonus to Initiative.

So try just:
Code:
hero.child[Initiative].field[Bonus].value += field[abValue].value
Now the bonus is based on the Counts not a hard-coded value. You could also have a feat or something else adjust the value in field[abValue].value from outside without having to make a change to this script.

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
Now we have increased the value that will be used for the class Thing by one without a single line of code change in the Class thing.

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.
ShadowChemosh is offline   #6 Reply With Quote
TalMeta
Member
 
Join Date: Oct 2011
Location: Browns Mills, NJ
Posts: 75

Old August 16th, 2012, 03:50 PM
Quote:
Originally Posted by ShadowChemosh View Post
The point is your not trying to add ONE your trying to add the xCount value which is placed into field[abValue].value. This is a totally soft-coded script that you can use for many different things. So in my example I used it for DR but your doing it for a bonus to Initiative.

So try just:
Code:
hero.child[Initiative].field[Bonus].value += field[abValue].value
Now the bonus is based on the Counts not a hard-coded value. You could also have a feat or something else adjust the value in field[abValue].value from outside without having to make a change to this script.

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
Now we have increased the value that will be used for the class Thing by one without a single line of code change in the Class thing.
I must be extra-dense today. Okay, I actually solved my dilemma a different way, but I'd like to understand what you're driving at against future need.

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?)
TalMeta is offline   #7 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old August 16th, 2012, 08:45 PM
Quote:
Originally Posted by TalMeta View Post
I must be extra-dense today. Okay, I actually solved my dilemma a different way, but I'd like to understand what you're driving at against future need.

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
Ok lets start over.

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
What I was talking about in the 2nd post you can ignore for now. It was about how a Feat could improve the class ability.

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.
Attached Images
File Type: jpg Image1.jpg (165.5 KB, 16 views)
File Type: jpg Image3.jpg (132.1 KB, 10 views)

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.
ShadowChemosh is offline   #8 Reply With Quote
TalMeta
Member
 
Join Date: Oct 2011
Location: Browns Mills, NJ
Posts: 75

Old August 17th, 2012, 02:19 AM
Thank you so much. You have all been a great help!
TalMeta is offline   #9 Reply With Quote
Reply

Thread Tools
Display Modes

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 03:38 PM.


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