As expected, when I add the vehicle from the Gear tab for the hero, a secondary minion character is created.
When the minion is selected, I am trying to do is to display the appropriate fields on a new tab -
VehicleBasics tab:
Code:
<template
id="vbaDetails"
name="Personal"
compset="Personal">
<portal
id="title"
style="lblTitle">
<label
istitle="yes"
text="Details">
</label>
</portal>
<portal
id="lblVehCat"
style="lblLeft">
<label>
<labeltext><![CDATA[
debug "Category: " & minion.child[actor].field[name].text
@text = "test:"
]]></labeltext>
</label>
</portal>
<portal
id="lblVehType"
style="lblLeft">
<label>
<labeltext><![CDATA[
@text = "Type: " & hero.findchild[VehicleBase].idstring
]]></labeltext>
</label>
</portal>
<portal
id="lblVehRel"
style="lblLeft">
<label
text="Reliability: ">
</label>
</portal>
<portal
id="VehReli"
style="lblLeft">
<label
field="vebReliability">
</label>
</portal>
<position><![CDATA[
~freeze our value in advancement mode or if an advancement has modified us
~Note: All freezing must be done *before* any positioning is performed.
~if (state.iscreate = 0) then
~ portal[value].freeze = 1
~elseif (autonomous = 0) then
~ portal[value].freeze = 1
~ endif
~position our tallest portal at the top
portal[title].top = 0
portal[title].width = width
~center the other portals vertically
portal[lblVehCat].left = 0
portal[lblVehCat].width = width
portal[lblVehCat].height = 30
portal[lblVehCat].top = portal[title].bottom + 5
portal[lblVehCat].visible = 1
portal[lblVehType].top = portal[lblVehCat].bottom + 5
portal[lblVehType].left = portal[lblVehCat].left
portal[lblVehType].width = width
height = portal[lblVehType].bottom + 10
]]></position>
</template>
<layout
id="vehbasics">
<templateref template="vbaDetails" />
<!-- This script sizes and positions the layout and its child visual elements. -->
<position><![CDATA[
perform template[vbaDetails].autoplace[10]
~perform template[vbaDetails].render
~figure out the total height we need for the tab
height = template[vbaDetails].bottom
]]></position>
</layout>
<panel
id="vehbasics"
name="Vehicle Basics"
marginhorz="5"
marginvert="5"
order="110">
<live>CharType.Vehicle</live>
<layoutref layout="vehbasics"/>
<position><![CDATA[
~get the height used by the layout and use it, as that means we scroll
~if necessary
perform layout[vehbasics].render
height = layout[vehbasics].height
]]></position>
</panel>
However, I get this error:
Quote:
Hero Lab was forced to stop compilation after the following errors were detected:
Template 'vbaDetails' - Reference to portal 'VehReli' using a field for a different component set
Layout 'vehbasics' - Template in reference 'vbaDetails' uses fields and must specify a thing/pick
|
What am I missing to get the tab to be able to access the information on the VehicleBase component?