Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
Quote:
Quote:
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. Last edited by ShadowChemosh; February 7th, 2011 at 10:16 AM. |
|||
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
1) Here is an example feat demo:
Code:
<thing id="fmessyes" name="Make a mess" description="test, you can delete" compset="Feat"> <tag group="Helper" tag="ShowSpec"/> <eval phase="GlobalTest" priority="12000" index="2"><![CDATA[ field[livename].text = "Testing Global Tags/12000" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="PreLevel" index="3"><![CDATA[ field[livename].text = "Pre-Levels/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="UserPreLv" index="4"><![CDATA[ field[livename].text = "Pre-Levels Users/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="Level" index="5"><![CDATA[ field[livename].text = "Levels/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="PostLevel" index="6"><![CDATA[ field[livename].text = "Post-Levels/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="UserPostLv" index="7"><![CDATA[ field[livename].text = "Post-Levels Users/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="UserPreAt" index="8"><![CDATA[ field[livename].text = "Pre-Att Users/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="PreAttr" index="9"><![CDATA[ field[livename].text = "Pre-Att/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="Attr" index="10"><![CDATA[ field[livename].text = "Attributes/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="PostAttr" index="11"><![CDATA[ field[livename].text = "Post-Att/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="UserPostAt" index="12"><![CDATA[ field[livename].text = "Post-Att Users/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="UserFinal" index="13"><![CDATA[ field[livename].text = "Final Phase Users/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="Final" index="14"><![CDATA[ field[livename].text = "Final Phase/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="Validation" index="15"><![CDATA[ field[livename].text = "Validation/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="Render" index="16"><![CDATA[ field[livename].text = "Render/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> <eval phase="First"><![CDATA[ field[livename].text = "First/100" field[xSumm].text = field[livename].text field[CustDesc].text = field[xSumm].text]]></eval> </thing> It doesn't modify the description on the Feat tab or printout, but does on the Specials tab at Render/100. |
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
INAttack and WF both show "-No Selection-" so they don't do what I need. Let me try to phase it again. I need to make an object that has a "-No Selection-" setting, but instead of being a herolab.exe "-No Selection-" it is actually another object. I need code to detect the herolab.exe "-No Selection-" (which is usrChosen1 set to 0) and if set to 0 then set it to the object instead. The reason for this, is with my new Druid Wild Shape, if you have not made a selection you lose access to things you lose (in D20) when Wild Shaping (such as Darkvision, etc.) This is confusing to people who are not aware of why they don't have Darkvision when they should. |
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
|
|
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Sorry about cluttering the community thread.
|
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Will this work? (this example uses Cleric as the default class selection)
Code:
if (field[usrChosen1].ischosen = 0) then perform hero.childfound[cHelpClr].setfocus else perform field[usrChosen1].chosen.setfocus endif doneif (state.isfocus = 0) ~now do things with the class you've set the focus to. |
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
Will look at the rest of what you have in a bit later. 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. |
|
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
The user being set to "-No Selection-" Because it is invalid and messes everything else up. Specifically, I have a Class Special (cDrdWild1) that I replace. In this Class Special, I have these settings: Select From ... -None- Custom Expression User.WSF? Restrict First List To.. All Things I have Templates all with User.WSFblah unique assignments. I have a bootstrap for all templates in this Class Special. A worker object looks to see what is chosen and if "-No Selection-" is chosen, it malfunctions. I have a template for "No Form" that is needed to be applied. So I need to force a choice and prevent the user from leaving a new druid in "-No Selection-" mode. If that isn't set to "No Form" the worker object disables Darkvision and anything else gone while wild shaped. I guess I could work around this by adding the script code from the "No Form" Special to all the 5 scripts working on the Wild Shape Worker Object? But that is duplicating a bunch of lines of code in 5 different scripts to bail out if not set. What I need is some way in the script to detect when not set (I have this) and then force a selection (like the Worg does with a tag) but in a script? |
|
#8 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
I tried:
if (field[usrChosen1].ischosen = 0) then perform hero.childfound[xNoForm].setfocus endif It still says "-No Selection-" |
#9 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
OK, you want no selection as a way to turn off the ability.
It sounds like you've already got a "no selection" special made, and you're getting errors once its selected, because it's not a template. In that case, you'll need to make sure you've selected something, and make sure that what you've selected is a template, before you start looking up fields that will only exist on a template: Code:
if (field[usrChosen1].ischosen <> 0) then if (field[usrChosen1].chosen.tagis[component.BaseTempl] <> 0) then ~apply all your effects endif endif |
#10 |
|
|