• 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

I get by with a little help

ErinRigh

Well-known member
Well my 4th grader ability has ran into a snag. I have an ability that tracks uses per day based on level creating an abValue string for uses per day.

Basically 1 + 1/5 class levels.

That isn't a problem.

What is a problem is, I want to add the ability to Tracked resources to track uses per day (no problem so far) but I want the uses to be equal to the abValue and I don't know how to code that?

To be clear, I can get it to track uses per day on the class tab and the specials tab and I can get it to display on the tracked resources, but I don't know how to make the tracked resources give a maximum of 1 + 1/5 levels.

Even if you could point me at an ability which does this it would be great
 
HERE is a post where I show how to use a Generic Class script that will work 95% of the time for class abilities that gain +1 bonuses at specific levels.

This is the same logic you will find in all over the community Pack. :)
 
Actually it doesn't grant a bonus at levels it grants uses per day and I can't figure out how to translate the script so that it will translate uses per day to something trackable on the in-play tab
 
Actually it doesn't grant a bonus at levels it grants uses per day and I can't figure out how to translate the script so that it will translate uses per day to something trackable on the in-play tab
Bonus, uses per day, all mean he "exact" same thing. Its a "value" that increases as the character gets to specific levels.

Scripting means to thinking in more generic terms. Once you have the "value" stored in "abValue" you can do whatever you want with it. ;)

Instead of giving a bonus to stealth you give it to the tracker:
Code:
~ The following should only happen once on the first copy
doneif (tagis[Helper.FirstCopy] = 0)

field[trkMax].value += field[abValue].value

Here I give a bonus to attack:
Code:
~ The following should only happen once on the first copy
doneif (tagis[Helper.FirstCopy] = 0)

hero.child[Attack].field[Bonus].value += field[abValue].value

Here I give a bonus to AC:
Code:
~ The following should only happen once on the first copy
doneif (tagis[Helper.FirstCopy] = 0)

hero.child[ArmorClass].field[Bonus].value += field[abValue].value

All the same exact logic until the final line of code. Its just a "value". :D
 
Thanks SC that really helps, but I can't figure out the timing to make it work. Here is my code, does it look alright? Because the tracker thing isn't working


Post Levels/10000
Code:
      if (#levelcount[Gladiator] >= 20) then
        field[abValue].value += 4
      elseif (#levelcount[Gladiator] >= 15) then
        field[abValue].value += 3
      elseif (#levelcount[Gladiator] >= 10) then
        field[abValue].value += 2
      elseif (#levelcount[Gladiator] >= 5) then
        field[abValue].value += 1
      else
        field[abValue].value += 0
        endif

      ~List beast handler with uses per day

      field[livename].text = "Tier 1: Beast Handler " & field[abValue].value & "/day"

~ The following should only happen once on the first copy
doneif (tagis[Helper.FirstCopy] = 0)

field[trkMax].value += field[abValue].value

So why won't it show up on the tracker? Timing?
 
First off that is not a generic scrip that I pointed you too. You are still trying to do levels in the script which is not correct. The script I pointed you to does NOT care about levels. It cares about the number of times you bootstrapped the ability to the class.

This also means you can change the levels if the ability gets reused by another class or an archetype.

This is the complete script and notice NO levels are hard-coded:
Post-Levels/10000
Code:
      ~ Set the list name
      field[listname].text = field[thingname].text & " " & field[xIndex].value & tagnames[Usage.?]

      ~ 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)

      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)

      field[trkMax].value += field[abValue].value

That is the WHOLE script 100% of it. Now you bootstrap it to the class at level 1, 5, 10, 15 & 20. The BOOTSTRAPPING tells the script how to advance the bonuses. This is called "soft-coding" meaning you can easily adjust the levels from outside of the script. :)

To make the tracker value show up you must TELL HL that you want to display on the in-play tab. You look at the "Charge Information" section of the Class->Class Special tab. Then check mark the "Show in Tracked Resources List?" and the Usage Period to set how often this should be.
Charges.jpg
 
Oh ok! That's not what I need at all!

The ability isn't dependent on level it is available at any level from a selected list, once taken, the uses per day are based on level, so even if the character doesn't take the ability until 9th level, he still gets multiple uses per day at 1st and 5th level for a total of 2 uses per day, and will gain a 3rd use at 10th level. But the ability is optional, so I am not certain how to bootstrap it?
 
Oh ok! That's not what I need at all!

The ability isn't dependent on level it is available at any level from a selected list, once taken, the uses per day are based on level, so even if the character doesn't take the ability until 9th level, he still gets multiple uses per day at 1st and 5th level for a total of 2 uses per day, and will gain a 3rd use at 10th level. But the ability is optional, so I am not certain how to bootstrap it?
That is called a Custom Ability then NOT a "Class Ability". I got confused because you kept using the term Class Ability.

So a "Class Ability" is bootstrapped to a class and they get it at a "Specific" level.

A "Custom Ability" is something chosen like a Barbarian Rage, or Witches Hex, or a Rogue Talent.

Sorry I got confused. :(

In that case the logic you had for hard-coding the levels could be used or you could simply use math of gaining a bonus every 5 levels. The "Tracker" stuff I showed is still valid as Tracker is the same logic for either.

So instead of locking yourself to a specific class you get the class level you are attached from directly from the Custom Ability fields. This is VERY important to do because I expect you to have Feats or Magic Items that increase the "Effective" level of this or other abilities later
Post-Levels/10000
Code:
~ If we've been Disabled, get out now
doneif (tagis[Helper.SpcDisable] <> 0)

~ Set intial use of one use
field[abValue].value += 1

~ increase number of uses by every 5 levels the class has
field[abValue].value += round(field[xTotalLev].value/5,0,-1)

~ Set the number of uses per day.  The "Tracker" tags will
~ will take care of all the wording.
field[trkMax].value += field[abValue].value

The above is the code you need.

1) First is the "Stop Script" so you can disable this logic if you want.
2) Set the uses to be 1 to abValue. This is helpful as it allows other outside scripts to easily adjust this value if you need to later.
3) Simple rounding math that says give a +1 bonus per 5 levels the character has. This is attached to this the level value on the Custom Ability. This allows outside script to give "Extra Effective" levels to increase this value.
4) Add the tracker max field. This is what is displayed on the In-Play tab if you actually have the correct "TAGS" set I showed above.
 
Last edited:
Sorry if I am going too quick here. But I am trying to help while fixing the Pack issues. Just don't have the time to write out really long help stuff. :(
 
He SC, this code works great but what would I alter so that it only checks for levels in my Gladiator class (cHelpGld/cGladiator)?
 
He SC, this code works great but what would I alter so that it only checks for levels in my Gladiator class (cHelpGld/cGladiator)?
Nothing it already is doing that. xAllLevels is the field on the custom ability that is pulling the level from the class it gets added too.

In this case the Gladiator. But if an archetype gave the ability to the fighter it would be the fighter class. That is why its better to use generic fields instead of hard-coding to a specific class.
 
Back
Top