• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

class level based initiative bonus?

TalMeta

Well-known member
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?
 
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.
 
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.
 
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.
 
Last edited:
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).
 
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.
 
Last edited:
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. :confused:

(both in eval-scripts, yes?)
 
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.
 

Attachments

  • Image1.jpg
    Image1.jpg
    165.5 KB · Views: 16
  • Image3.jpg
    Image3.jpg
    132.1 KB · Views: 10
Back
Top