Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

Reply
 
Thread Tools Display Modes
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old June 24th, 2018, 12:50 PM
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 by risner; June 24th, 2018 at 03:17 PM.
risner is offline   #1 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old June 24th, 2018, 02:31 PM
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.



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>
risner is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old June 24th, 2018, 03:21 PM
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.
Mathias is offline   #3 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old June 24th, 2018, 08:20 PM
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...._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 by risner; June 26th, 2018 at 06:05 AM.
risner is offline   #4 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old June 28th, 2018, 12:33 PM
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).
risner is offline   #5 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old June 28th, 2018, 12:33 PM
I guess I'll try to hack up a prototype for agent use, but there is very little in the way of examples.
risner is offline   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old June 28th, 2018, 01:12 PM
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.
Mathias is offline   #7 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old June 28th, 2018, 03:10 PM
The system allows multiple levels of separate classes, but I don't see how it matters which order I took the classes. So I guess it doesn't matters for HL purpose.

I'll dig on the agent tab some more:
This is the only useful link I could find regarding agents:
http://forums.wolflair.com/showthrea...ighlight=agent
So I'll try to use it.
risner is offline   #8 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old July 15th, 2018, 08:05 PM
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.
risner is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old July 15th, 2018, 09:48 PM
http://forums.wolflair.com/showthrea...ighlight=agent is the thread I'd look at.
Mathias is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 10:02 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.