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
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old June 13th, 2016, 06:08 PM
THanks! Mostly working. However, I'm running into an error when I try adding the first of the table_dynamic to the template. I get
Quote:
Syntax error in 'titlebar' script for Template 'soSorTemp' (in Portal 'soMinor') on line 2
-> Invalid use of a reserved word in script
If I change the titlebar to agent.field[sMinName].text then I get:
Quote:
Template 'soSorTemp' - Reference to portal 'soMinor' that can only be used within a layout
Here's my tab:
Code:
  <template
    id="soSorTemp"
    name="Sorcery Template"
    compset="Sorcery"
    marginhorz="3"
    marginvert="2">

    <portal
      id="soSorTitle"
      style="lblTitle">
      <label>
        <labeltext><![CDATA[
          @text = "Description"
          ]]></labeltext>
        </label>
      </portal>
      
    <portal
      id="soSorDesc"
      style="lblBrdLeft">
      <label
        field="descript"
        ismultiline="yes">
        </label>
      </portal>

    <portal
      id="soMinor"
      style="tblNormal">
      <table_dynamic
        component="Power"
        showtemplate="SimpleItem"
        choosetemplate="SimpleItem"
        useagentadd="yes"
        useagentcandidate="yes"
        useagentlinkage="yes"
        candidatefield="sPwrExpr">
        <titlebar><![CDATA[
          @text = "Add a Minor " & field[sMinName].text
          ]]></titlebar>
        <description/>
        <headertitle><![CDATA[
          @text = "Minor: " & field[sMinName].text & "(" & field[sMaxMinor].text & ")"
          ]]></headertitle>
        <additem><![CDATA[
          @text &= "Add New Minor " & field[sMinName].text
          ]]></additem>
        </table_dynamic>
      </portal>
          
    <position><![CDATA[
      ~set up our dimensions, with a width that we dictate; our width can vary
      portal[soSorTitle].height = 20
      portal[soSorDesc].height = height/3
      portal[soMinor].height = height/3

      ~if this is a "sizing" calculation, we're done
      doneif (issizing <> 0)

      ~position the description on the left and let it use all available space
      portal[soSorTitle].top = 0
      portal[soSorTitle].left = 0
      portal[soSorTitle].width = width
      portal[soSorDesc].top = portal[soSorTitle].bottom + 2
      portal[soSorDesc].left = portal[soSorTitle].left
      portal[soSorDesc].width = portal[soSorTitle].width
      portal[soMinor].top = portal[soSorDesc].bottom + 10
      portal[soMinor].left = portal[soSorDesc].left
      portal[soMinor].width = (portal[soSorDesc].width/2) - 5
      
      ]]></position>

    </template>
                   
  <!-- sorcery layout
        This layout orchestrates the display of the visual elements that comprise
        the Skills tab. This amounts to a title at the top and a dynamic table below
        where the user can add and adjust the skills he wants.

        The logic for this layout is similar to (albeit much simpler than) the
        logic for the Basics tab. So please refer to the Basics tab for more details.
  -->
  <layout
    id="sorcery">
    <templateref template="soSorTemp" useagent="yes"/>

    <!-- This script sizes and positions the layout and its child visual elements. -->
    <position><![CDATA[
      ~freeze our skills table in advancement mode to disable adding new choices
      ~Note: All freezing must be done *before* any positioning is performed.
      ~if (state.iscreate = 0) then
      ~  template[soSorTemp].freeze = 1
      ~  endif

      ~both tables span the full width
      template[soSorTemp].width = width
      
      template[soSorTemp].visible = hero.tagis[Sorcery.Sorcery]
      
      perform template[soSorTemp].autoplace[0]

      ]]></position>

    </layout>

  <!-- sorcery panel
        This is the "Sorcery" panel shown within Hero Lab.
  -->
  <panel
    id="sorcery"
    name="Sorcery"
    marginhorz="5"
    marginvert="5"
    order="155"
    agentcompset="Sorcery"
    agentlive="HasSorc"
    agentname="name"
    >
    <live>!HideTab.sorcery</live>
    <layoutref layout="sorcery"/>
    <position><![CDATA[
      ]]></position>
    </panel>
am I missing something with the agent?
TCArknight is offline   #11 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 13th, 2016, 10:40 PM
You may not put a table_dynamic inside a template - only on the tab itself. So both your table and your template will be entries on your tab's layout, with the table separate from the template.
Mathias is online now   #12 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old June 14th, 2016, 10:18 AM
That did it, thank you!

Every time I reload, since I've gone from the chooser to the agent tab I'm getting a message about the Magic being orphaned. I'll probably rebuild the test character from scratch to see if it's a true issue or just something with the reloading, etc..
TCArknight is offline   #13 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 14th, 2016, 10:24 AM
Yes, if the table/chooser something was added to no longer exists, that pick is permanently orphaned. You'll find that you'll end up discarding a few test characters over the course of creating a game system.
Mathias is online now   #14 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 06:08 PM.


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