Member
Join Date: Aug 2014
Posts: 87
|
Yeah, this filters nothing. I'm doing something wrong.
Code:
<portal id="crSkPick1" style="chsNormal"> <chooser_table component="Skill" choosetemplate="LargeItem"> <candidate inheritlist="yes">CareerSkl1.?</candidate> <chosen><![CDATA[ if (@ispick = 0) then @text = "{text clrwarning}Select Skill" else @text = field[name].text endif ]]></chosen> <titlebar><![CDATA[ @text = "Choose the Skill for your career" ]]></titlebar> </chooser_table> </portal> |
#11 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
The candidatefield option is what you'll be using, not the <candidate> element.
|
#12 |
Member
Join Date: Aug 2014
Posts: 87
|
tried that, with no luck either. Here's the code
Code:
<portal id="crSkPick1" style="chsNormal"> <chooser_table component="Skill" choosetemplate="LargeItem" candidatepick ="Career" candidatefield="crSkills"> <chosen><![CDATA[ if (@ispick = 0) then @text = "{text clrwarning}Select Skill" else @text = field[name].text endif ]]></chosen> <titlebar><![CDATA[ @text = "Choose the Skill for your career" ]]></titlebar> </chooser_table> </portal> when I click the Chooser though, I see the entire list of skills, not just pistol. |
#13 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Is "Career" the id of the specific Career you've added to this test character, or is that the Id of the Career component? You need to target a particular pick with that candidatepick expression.
Try putting this field on the actor for now, in order to get it set up correctly, because then you can have a defined and permanent candidatepick. |
#14 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Also, crSkills will need to be a full tag expression - group.tag, so CareerSkl1.skPistol, not just skPistol.
|
#15 |
Member
Join Date: Aug 2014
Posts: 87
|
Quote:
Code:
<template id="caPick" name="Career Pick" compset="Career" marginhorz="3" marginvert="2"> <portal id="name" style="lblNormal" showinvalid="yes"> <label field="name"> </label> </portal> <portal id="lblmenuar1" style="lblSecond"> <label field="usrLblAr1"> </label> </portal> <portal id="crSkPick1" style="chsNormal"> <chooser_table component="Skill" choosetemplate="LargeItem" candidatepick ="Career" candidatefield="crSkills"> <chosen><![CDATA[ if (@ispick = 0) then @text = "{text clrwarning}Select Skill" else @text = field[name].text endif ]]></chosen> <titlebar><![CDATA[ @text = "Choose the Skill for your career" ]]></titlebar> </chooser_table> </portal> <portal id="crSkPick2" style="chsNormal"> <chooser_table component="Skill" choosetemplate="LargeItem"> <needtag container="CareerSkl2" thing="CareerSkl2" usehero="yes"></needtag> <chosen><![CDATA[ if (@ispick = 0) then @text = "{text clrwarning}Select Skill" else @text = field[name].text endif ]]></chosen> <titlebar><![CDATA[ @text = "Choose the Skill for your class" ]]></titlebar> </chooser_table> </portal> <portal id="lblmenuar2" style="lblSecond"> <label field="usrLblAr2"> </label> </portal> <portal id="info" style="actInfo"> <action action="info"> </action> <mouseinfo/> </portal> <portal id="delete" style="actDelete" tiptext="Click to delete this item"> <action action="delete"> </action> </portal> <position><![CDATA[ ~set up our height based on our tallest portal height = portal[info].height ~if this is a "sizing" calculation, we're done doneif (issizing <> 0) ~position our tallest portal at the top portal[info].top = 0 ~center the other portals vertically perform portal[name].centervert perform portal[delete].centervert perform portal[lblmenuar1].centervert perform portal[lblmenuar2].centervert ~position the delete portal on the far right perform portal[delete].alignedge[right,0] ~position the info portal to the left of the delete button perform portal[info].alignrel[rtol,delete,-8] ~position the name on the left -and let it use all available space- portal[name].left = 0 ~portal[name].width = minimum(portal[name].width,portal[info].left - 5) ~positioning the optional menus if (compare(field[usrLblAr1].text,"") = 0) then portal[lblmenuar1].visible = 0 portal[crSkPick1].visible = 0 endif if (compare(field[usrLblAr2].text,"") = 0) then portal[crSkPick2].visible = 0 portal[lblmenuar2].visible = 0 endif ~position the menus portal[lblmenuar1].left = portal[name].right + 10 portal[crSkPick1].left = portal[lblmenuar1].right + 5 portal[lblmenuar2].left = portal[crSkPick1].right + 10 portal[crSkPick2].left = portal[lblmenuar2].right + 5 ]]></position> </template> |
|
#16 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Can you work on a different part of your project for a while? I think I'm going to have to teach you how to rebuild this system, because this approach isn't going to work, and I don't have time this week to write out the instructions on how to do that.
If you want to study up on it, search this forum for threads about "agent tabs". "Agent" is probably the keyword to use. |
#17 |
Member
Join Date: Aug 2014
Posts: 87
|
Sure thing. I have a lot of data-entry to do for weapons, spells, etc and really haven't started on any sort of character sheet solution. I have plenty of other things to do.
I'll read up on the agent piece. Thanks Mathias for everything. |
#18 |
|
|