Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
barrelv
Member
 
Join Date: Aug 2014
Posts: 87

Old October 15th, 2014, 05:38 AM
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>
barrelv is offline   #11 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 15th, 2014, 08:38 AM
The candidatefield option is what you'll be using, not the <candidate> element.
Mathias is offline   #12 Reply With Quote
barrelv
Member
 
Join Date: Aug 2014
Posts: 87

Old October 15th, 2014, 08:49 AM
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>
crSkills has a value of: skPistol

when I click the Chooser though, I see the entire list of skills, not just pistol.
barrelv is offline   #13 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 15th, 2014, 08:59 AM
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.
Mathias is offline   #14 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 15th, 2014, 09:00 AM
Also, crSkills will need to be a full tag expression - group.tag, so CareerSkl1.skPistol, not just skPistol.
Mathias is offline   #15 Reply With Quote
barrelv
Member
 
Join Date: Aug 2014
Posts: 87

Old October 15th, 2014, 09:38 AM
Quote:
Originally Posted by Mathias View Post
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.
is there a particular command I can use to have it figure out the career that called it into being?. Here's the full template:

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>
barrelv is offline   #16 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 15th, 2014, 10:39 AM
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.
Mathias is offline   #17 Reply With Quote
barrelv
Member
 
Join Date: Aug 2014
Posts: 87

Old October 15th, 2014, 10:46 AM
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.
barrelv is offline   #18 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 03:45 AM.


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