Senior Member
Join Date: Oct 2016
Posts: 621
|
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 |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. 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 |
Senior Member
Join Date: Oct 2016
Posts: 621
|
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
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
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 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 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 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 |
Senior Member
Join Date: Oct 2016
Posts: 621
|
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 |
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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 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 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. |
#6 |
Senior Member
Join Date: Oct 2016
Posts: 621
|
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? |
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
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 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. 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; November 20th, 2017 at 11:04 AM. |
|
#8 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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.
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. |
#9 |
Senior Member
Join Date: Oct 2016
Posts: 621
|
Nope that made perfect sense, thanks, I think I am ready for my 5thgrade test
|
#10 |
|
|