View Single Post
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old July 28th, 2018, 05:44 AM
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[table] 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.
risner is offline   #16 Reply With Quote