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
chimeforest
Junior Member
 
Join Date: Nov 2015
Posts: 11

Old March 11th, 2017, 07:41 PM
Hello,

I'm having trouble adding some situational text to a Craft skill which the user get's to pick out.

I have a field set up like so:
usrChosen1: component.BaseSkill & Helper.SkCatCraft

Here is the situational code that I have so far:
Code:
      doneif (tagis[Helper.FtDisable] <> 0)

      #situational[hero.child[???], "You can make use of this craft without the proper tools and suffer no penalty.",field[name].text]
Normally, I'd put the skill in where the ??? is, however since the user gets to pick which skill it is, it's not so simple. I've tried a couple variations on "field[usrChosen1].chosen" but so far nothing has worked.

Any ideas?

Thank you in advance,
Sincerely,
Chimeforest

Last edited by chimeforest; March 12th, 2017 at 01:40 PM.
chimeforest 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 March 11th, 2017, 09:08 PM
The field name can be different Things. So which editor tab is your Thing on?

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
chimeforest
Junior Member
 
Join Date: Nov 2015
Posts: 11

Old March 12th, 2017, 05:57 AM
Sorry, I should have mentioned this. I am making a Trait. It has a drop-down box of craft skills the user has selected on the Skills tab.
chimeforest 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 March 12th, 2017, 10:33 AM
First got to "Develop->Enable Data File Debugging". Now add a trait a to your character, any trait will do. Then RIGHT mouse click on the "?" next to the trait and select "Show Debug Fields". You will see that traits do have a field named usrChosen1. So you where correct in using field[usrChosen1].chosen.

You never listed the exact error you where getting or "when" you where getting issues. All of that matters in scripting.

My guess would be that the script compiled when you had this:
Code:
#situational[field[usrChosen1].chosen, "You can make use of this craft without the proper tools and suffer no penalty.",field[name].text]
But it threw an error when you selected the craft skill right? Again I am "guessing" here as you didn't provide enough details of the error you got.

If the above is true then the cause is that you set the "Restrict First List To.." to "- none -" or "All Things". Which means your trying to modify a Thing and not a Pick. Only Picks can have situational text added too it. If you don't know what I mean by Pick vs Thing please read the editor's glossary of terms.

Change the "Restrict First List To.." to be "All Picks on Hero". This will allow the script to work but remember this means only the "Craft" skills that have been selected/added on the Skills tab will display in the dropdown now.

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.
ShadowChemosh is offline   #4 Reply With Quote
chimeforest
Junior Member
 
Join Date: Nov 2015
Posts: 11

Old March 12th, 2017, 01:39 PM
Thank you very much =]
The code you provided worked perfectly! I completely misunderstood how the first parameter of "#situational" worked in this case. I kept trying variations of "hero.child[field[usrChosen1].chosen]" which produced a variety of errors.. and in hindsight seems rather silly. Next time I will post what errors I get (sorry about that >.<; )

If it's not too inconvenient, I would like to ask one more thing of you; Is it possible to remove the need for tools from the selected craft skill via scripts? And if so, how would you go about doing it?

Thank you again,
Chimeforest
chimeforest is offline   #5 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:55 PM.


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