Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old November 19th, 2017, 01:15 PM
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
ErinRigh is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old November 19th, 2017, 01:29 PM
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.
ShadowChemosh is offline   #2 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old November 19th, 2017, 06:58 PM
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
ErinRigh 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 November 19th, 2017, 09:12 PM
Quote:
Originally Posted by ErinRigh View Post
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".

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   #4 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old November 20th, 2017, 05:57 AM
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?
ErinRigh 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 November 20th, 2017, 09:16 AM
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

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   #6 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old November 20th, 2017, 10:44 AM
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?
ErinRigh 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 November 20th, 2017, 10:56 AM
Quote:
Originally Posted by ErinRigh View Post
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.

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

Old November 20th, 2017, 11:05 AM
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.
ShadowChemosh is offline   #9 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old November 20th, 2017, 11:47 AM
Nope that made perfect sense, thanks, I think I am ready for my 5thgrade test
ErinRigh is offline   #10 Reply With Quote
Reply


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 08:39 AM.


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