• 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

Two Questions: isagent and pathfinder style class tab

risner

Well-known member
I've seen discussion on agents being a new way to do things. Using "isagent <> 0" and agent.field[] with a configurable. Is there a link to docs for this? What is the advantage of this new feature?

I'd like to make a class tab for a custom game system that uses the list from the pathfinder class tab with the ability of the user to move levels up and down. I can't seem to find code that does this? Does someone have a code snip for this or can point me to the docs for the table method? (<table_dynamic>?)
 
Last edited:
Ok for #2 I've progressed. I have two issues with my code (see below) for #2. I can't add the same class twice and there is a little wasted space to the right.

Class.png


The wasted space on the right below the title ("Character Class") to the right of the X delete button. How do I nix that and use the full line?

Code:
  <portal
    id="clClass"
    style="tblNormal">
    <table_dynamic
      component="Class"
      showtemplate="ShowClass"
      choosetemplate="ClassThing"
      allowuserorder="yes">
      <candidate></candidate>
      <titlebar><![CDATA[
        @text = "Choose the class for your character"
        ]]></titlebar>
      <headertitle><![CDATA[
        @text = "Character Class"
        ]]></headertitle>
      <additem><![CDATA[
        @text = "Add a Level"
        ]]></additem>
      </table_dynamic>
    </portal>

  <template
    id="ClassThing"
    name="Class Thing"
    compset="Class"
    marginhorz="3"
    marginvert="5">

    <portal
      id="name"
      style="lblXLarge"
      showinvalid="yes">
      <label
        field="name">
        </label>
      </portal>

    <position><![CDATA[
      height = portal[name].height
      doneif (issizing <> 0)
      perform portal[name].centervert
      portal[name].left = 0
      ]]></position>

    </template>

  <template
    id="ShowClass"
    name="Show Class"
    compset="Class"
    marginhorz="3"
    marginvert="5">

    <portal
      id="level"
      style="lblNormal"
      showinvalid="yes">
      <label
        field="clIndex">
        </label>
      </portal>

    <portal
      id="name"
      style="lblNormal"
      showinvalid="yes">
      <label
        field="name">
        </label>
      </portal>

    <portal
      id="delete"
      style="actDelete">
      <action
        action="delete">
        </action>
      </portal>

    <position><![CDATA[
      height = maximum(portal[name].height,portal[level].height)
      doneif (issizing <> 0)
      perform portal[name].centervert
      perform portal[level].centervert
      portal[level].left = 0
      portal[name].left = 20
      perform portal[delete].alignedge[right,0]
      portal[delete].top = 5
      ]]></position>

    </template>

  <layout
    id="class">
    <portalref portal="clClass" taborder="20"/>

    <position><![CDATA[
      portal[clClass].width = width
      portal[clClass].top = 3
      ]]></position>
    </layout>
 
The advantage of agent tabs is that you can define a single tab that gets re-used for a lot of similar things - in Pathfinder, all classes use an agent tab, so that they can use the same thing, but at the very beginning of HL, in d20, you needed to define a separate tab for each class.

This page of the wiki describes the parameters allowed on tables: http://hlkitwiki.wolflair.com/index.php5?title=TableDynamic_Element_(Data)

Allowing the user to sort it is the allowuserorder parameter, and to remove the space allocated for the scrollbar, set scrollable="no". Your component will also need to be set up with an orderfield to allow that to be added multiple times.


Whether an item is unique or not (and can be added more than once) is controlled on the individual items, not on the table.
 
Thanks!

I missed your post before I figured out allowuserorder and orderfield on my own plus using isascend to sort in the right direction. It never occurred to me the space on the right was my scrollbar space, which seems obvious in 20/20 hindsight.

This leaves me with two more questions:
Pathfinder has unique cHelpClassname things and non-unique clsClassname things. This is best practice for systems with level based abilities? I'm currently applying a tag to the first thing and then scripting only if that tag is loaded. I guess that is less efficient with "if tag not found, then done" on all the other bootstraps except the first? Is this why Pathfinder does one unique and many non-unique?

Can I get a bare bones Agent sample code segment. I found the docs (http://hlkitwiki.wolflair.com/index.php5?title=TableDef_Element_(Data), but without sample code how it fits together, I'm afraid it will take me hours of experimentation.

Simple code of a <panel>, <thing>, etc needed to demo agent use would help save me many hours.

Edit: Cleaned up this to shorter/concise questions.
 
Last edited:
Ultimately, I couldn't think of a reason for the separate helper bootstrap. So I changed my classes to be one object (isunique). When added to your classes, it's restricted from being added a second time. You now have it with an increment up/down buttons. All the scripting is the one thing.

I can't think of any issues with this for game systems that don't have things like Pathfinder (d10 roll for HP, favored class style mechanic, etc).
 
I guess I'll try to hack up a prototype for agent use, but there is very little in the way of examples.
 
If your system doesn't allow multiple levels of separate classes, and require the user to list the order they take the classes in, then ditching the class/class level combination will work for you.



I apologize, but you're asking these questions about a month before Gen Con. I have very little time to answer any in-depth questions right now. There should be existing conversations in this forum with examples of using agent panels.
 
There apparently are no known examples of agent code available and I've been unable to get a working example created.

I've also looked at all code in the following public data:
4e
5e (.user)
Alternity
Star_Wars_d6_2nd_Rev
candc
d20 (*.user)
dwaitas
megs
pathfinder (.user)
qin
sample
savage
RavenX Deathwatch thread
Savage-Rifts

If anyone has agent examples, please send me a PM.
 
This is an example from a dataset I’ve been working on:

Code:
<!-- upbringing panel
        This is the "Upbringing" panel shown within Hero Lab.
  -->
  <panel
    id="upbringing"
    name="Upbringing"
    marginhorz="5"
    marginvert="5"
    order="10"
    agentcompset="Upbringing"
    agentlive="HasUpbring"
    agentname="name"
    >
    <live>!HideTab.upbringing</live>
    <layoutref layout="upbringing"/>
    <position><![CDATA[
      ]]></position>
    </panel>
* Upbringing is a Component with an autocompset=“yes”, but you can define the compset if you like. You just have to use whatever you define in the agentcompset= portion

* HideTab.upbringing is a tag bootstrapped to the hero at creation.

* HasUpbring is an identity tag on the Upbringing component. When an upbringing is selected, the HasUpbring.? is forwarded to the hero and the HideTab.upbringing tag on the hero is deleted.

* agentname=“name” uses the name in the selected component for the tab (panel) name.

Does that help?
 
Woot. Progress. I'm to the point where I have a Class component and if added to the character, a new tab appears. Trying to figure out how to put things on this tab.

How do I point:
<layoutref layout="classlayout"/>
in the panel_class.dat file to a value derived from the agent?

Or do I need one BIG classlayout layout with every class programmed via if/then/else code?
 
Last edited:
I believe these three threads are the best hints for others on this subject:
One
Two
Three

Using that knowledge and Mathias posts in here, I have a panel_class.dat file now, which spawns new tabs for each class bootstrapped to the hero. Also chatting with RavenX, the way to customize the panel is to have one panel definition and express tags to turn on/off different types of class features (spells, bonus feats, etc).

I'm making progress understanding this.

I've included a photo and a zip of my panel_class.tab.
The Class component is unique and has identity tags:
<identity group="ClsTabLive"/>
plus:
<eval index="1" phase="Level" priority="1000" name="Add Class Tags">
<![CDATA[
~ Assign tags to the Hero
perform forward[Class.?]

~ Activate my tab, now that I have levels in this class.
perform forward[ClsTabLive.?]
]]></eval>
 

Attachments

  • panel.zip
    panel.zip
    1.1 KB · Views: 1
  • Agent.jpg
    Agent.jpg
    195.2 KB · Views: 4
Last edited:
I'm down to one question and it may a question of best practices.

Pathfinder class agent uses a unique cHelpWiz and a copy of cWizard for each level in the class. Is this required for agent processing? Or is it simply a relic of Pathfinder's need to track level by level for things like favored class features and similar?
 
Code for others!

Code:
<!-- Agent code is complicated and very much undocumented. This is my walk
through.

############## A table of fixed objects with UserSelect{ions} available:
  <table_fixed
    component="UserSelect"
############## MenuSlPick is a compact visual for UserSelect options.
    showtemplate="MenuSlPick"
############## ClSpecSrch is a sort set that uses ClSpecWhen ascending sort.
    showsortset="ClSpecSrch"
############## ClassCustom must be a class identity tag present on the object.
    agentlist="ClassCustom">
############## Remove all SpcDisabled objects from the list.
    <list>!Helper.SpcDisable</list>
    </table_fixed>

    <table_dynamic
      component="UserSelect"
      showtemplate="MenuSlPick"
      showsortset="ClSpecSrch"
############## A simple list choice template.
+     choosetemplate="SimpleItem"
############## Chosen items will get this identity tag from the agent assigned.
+     agentautotag="SpecSource"
############## TODO explain useagentlinkage, as linkage[table] fails for me.
+     useagentlinkage="yes"
############## TODO explain useagentadd, I couldn't see it does anything.
+     useagentadd="yes"
############## This dynamically sets candidatepick="x" where x is the agent.
+     useagentcandidate="yes"
      agentlist="ClassCustom"
############## The field containing the candidate expression.x is the agent.
+     candidatefield="FirstCustomTagExp"
############## Dynamic tables require a description width.
+     descwidth="350">
       <list>!Helper.SpcDisable</list>
############## Required Description.
+      <description/>
############## TODO Add Item. Why doesn't useagentadd replace this?
+      <additem><![CDATA[
+        @text &= "Choose Between Options"
+      ]]></additem>
       </table_dynamic>

This just dumps a table and I still don't understand 3 things in these example working code:

1) How does useagentlinkage work? linkage
fails for me.
2) The useagentadd option seems to be a no-op, I couldn't detect it doing anything.
3) Add Item. Why doesn't useagentadd replace this?

Plus I still don't understand how to do pathfinder style Primary, Secondary, Tertiary, Quad framework (like Ranger Bonus Feat and etc). I'm turning all my stuff into one fixed table and they choose options. So there will be a helper custom for each choice. A waste of picks/things/memory.
 
<layoutref layout="upbringing"/>

Where do you have this programmed?
The layout specifically. Which file is it inside? The separate file for the upbringing of choice? Are layoutref duplicated?
I forgot to mention this just for reference, but this layout=“upbringing” is the layout for the tab usually defined just before panel itself.
 
Mathias may be taking a break Post-GenCon. I'm hoping once he gets back he can help us all out (well at least me), and explain a couple of things I can't seem to get.

Namely, how to structure the agent side of things like "Bonus Monk Feats" and the like. Where, you have generic slots (1, 2, 3, and 4) for doing generic class features and have the agent tab handle all the interface. The closest I can get is to not do anything similar, and to bootstrap a thing per class feature and display all class features needing choices in a table. That isn't ideal and can lead to scrolling. Not to mention it is more difficult to determine if you picked duplicates and other issues.
 
Mathias, I’m still gated by the lack of the required agent code to do the abstractions (primary, secondary, etc).
 
I've made no progress on this since July 28th. I'm still waiting on a reply from Lonewolf regarding the missing parts, that no one outside Lonewolf understands about agents.
 
Back
Top