• 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

Issue reading tags through agent linkage

RavenX

Well-known member
Mathias,

I found that to get access to tags in the layout script for determining whether to show or hide something I had to use an

Code:
agent.tagis[]

to accomplish this. Is there something I need to do to gain access to the linkage's tags? I am trying to access a tag from a mouseinfo script but can't seem to figure out why the tagis[] isn't working on it. When I tried using the agent. part Hero Lab complained about it.
 
Please give me more detail about the code you're using and the task you're trying to accomplish.
 
Oh, and another thing to remember - if you were on a custom class special in Pathfinder, and you were transitioning to the class this special were being added to, what transition would you use?

You don't say where your position script is, but if this is the position script on one of the pick templates on one of the tables on this panel, then the context of that script is the pick that's been added.
 
The mouse info script is in a procedure. Trying to build a table of values to display something over 30 levels. I am trying to get it to check for a specific tag, if the tag is present, send the variable into the correct array and return the value for display.
 
Attack values are being added, i.e. THAC0, values, I am trying to get this table displaying as "mouseinfo" on the class tab we just created using the agent content you told me about yesterday...

Here is the portal on the class tab:
Code:
  <!-- clAtkInfo portal
         presents the user with a table that shows various THAC0 values
         for the class of their character.
  -->
  <!-- clAtkInfo -->
  <portal
    id="clAtkInfo"
    style="actAttacks">
    <action
      action="info"
      buttontext="THAC0">
      </action>
      <mouseinfo mousepos="middle+below"><![CDATA[
        call cAtkInfo
        ]]></mouseinfo>
    </portal>

Here is the procedure:
Code:
  <!-- Proceedure cAtkInfo
         Presents a table that the user can see which displays various THAC0 values.
  -->
  <procedure id="cAtkInfo" scripttype="mouseinfo"><![CDATA[
    @text = "{b} - THAC0 - {/b}{br}{align left}"
    var i as number
    for i = 1 to 30
    @text = @text & "{br} Level " & i & ": "

      ~display our THAC0 values based on class
      if (tagis[ClassCat.Psionic] <> 0) then
        @text = @text & hero.child[THAC0Psi].field[THAC0].arrayvalue[i]
      elseif (tagis[ClassCat.Priest] <> 0) then
        @text = @text & hero.child[THAC0Pri].field[THAC0].arrayvalue[i]
      elseif (tagis[ClassCat.Rogue] <> 0) then
        @text = @text & hero.child[THAC0Rog].field[THAC0].arrayvalue[i]
      elseif (tagis[ClassCat.Warrior] <> 0) then
        @text = @text & hero.child[THAC0War].field[THAC0].arrayvalue[i]
      elseif (tagis[ClassCat.Wizard] <> 0) then
        @text = @text & hero.child[THAC0Wiz].field[THAC0].arrayvalue[i]
        endif

      ~ If this was the last level we got to, change the color of the rest
      ~ of the text
      if (i = field[cTotalLev].value) then
      @text = @text & "{text clrdisable}"
      endif

      next
    ]]></procedure>
 
Put that portal inside a template. Then, the template can be assigned to use the agent pick when it's placed into the layout:

Code:
<templateref template="clsPowInfo" useagent="yes" taborder="10"/>

Then, your script won't need to reference the agent in its code - its initial context will already be that agent pick.
 
That got it working, thank you Mathias.
 

Attachments

  • Class Tab Progress.png
    Class Tab Progress.png
    197.9 KB · Views: 8
  • Class Tab progress 2.png
    Class Tab progress 2.png
    258.8 KB · Views: 5
  • Class Tab progress 3.png
    Class Tab progress 3.png
    254.1 KB · Views: 6
  • Class Tab progress 4.png
    Class Tab progress 4.png
    485 KB · Views: 3
  • Class Tab Progress 5.png
    Class Tab Progress 5.png
    442.4 KB · Views: 5
Last edited:
I am trying to figure out how to tackle adding a custom ability to the table, like Wizard Specialization school, where the user is presented a list of options and gets to choose one of the options presented.
 
Look back at the original thread I linked you to for agents - study the second code example in that.
 
Mathias,

Can a <thing> have useagent= in it? or is it just <table_whatever> and a <template> that are allowed to use that feature?
 
The agent linkage is set up by the table.

The same <thing> could be added to many different tables, and will have a different linkage
depending on which one it's added to. That way, whenever you have an archetype that uses the Rogue Talents, you don't need to re-write all of them for this new class/archetype combination - you just add them to the new class, and the linkage
allows them to pull information from that class, same as they would when pulling information from the Rogue class.
 
Sorry, I was incorrect - one agent setting is available to fixed tables: agentlist.

In Pathfinder's class special table:

agentlist="SpecSource"
 
Sorry, I was incorrect - one agent setting is available to fixed tables: agentlist.

In Pathfinder's class special table:

agentlist="SpecSource"

Thank you, Mathias, I thought there had to be something since I couldn't set a table inside a template.
 
Sorry, I was incorrect - one agent setting is available to fixed tables: agentlist.

In Pathfinder's class special table:

agentlist="SpecSource"

Mathias,

Is the part in the quotes in the pick context, thing context, or the agent linkage?
 
Back
Top