Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

Reply
 
Thread Tools Display Modes
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 26th, 2014, 06:12 PM
Ok for #3 I see, it adds the name to a field and appends the field to the skill, shouldn't be too tough to figure out, but I'm still having trouble with #2. I've used the needtag and if I'm reading correctly I tell it to use the Skill.? tag on the skill and the SkillList.? tag on pick and it should only show the intersection of the two, but it still shows everything.

This is my form portal

Code:
<portal
    id="expExpert"
    style="tblNormal">
    <table_dynamic
      component="Expertise"
      showtemplate="expPick"
      choosetemplate="SimpleItem"
      headerpick="SkillHelp"
      addpick="SkillHelp"
      showfixedlast="yes">
      <candidate>!Hide.Expertise</candidate>
      <needtag
        container="Skill"
        thing="SkillList">
        </needtag>
      <titlebar><![CDATA[
        @text = "Add an Area of Expertise"
        ]]></titlebar>
         <description/>
      
      <headertitle><![CDATA[
        @text = "Areas of Expertise"
        ]]></headertitle>
        
      <additem><![CDATA[
        ~if we're in advancement mode, we've been frozen, so display accordingly
        if (state.iscreate = 0) then
          @text = "{text clrgrey}Add Areas of Expertise Via Advances Tab"
          done
          endif

        ~set the color based on whether the proper number of slots are allocated
         @text &= "Add New Area of Expertise"
        ]]></additem>
   
      </table_dynamic>
    </portal>
Am I missing something or am I looking at the logic in the wrong place?
AndrewD2 is offline   #11 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 27th, 2014, 08:34 AM
Remember that container="" of the needtag refers to the gizmo - the container that's attached to each skill - not to the skill itself.

So, that container has no tags in it by default.

Here's how Shadowrun puts the appropriate tags there:

Code:
    <eval index="10" phase="Initialize" priority="10000"><![CDATA[
      ~copy our SkillList tags to the gizmo so they can be used for the needtag
      if (isgizmo <> 0) then
        perform gizmo.pushtags[SkillList.?]

        ~tags added to the gizmo are then automatically added to the parent of
        ~that gizmo - but that's where those tags were just pushed from, meaning
        ~that what happens is to duplicate them all.  So, delete the ones on
        ~ourself, then pull the tags from the gizmo.
        perform delete[SkillList.?]
        perform gizmo.pulltags[SkillList.?]
        endif
      ]]></eval>
Mathias is online now   #12 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 27th, 2014, 09:26 AM
Ah, I see, I thought the skill pick became the gizmo when you added the child entity to it, I'll try this out when I have free time (hopefully tonight) but right now, its Pathfinder work for Aaron.

Thanks for all your help,
I really do appreciate it.
AndrewD2 is offline   #13 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 27th, 2014, 06:05 PM
I got it to work thank you for explaining that, is there a built in style the does the auto-resizing/carrying over to 2nd line like the Shadowrun skills do?
AndrewD2 is offline   #14 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 27th, 2014, 10:50 PM
I think this is the most relevant part of the position script that sets up the multi-row

Code:
      ~otherwise, the name gets more space
      else
        portal[domain].visible = 0
        portal[menu1].visible = 0
        portal[name].width = minimum(portal[name].width,lastright - portal[name].left - 5)
        perform portal[name].sizetofit[30]
        portal[name].width = minimum(portal[name].width,lastright - portal[name].left - 5)
        endif

      ~a few skills, like exotic weapons, will end up needing two lines in
      ~order to fit when they're skillsofts.  The sizetofit[30] brings the font
      ~height small enough that it will fit, so here, we only use autoheight,
      ~not autosize or autowidth
      perform portal[name].autoheight
      perform portal[name].centervert
Oh, and on the portal itself, the ismultiline is required:
Code:
    <portal
      id="name"
      style="lblLeft"
      showinvalid="yes">
      <label
        ismultiline="yes">
        <labeltext><![CDATA[
          if (tagis[Reference1.?] <> 0) then
            @text = field[name].text
          elseif (hero.tagis[Hero.Minion] <> 0) then
            @text = field[baseuiname].text
          elseif (state.isadvance <> 0) then
            @text = field[name].text
          else
            @text = field[baseuiname].text
            endif
          ]]></labeltext>
        </label>
      <mouseinfo mousepos="middle+above"><![CDATA[
        if (tagis[Helper.Disable] <> 0) then
          @text = "{b}This ability is currently disabled and may not be used{/b}"
        else
          @text = ""
          endif
        ]]></mouseinfo>
      </portal>
Mathias is online now   #15 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 28th, 2014, 04:49 PM
Excellent, much thanks
AndrewD2 is offline   #16 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old November 1st, 2014, 12:48 PM
Ok, back to here as I'm working on advanements now, I looked at how Shadowrun does specialties and it has a chooser for the skills on the character and then based on the skill chosen limits the list of specialties available (if nothing is selected it shows them all).

So getting the list of Areas of Expertise itself was easy as I just set the candidate field to component.Expertise, but I'm not sure about getting the chooser. I figured I'd use a menu_things as that seemed like the best way to get a dynamically available list of skills (the requirement being skills with 3 or more ranks in them which is identified by the field Helper.CanExpert).

So I added a field to the Advance component to contain the menu choice and I created a portal that I was going to set to show only if the tag Advance.NeedsSkill is on it. I was in the template for new additions and I created this portal:

Code:
  <portal
    id="advSkill"
    style="menuNormal"
    width="275">
    <menu_things
      field="advSkill"
      component="Skill"
      usepicks="hero">
      <candidate><![CDATA[
        component.Skill & Helper.CanExpert
        ]]></candidate>
      </menu_things>
      </portal>
and I get this error

Code:
Hero Lab was forced to stop compilation after the following errors were detected:

Portal 'advSkill' - Reference to incompatible field type/style/behavior based on portal type
One or more timing errors were identified. Please review the timing report and correct the errors. You can access the report under the 'Develop' menu or by clicking this link.
the field code is

Code:
    <field
      id="advSkill"
      name="Chosen Skill"
      type="derived"
      style="menu">
      </field>
It seems to match the requirements of the field element of value based and menu style so I'm not sure what the problem is. If I comment out the portal the error goes away so I know there error is somewhere involving that.
AndrewD2 is offline   #17 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old November 1st, 2014, 04:18 PM
Also, I'm trying to figure out how to stop picks from Advances from subtracting from skill points, Traits use (isuser + origin.ishero >= 2) but that doesn't work because the origin is a gizmo and not a hero, which means by default its not even subtracting them, I removed the ishero check, but that didn't work, I tried origin.isgizmo, but that threw an error, so I'm not really sure what to do to get this to not happen.
AndrewD2 is offline   #18 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 2nd, 2014, 09:03 AM
Quote:
Originally Posted by AndrewD2 View Post
Also, I'm trying to figure out how to stop picks from Advances from subtracting from skill points, Traits use (isuser + origin.ishero >= 2) but that doesn't work because the origin is a gizmo and not a hero, which means by default its not even subtracting them, I removed the ishero check, but that didn't work, I tried origin.isgizmo, but that threw an error, so I'm not really sure what to do to get this to not happen.
Please clarify this, I'm not sure how you've got an advancement that's inside a gizmo.
Mathias is online now   #19 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 2nd, 2014, 09:04 AM
style="menu" must always be combined with type="user", not type="derived" or type="static", because the user has to be able to control the menu's selection.
Mathias is online now   #20 Reply With Quote
Reply

Thread Tools
Display Modes

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 01:51 PM.


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