Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
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:
Quote:
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> |
||
#11 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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.
|
#12 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
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.. |
#13 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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.
|
#14 |
|
|