Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
Ok, I need help. Here is my feat. It's broken atm but I need help with some scripting I've never used before.
What I need to do is check if an ability like the Goliath's Powerful Build ability is present. If it is I need add +1 to iCount. This allows abilities like Powerful Build to stack with the Brawny feat. (I've highlighted the sample script in red). I tried using the #hasability macro but it wasn't detecting the presence of the 'ra5CEEMoBo' for some reason. I think I should be using findchild but am unsure how to go about it. I am shamelessly asking ShadowChemost for advice. Phase: Post-attributes, Priority: 11000 Quote:
Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
|
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
So your checking the HasAbility.? tag on the Child. Sort of different but basically it should work except when using hero.child[] it should be throwing an error when the racial ability is not found.
The easy way here is to look for the Ability tag on the hero which should get placed pretty early. Otherwise the hero HasAbility.? tag is not placed until really late as its meant to be used by Pre-Req scripts. Try this for an easy solution: Code:
~ Goliath's Powerful Build ability if (hero.tagis[Ability.ra5CEEMoBo] <> 0) then iCount += 1 endif Code:
~ Goliath's Powerful Build ability LIVE on the Hero if (hero.childlives[ra5CEEMoBo] <> 0) then iCount += 1 endif 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: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
I'll look at it tomorrow. It should fix my issues I think.
hero.child[] was throwing errors and that was what was driving me batty. childlives is new to me though. I'll have to remember it and add it to my list of commands. Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
I sort of said that about hero.child[]. You could also replace the logic with hero.childfound[] instead and then you won't get an error message.
hero.child[] says the Pick "must" exist Live on the hero or throw an error to the user. hero.childfound[] says do stuff to a Pick "if" found else do nothing. 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: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
Quote:
Many, many thanks. Now I just have to figure out where my problem is with elf Keen Sight perception and my Perceptive feat script and the Unearthed Arcana Skill feats are complete and I'll move on to the racial feats. Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
|
#5 |
|
|