FEATURE: Hero Lab integration

Developer discussion regarding MapTool 1.4

Moderators: dorpond, trevor, Azhrei

Forum rules
Posting now open to all registered forum users.
Post Reply
User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

FEATURE: Hero Lab integration

Post by JamzTheMan »

OK, so this one is a personal request. :)

Normally I wouldn't suggest, "Hey, lets support this ONE software" but it is very widely used and other VTT's have support/integration at some level.

There may be other software and could be some overlap depending on what we do but I'm mostly familiar with HL. If you could "easily" port in creatures/pc's to tokens, it could give MT a user based push. I've worked with Rob and some of the developers in the past as well on other projects and I'm sure we could get some support from the other end as well if needed.

My initial proposal would be:

1. Treat HeroLab Portfolio's as Asset Folders (.por files are simply zip files with an index.xml inside listing and pointing to characters inside the file. This could be leveraged for other "zip" types if done right)

2. When selecting a Portfolio, the asset window shows the individual characters and can be dragged into MT as normal tokens bringing in the character data with it.

3. The character data is XML, I propose a separate token data space to hold this as properties are framerwork specific. So something like Notes/GM/Notes, maybe Character Data? would hold it as text.

4. Add a few XML DOM commands that can query XML data. Would be useful for other integration points.

From here normal macro code can initialize the token.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: FEATURE: Hero Lab integration

Post by RPTroll »

Craig had mensioned a Roll20 character sheet integration as well. Is this similar?

If so we should look at an abstraction layer that would be used to integrate with those two as well as future possibilities.
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: FEATURE: Hero Lab integration

Post by JamzTheMan »

I think the roll20 character sheet integration is actual character sheets (in html/css?) but one supports the other. HL integration would be setting up token properties only.

The way I had planned for that was to create a macro or two that you could supply an xpath to query the xml data to populate a property.

I'd also propose not caching .por files as an asset and instead create a fileWatcher event so the token knows when a .por file has been updated and could update (prompt?) the token.

The fileWatcher code would be a reuse on some other feature requests.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

MandyRae
Cave Troll
Posts: 53
Joined: Sat Mar 12, 2016 11:39 am

Re: FEATURE: Hero Lab integration

Post by MandyRae »

Honestly, the biggest issue I see with implementing this is the naming of the token properties and the code of the various frameworks out there. You would either have to code an import for each framework, or something similar, or the frameworks would all have to be rewritten using a standardized set of token properties . . .

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: FEATURE: Hero Lab integration

Post by JamzTheMan »

MandyRae wrote:Honestly, the biggest issue I see with implementing this is the naming of the token properties and the code of the various frameworks out there. You would either have to code an import for each framework, or something similar, or the frameworks would all have to be rewritten using a standardized set of token properties . . .
Correct. So the "integration" is just the fact that it can create tokens based on images in the portfolio, link to the portfolio for quick updates, and extract and store the 3 statblocks. Since Hero Lab supports more than just Pathfinder, you obviously can't hard code a specific RPG.

But, I think you will find this integration is a lot easier than cut/pasting the data into the token. Also, a new macro that can grab data from XML using XPath makes it a better approach (IMO) than using regular expressions and also makes reading/changing the macro easier. I've supplied a macro in my campaign that does this. If your framework used different properties, you should be able to change it easy enough. Not every framework will want/need the same properties.

I had thought of adding a <link> property or such, basically just adding a place to add an xpath on the properties page but a lot of properties are really JSON objects or string properties so it's not a 1:1 mapping.

Now, of course, a framework may still want to use regular expression for non-hero lab users but it's here for use if you want it. I for one didn't want to do some sort of "export" in Hero Lab, copy, open MT, click macro, paste, "process" anymore for myself so here we are :)

Edit: BTW it's already done, you can view/test it in my fork...
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

Post Reply

Return to “MapTool 1.4”