A Pathfinder Hero Lab to Maptool converter

Show off your RPG maps, campaigns, and tokens. Share your gaming experiences and stories under General Discussion and save this forum for things you've created that may help others run their own games. Use the subforums when appropriate.

Moderators: Azhrei, dorpond, trevor, Gamerdude

User avatar
Dervish
Giant
Posts: 121
Joined: Thu Sep 15, 2011 7:52 pm

Re: A Pathfinder Hero Lab to Maptool converter

Post by Dervish »

Sozin did not so much fade away as much he got frustrated by the fact that Maptool would not allow the functionality that he had envisioned.

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

Re: A Pathfinder Hero Lab to Maptool converter

Post by JamzTheMan »

The problem I've seen with most of the HL converters is they last until HL changes the XML structure which is more often than not. Also, they always seem to lock you into a framework as far as properties go.

I've been toying with incorporating HL portfolio support IN maptool itself. Have them show up as Assets like rptok tokens. (although you can have multiple characters in a .por so not sure how to handle that yet).

But my current thinking is to expose a new function, "xpath". And maybe a special token property to store the XML (may not be needed). Then, you import the .por character, you have the XML, you can now use xpath commands to retrieve your data and set properties (or leave the property as a [r: xpath(...)] command. If all the properties were mapped, moving to a different framework would just be coping those xpath to other properties. You could even set up a table of xpath commands that map to property names? And if HL changes, it's just a change to the framework's xpath command(s).

Also, xpath function could open up other avenues of data gathering/storing. I could probably also use gson to supply a xml->json converter for those that would rather work in json.

Just some thoughts on design, if there is interest, feel free to comment.
-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

Dracones
Cave Troll
Posts: 68
Joined: Mon Nov 14, 2011 8:04 pm
Location: Fort Pierce, FL

Re: A Pathfinder Hero Lab to Maptool converter

Post by Dracones »

Yeah, ideal would be from within Maptool itself. For multiple characters(and minions, they get their own XML block with characters inside that), you'd probably have to write a specific HL importer that parses the por(zip) and pulls out the character list from the XML(which is all over the place).

Then you could remove that specific character XML block(and nuke the sub-block minion entries which will mess you up) and XPATH it. So a little: Load file, pop up which character you want to work on if more than 1, run XPATH on that block to copy onto the selected token.

Once you get to that point you probably won't go insane working with their XML. Insanity past that point is when you try to grab all the juicy and pretty spell/feat/item detailed XML in the character blocks and make a reference off of that.

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

Re: A Pathfinder Hero Lab to Maptool converter

Post by JamzTheMan »

ya, retrieving the xml is easy, I have a php already doing that by specifying a character name from shared google drive.

So, in Asset viewer, would I show 1 .por asset and if you drag n drop it, prompt you for a character... or

show 1 asset per character. eg multiple assets for the same physical file. I'd like to do it this way using imbedded images for thumbnail, but not sure if it's feasible...
-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

Tinalles
Kobold
Posts: 24
Joined: Sun May 27, 2012 9:39 pm

Re: A Pathfinder Hero Lab to Maptool converter

Post by Tinalles »

Sounds like an interesting approach. Were you anticipating live interaction? I vaguely recall Fantasy Grounds is supposed to have a live connection with Hero Lab.

In the meantime, hl2mt's working great for me. I've added a couple lines to sort the lists of things alphabetically (feats, specials, resists, etc). It was a serious pain locating the correct entry in the list when it was just higgledy-piggledy according to how Hero Lab organized the data. Alphabetical is much nicer.

I also added a couple lines to the initiative macro to actually add the tokens that call it to Maptool's built-in initiative tracker. The existing macro was calling setInitiative(), but hadn't called addToInitiative().

Hey Dracones ... should I send you a pull request to get my changes added back to your repository? I'm happy to give back to the community.

Next up, I'm trying to figure out why selecting a group of tokens and clicking Perception makes them all roll a check using the modifier of the first selected token, rather than their own. It'd be very handy to be able to roll saves and skill checks for groups of things all in one go rather than by selecting them one at a time.

After that I may add a Concentration check button to creatures that spells or spell-like abilities.

Longer term, I miss the "Temps" button from TokenLab! It was very handy being able to assign temporary bonuses/penalties to attack, damage, saves, AC, and so on. But I'm guessing that adding that will be rather more complex.

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

Re: A Pathfinder Hero Lab to Maptool converter

Post by JamzTheMan »

Define live? I possibly could do a file watcher but users would have to hit save in HL after every change, and then with asset cache it could get hinky. A one button refresh may be more in line.

And the problem I had with previous hl to token converters is they always generate macros and such based on their own framework if any. I would prefer to use established frameworks like lmarks's. Which btw you may want to look at, it has all them temp hp mods and all that fancy stuff for you.

and less than 50% of the time do I need stock monsters, many I need to throw templates or class levels on, so batch creation doesn't appeal to me. I prefer a quick method of generating a token as needed.
-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

Tielc
Cave Troll
Posts: 25
Joined: Wed Jul 16, 2014 10:41 pm

Re: A Pathfinder Hero Lab to Maptool converter

Post by Tielc »

Hi, I have been fairly unsuccessful in getting the Sheet to show in the Nerps version of Maptool. For instance, I get this message a lot

<html>A stack overflow has occurred.<p>This is commonly because a macro being used has exceeded the stack space specified when MapTool was executed.<br>Please run MapTool again and specify a larger stack size.

However, the Nerps fork of MT was written with b89 which means the launcher doesn't work with Java7.

Finally, I also am having issues where the vision of every token is being set to conic, and forcing facing for each Token created. Any thoughts?

Edit: I'm also not getting the BAB or CMB to show up in my properties. Everything else comes across fine except these few things.

Sorry for the massive image size :(.

Is there by chance source available for this? I might be interested in seeing how you read the .jor files, and convert this a bit to .NET.

Tielc
Cave Troll
Posts: 25
Joined: Wed Jul 16, 2014 10:41 pm

Re: A Pathfinder Hero Lab to Maptool converter

Post by Tielc »

Alright, I figured I would keep my previous post as opposed to editing it. I have, for the most part gotten everything working. Now there's a few other challenges I'm still struggling with. I'm hoping the author might be able to provide some insight. Possibly source as I'd like to ultimately be able to tweak this myself. Though that will involve, for me anyway, moving it over to either C# or VB.NET (Windows Only)

BUGS or ISSUES
-Conic is being set as the vision type for every token. I would like to be able to reference the proper vision as set, though I can chance this manually. Still, setting it to conic automatically enables the Facing of the MT Tokens.
-Some properties aren't being mapped over to the specified properties, specifically: BAB & CMB
-The Properties Chosen for Health are not honored in the Health Macro Frame. It's requesting the values as shown in the videos on YouTube (HPC, HPT & HPM), whereas I set the Properties to use as (HPCurrent, HPMax, HPTemp). This is easily remedied by changing the name of the properties I use, however, I assumed this would honor the Property Mappings.
-I'm having some attack macros roll the To Hit multiple times, even for single attacks (not including Full round Attacks). In these cases, it's printing the same string twice for the attack roll, then displaying the damage once. I have no clue why it is doing this though. Looking at your macro, it only lists the values once. EDIT: This can be resolved by disabling Insert Smilies from the settings.

REQUESTS
-Critical Threat check. In my Macros, I set a Crit Threshold in the macro, check against it, then roll for confirmation and provide multiple dice rolls and multiplication of damage bonus automatically. Is this something that could be added to the attack macros that are generated? I don't use the table like you do, but they look like the follwing:

Code: Select all

<b>Short Sword Attack</b><br>
[h: AttackRoll=d20]
[h: Bonus=2]
[h: CritThreat=19]
[h: Damage=d4]
[h: CriticalDamage=2d4]
[h: Effect=""]
Attack Roll: [AttackRoll+Bonus] | Damage: [Damage][r:Effect]
[if(AttackRoll>=CritThreat), CODE:
{<span color=Red><br><b>Critical Chance Confirmation:</b> [d20+Bonus] | <b>Critical Damage:</b> [CriticalDamage][r:Effect]</span>};{}]

-Can you map the property Initiative please? Or, update the Macro that's created to Roll Initiative to include the following: [h: addToInitiative()][setInitiative(1d20+Init)]. Currently, I just select all the NPCs and click this macro and they're added automatically to the initiative tracker in MapTool. They require the Property in this case, Init. I do the same thing for my PCs, but manually adjust their values for their physical rolls.
-Could you by chance add a Concentration Check Roll Button based on the Caster Level? I know this can change based on which spells they are using, but this is another macro I've in the past added automatically to each of my casters.
-Allow for modification of the Tables Printed for Rolls. I'm running into a lot of situations where the default 200px isn't wide enough to display the results on a single line. It would be nice to be able to adjust this before outputting for my preferences (400px)

adventuremagic123
Cave Troll
Posts: 33
Joined: Sun Jan 06, 2019 12:29 pm

Re: A Pathfinder Hero Lab to Maptool converter

Post by adventuremagic123 »

hl2mt.exe is invaluable! Thank you!

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

Re: A Pathfinder Hero Lab to Maptool converter

Post by JamzTheMan »

FYI We do have HeroLab support native inside MapTool now as of 1.5.0. Add any .por file to your Asset Library like a folder, click on it, it'll create tokens based on characters in the portfolio. It'll link to the por file as well and exposes access to the statblocks and images for that character.

See the Wiki for details.
-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

adventuremagic123
Cave Troll
Posts: 33
Joined: Sun Jan 06, 2019 12:29 pm

Re: A Pathfinder Hero Lab to Maptool converter

Post by adventuremagic123 »

JamzTheMan wrote:
Thu Oct 23, 2014 12:23 pm
The problem I've seen with most of the HL converters is they last until HL changes the XML structure which is more often than not. Also, they always seem to lock you into a framework as far as properties go.

I've been toying with incorporating HL portfolio support IN maptool itself. Have them show up as Assets like rptok tokens. (although you can have multiple characters in a .por so not sure how to handle that yet).

But my current thinking is to expose a new function, "xpath". And maybe a special token property to store the XML (may not be needed). Then, you import the .por character, you have the XML, you can now use xpath commands to retrieve your data and set properties (or leave the property as a [r: xpath(...)] command. If all the properties were mapped, moving to a different framework would just be coping those xpath to other properties. You could even set up a table of xpath commands that map to property names? And if HL changes, it's just a change to the framework's xpath command(s).

Also, xpath function could open up other avenues of data gathering/storing. I could probably also use gson to supply a xml->json converter for those that would rather work in json.

Just some thoughts on design, if there is interest, feel free to comment.
I suppose since this was posted in 2014, I'm a bit late with my comments ... 😁

These are great thoughts. Definitely a good general solution, however there are probably a lot of GMs out there who don't have the programming skills.

MapTool's original design seemed to have that in mind. I think they need to be supported -- though with xpath available maybe the community will do it.

Elorebaen
Dragon
Posts: 364
Joined: Sat Dec 22, 2007 5:37 pm

Re: A Pathfinder Hero Lab to Maptool converter

Post by Elorebaen »

Awesome! I didn't realize there was this sort of support for HeroLab. Thank you!

Gellor
Kobold
Posts: 7
Joined: Sat Jun 05, 2010 3:55 pm

Re: A Pathfinder Hero Lab to Maptool converter

Post by Gellor »

Hello,

Just curious if I am missing something. I was able to import my .por file into MapTool 1.6.1, so thank you. However, it doesn't seem to create the macros so, for example, I could simply swing a sword, make a save, etc. Is that functionality included? I used to use TokenLab.

Thank you for any assistance you can provide!

Post Reply

Return to “User Creations”