-
October 6th, 2011, 12:11 #1
Pathfinder Creature Parser - FULL release V1.0.0.15 - Updated 3rd January
New v2 beta test available here: https://www.fantasygrounds.com/forum...2-Beta-Version
UPDATE - 3rd January 2012. Full Version 1.0.0.15
Attachment 2247
New features/items fixed:
- Modified to be able to read stat blocks from the Combat Manager application - https://www.combatmanager.com/. See readme.txt file and below.
- logging disabled by default. Parsing is much faster without logging!
- added custom xp tag to each create - XP is not used by Fantasy Grounds at present.
- Added a token reference for each creature - see readme.txt and below.
Note: This is just a creature parser, it will not parse traps or vehicles. Do not include stats for traps or vehicles in the statblock file you parse as they will break the parser!
Combat Manager
https://www.combatmanager.com/
Check this thread for more details.
NOTE: Minor text formatting is still needed with statblocks copied from the monster statblock within combat Manager:
1) Move description to the beginning of the statblock.
2) Next line after description must be <NAME> CR <CR Value> all on one line. For example: Ghoul CR 2.
NOTE: When doing a "Select All" and copy from Combat Manager, the CR entry will be placed on the line before the name - move this to the end of the name line.
3) Remove all blank lines in the statblock.
4) Leave a blank line between each creature statblock.
Token Reference
A token reference has been added for each creature - referencing the creature display name in the tokens directory in the module - with a .png extension. For example:
Creature: Archon, Shield
Token: tokens/Archon, Shield.png@Bestiary2
Note: this needs the manual addition of the image to the "tokens" directory in the module and any required tokens - named <creature name>.png
GOTCHAS
Pathfinder Society - creatures in PFS modules don't have XP values. The Parser relies completely on the XP line between creature Name/CR and Type to be able to split these lines up.
Workaround: PFS creatures, add a new line: "XP 1" (without the quotes) between the Name/CR line and the type line/s.
Stat block titles
The Parser mainly relies on the stat block main titles to correctly read the data correctly. Make sure that when you copy/paste the creature that the main titles are one a line by themselves, no space in front and no spaces in the title (I've seen spaces appear when copying some creatures). The titles are:
Defense
Offense
Tactics (if present)
Statistics
Ecology (if present)
Special Abilities (if present)
Frog God Games Statblocks: Frog God Games products (Slumbering Tsar, Rappan Athuk, Razor Coast, etc.) usually adhere to the Paizo statblock format - with one exception: the "Stat block titles" are not present, the books contain separator lines instead - so you must enter the relevant "Stat block titles" as listed above in place of the separator lines.
HeroLab statblock output
In HeroLab go to File -> Output Active Hero Statblock -> Plain Text -> Save to File and the output parses fine with some minor changes to the HeroLab exported file:
- Add an XP line between the Name/CR line and Type line.
- Remove the --------- lines around the section titles. (remove the whole line)
- Remove any blank lines within each individual statblock.
- Remove the HeroLab notice at the bottom.
-------------------------------------------------------------
Hi everyone,
For a while I've been slowly developing an application that allows parsing of Pathfinder creature stat blocks from a text file into a Fantasy Grounds mod file.
I've tried to design this so that stat blocks can just be copied from PF material (start with the description and end with the special abilities) into a text file and then the text file can be parsed into a creature module for loading in FG.
See the files in the attachment. Extract to a folder. Run setup.exe.
Follow the instructions in readme.txt.
Please let me know if it works and if you have any issues... A good place to look to see how the parsing is going is a temporary file created during parsing - it is the same name as your text file with an extension of .fpf; or check the logfile (same name as your text file + .log). The .fpf file contains formatted stat block info - it might help you to spot formatting errors in the original text file (I've seen a few from copy/paste from the Bestiary 2) and allow you to fix them yourselves and get some creatures parsed!
If you do have issues, please PM me with details of:
1) The error raised.
2) The text stat block for the creature you're parsing. (The one that caused the error may be indicated in the text line output).
3) The .fpf file entry for this creature and the logfile.Last edited by Trenloe; February 22nd, 2014 at 16:55.
-
October 6th, 2011, 21:37 #2
Parser Testing
Any specific formating issues we should look for when creating the text file (doesnt like certain chracters ior spacing iussues?). I ran an npc from the first steps scenario into the parser and received the following parser notice toward the end:
Processing creature: Deandre Dulay
Error in ReadWriteFormattedCreature, Message: Index was outside the bounds of the array.
Error in btnStartParse_Click, Message: Conversion from string "Index was outside the bounds of " to type 'Integer' is not valid.
Module file created: C:\Documents and Settings\Main\My Documents\Downloads\pathfinderSocietyScenarioIntro 1FirstStepsPartIInServiceToLorePFRPGPDF\parsermodt est.mod
I'm assuming keeping the tactics in the text file was a bad idea, but anything else that would specifically lead to the 2 errors above? I get a mod file and it shows in my library, but Im unable to see anything inside when I open. One other basic question for now - should I be encoding the .txt file as an ANSI, Unicode or UTF-8 file?Last edited by Talen; October 6th, 2011 at 22:42.
-
October 6th, 2011, 23:43 #3Originally Posted by Talen
But, I tried to design it so that you can just copy and paste the stat block - have a look at the example in the zip file.
Originally Posted by Talen
I did all of my testing against monsters from Bestiary 1 and 2 and followed the stat block definition from page 6 of Bestiary 2. Late last night I ran a couple of NPCs from Carrion Crown 2 (Trial of the Beast) through and realisesd that I'm going to have to do some more work as NPCs are different to Monsters!
As a starter Tactics need to be removed for now. I'll code for that later and move the tactics into the "Other" tab of the NPC.
Please send the .txt file you were using to martinblake1415 (at) h o t m a i l (dot) c o m and I'll take a look. Sorry it flopped at the first step!
Originally Posted by Talen
The files I've been using are ANSI with Windows 1252 encoding. The encoiding has been necessary for some of the above mentioned issues (hyphens etc). I may look into making it cover other formats at a later date (if it's relatively easy and not expanding the formats is an issue to some people).
-
October 7th, 2011, 01:23 #4
Thanks for the info - I sent the text file your way.
-
October 7th, 2011, 06:09 #5
Update: V 1.0.0.7 fixes items 2 and 3.
Issues identified so far:
Thanks to Talen for pointing me in their direction.
- PFS NPCs don't have XP entry. A lot of the initial logic in determining description, name/CR and type needs this line. Workaround - enter XP 1 in a line between name/CR and type.
- Creatures with "gear" entries rather than treasure. Workaround - change the Gear/Combat Gear title to "Treasure".
- Tactics section causes errors. Workaround - remove all tactics section (upto but not including "Statistics" title).
I'm working on finding good solutions to the above items. In the mean-time if you want to parse the creature/NPC use the workarounds mentioned.Last edited by Trenloe; October 7th, 2011 at 12:02.
-
October 7th, 2011, 12:41 #6
Update V1.0.0.7
Update available - see the first post for download, changes and gotchas.
-
October 8th, 2011, 01:41 #7
Working great! The time save is fantastic! A few nitpicking points at the moment. The parser still doesnt like seeing "other gear"...it comes out as "no match" in the npc - but the good news is that it doesnt stop the parse and doesnt make a practical difference. Also, Im sure this was a further down the road point - but traps will stop the parse if you try to get them in.
-
October 8th, 2011, 03:23 #8Originally Posted by Talen
I'm currently around 30% into a first pass of Bestiary 2 - currently up to Dragons (there are a lot of A's and D's in Bestiary 2!). So far, everything parses through OK - a couple of things to sort out, the main one being single attack format...
Originally Posted by Talen
Originally Posted by Talen
-
October 8th, 2011, 03:26 #9
HeroLab "Output Active Hero Statblock" parsing
I've done some testing with the HeroLab statblock output (File -> Output Active Hero Statblock -> Plain Text -> Save to File) and this parses fine with a couple of minor changes to the HeroLab exported file:
- Add an XP line between the Name/CR line and Type line.
- Remove the --------- lines around the section titles. (remove the whole line)
- Remove the HeroLab notice at the bottom.
-
October 8th, 2011, 05:46 #10
Is the hero lab use just a validation or is there some other use?
Thread Information
Users Browsing this Thread
There are currently 3 users browsing this thread. (0 members and 3 guests)
Bookmarks