|
Senior Member
Join Date: Jun 2010
Location: Beaverton, OR
Posts: 267
|
I am trying to code the water rat feat from savage tide adventure path. I am trying to get it to disable the feat if you are in medium/heavy armor, encumbered, or fatigued or exhausted. I got most of it to work but am having trouble with the fatigue and exhausted line. This is the code I used. On a second note I have no education in programing. Where is a good book/web resorce I could use to learn the basics to program herolab?
elseif (hero.tagis[pcnFatigue] + hero.tagis[pcnExhaust] <> 0) then result = assign[Helper.SpcDisable] done The full code is listed below. ~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) var result as number ~ If we fail the test for being speedy, get out if (hero.tagis[Encumbered.Heavy] + hero.tagis[Encumbered.Medium] <> 0) then result = assign[Helper.SpcDisable] done elseif (hero.tagis[Hero.MedArmor] + hero.tagis[Hero.HeavyArmor] <> 0) then result = assign[Helper.SpcDisable] done elseif (hero.tagis[pcnFatigue] + hero.tagis[pcnExhaust] <> 0) then result = assign[Helper.SpcDisable] done endif #skillbonus[skSwim] += 2 if (#skillranks[skSwim] >= 10) then #skillbonus[skSwim] += 2 endif |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Here is the fix for the line in trouble.
Code:
elseif (hero.childfound[pcnFatigue].field[pIsOn].value + hero.childfound[pcnExhaust].field[pIsOn].value <> 0) then result = assign[Helper.SpcDisable] done endif Otherwise you where really close to having it... Hope that helps. 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
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Quote:
You can access the Authoring Kit via the Windows Start menu, as it is listed in the group of shortcuts next to Hero Lab itself. Alternately, you can go there directly via the URL below: http://hlkitwiki.wolflair.com/index.php5?title=Home The most important sections are "Basic Concepts and Terminology" and "Kit Reference". Hope this helps! |
|
#3 |
Senior Member
Join Date: Jun 2010
Location: Beaverton, OR
Posts: 267
|
Thank you both for the info. I am now tryimg to add a swim speed that is equal to your land speed. I know how to bootstrap it but I need it to turn off if in armor or encumbered. This is the code I tryed with many varibles of the same.
hero.child[xSwim].field[Value].value = hero.child[Speed] I am not even sure if this will give the special ability of swim if I figured out the value error. |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Go to the "R Cust Spec" tab, and make a copy of the "Additional Movement: Swim (rcEiSwim)" ability - that ability gives Animated Objects a swim speed equal to their land speed, so copy that (including its timing - there's a limited window between when land speed is finished and when swim speed is finished).
Also, take a close look at how that ability bootstraps swim - it adds an abValue of 5, so that there is a positive swim speed when it comes time to check whether the swim skill should be a class skill at +8 (which has to happen before the land speed is calculated). |
#5 |
|
|