Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Script] Pathfinder Hero Labs Character/Monster Importer

Purpose: This script is designed to import Pathfinder characters created in Hero Labs (<a href="http://www.wolflair.com" rel="nofollow">www.wolflair.com</a>) into Roll20. This is accomplished by parsing Hero Labs custom xml output and using this to create journal entries in Roll20. This script is designed to work with Sam's Pathfinder v2.0 style of sheet only (Roll20 Default Pathfinder Sheet) Basic Instructions: 1) Open the Hero Lab portfolio that you wish to import and from the File pull down menu select "Save Custom Output". 2) In the next menu, choose "Generate XML File" making sure to output only the current hero. 3) Copy the contents of the xml file to your clipboard using a standard text editor like notepad (Do not use Wordpad!!). 4) In Roll20, place a token down that represents this hero, then edit the token and paste the contents of the xml file to the GMNotes section of the token. 5) As there are several required inputs (due to limitations in the xml), I suggest creating a Roll20 macro using the following syntax: !import ?{Melee Stat?|str} ?{Ranged Stat?|dex} ?{CMB Stat?|str} ?{Caster Class 0 Stat?|none} ?{Caster Class 1 Stat?|none} This will pass the 5 required arguments to the script: Melee Stat = The ability score responsible for Melee attacks Ranged Stat = The ability score responsible for Ranged attacks CMB Stat = The ability score responsible for determining Combat Maneuvers. Caster Class 0 Stat = The ability score responsible for determining bonus spells for this class. Caster Class 1 Stat = The ability score responsible for determining bonus spells for this class. Limitations: Please be aware that the Hero Lab xml output does not directly include all data required to fill out the character sheet directly, however with that said, I tried to make sure to cover as much information as possible. There are simply some things that were difficult/impossible to import into Roll20 with 100% accuracy, so please make sure to check the accuracy of your sheet after import. The list of limitations may seem long, but in my experience I didn't consider any of these game breaking compared to the time savings that the script provided: - Cannot break down HP, BAB, and Base Saves by class in the class information section, so all information added to class-0 line. - Cannot determine any Favorite Class bonuses because they are not reported in the xml. - Cannot handle skill replacement rolls such as the Bard's Versatile Performance, these skills should be updated manually. - Many bonuses, including but not limited to traits, magic items, or feats are not specified in the xml, therefore all bonuses are entered as misc bonuses. - Cannot determine accurate HP formula, if you play a class or archetype that does not use CON for HP you will need to manually modify HP and/or the formula. - Temporary Hit Points (such as via spell adjustments like false life) are calculated based on Con. - Cannot populate the Next Level XP field as this information is not present in the xml file. - Cannot set the Armor Type (Light, Medium, Heavy) as this information is not present in the xml file. - Currently the Roll20 Sheet does not have a space for the Burrow Speed attribute, therefore I am saving it as a misc speed. - Currently the Roll20 Sheet does not have a space for the Fly maneuverability category. - Many "Special Abilities" do not have a proper classification, doing a random sample, it seemed that the majority were Racial Traits, therefore if you are missing a class ability, you might want to check the Racial Traits area to see if it was copied there. This is a limitation of the xml output. - There was no simple way to calculate ability uses or wand charges, so while this information is often in the name of the ability/item, the appropriate fields on the sheet will need to be updated manually. - There is no accurate way to calculate Class Skills per level as this information is not in the xml, therefore it should be manually updated. - Cannot determine the source of miscellaneous spells that exceed the amount of spells known. - Spells Known is populated on spontaneous casters purely based on the spells in their known list, this may not accurately represent the rulebook chart in cases where bonus spells are added for various reasons. - Cleric Domain Spells, Wizard School Specialization Spells, and other areas where Bonus Spells are gained (favored class bonuses) are not reported the xml, therefore you should double check to make sure that spells per day is set properly. Often Domain spells and Specialization spells need to be added manually. - Weapons, there is no way to properly determine the damage bonus of a weapon, the information needed is not in the xml. So, I import the weapons with a note to check the accuracy of the weapon. - Weapons, the only way to identify "Masterwork" and enhancement bonus (i.e. +1) is if the weapons start with these field, therefore weapons made from special materials that are automatically masterwork may not be identified, as well as weapon enhancement bonuses that don't precede the weapon. - Reminder, do not use Wordpad for copying and pasting the xml files, it causes strange characters throughout the xml. Not implemented in this version: - Homeland field - Occupation field - Hero Points - Prestige/Fame Contributors (Thank you!): HoneyBadger, whose xml parsing code from the D&D4E monster importer is the basis upon which this script is built. Sam, whose awesome Pathfinder Sheet really makes this script possible, as well as helping me when my late night math was failing me. Aaron, Brian, BoomerET and several others whose scripts and advice helped a true novice fix and begin to understand coding Zepth, Kuriin, and Pat K. (great friend of mine) for help testing this script and fixing all of the immediate bugs. The script can be found here: <a href="https://github.com/beeke01/PathfinderHLImport/blob" rel="nofollow">https://github.com/beeke01/PathfinderHLImport/blob</a>...
1407415398

Edited 1407417413
Also, this is my first coding project, so I am certain there will be additional bugs. Also I apologize in advance to the veteran coders who could have certainly done this script in a much more efficient and effective manner (I am open to any suggestions for improvement).
Well done on getting this to release Kevin. It has helped me immensely with building my RotRL campaign
WOO WOO! This script is amazing!! Thanks Kevin for releasing it. :-_)
Giving this a bump for those who haven't seen it. :)
Is the Pathfinder V2.0 the pathfinder looking one or the one that Sam made to look like the 5E sheet? I assume its the Legacy Sheet.
No, version 2.0 is the latest and greatest, this will not work fully with the legacy sheet.
For minion, do we need to do anything extra or can we now put the entire Herolab XML in the character GM note and import? I remember you mentioned we had to do something with HoneyBadger's code...don't know. :-) This + CharDup = Amazing!
Minions should be able to be imported, but it will not import as part of the character, you need to switch to the minion in Hero Labs and save an xml of the minion, then you should be able to import that. Kevin
I pushed a new version to Github, only includes a few minor bug fixes. Notes in the script are updated: Bug Fixes: Fixed SR not populating properly on Import Fixed Duplicate spells for NPC, now only memorized spells are added to the sheet Changes: Updated how weapons are imported by setting STR as the default value and calculating the damage bonus from it. Still not perfect, but should help with mass imports where 90% of attacks are based on STR. Known Issues: If a Spellbook class both populates his Spellbook AND memorizes spells in Hero Lab before import, duplicate spells will appear in their spell list. Due to possible multi-class combinations I can't find a good way around this because the spells are duplicated in two different sections under this condition. You can workaround this by importing Spellbook casters prior to spell memorization but after adding spells to their spellbook. Are there any feature requests? I have been working on "Powercarding up" and have a custom script that will automatically create some macros based on the import, but this is specific to the use of Honeybadger's Powercard script at this stage. The custom script is located on Gisthub if they want to see it.
If possible, adding mythics would be great. Once we get a perfect weapon import system, I think everything will be golden. Then being able to add specific macros would be even better (Flank, Power Attack, Surprise, Haste, Bard Song, Bless, etc.) to auto calculate. :) Another thing that would be amazing is to just auto-replace the character without having to rename the old one name_old so it can be imported. But, otherwise, that's just a time thing and no real big deal. The weapon import is probably the most important thing -- and potentially mythics.
Can you explain what is not working with mythics? Regarding macros, please go to my github repository, there is a script there that will create a bunch of macro that cover many of the mechanical situations that need simple modifiers. I looked at doing a condition/buff bot that would add/remove conditions, but with the number of buffs/conditions in Pathfinder it is simply too complex to be worth the coding time. Weapon imports will not get much better, you will need to lobby Hero Lab to make a better XML export.
kevin thanks for all your work! i see you have stuff set up to do macros from this as well, i looked at your gith hub but i am api dumb. so if you could give me a quick run down on how you do that it would be a major help
If you are talking about the Powercard macros the macros created rely on Honeybadger's Powercard script. The PSmacro script will allow you to run two commands to automatically generate a large number of ability macros: !psmacro --CharacterName !psmacro --CharacterName --npc In the above examples replace "CharacterName" with the actual character/monster that you are looking to populate. These macros are detailed in the following text file: <a href="https://github.com/beeke01/PSMacro/blob/master/Pow" rel="nofollow">https://github.com/beeke01/PSMacro/blob/master/Pow</a>... Here is an example of some output from a couple of Ability macros from an "iconic" Rise of the Runelords villain: As you can see being an NPC the results are sent only to the GM, these are token actions assigned to the token, so no need to keep pulling up the sheet. As an encounter starts I will hit the "Defenses" token action macro to get all of the important items imported/added to the sheet. The saving throws also output relevant information. The attack macro in this case allows for a popup to automatically calculate the attack value based on whether it is a first, second, etc... attack but the Power card shows what value was entered there so it is very easy to know which attack is which. I also automatically highlight based on defined crit values, so no need to have a "Crit on" line. If I do crit I simply roll the same attack again, rather than clutter the card with information that will only happen 5-20% of the time. If you need some help walking through setting things up, send me a PM and we can work out a time where I can show you how I have things setup in my game and you can decide if that is something you want to setup for yours.