Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Authoring Kit (http://forums.wolflair.com/forumdisplay.php?f=58)
-   -   Need help with new component (http://forums.wolflair.com/showthread.php?t=64753)

Phrll September 10th, 2020 02:48 PM

Need help with new component
 
I'm working with the new system skeleton files and having a problem with a new component. I'm not getting any compile errors and everything loads but nothing is being displayed in the portal on the Basics tab. I can replace the compset in the portal and template with one of the "built-in" ones (Attribute, Skill, etc.) and everything works so I'm 99% sure the problem is with the component, I just don't know what I'm doing wrong. I tried autocompset="yes" initially but tried a separate <compset> section as well, with the same results. I'm pretty new to this so it's probably something dumb.

Here are the component and compset definitions, they're in traits.str.

Code:

<component
    id="Condition"
    name="Condition"
    autocompset="no">
    <!-- Activation state of ability - we're not activated by default -->
    <field
      id="condActive"
      name="Is Activated?"
      type="user"
      minvalue="0"
      maxvalue="1">
      </field>
    </component>

  <compset
    id="Condition">
    <compref component="Condition"/>
    </compset>

The thing_conditions.dat file:
Code:

<?xml version="1.0" encoding="UTF-8"?>
<document signature="Hero Lab Data">
  <thing id="condUpset"
    name="Upset"
    compset="Condition"
    description="Description goes here"
    isunique="yes">
    <fieldval field="condActive" value="0"/>
    <tag group="explicit" tag="1"/>
    </thing>
</document>

The Portal. This and the template code are in tab_basics.dat.
Code:

  <portal
    id="baCondition"
    style="tblInvis">
    <table_fixed
      component="Condition"
      showtemplate="baCondPick"
      showsortset="explicit"
      scrollable="no">
      <headertitle><![CDATA[
        @text = "Condition"
        ]]></headertitle>
      </table_fixed>
    </portal>

And the Template.
Code:

<template
    id="baCondPick"
    name="Condition Pick"
    compset="Condition"
    marginhorz="16"
    marginvert="3">

    <portal
      id="name"
      style="lblLeft"
      showinvalid="yes">
      <label
        field="name">
        </label>
      </portal>
     
    <portal
      id="info"
      style="actInfo">
      <action
        action="info">
        </action>
      </portal>

    <position><![CDATA[
      height = portal[info].height

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

      portal[info].top = 0

      perform portal[name].centervert
      perform portal[info].alignedge[right,0]

      portal[name].left = 0
      portal[name].width = 135
      debug "top = " & portal[name].top & " height = " & portal[name].height

      ]]></position>

    </template>


Mathias September 10th, 2020 05:02 PM

What adds this pick to the hero? For attributes and skills, those are added to the hero by <enmasse> entries in definition.def.


Either that, or change the portal from table_fixed to table_dynamic, so that the user adds the conditions they want, and doesn't have to see the rest.

Phrll September 11th, 2020 02:06 AM

*sigh* I knew it was something simple I was forgetting. It's all slowly sinking in. That fixed it, thanks much, Mathias!!


All times are GMT -8. The time now is 06:24 AM.

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