Senior 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 Castles & Crusades Ruleset for Hero Lab Hero Lab (5E D&D) -> Fantasy Grounds Character Converter |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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.
|
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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"> 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> |
#3 |
Senior Member
|
Zoiks, I've got a lot to learn obviously.
Thanks Mathias for your help, I appreciate it. BoomerET Castles & Crusades Ruleset for Hero Lab Hero Lab (5E D&D) -> Fantasy Grounds Character Converter |
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Mathias, what compset is the "shortname" field defined in?
RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Find the wiki page that covers how components are defined - take a look through all the settings there.
|
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
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?
RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
#7 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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.
|
#8 |
|
|