• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Dynamic tab names

BoomerET

Well-known member
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
 
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.
 
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>
 
Find the wiki page that covers how components are defined - take a look through all the settings there.
 
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?
 
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.
 
Back
Top