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

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

A Pathfinder Hero Lab to Maptool converter

Post by Dracones »

hl2mt version 0.81

EDIT: REVISED: 07/03/2015

This is a Hero Lab to Maptool token converter which can be found at https://bitbucket.org/mmealman/hl2mt

This is a desktop application written in Python which can take batches of Hero Lab .por files and convert them into Maptool .rptok files which can be dragged and dropped into Maptool. The program takes data found in the Hero Lab files and creates macros for weapon attacks, skill rolls and so on.

Here's a video showing a quick overview of how hl2mt works.

Below are some video tutorials on using the app if you want to see a more step by step showing of some of the things it can do:

Tutorial 1 - Basic usage
Tutorial 2 - Folders
Tutorial 3 - Making use of sub-folders
Tutorial 4 - Token properties
Tutorial 5 - Indexes
Tutorial 6 - Using Dropbox to host indexes
Tutorial 7 - The Community Bestiary
Tutorial 8 - Custom Macros

Download Links

Windows
Linux 32bit
Linux 64bit
OS X 64bit Mountain Lion

07/03/2015 changes:

  • Project moved to Bitbucket.

Version 0.81 changes:

  • Added in the ability to add in custom macros in hl2mt that get put onto tokens as they get created.
  • Removed "GM Macros" as their functionality is now handled by custom macros.

Version 0.75 changes:

  • Created an output option for "GM Macros". When this is selected it'll create on the token a group of GM macros. Currently these macros will manipulate the token name(set the name to unknown, back to name, or name plus a random number like 'Goblin 34').
  • Changed the HP macro to work with temporary hit points.


Version 0.7 changes:

  • Added in an option for ability check macros.
  • Weapon macros will now be created that roll for full iterative attacks.
  • Added in GUI options to support the above.
  • Changed the application icon for better Mac support.

Version 0.6 changes:

  • Added in compatibility for Hero Lab 4.2c / Pathfinder 8.0
  • Fixed some GUI elements and default value behavior that wasn't working correctly on OS X.
  • Added a OS X binary to the download section.

Version 0.5 changes:

  • Re-wrote the app using Qt for the user interface and made it easier to pick your own images for tokens.
  • Removed table indexing. Remote HTML is now the only option if you want indexing.
  • Created binaries for Windows and Linux.
  • Created video tutorials and the app should be more user friendly.
[/list]
Last edited by Dracones on Sat Jul 04, 2015 12:25 am, edited 13 times in total.

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 »

An updated screen shot:

Image
Last edited by Dracones on Sun Oct 20, 2013 4:24 pm, edited 1 time in total.

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 »

Nice work! I had started looking at Sozin's TokenLab as well but it looked abandoned and not very compatible with the framework I use and found it easier to stick eith the statblock parser.

This looks like it has potential due to the fact that it has some property mappings. I have a couple of questions, is there a reason you have to Export as xml first? Were you not able to use what is stored in the portfolio? Now that .por files are basically just .zip files, they have the raw xml data that HL saves in as well as the .txt, .html, & .xml statblocks (and portraits). It would be nicer to just supply the path of the .por file and go from there.

And does it have to be a local file? Can you point to a http link? I have access to all my players portfolios via Google Drive. In fact, I have a macro that retrieves the .txt & .html statblocks straight from Google Drive and updates the token. I'd love to see if I could automate it a little more with what you have but I haven't taken the time to map out their xml -> properties.
-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 »

Heh, I never even looked at the por files. I assumed they were some binary format. Let me dig into them and see if I can use those, because you're right, it'd be a lot easier. I'm not sure about the http support. Right now I have some logic in to work with subdirs, for example if you have: xml/Undead, xml/Summonings it'll scan down and work through them, outputting your tokens into token/Undead, token/Summonings. So I'd have to change out the logic behind that to also be http friendly.

But ultimately I'd like for this tool to work with Realmworks so it may make sense to be able to fetch pors over URL anyway.

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, just a couple months ago they changed the .por output (it was binary) to zip, which had the added benifit of smaller files.

In root you will find the index xml which lists all the characters and there location within the zip for each file type and their portrait. So it should be easy to list all the characters in the .por to select from to export to token.

Maybe you could have a "batch" mode if you want to parse through multiple portfolios (which it seems it's how you currently have it?) or single mode. I've been anticipating Realm Works as well and been trying to find way to sync everything up. I've been thinking of doing some sort of "filewatcher" so I could detect if a portfolio has changed and auto-update the token.

Actually, it would be pretty sweet if this just ran on the web. I was actually thinking of looking into Google App Scripts to translate portfolio to token all on a google drive, one click shopping :)
-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
Full Bleed
Demigod
Posts: 4444
Joined: Sun Feb 25, 2007 11:53 am
Location: MD
Contact:

Re: A Pathfinder Hero Lab to Maptool converter

Post by Full Bleed »

I like Hero Labs. But the pricing is pretty steep for a group. I'd need at least $70 to get the core of my Pathfinder game (GM) and my players would need at least $40 each.

Can we add our own Creatures to Hero Labs? What about house rules? Is it very customizable?
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

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 »

JamzTheMan wrote:In root you will find the index xml which lists all the characters and there location within the zip for each file type and their portrait. So it should be easy to list all the characters in the .por to select from to export to token.

Maybe you could have a "batch" mode if you want to parse through multiple portfolios (which it seems it's how you currently have it?) or single mode. I've been anticipating Realm Works as well and been trying to find way to sync everything up. I've been thinking of doing some sort of "filewatcher" so I could detect if a portfolio has changed and auto-update the token.

Actually, it would be pretty sweet if this just ran on the web. I was actually thinking of looking into Google App Scripts to translate portfolio to token all on a google drive, one click shopping :)


Dug into a por file and it'll be easy for me to parse those. I'll code that in tomorrow. Thanks for the heads up on that.

The app does have a batch mode, but that's to run it without a GUI. For example I have a crypt.sh that runs:

Code: Select all

python main.py --config crypt_everflame.conf --batch


That's for a module I'm working on where I have a separate config file with different options just for that module. But in both modes(GUI and console) the app is designed to run on batches of files. Part of the reason it does that is so I can create a master index against all the special ability, feat and spell text Hero Lab provides. If a Lich has magic missile and a PC has it, they'll both point to the same row in a table for the spell text.

Right now my main interest is getting this stable and working with whatever stuff people want it do. Later it wouldn't be a big deal at all to create a simpler GUI for creating a single token(or web interface) that uses this as the back end engine.

Full Bleed wrote:I like Hero Labs. But the pricing is pretty steep for a group. I'd need at least $70 to get the core of my Pathfinder game (GM) and my players would need at least $40 each.

Can we add our own Creatures to Hero Labs? What about house rules? Is it very customizable?


Yep, HL can be pricey. But I like it because otherwise I personally wouldn't be able to math up Pathfinder characters. HL is very customizable, but it's in its own language which is probably a PITA to learn. If you have the bestiaries you can import "stock" creatures which are the base monsters and then mod them however you want. Add weapons, levels, I think even templates. You can also tweak hp, ac, various stats, add in feats, etc etc. There's also a community repository http://www.d20pfsrd.com/extras/community-creations/hero-lab where people have created encounter files for modules and APs. For example for making Crypt of the Everflame I just loaded up the por files made by the community, exported them out, found some images and converted them all over into tokens using this app.

What's attracted me to HL the most though is the character output data has in all the stats you need plus all the descriptions. So that means I can import a bunch of stock monsters or whatever into HL, save them and then convert them all over via this tool and have that data in Maptools. And the nice thing is that when new supplements come out, say Robert's Redneck Book of Spells, as long as Hero Lab has the data it'll export into MT without me having to change the app.

The downside is that those supplements usually cost $, but once you buy them you own them forever.

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 »

Full Bleed wrote:I like Hero Labs. But the pricing is pretty steep for a group. I'd need at least $70 to get the core of my Pathfinder game (GM) and my players would need at least $40 each.

Can we add our own Creatures to Hero Labs? What about house rules? Is it very customizable?


Ya, buying the packs per person can get a little expensive. Although, technically, you DO get 2 licenses, ie you can install it on 2 PC's. And technically, you can buy up to 2 more licenses for 10$ each for a total of 4. And each of those 4 all get what ever you purchase pack wise. I'm not sure what the EULA reads so do what you want with that info. I personally have a few laptops running the extra licenses that I've, um, loaned out to my friends. In total, our group still has 4 seperate purchases with a total of 9 licenses running.

Regarding building your own monsters, absolutely, the best thing I like about it is actually being able to load up, say, a bug bear and then throwing a few levels of ranger on it. Or throw on a "template" or two. It calculates the CR for you. You can even create a creature from scratch and it calculates the CR for you as well.

I've used PCGen, spreadsheets, gobs of tools, across many game systems. I won't go an say ZOMG IT'S AWESOMESAUCE, but it's pretty close, at least for Pathfinder and Shadowrun. Most of my players are cheap but after a dozen game sessions and a few dozen "errors", my players find it invaluable. Especially at the table, nothing beats clicking on "Prone", "Power Attack", "Invisible", "Prayer" (etc etc) and having it all figured out for you at the table. We had a running line where one player kept saying "Meh, making characters by book is easy" but almost every weak I'd have to point out, "btw, you can't take that feat because of abc and your pluses should be +7 not +9, I thought it was easy?" :)

Regarding house rules, it depends on what they are. There is a "editor" and it can be either really easy or hard. If you have a feat/item/template/class/etc that just like "xyz" but with "abc" sometimes you can just clone and change. But the Community is really active so someone will always answer your "how do I do xyz" question.

Run it in Demo mode if you haven't. Can do everything except print and save (core rules only, no APG, etc).
-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 »

Okay, this now works with Hero Lab por and stock files. Since some stock files have duplicate names in them I've modded the app to add 1, 2, 3 at the end of the token filename as needed to not overwrite duplicate Hero Lab entries. Some of the stocks have multiple versions of NPCs(Iconics file as an example).

I also hacked up the image detect stuff to handle a Default.whatever image in the image directories. For example the stock files:

Code: Select all

Dragons, Chromatic.stock
Dragons, Imperial.stock
Dragons, Metallic.stock
Dragons, Primal.stock


have over 150 Dragons in them. You can put all these stock files in a Dragons sub-folder and put a default.png dragon image for portrait/pogs and all the dragons will use that. Later you can toss in Red.png, Gold.png, White.png to start tweaking out the different dragon colors since all dragon names have their color in them it'll pick those up. I also tested this with the Elementals.stock file and used Fire.png, Water.png, etc and that worked out pretty well.

I might be running into issues with the Master Index tables growing too large and causing some issues with Maptools. I have 240 tokens with around 800 entries in my HeroLabIndex table storing feats, spells, etc. If you run into this try to turn indexing off and see if that helps.

Since I can now import stock files directly from HL(they're in your HL data folder) I'm not sure how best to store all this spell/feat/etc info. There are about 310 stock files(in my install of HL anyway) each of which could contain 10-100+ monsters and NPCs, so keeping an index of all those abilities may start to run into silly mode.

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 »

Regarding storing abilities and spells. I'd almost rather just have everything stored on the token. On one end, I may be duplicating data having, say, 6 of the same token. On the other end, in a table I'm storing data for hundreds of tokens I'm not using at the moment.
-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, I may revisit that as an option. I tried working with it initially but trying to store Hero Lab data into JSON was finicky. I switched to using tables and that's been very happy with anything I've shoved into it, so that's been an up-side.

I'd love for a proper on disk sqlite database to store all data this into.

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 »

If you were using Java, it's pretty easy to convert XML -> JSON. Not sure about Python.

Technically, you "could" write all the data to an online database and then just create hyperlinks to a php/java/phython page that served up the data. If you want to go that route and need one, let me know. I can create one on my server and host the data for you. I can create a few php pages as well.

Another alternative is to use Google App scripts. If you are familiar with JavaScript. Google gives you "simple" db to store JavaScript objects in. It would be universal for everyone though (good/bad thing).
-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 »

I run my own server too, so that isn't a problem. I don't want to become a 'store' of data for other people though. The way I'm trying to approach this is the person using this app owns Hero Lab, the app isn't doing anything other than reading their own personal Hero Lab stuff and doing things with that data for their own personal use. I also wouldn't want the app to depend on any 1 person hosting things.

A remote store where the Feat/Spell links would be nice. Maybe create a HTML page for everything it indexes, zip that up and let the user put it wherever they want themselves? Just have the app ask for the URL to their repo so when it builds the hyperlinks it points to the right location?

That way people can host it on their webservers, dropbox, whatever they want to do. There'd be nothing that'd prevent someone from building a huge HL index, hosting it and letting other people link their macros against that. It'd just be that anyone could build their own index if needed.

Thoughts/ideas?

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 »

Eh, hrefs in a Maptool frame opens up an external browser.

Any way to have external HTML pulled in and display with MT? I really don't want to leave the application when referencing the data.

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 link would have to be to a maptool frame or dialog. Then THAT frame would be importing the data. I'm not 100% sure what you can pull in, but I've pulled in images using an external source. Hmmm, not sure what HTML MT supports, probably not iframes or such...

Maybe not a good idea after all. :(
-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 “User Creations”