Junior Member
Join Date: Nov 2015
Posts: 11
|
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] Any ideas? Thank you in advance, Sincerely, Chimeforest Last edited by chimeforest; March 12th, 2017 at 01:40 PM. |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. |
#2 |
Junior Member
Join Date: Nov 2015
Posts: 11
|
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.
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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] 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. |
#4 |
Junior Member
Join Date: Nov 2015
Posts: 11
|
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 |
#5 |
|
|