Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

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

Old December 5th, 2019, 02:09 PM
Ok maybe I am out of my depth here but I need some help with the code for a racial special ability.

Basically, I need the ability to check for wild empathy, and if so add a bonus to a variable racial ability.

I have figured out the code for the variables but I can't find any explanation anywhere explaining how I get it to search for wild empathy? please help!
ErinRigh is offline   #1 Reply With Quote
TobyFox2002
Senior Member
 
Join Date: Nov 2013
Location: Andover, Ma
Posts: 618

Old December 5th, 2019, 02:15 PM
Code:
  if (#hasability[cWildEmp] <> 0) then
     do stuff...
  end
When searching for how to check for various specials, the best place to look is for feats. Open a portfolio and type in "requires Wild Empathy" or whatever you require, and then open that feat in the editor.
TobyFox2002 is offline   #2 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old December 5th, 2019, 02:43 PM
thanks mate
ErinRigh is offline   #3 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old December 5th, 2019, 03:02 PM
Ok what am I doing wrong?
Post Attr/10000
Code:
if (#hasability[cWildEmp] <> 0) then
     field[abValue].value += hero.child[Totals].field[tHitDice].value + hero.child[aCHA].field[aModBonus].value + 4
  else
     field[abValue].value += hero.child[Totals].field[tHitDice].value + hero.child[aCHA].field[aModBonus].value
  endif
ErinRigh is offline   #4 Reply With Quote
Aaron
Senior Member
Lone Wolf Staff
 
Join Date: Oct 2011
Posts: 6,792

Old December 5th, 2019, 03:07 PM
HasAbility tags are not forwarded to the hero until way late. They are basically only for checking if pre-reqs are satisfied. Try using "hero.childlives[cWildEmp]" in the first branch of your code instead.
Aaron is offline   #5 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old December 5th, 2019, 03:10 PM
thanks Aaron
ErinRigh is offline   #6 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,727

Old December 5th, 2019, 03:10 PM
#hasability uses hero tags that are processed very late in timing as its meant for Pre-Req's not for standard checking. Meaning I assume your problem is that you always getting the bottom calculation.

The easy way is to fix the IF statement to check for the hero ability tag.
Code:
if (hero.tagis[Ability.cWildEmp] <> 0) then

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

Old December 5th, 2019, 04:17 PM
cool, that'll work too, thanks SC
ErinRigh is offline   #8 Reply With Quote
Reply

Thread Tools
Display Modes

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 03:05 AM.


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