Member
Join Date: Aug 2014
Posts: 52
|
The "findchild" context transition is not documented on the wiki yet it appears right away in the leadsummary element in the skeleton files. What is it? Is it any different from just the "child" transition and if so, how? Devs?
|
#1 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Find child is allows you to find one occurrence of a specific occurrence of a child with a custom tag on it.
Lets say you want to find the specific "Speak With Animals" SLA from a Gnome. You could just look for speak with animals by going Code:
hero.child[spSpeawit1].etc so you use find child instead. Find child works like this Code:
hero.findchild[component, "tag expression"].etc Code:
hero.findchild[BaseSpell,"Helper.SpellLike & Target.spSpeawit1 & Custom.GnomeSpell"].etc EDIT: I just realized I replied on the authoring kit forum and not in pathfinder where I thought I was, but the idea should still be the same Last edited by AndrewD2; August 26th, 2014 at 12:40 PM. |
#2 |
Member
Join Date: Aug 2014
Posts: 52
|
So this is essentially the same as the firstchild[expr, sort] transition?
|
#3 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Pretty sure firstchild finds only the first child, this could find the 15th copy of a thing, but it finds its specifics from a tag expression
|
#4 |
Member
Join Date: Aug 2014
Posts: 52
|
Seems the same to me, because even with findchild you might get more than one match and the default is likely to return the first match found. Thank you for the explanation.
|
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
So in example for my Beast Shape adjustment that adds a Bite attack I have a tag on it that is PolyAdjust.Attack. This way I can find the exact bite attack that was added via the adjustment: Code:
hero.findchild[BaseWep,"thingid.wBite & PolyAdjust.Attack".field[].value That is one example. P.S. - If you are use to data bases then the above is like using a SQL/Chain with a Unique Composite Key. child[] is like using a SQL where statement with only part of the Composite key. <- Not sure that is helpful.... 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. |
|
#6 |
Member
Join Date: Aug 2014
Posts: 52
|
Then you have to be certain that you know there is a unique tag combination for the pick you want.
|
#7 |
Member
Join Date: Aug 2014
Posts: 52
|
Quote:
|
|
#8 |
|
|