Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
gauldin
Member
 
Join Date: Sep 2013
Location: Raleigh, NC
Posts: 43

Old May 1st, 2015, 01:29 PM
I'm attempting to add a version of the "Daring" Rogue Talent as a Custom Ability (I only have the core PF package). The only problem I'm having is trying to get it to display the +n bonus to Will saves vs Fear. I tried copying the code from the Bravery ability, and which gave me this eval script at Render 1000:
field[livename].text = "Daring +" & field[abValue].value
field[abSumm].text = signed(field[abValue].value) & " to Will save vs. Fear"

~only perform the calculations for the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

doneif (tagis[Helper.SpcDisable] <> 0)


#situational[hero.child[svWill], signed(field[abValue].value) & " vs. fear",field[thingname].text]
(I'd already computed field[abValue].value at the Post-levels stage).

However, this generates the error "Attempt to access filed 'listname' that does not exist for thing 'cMGDaring'".

Any pointers as to where I'm going off the rails?
gauldin is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 1st, 2015, 01:34 PM
listname is only a field that exists on class specials, so you must exclude it from that script if you are adapting it to a custom special.
Aaron is offline   #2 Reply With Quote
gauldin
Member
 
Join Date: Sep 2013
Location: Raleigh, NC
Posts: 43

Old May 1st, 2015, 01:42 PM
Ah - didn't know that, but makes sense why it wouldn't work. Is there something equivalent for Custom Specials? When it comes to getting stuff to display on the character sheet, I'm pretty much flying blind.
gauldin is offline   #3 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 1st, 2015, 01:45 PM
Custom specials show their livename in the program, and the sbName in output statblocks. Don't remember off the top of my head which field is displayed for character sheet printouts.
Aaron is offline   #4 Reply With Quote
gauldin
Member
 
Join Date: Sep 2013
Location: Raleigh, NC
Posts: 43

Old May 1st, 2015, 02:36 PM
After some playing around, I can get it to display on the statblock and on the Abilities & Gear appendix. On the main character sheet, "Daring +3 (Ex)" shows up under Special Abilities, but there's no note under the Will Save, which is what I was going for (a la Bravery). This will have to be good enough. Thanks!
gauldin is offline   #5 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 1st, 2015, 03:38 PM
The note under the will save is applied by the #situational macro, for your future edification.
Aaron is offline   #6 Reply With Quote
gauldin
Member
 
Join Date: Sep 2013
Location: Raleigh, NC
Posts: 43

Old May 2nd, 2015, 06:31 AM
So what was wrong with the #situational macro in the code above? (for future edification)
gauldin is offline   #7 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 2nd, 2015, 07:02 AM
Add some debugs and I think you'll find one of your doneifs is triggering an end to the script before the macro executes.
Aaron 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 May 2nd, 2015, 10:03 AM
Example of adding "debug". To view then go to "Develop->Floating Info Windows->Show Debug Output".

Code:
debug "Started Script"
field[livename].text = "Daring +" & field[abValue].value
field[abSumm].text = signed(field[abValue].value) & " to Will save vs. Fear"

debug "Before FirstCopy"
      ~only perform the calculations for the first copy
      doneif (tagis[Helper.FirstCopy] = 0)
debug "After FirstCopy"
debug "Before ShowSpec"
      ~ If we're not shown, just get out now
      doneif (tagis[Helper.ShowSpec] = 0)
debug "After ShowSpec"
debug "Before SpcDisable"
      doneif (tagis[Helper.SpcDisable] <> 0)
debug "After SpcDisable"

      #situational[hero.child[svWill], signed(field[abValue].value) & " vs. fear",field[thingname].text]

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
gauldin
Member
 
Join Date: Sep 2013
Location: Raleigh, NC
Posts: 43

Old May 2nd, 2015, 02:52 PM
Thanks guys! That helped get it working. I think when I copy code from something else, I tend to just blindly assume whatever was there must still be good, even if the situation is different where I'm using it, so I don't do the same due diligence I would on my own code. Anyway, I always learn something from you guys, and I appreciate your patience!
gauldin is offline   #10 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:51 AM.


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