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)
-   -   Dynamic tab names (http://forums.wolflair.com/showthread.php?t=46548)

BoomerET November 19th, 2013 04:08 PM

Dynamic tab names
 
Is it possible to create a tab where the name= is dynamic.

I tried using CDATA, without any success.

As it stands right now, I have multipe tab_xxx files, one for each class and race, but was wondering if I could somehow use a dynamic name so I can have one tab configuration file instead of 20.

It's easy enough to create each one, as it's just copy/paste, but all the information is duplicated.


BoomerET

Mathias November 19th, 2013 04:28 PM

This is an advanced topic that's not currently covered in the wiki, I'm sorry to say - there's a mechanism called agent linkages that allows you to create a single tab that gets re-used for any specific thing that's derived from a particular component.

Mathias November 19th, 2013 04:38 PM

Here are some pieces from Pathfinder's panel_class.dat file that will hopefully help you figure out how to implement this:

Code:


 
<!-- Class panel -->
<panel
  id="Class"
  name="Class"
  order="150"
  marginhorz="5"
  marginvert="5"
  agentcompset="Class"
  agentlive="ClsTabLive"
  agentname="shortname">

agentlive must be an <identity> tag on the compset, and it's tested in the hero context to determine whether to show this tab or not.

And here's how it looks in an individual table:

Code:


<!-- SPELLBOOK FORM - list of spells in the spellbook for this class -->
<portal
  id="ClsBook"
  style="Table">
  <table_dynamic
    component="BaseSpell"
    showtemplate="sPick"
    choosetemplate="sThing"
    descwidth="300"
    addspace="3"
    showsortset="Spell"
    choosesortset="Spell"
    useagentadd="yes"
    useagentcandidate="yes"
    agentlist="Spellbook"
    agentautotag="Spellbook"
    useagentlinkage="yes"
    candidatefield="cSplBkExpr"
    columns="3"> <!-- Note - NOT linked to helper object -->
    <list><![CDATA[
      !Helper.CustomItem & !Hide.Spell & !Helper.Obsolete
      ]]></list> <!-- Don't want to see the custom spell -->
    <restriction>TRUE</restriction> <!-- Only learn spells once -->
    <titlebar><![CDATA[
      @text = "Choose your " & lowercase(agent.field[cSpBkName].text) & " " & lowercase(agent.field[cSpellName].text) & "."
      ]]></titlebar>


BoomerET November 19th, 2013 04:51 PM

Zoiks, I've got a lot to learn obviously.

Thanks Mathias for your help, I appreciate it.


BoomerET

RavenX March 21st, 2014 01:33 PM

Mathias, what compset is the "shortname" field defined in?

Mathias March 21st, 2014 02:04 PM

Find the wiki page that covers how components are defined - take a look through all the settings there.

RavenX March 21st, 2014 02:07 PM

I figured out that I needed a hasshortname="yes" in the component. Do I have to define the shortname field on each class or is it automatically defined?

Mathias March 21st, 2014 03:33 PM

shortname defaults to = name if nothing else is entered. In d20/Pathfinder, most classes don't set a different shortname - the only exceptions are the ones with really long names, who use an abbreviation or other way of shortening the name.


All times are GMT -8. The time now is 02:54 PM.

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