PDA

View Full Version : Pathfinder Creature Parser - Alpha release



Trenloe
October 6th, 2011, 13:11
New v2 beta test available here: http://www.fantasygrounds.com/forums/showthread.php?20522-Pathfinder-Creature-Parser-V2-Beta-Version

UPDATE - 3rd January 2012. Full Version 1.0.0.15

2247

New features/items fixed:

Modified to be able to read stat blocks from the Combat Manager application - http://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
http://www.combatmanager.com/

Check this thread (http://www.fantasygrounds.com/forums/showthread.php?t=15808) 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, [email protected]

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.

Talen
October 6th, 2011, 22:37
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?

Trenloe
October 7th, 2011, 00:43
Any specific formating issues we should look for when creating the text file (doesnt like certain chracters ior spacing iussues?).
I've coded remove spaces at the end and beginning of lines, remove TABs, remove long hyphens and replace with the minus (-) sign, but I'm sure there are some in there that I still need to track down - I noticed the "x" for "x3" damage wasn't processing properly and need to update that.

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.


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?
One of the first things I need to do is try to make the error messages more meaningful!

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! :mad:

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!


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?
Even with errors I continue processing (in case you're doing a lot of creatures together and some of them work). If there was an error on the first creature then there won't be a complete db.xml file in the mod.

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).

Talen
October 7th, 2011, 02:23
Thanks for the info - I sent the text file your way.

Trenloe
October 7th, 2011, 07:09
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.

Trenloe
October 7th, 2011, 13:41
Update available - see the first post for download, changes and gotchas.

Talen
October 8th, 2011, 02:41
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.

Trenloe
October 8th, 2011, 04:23
Working great! The time save is fantastic!
Glad it's working for you. :) Yeah, I've been very surprised with the time save - I imported all the custom monsters from Carrion Crown 2 in about 5 minutes! :D

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...

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.
Looks like "Gear" slipped through my "do comparisons case insensitive" code. I'll update in the next release. Before then, if you want to avoid "no match" appearing, use "Gear", "Combat Gear" and "Other Gear" (leading capitals on all).

Also, Im sure this was a further down the road point - but traps will stop the parse if you try to get them in.
Yep, I'm sure anything other than creature stat blocks will break the parser. I've no plans to bring in traps - basically, because there is nowhere to put them in Fantasy Grounds! I suppose they could be put in as freeform story entries, but you may as well copy/paste them directly into FG yourself...

Trenloe
October 8th, 2011, 04:26
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.

Talen
October 8th, 2011, 06:46
Is the hero lab use just a validation or is there some other use?

Trenloe
October 8th, 2011, 06:50
Is the hero lab use just a validation or is there some other use?
Nope, its not just validation. On the HeroLab supports FG threads a few people were asking for HL and the FG character importer to support NPCs/creatures.

Now you can create custom creatures and bad add NPCs in HL and import them to FG with this parser. :)

Koryn
October 9th, 2011, 20:34
I'm not sure if this is just an error on my part so I thought I would ask. I have tested both a Hero Lab stat block and a sample monster from Bestiary 2 with no issues parsing either using the instructions provided.

The issue I am having is both creatures AC are correct in the module however both have their AC changed to 10 when I place them on the combat tracker.

Trenloe
October 9th, 2011, 23:27
I'm not sure if this is just an error on my part so I thought I would ask. I have tested both a Hero Lab stat block and a sample monster from Bestiary 2 with no issues parsing either using the instructions provided.

The issue I am having is both creatures AC are correct in the module however both have their AC changed to 10 when I place them on the combat tracker.

Hi Koryn - no, it's not an error on your part; it's on mine! The AC line in the library entry has "AC" at the beginning - that's causing FG a problem. I'll fix that in the next release of the parser (which will be out soon).

Talen
October 9th, 2011, 23:52
When errors do arise, how do you pinpoint the spot with the error occurred using the log file? Does the log pinpoint the creature where the first error occurred?

Trenloe
October 10th, 2011, 00:08
When errors do arise, how do you pinpoint the spot with the error occurred using the log file? Does the log pinpoint the creature where the first error occurred?

Search for an entry "FormatDataFile: Reading and formatting creature stat block:" it will tell you the name/CR line from the text file. Then all the lines after that should relate to that creature.

You should see something like this in the log at the beginning of each creature stat block:

7/10/2011 10:33:03 PM: Entered Sub FormatDataFile.
7/10/2011 10:33:03 PM: FormatDataFile: Read past starting blank lines (if any).
7/10/2011 10:33:03 PM: FormatDataFile: Opened StreamWriter.
7/10/2011 10:33:03 PM: FormatDataFile: Written DESCRIPTION line: A shimmering, colorless mass congeals to form a four-armed humanoid shape with an eye-like pattern in its torso.
7/10/2011 10:33:03 PM: FormatDataFile: Written NAME line: Aeon, Bythos CR 16
7/10/2011 10:33:03 PM: FormatDataFile: Reading and formatting creature stat block: Aeon, Bythos CR 16
7/10/2011 10:33:03 PM: FormatDataFile: Written XP line: XP 76,800
7/10/2011 10:33:03 PM: FormatDataFile: Written TYPE line: N Large outsider (aeon, extraplanar)

Trenloe
October 10th, 2011, 14:01
Thanks for the feedback Talen and Koryn. There's a new release available (see first post) that addresses the AC issue and has some other minor improvements.

Please keep feedback coming - I'd like any issues reported so that we can get this parser working for 99.9% of creature stats... :)

Dershem
October 10th, 2011, 22:14
Just wanted to give you guys a big thanks for a. Coding this and B. Testing it out, I know it will be a real boon for running adventure paths, and having the Bestiary 2 available to use as well.

Koryn
October 11th, 2011, 01:29
Everything I have thrown at it is working great after the last update. I have been doing some testing with Tome of Horrors with success after a bit of editing to the text doc pre parse.

My thanks to you Trenloe for the work you have put into this. It is greatly appreciated.

Trenloe
October 11th, 2011, 02:15
Everything I have thrown at it is working great after the last update. I have been doing some testing with Tome of Horrors with success after a bit of editing to the text doc pre parse.

Great to know it's working well for you.

Tome of Horrors was going to be my next check - what editing did you have to do to get it to work?

EDIT: Actually, I see what is up. The Tome of Horrors doesn't use the section headings that normal stat blocks do (Defense, Offense, Statistics, Ecology and Special Abilities) - the parser relies heavily on these headings to be able to extract information across multiple lines with some sub-headings sometimes being there and other times not (e.g. Aura appears rarely).

So, for other people's information, Tome of Horrors creatures will need the section headings putting into the stat block - Koryn, I'm sure that's what you've already found out...

Koryn
October 11th, 2011, 05:50
So, for other people's information, Tome of Horrors creatures will need the section headings putting into the stat block - Koryn, I'm sure that's what you've already found out...

The only thing I had to do other than add in the headings was change the semicolons on the saves line to commas. Perfect parse after those two things are done.

I was perusing the legal appendix at the back of ToH and pondering whether materials in the book could be compiled for general use. Not sure if this is something each user would need to do for themselves.

Talen
October 11th, 2011, 16:47
For Bestiary 2 - apart from the Offense spacing issue - what other changes di you have to make if any with the new parser?

Koryn
October 11th, 2011, 20:57
For Bestiary 2 - apart from the Offense spacing issue - what other changes did you have to make if any with the new parser?

I haven't had to make any changes to the Bestiary 2 creatures using the newest version of the parser (1.0.0.9).

Trenloe
October 12th, 2011, 01:52
For Bestiary 2 - apart from the Offense spacing issue - what other changes di you have to make if any with the new parser?

Sometimes copying out of the Paizo PDF spaces also appear in the CR (i.e. "C R") which will break the parser - as checking for " cr " is a major part of the initial parsing - as it's the first consistent text that is present in the creature stat block.

wbcreighton
October 14th, 2011, 18:09
Out of curiousity: Where are you copying the text from a pdf or the paizo web site ?

I think the Bestiary 2 is on the web site correct ?

http://paizo.com/pathfinderRPG/prd/additionalMonsters/additionalMonsterIndex.html

After you do the bestiary 2 will you make it available ?

Trenloe
October 15th, 2011, 00:46
I'm copying from the PDF. You can use the PRD on the website, but you'll have to do additional formatting - remove all blank lines and the lines around the section titles.

Dershem
October 15th, 2011, 07:50
I'm parsing creatures from Jade reagent and getting some issue's with 2 of them I can't figure out... here is the text... scratch that text sent in pm..

Trenloe
October 15th, 2011, 14:36
I'm parsing creatures from Jade reagent and getting some issue's with 2 of them I can't figure out... here is the text... scratch that text sent in pm..

Hi Talysian - thanks for trying the Parser and for forwarding on details of your issue.

For reference of others: there are typo errors in some of the Jade Regent creatures. They are missing a comma (,) after the strength statistic. For example:

STATISTICS
Str 1 Dex 18,

Which should actually be:

STATISTICS
Str 1, Dex 18,

I haven't looked at the Jade Regent creatures too much as I'm probably going to be a player in that adventure path soon. Just check that each creature has properly formatted statistics and you should be OK.

Trenloe
October 17th, 2011, 09:20
After you do the bestiary 2 will you make it available ?

Yes, I'll make it available as a module. I've been away at PiazoConOz playing lots of Pathfinder so haven't been able to improve on my 30% completion. Now I'm back I'll continue on the copy/paste-fest that is needed... :)

Talen
October 21st, 2011, 05:35
So in playing "Where's Waldo", where's the error in the following text file?

Giant Amoeba CR 1
xp 100
N Small ooze (aquatic)
Init –5; Senses blindsight 30 ft.; Perception –5
Defense
AC 6, touch 6, flat-footed 6 (–5 Dex, +1 size)
hp 15
Fort +3, Ref –5, Will –5
Defensive Abilities ooze traits
Offense
Speed 10 ft., climb 10 ft., swim 20 ft.
Melee slam +3 (1d3+1 plus 1d3 acid and grab)
Space 5 ft.; Reach 5 ft.
Special Attacks constrict (1d3+1 plus 1d3 acid)
Statistics
Str 12, Dex 1, Con 16, Int —, Wis 1, Cha 1
Base Atk +1; CMB +1 (+5 grapple); CMD 6 (can’t be tripped)
Skills Climb +9, Swim +9
SQ amphibious

Trenloe
October 21st, 2011, 06:36
So in playing "Where's Waldo", where's the error in the following text file?

Giant Amoeba CR 1
xp 100
N Small ooze (aquatic)
Init –5; Senses blindsight 30 ft.; Perception –5
Defense
AC 6, touch 6, flat-footed 6 (–5 Dex, +1 size)
hp 15
Fort +3, Ref –5, Will –5


There's no hitdice on the HP line, make the line: hp 15 (2d8+6)

If you didn't know, the giant Amoeba is in the Bestiary 2 module too! :)

Trenloe
October 21st, 2011, 06:44
Yes, I'll make it available as a module. I've been away at PiazoConOz playing lots of Pathfinder so haven't been able to improve on my 30% completion. Now I'm back I'll continue on the copy/paste-fest that is needed... :)

Bestiary 2 mod available for download here. (http://www.fantasygrounds.com/forums/showthread.php?t=15549)

:)

Talen
October 22nd, 2011, 15:36
There's no hitdice on the HP line, make the line: hp 15 (2d8+6)

If you didn't know, the giant Amoeba is in the Bestiary 2 module too! :)


I did know that (and thank you)- but trying to pull myself up by the bootstraps and figure out where my mistakes are. I still cant efficiently find them with the log, but, I did learn the following:

1. As you identified, hp need the hit dice entry as well.
2. Defense saves need to be on the same line.
3. You cannot have 2 "Treasure" entries using the same label.
4. Related to the above - you cant have a colon after the "Treasure" label.
5. Senses need to be separated by a semicolon.

Talen
October 30th, 2011, 20:11
In the Bestiary2, I've come cross the slam attack entry for the Giant Amoeba which did not parse the attack. The funny thing is that when I parsed the same creature entry from a different source (the First Steps Part 2 scenario) - it also did not parse the attack properly. Is the "and grab" description gumming it up?

Trenloe
October 30th, 2011, 22:57
In the Bestiary2, I've come cross the slam attack entry for the Giant Amoeba which did not parse the attack. The funny thing is that when I parsed the same creature entry from a different source (the First Steps Part 2 scenario) - it also did not parse the attack properly. Is the "and grab" description gumming it up?

Hey Talen - when you say didn't parse the attack are you saying that there was an error caused or that the attack string isn't being recognised by Fantasy Grounds?

The current B2 mod has parsed has the attack listed as: "slam +3 (1d3+1 plus 1d3 acid and grab)". If you change the "and grab" to "plus grab" the attack should work.

I'll keep an eye out for attacks like this and see what I can build into the parser.

Talen
October 30th, 2011, 23:04
I mean fg won't make the attack ( it does parse in the sense that it shows up in the entry).
I'll keep an eye out for those too.

Trenloe
October 30th, 2011, 23:16
I mean fg won't make the attack ( it does parse in the sense that it shows up in the entry).
I'll keep an eye out for those too.

Yeah, it's an FG thing. The attack doesn't work with 2 damage types listed as "x and y" e.g. "1d6 fire and acid" I had to manually change it to "1d6 fire, acid". So, unfortunately, it's not just a case of changing any "and" in the attack line to plus...

I'll compile a few examples and see what the options are and see what is best for importing into FG...

Talen
November 13th, 2011, 03:35
My trouble shooting skills are on the fritz, so looking for an assist - anyone know where Im missing the error here? I thought it might be the sneak attack damage or the racial modifiers, but changing the format of the attack and removing the racial modifiers didnt yield any results.

Spriggan High CR 3
xp 100
CE Small humanoid (gnome)
Init +4; Senses low-light vision; Perception +7
DEFENSE
AC 17, touch 15, flat-footed 13 (+2 armor, +4 Dex, +1 size)
hp 22 (4d8+4)
Fort +5, Ref +5, Will +1
OFFENSE
Speed 20 ft.
Melee mwk morningstar +5 (1d6–1)
Ranged light crossbow +8 (1d6/19–20)
Special Attacks sneak attack +2d6
Spell-Like Abilities (CL 4th; concentration +4)
At will—flare (DC 10), scare (DC 12), shatter (DC 12)
TACTICS
During Combat The spriggan grows to Large size as soon as
possible and lumbers into combat, concentrating on the
most dangerous opponents (see below for Large statistics).
The spriggan does not much like the atomies, and so avoids
harming PCs that seem to be concentrating their attacks
against the diminutive duelists.
Morale The grim spriggan expects and offers no quarter. He
fights until slain.
STATISTICS
Str 9, Dex 19, Con 12, Int 10, Wis 10, Cha 9
Base Atk +3; CMB +1; CMD 15
Feats Combat Reflexes, Weapon Focus (morningstar)
Skills Climb +1, Disable Device +11, Perception +7, Sleight of
Hand +11, Stealth +15; Racial Modifiers +2 Climb, +2 Disable
Device, +2 Perception, +2 Sleight of Hand, +2 Stealth
Languages Aklo, Gnome
SQ size alteration, spriggan magic, spriggan skills
Gear leather armor, light crossbow with 10 bolts, masterwork
morningstar
SPECIAL ABILITIES
Size Alteration (Su) At will as a standard action, a spriggan
can change his size between Small and Large. Weapons,
armor, and other objects on the spriggan’s person grow
proportionally when he changes size (objects revert to
normal size 1 round after a spriggan releases them). When a
spriggan becomes Large, his speed increases to 30 feet, he
gains +12 Strength, –2 Dexterity, and +6 Constitution, and
he takes a –2 size penalty to his AC. While Large, a spriggan
cannot use his sneak attack or his racial spell-like abilities.
Spriggan Magic (Ex) A spriggan gains a +1 racial bonus on
concentration checks and to save DCs for all of its racial
spell-like abilities.
Spriggan Skills (Ex) Climb, Disable Device, Perception, Sleight
of Hand, and Stealth are class skills for spriggans.

Trenloe
November 13th, 2011, 08:37
My trouble shooting skills are on the fritz, so looking for an assist - anyone know where Im missing the error here? I thought it might be the sneak attack damage or the racial modifiers, but changing the format of the attack and removing the racial modifiers didnt yield any results.
This one's a hard one - it's actually the re-use of the word "skills" in the special abilities section. Parsing out the data from the Statistics section of the statblock is a difficult task as there can be a lot of freeform text here and a lot of the usual headings can be missing so it's harder to know for sure where one section starts and another begins. Although, I think I have an idea how I can do this a bit better - I'll do this is a future update.

For now, you can get this create to parse by changing the Special ability "Spriggan Skills (Ex)" to Spriggan Skill (Ex)" - so the parser won't think there are multiple "skills" headings in the stat block.

Trenloe
November 14th, 2011, 10:42
New version now available in post #1.

I've been doing a lot of work behind the scenes ironing out a few wrinkles. I now feel that this is ready to be called a full release (not an Alpha release) - I've jumped straight past any Beta releases! :D

See post #1 for new features - and the changelog in the readme.txt in the installation zip file.

Also - get the updated Bestiary 2 module here. (http://www.fantasygrounds.com/forums/showthread.php?t=15549) It's been created with the latest parser (and a bug fixed statblock file) so this should be much nicer and more accurate to use.

UPDATE - 16th November 2011. Full Version 1.0.0.12

New features/items fixed:

Multiple attacks formatted into single attacks - full implementation. Cancel parse button.
Massively increased logging.
Disable logging option (handy on slow PCs or when parsing large creature lists).
Will process if no HD entry pressent on HP line.
Processing of saves with ; seperator (Tome of Horrors). Standard seperator is a comma (,).
Process headings with a colon at the end of the label.
Handle saves with additional multipliers - e.g. +4 vs. fear.
Handle parsing of "Spell-like" abilities - Tome of Horrors.
Process weaknesses line and place in Special Qualities (SQ).
Rename "vulnerable" weaknesses to "vulnerability" - Fantasy Grounds will not recognise "vulnerable".
Much better formatting of special abilities in the "other" tab.

madman
November 16th, 2011, 05:29
I was just wondering no that you have worked through doing the Monster Parser, Is there any chance for a spell parser (PLEASE) Feat Parser (Please)

Would it be Worth it to do.

Just curious, Thank You For everything you have done so far.

P.S. and thanks for the cool stuff to come(as I know it will)

Madman

Chris

Trenloe
November 16th, 2011, 08:11
I was just wondering no that you have worked through doing the Monster Parser, Is there any chance for a spell parser (PLEASE) Feat Parser (Please)

Would it be Worth it to do.


I hadn't really thought too much about spells and feats - probably because I usually GM on Fantasy Grounds, not play.

But, I have the code infrastructure sorted out for creating FG modules and spells and feats would be much, much easier to parse than creatures so I'll look into it...

What are you thinking about - seperate feat & spell modules or feats and spells in one module. That is would we want to create "the big module of every feat" and a seperate "the even bigger module of every spell" or allow creating "Ultimate Combat" and "Ultimate Magic" modules???

I suppose doing one and gettting to other isn't too hard - as long as you don't mind a little bit of xml editing!

Trenloe
November 16th, 2011, 10:04
UPDATE - 16th November 2011. Full Version 1.0.0.12

See post #1 for download and more details.

New features/items fixed:

All ranged attacks now have "ranged" attack type. Previously these would have defaulted to "melee".
Spells known and Spells Prepared now include class name.
More meaningful (or confusing?) error messages.
Parser version included in definition.xml

madman
November 17th, 2011, 02:40
I was thinking about the third party stuff. i.e. 101 spells by rite publishing i think is 909 spells to add by hand (OUCH) and I am sure that we will have a ton of feats and spells coming soon from Paizo soon. There are a ton of them not in a mod at this point. not sure the best way to do it other than a couple of mods, one feats one spells. Since they are only used for character creation and to level up, having huge mods shouldn't be a problem. but i think the people who are active around here will chime and give give some feedback.....................................

Working on season 2 PFS Creature .mod

Chris

Blackfoot
November 17th, 2011, 14:59
What are you thinking about - seperate feat & spell modules or feats and spells in one module. That is would we want to create "the big module of every feat" and a seperate "the even bigger module of every spell" or allow creating "Ultimate Combat" and "Ultimate Magic" modules???

I suppose doing one and gettting to other isn't too hard - as long as you don't mind a little bit of xml editing!
I suppose both have their merits... one if you want all the options available in one place... the other if the GM restricts which ones are available for some reason.
Perhaps the best option would be to do the big feats module/big spells module but include the source somehow in each item... so that if a GM restricted use it would be easy enough to tell where that particular feat or spell came from.

Dershem
November 17th, 2011, 19:08
Perhaps a spell module and feat module for each source?

Blackfoot
November 17th, 2011, 20:23
Perhaps a spell module and feat module for each source?I don't know.. I still like the idea of everything in one place. Having to sort through 3 or 4 lists of spells or feats for your class is a pain.

Dershem
November 17th, 2011, 20:53
To be honest I'd Like the idea of one Module for everything a player needs, and one for everything a gm needs..

Any idea on how to handle traps/haunts? I've just been doing them on the fly with notes in my adventure section just curious how others handle them! Would it be worth it to do an extension to handle these or change the base coding?

Trenloe
November 17th, 2011, 23:11
Any idea on how to handle traps/haunts? I've just been doing them on the fly with notes in my adventure section just curious how others handle them! Would it be worth it to do an extension to handle these or change the base coding?

I've just been doing them on the fly. Adding haunts in the combat tracker if needs be (but generally not). Traps are easier to handle on the fly unless they have things such as Init, HP, etc...

But, it would be nice to have somewhere to record them and then use them in the game. An extension would definitely be the way to go - not a good idea to change the base code as you'd have to update it everytime the 3.5E ruleset was released. The way extensions work is they essentially "supercede" the base code anyway - so you're kind-of changing the base code, but you're not - if that makes sense?

Trenloe
November 17th, 2011, 23:17
To be honest I'd Like the idea of one Module for everything a player needs, and one for everything a gm needs.

For my initial attempt on a spell/feat parser I'm thinking of adding an additional field - Source. Which will contain the source document name the spell/feat comes from.

Then, what I am thinking of doing is have top level menus in the library of:


Source
Class (Spells)
Feat Type


I haven't done anything like this before, so I'm not sure how easy it will be. Plus, in theory, there are cascading menu's - such as Source -> Class for Spells, or just Class.

So, I'll see how I go. It will be a 2 stage process anyway:

Parse spells and create spell entry in FG XML.
Create library menus in XML from parsed data


I'll start a new thread when I have something...

Dershem
November 17th, 2011, 23:25
You sir and others who do this coding work, for community projects are what make fantasy grounds a truly enjoyable bit of software!

madman
November 18th, 2011, 03:18
You F----N Rock

Nuff Said

Chris

Trenloe
November 18th, 2011, 14:56
OK, for those of you who wanted a spell module, check this thread. (https://www.fantasygrounds.com/forums/showthread.php?t=15672)

I've created it using code from the creature parser and the D20PFSRD spell database. I'm still ironing out some issues with the code - but will release a spell parser soon that allows text copy/paste entry similar to the creature parser.

madman
November 19th, 2011, 04:03
Joktan Heth CR 7
XP 0
Human worm that walks wizard 6 (necromancer)
NE Medium vermin (augmented humanoid)
Init +3; Senses blindsense 30 ft., darkvision 60 ft.; Perception +14
Defense
AC 20, touch 16, flat-footed 17 (+4 armor, +1 deflection,
+3 Dex, +2 insight)
hp 53 (64 with false life) (6d6+30); fast healing 3
Fort +6, Ref +6, Will +8
Defensive Abilities worm that walks traits; DR 5/—; Immune disease, paralysis,
poison, sleep, mindaffecting effects
Offense
Speed 30 ft.
Melee slam +5 (1d4+3 plus grab)
Melee mwk quarterstaff +6 (1d6+3)
Special Attacks channel negative energy (DC 12, 7/day),
discorporate, squirming embrace (2d6+3, DC 16), tenacious
Spell-Like Abilities (CL 6th; concentration +10)
7/day—grave touch (3 rounds)
Necromancer Spells Prepared (CL 6th; concentration +10)
3rd—displacement, haste, lightning bolt (DC 17), vampiric touch
2nd—darkness, false life, scare (DC 17), scorching ray,
summon swarm
1st—magic missile (&#215;2), ray of enfeeblement (DC 16, &#215;2)
0 (at will)—detect magic, disrupt undead, ray of frost, read
magic, touch of fatigue (DC 15)
Opposition Schools Abjuration, Divination
Tactics
Before Combat before the PCs arrive, Joktan uses his wand to
cast mage armor on himself and casts false life (both of these
effects are factored in above).
During Combat At the start of combat, Joktan casts haste
on himself and his undead minions, before opening up to
attack the PCs with spells like lightning bolt, vampiric touch,
and scorching ray. When reduced to fewer than half his
total hit points, he casts displacement. If any spellcaster in
particular troubles him, he uses summon swarm on the pest.
Morale Joktan is supremely confident in his abilities and fights
to the death.
Statistics
Str 14, Dex 16, Con 17, Int 18, Wis 10, Cha 8
Base Atk +3; CMB +5 (+17 grapple); CMD 23
Feats Combat Casting, Command Undead, DiehardB,
Empower Spell, Iron Will, Scribe Scroll, Spell Focus
(necromancy), Toughness
Skills Fly +12, Knowledge (arcana) +13, Knowledge (religion) +13,
Perception +14, Sense Motive +8, Spellcraft +13, Stealth +17;
Racial Modifiers +8 Perception, +8 Sense Motive, +8 Stealth
Languages Aklo, Common, Draconic, Elven, Giant
SQ arcane bond (ring)
Combat Gear potion of cure serious wounds, scroll of blindness/
deafness, scroll of false life, wand of mage armor (32 charges);
Other Gear mwk quarterstaff, ring of protection +1, cloak of
resistance +1, spellbook, spell component pouch,
Special Abilities
Discorporate (Su) A worm that walks can collapse into a
shapeless swarm of worms as a free action. All held, worn,
and carried items fall and its Strength score drops to 1.
The worm that walks functions as a true swarm while
discorporated, with a reach of 0 feet (its space remains
unchanged). While discorporated, the worm that walks
loses all of its defensive abilities and gains all of the
standard swarm traits. It loses its slam attacks and all
special abilities and special attacks, but can make a swarm
attack that deals damage equal to its engulf attack. A
worm that walks can reform into its true form (including
equipping all gear in reach) as a full-round action as long as
it has at least 1 hit point.
Squirming Embrace (Ex) If a worm that walks grapples a foe,
as a swift action, it can cause a swarm of worms to squirm
over the grappled creature. These worms deal automatic
swarm damage with no attack roll needed. If a creature
takes damage from the swarm, it is also subject to the
swarm’s distraction ability, and must make a Fortitude save
or be nauseated for 1 round. A worm that walks can only
have one embraced target at a time, but it does not have to
continue grappling in order to maintain the embrace. If the
worm that walks moves more than 5 feet from the swarm
or dismisses the swarm (a free action), the swarm dies.
Any area attack that damages the swarm or any severe or
stronger wind effect that affects the swarm’s target kills it.
Tenacious (Ex) A worm that walks gains a +8 racial bonus on
combat maneuver checks made to grapple and a +4 racial
bonus to its CMD.
Worm that Walks Traits (Ex) A worm that walks has no discernible
anatomy, and is not subject to critical hits or flanking.
Reducing a worm that walks to 0 hit points causes it to
discorporate (see above)—a worm that walks at 0 hit points
is staggered, and one at negative hit points is dying. Worms
that walk are immune to any physical spell or effect that
targets a specific number of creatures (including singletarget
spells such as disintegrate), with the exception of such
spells and effects generated by the worm that walks itself,
which treat the worm that walks as one single creature
if it so chooses. Mind-affecting effects that target single
creatures function normally against a worm that walks,
since the creature’s individual components share a hive
mind. A worm that walks takes half again as much damage
(+50%) from damaging area effects, such as fireball and
splash weapons. Worms that walk are susceptible to high
winds—treat a worm that walks as a Fine creature for the
purposes of determining wind effects.

Joktan Heth 2 CR 10
XP 0
Human worm that walks wizard 9 (necromancer)
NE Medium vermin (augmented humanoid)
Init +3; Senses blindsense 30 ft., darkvision 60 ft.; Perception +17
Defense
AC 20, touch 16, flat-footed 17 (+4 armor, +1 deflection, +3 Dex,
+2 insight)
hp 88 (103 with False Life)(9d6+54); fast healing 10
Fort +8, Ref +7, Will +9
Defensive Abilities worm that walks traits; DR 15/—; Immune
disease, paralysis, poison, sleep, mind-affecting effects
Offense
Speed 30 ft., fly 60 ft.
Melee slam +6 (1d4+3 plus grab)
Melee mwk quarterstaff +7 (1d6+3)
Special Attacks channel negative energy (DC 13, 7/day),
discorporate, squirming embrace (2d6+3, DC 18), tenacious
Spell-Like Abilities (CL 9th; concentration +13)
7/day—grave touch (4 rounds)
Necromancer Spells Prepared (CL 9th; concentration +13)
5th—empowered vampiric touch, hold monster (DC 19)
4th—dimension door, enervation, fear (DC 20), wall of fire
3rd—displacement, fly, haste, lightning bolt (DC 17),
vampiric touch
2nd—blindness/deafness (DC 18), darkness, false life,
scorching ray, summon swarm
1st—expeditious retreat, magic missile (&#215;3), ray of
enfeeblement (DC 17, &#215;2)
0 (at will)—detect magic, disrupt undead, ray of frost, read
magic, touch of fatigue (DC 15)
Opposition Schools Abjuration, Divination
Tactics
Before Combat Before the PCs arrive, Joktan uses his wand to
cast mage armor on himself and casts false life and fly (all of
these effects are factored in above).
During Combat At the start of combat, Joktan casts haste
on himself and his undead minions, before opening up to
attack the PCs with spells like fear, empowered vampiric
touch, and hold monster. When reduced to fewer than half
his total hit points, he casts displacement. He uses wall of
fire to divide the PCs when convenient, and enervation to
cripple any spellcasters that bother him.
Morale Joktan is supremely confident in his abilities and fights
to the death.
Statistics
Str 14, Dex 16, Con 18, Int 18, Wis 10, Cha 8
Base Atk +4; CMB +6 (+18 grapple); CMD 24
Feats Combat Casting, Command Undead, DiehardB,
Empower Spell, Greater Spell Focus (necromancy),
Improved Iron Will, Iron Will, Scribe Scroll, Spell Focus
(necromancy), Toughness
Skills Fly +15 (+19 with fly), Knowledge (arcana) +16,
Knowledge (religion) +16, Perception +17, Sense Motive +8,
Spellcraft +16, Stealth +20; Racial Modifiers +8 Perception,
+8 Sense Motive, +8 Stealth
Languages Aklo, Common, Draconic, Elven, Giant
SQ arcane bond (ring), life sight (10 feet, 9 rounds/day)
Combat Gear potion of cure serious wounds, scroll of blindness/
deafness, scroll of false life, wand of mage armor (50 charges),
wand of ray of exhaustion (7 charges); Other Gear mwk
quarterstaff, cloak of resistance +1, pearl of power (1st), ring
of protection +1, robe of bones, spellbook, spell component
pouch, 100 gp


I can not for the life of me find the problem with these stat blocks

Can anybody HELP PLEASE!

Thx
Chris

Trenloe
November 19th, 2011, 05:27
I won't be in front of a computer for a while so can't check.

If you're getting an actual error while parsing, don't press "ok" and look in the .fpf and .log files created during parsing. This will give you a good idea where things are failing and so give a better chance of finding the area where the issue is.

Although, looking again at your stat blocks, it is probably related to 2 melee headings.

madman
November 19th, 2011, 13:24
Wow I was tired!

Chris

I just locked up the parser with this one. any thoughts.

Tiressia CR 4
XP 1,200
Female dryad druid 2 (Pathfinder RPG Bestiary 116)
CG Medium fey
Init +5; Senses low-light vision; Perception +14
Defense
AC 18, touch 15, flat-footed 13 (+5 Dex, +3 natural)
hp 48 (6d6+2d8+18)
Fort +9, Ref +10, Will +13
DR 5/cold iron
Weaknesses tree dependent
Offense
Speed 30 ft.
Melee mwk sickle +10 (1d6–1)
Ranged mwk longbow +10 (1d8–1/&#215;3)
Spell-Like Ability (CL 2nd;
concentration +8)
8/day—storm burst
Spell-Like Abilities (CL 6th; concentration +12)
Constant—speak with plants
At will—entangle (DC 17), tree shape, wood shape (1
lb. only)
3/day—charm person (DC 17), deep slumber
(DC 19), tree stride
1/day—suggestion (DC 19)
Druid Spells Prepared (CL 2nd;
concentration +7)
1st—faerie fire, goodberry, magic
fang, obscuring mistD
0 (at will)—guidance, purify food and drink,
stabilize, virtue
D Domain spell; Domain Weather
TACTICS
During Combat Tiressia tries to avoid melee combat,
using entangle to hinder foes and deep slumber on
any creature attacking her tree. She uses her scroll to
summon additional creatures to help Falchos in battle,
while jumping from tree to tree using tree stride and tree
meld to attack enemies at a distance with her longbow.
Morale Tiressia retreats into her oak when reduced to 20 hit
points or fewer, praying that her attackers get bored and leave.
Statistics
Str 8, Dex 20, Con 15, Int 14, Wis 20, Cha 22
Base Atk +4; CMB +9; CMD 18
Feats Agile Maneuvers, Great Fortitude, Stealthy,
Weapon Finesse
Skills Climb +8, Craft (wood sculpture) +17, Diplomacy +15, Escape
Artist +16, Handle Animal +15, Heal +14, Knowledge (nature)
+13, Perception +14, Stealth +16, Survival +16
Languages Common, Elven, Sylvan; speak with plants
SQ nature bond (Plant domain), nature sense, tree meld, wild
empathy +8, woodland stride
Combat Gear goodberries (5), potion of cure moderate wounds
(2), scroll of summon nature’s ally II, wand of cure light wounds
(26 charges), 6 feather tokens (tree); Other Gear masterwork
longbow with 20 arrows, masterwork sickle, 178 gp

Trenloe
November 21st, 2011, 00:59
Wow I was tired!

Chris

I just locked up the parser with this one. any thoughts.

Tiressia CR 4
XP 1,200
Female dryad druid 2 (Pathfinder RPG Bestiary 116)
CG Medium fey
Init +5; Senses low-light vision; Perception +14
Defense
AC 18, touch 15, flat-footed 13 (+5 Dex, +3 natural)
hp 48 (6d6+2d8+18)
Fort +9, Ref +10, Will +13
DR 5/cold iron
Weaknesses tree dependent
Offense
Speed 30 ft.
Melee mwk sickle +10 (1d6–1)
Ranged mwk longbow +10 (1d8–1/×3)
Spell-Like Ability (CL 2nd;
concentration +8)
8/day—storm burst
Spell-Like Abilities (CL 6th; concentration +12)
Constant—speak with plants
At will—entangle (DC 17), tree shape, wood shape (1
lb. only)
3/day—charm person (DC 17), deep slumber
(DC 19), tree stride
1/day—suggestion (DC 19)
...


Looking in the log file, all it contains is:

21/11/2011 10:35:09 AM: Starting Application. App Exe: Pathfinder Tool - FG Creature Parser Product Version: 1.0.0.12
21/11/2011 10:35:09 AM: Reading data file: C:\Temp\PF_Parse\Madman2.txt
21/11/2011 10:35:09 AM: Calling sub FormatDataFile.
21/11/2011 10:35:09 AM: Entered Sub FormatDataFile.
21/11/2011 10:35:09 AM: FormatDataFile: Read past starting blank lines (if any).
21/11/2011 10:35:09 AM: FormatDataFile: Opened StreamWriter.
21/11/2011 10:35:09 AM: FormatDataFile: Written DESCRIPTION line:
21/11/2011 10:35:09 AM: FormatDataFile: Written NAME line: Tiressia CR 4
21/11/2011 10:35:09 AM: FormatDataFile: Reading and formatting creature stat block: Tiressia CR 4
21/11/2011 10:35:09 AM: FormatDataFile: Written XP line: XP 1,200
21/11/2011 10:35:09 AM: FormatDataFile: Written TYPE line: Female dryad druid 2 (Pathfinder RPG Bestiary 116) CG Medium fey
21/11/2011 10:35:09 AM: FormatDataFile: Written INIT line: Init +5; Senses low-light vision; Perception +14
21/11/2011 10:35:09 AM: FormatDataFile: got the line ending in DEFENSE Defense
21/11/2011 10:35:09 AM: FormatDataFile: got the line ending in OFFENSE DR 5/cold iron; Weaknesses tree dependent
21/11/2011 10:35:09 AM: GetAndFormatLine: Searching for 2 strings: tactics ,statistics
21/11/2011 10:35:09 AM: FormatDataFile: Retrieved OffenseText Speed 30 ft. Melee mwk sickle +10 (1d6-1) Ranged mwk longbow +10 (1d8-1/x3) Spell-Like Ability (CL 2nd; concentration +8) 8/day-storm burst Spell-Like Abilities (CL 6th; concentration +12) Constant-speak with plants At will-entangle (DC 17), tree shape, wood shape (1 lb. only) 3/day-charm person (DC 17), deep slumber (DC 19), tree stride 1/day-suggestion (DC 19) Druid Spells Prepared (CL 2nd; concentration +7) 1st-faerie fire, goodberry, magic fang, obscuring mistD 0 (at will)-guidance, purify food and drink, stabilize, virtue D Domain spell; Domain Weather
21/11/2011 10:35:09 AM: FormatDataFile: Written SPEED line: 30 ft.
21/11/2011 10:35:09 AM: FormatDataFile: Written Melee line as: mwk sickle +10 (1d6-1)
21/11/2011 10:35:09 AM: FormatDataFile: Written Ranged line as: mwk longbow +10 (1d8-1/x3)

The last line of processing a ranged attack gives you an idea of where to look for the problem - processing of the next lines after this one.

Looking at the stat block - there are 2 entries for spell-like abilities:


Spell-Like Ability (CL 2nd;
concentration +8)
8/day—storm burst
Spell-Like Abilities (CL 6th; concentration +12)
Constant—speak with plants
At will—entangle (DC 17), tree shape, wood shape (1
lb. only)
3/day—charm person (DC 17), deep slumber
(DC 19), tree stride
1/day—suggestion (DC 19)

This doesn't match with the Paizon stat block definition and so the parser is not written to process 2 seperate similar/same headings (like when there were 2 melee entries).

Putting these in a single Spell-Like Abilities entry fixes the issue:


Spell-Like Abilities (CL 2nd;
concentration +8)
8/day—storm burst (CL 6th; concentration +12)
Constant—speak with plants
At will—entangle (DC 17), tree shape, wood shape (1
lb. only)
3/day—charm person (DC 17), deep slumber
(DC 19), tree stride
1/day—suggestion (DC 19)

madman
November 21st, 2011, 04:30
well at this point I think I have come across just about everything that can go wrong.

Working toward novice status I think.

Thanks Trenloe

Chris

Trenloe
January 3rd, 2012, 06:38
Main updates are:

Support for Combat Manager statblocks (with some basic manual formatting).
Token links added to each creature entry - needs manual addition of token .png files to module.

See post #1 for download and further details.

madman
January 6th, 2012, 00:37
Here is Bestiary 3,

Thanks Trenloe For the parser, this would have taken weeks without it. Paizo once again changed their format a little ,Names in Caps, page splits when you highlight at a weird spot. Why do they make it more difficult than it needs to be.

Fighting the good fight!

Edit: Finding some small errors with this, will fix them and re-post it. Ok I think I got them all. If you find any errors let me know, and I'll fix em. Please post here (http://www.fantasygrounds.com/forums/showthread.php?p=118147#post118147)



Chris

Edit:Fixed

darkling
January 6th, 2012, 00:39
That is amazing!

I was actually doing it myself, but now I'm going to stop!

Trenloe
January 6th, 2012, 00:52
Here is Bestiary 3,

Thanks Trenloe For the parser, this would have taken weeks without it.

Chris

Brilliant! Thanks for doing that madman - I started, but only got as far as "B" before I stopped - still copy/paste jaded from Bestiary 2.

Now, how many people have a PDf of "Tome of Horrors Complete" and would like to split up copying and formatting the monster statblocks for input to the parser?

When copying and pasting there is the additional work adding the heading text for each creature (Offense, Defense, etc) as these are just seperator lines in the PDF.

Then, the "Reusing the Monsters in This Tome" section at the back states that we have to put 1 entry for each monster we use in the OGL statement. The example for 1 monster given is:


Adherer from the Tome of Horrors Complete, Copyright 2011, Necromancer Games, Inc., published and distributed by Frog God Games; Authors Scott Greene and Clark Peterson, based on original material by Guy Shearer.

So, if people are copying and pasting monsters, we'll need them to do a line for each monster in a seperate file for the OGL statement. You can see examples of this in the OGL statements in most Paizo modules and adventure paths - they frequently use creatures from the old 3.5E Tome of Horrors and have to make similar statements for each creature.

Anyone like to help out? If so, select one or more letters of the alphabet and work on those creatures - let us know what you're working on so no one doubles up. Then send the 2 text files (1 creature statblocks and 1 OGL statements) to me and I'll combine into one big module. Or, smaller ones if it is just too big!

madman
January 6th, 2012, 00:52
I wish I could find a way to be able to share all the Tokens I have made for the Pathfinder Stuff.

Damn Copyright Laws!

Chris

madman
January 6th, 2012, 00:54
Have you changed the parser to allow the stat block changes?
Edit: NM I read your post to the end


I would happy to do 1/2 or a third.

Chris

madman
January 6th, 2012, 01:25
Ok I am starting With the Korred Page 398. This is going to go a lot slower.
Good thing I have A macro Pad to do the copy/paste and headings

Chris ((Madman©))

I must be?

wbcreighton
January 30th, 2012, 22:52
Big Thanks for this PF Parser, Trenloe. Downloaded it on my laptop and also to my desktop.

I tried it on "City of Golden Death" module.

My laptop which runs Windows 7, seems to have trouble parsing. The Special Abilities keep showing up in weird spots.

My desktop which runs XP ran a parse on the entire "City of Golden Death" flawlessly.

When the PF Parser installed on my desktop it had to download and install .Net Framework 4 Client. I am wondering if you think that my laptop might be screwing up because it doesn't have an up to date .Net Framework install ?

The other question is where do I put the token folder and the db.xml and definition.xml that is created for the tokens ? This token feature add on is very cool.

Trenloe
January 30th, 2012, 23:38
Big Thanks for this PF Parser, Trenloe. Downloaded it on my laptop and also to my desktop.
No worries. :)


My laptop which runs Windows 7, seems to have trouble parsing. The Special Abilities keep showing up in weird spots.

My desktop which runs XP ran a parse on the entire "City of Golden Death" flawlessly.

When the PF Parser installed on my desktop it had to download and install .Net Framework 4 Client. I am wondering if you think that my laptop might be screwing up because it doesn't have an up to date .Net Framework install ?
It may be the .Net framework, but I would imagine you'd have more issues than just special abilities.

Did you use the exact same text file for the parse on each PC? The only think I can think of is that it is slightly different - or it was saved with a different character encoding.

I run Windows 7, so it can't be that...

Perhaps run the problem parse with logging enabled and send me the .fpf and .log file created in the same directory as the text statblock file.


The other question is where do I put the token folder and the db.xml and definition.xml that is created for the tokens ? This token feature add on is very cool.
It has been coded to have tokens in the .mod file. In the directory that contains the statblock text file (and the resulting .mod file) there will be another directory with the name of the module specified during the parse.
Go into there and there is a token directory.
copy your token image files into the token directory with the naming convention mentioned in post #1 and the readme file.
Zip up the whole module folder (from within the folder so that it doesn't have the high level directory).
Rename the .zip file to .mod.
Copy to your FG directory.

wbcreighton
January 31st, 2012, 08:21
I'm looking at the 2 text files and no they aren't the same.

One issue is related to this:

SQ fiery death (1d6 fire damage, Reflex DC 11 half )
Gear broken chain shirt, helmet, broken scimitar
Special Abilities
Light Fortification (Ex) Whenever a sneak attack or critical hit is
scored against a gold-clad creature, there is a 25% chance that
the extra damage is negated and damage is rolled normally.

as apposed to this:

SQ fiery death (1d6 fire damage, Reflex DC 11 half )
Special Abilities Light Fortification (Ex) Whenever a sneak attack or critical hit is
scored against a gold-clad creature, there is a 25% chance that
the extra damage is negated and damage is rolled normally.
Gear broken chain shirt, helmet, broken scimitar

It works when the Gear line breaks up the SQ line and the Special Abilities. Otherwise the Special Abilities gets lumped in with the SQ.

In the other instance:

Languages Draconic
SQ favored terrain (swamp +2), hold breath, track +1, wild
empathy +4
Combat Gear waters of the Whispering River (5 doses;see page 8); Other Gear bracers of armor +1, javelins (3),
masterwork morningstars (2), 31 gp

compared to:

Languages Draconic
Special Abilities
SQ favored terrain (swamp +2), hold breath, track +1, wild empathy +4
Combat Gear waters of the Whispering River (5 doses;see page 8); Other Gear bracers of armor +1, javelins (3),
masterwork morningstars (2), 31 gp

I put the Special Abilities line in the second instance, but the instance that didn't have the Special Abilities header works. It thinks that the S.A. header is part of the language line.

Very minor examples indeed, especially considering it was the first file I tried.. The parser is a real help. :)

Trenloe
January 31st, 2012, 11:22
I'm looking at the 2 text files and no they aren't the same.
I've deliberately designed the parser to try and parse 99% of Paizo PDF create statblocks by just doing a copy/paste into a text file. Sometimes you need to check the copy/paste as heading in particular sometimes get spaces in them (due to font/highlights not translating directly to text). So, usually you don't need to change the order of the text that results from the copy/paste - were you having issues?

I'm guessing you are parsing the Golden Skeletons for the SQ Fiery death example? I can just copy/paste this out of the PDF - but in my example "Defense" comes out as "Defe nse" and I just remove the space - that is all I do. As metioned in post #1 the main headings are key in the parsing, so make sure they copy/paste OK. In fact, just make sure all headings copy/paste OK - but it is more common for the headings and creature name to have spaces in them as these are usually highlighted or use a different fonts in the PDF that can cause copy/paste issues.


One issue is related to this:

SQ fiery death (1d6 fire damage, Reflex DC 11 half )
Gear broken chain shirt, helmet, broken scimitar
Special Abilities
Light Fortification (Ex) Whenever a sneak attack or critical hit is
scored against a gold-clad creature, there is a 25% chance that
the extra damage is negated and damage is rolled normally.

as apposed to this:

SQ fiery death (1d6 fire damage, Reflex DC 11 half )
Special Abilities Light Fortification (Ex) Whenever a sneak attack or critical hit is
scored against a gold-clad creature, there is a 25% chance that
the extra damage is negated and damage is rolled normally.
Gear broken chain shirt, helmet, broken scimitar

It works when the Gear line breaks up the SQ line and the Special Abilities. Otherwise the Special Abilities gets lumped in with the SQ.

I have designed this parser to adhere to the statblock standard detailed in the introduction of the Paizo Bestiary - and to follow the order detailed there.

The problems come in with NPCs in modules - where they have tactics and gear entries. For gear entries treat them as treasure in terms of where they appear in the stablock - after Organization and before Special Abilities.

Special abilities should always be the last entry in your statblock. AND, don't confuse Special Qualities (SQ) with special abilities - SQ comes between Languages and Environment.

Basically, the parser steps through each expected heading in order. So, when you put gear after special abilities the parser found "gear" before it checked for "special abilities" and so assumes that the whole line from after SQ to the end of gear was the "gear" line.


In the other instance:

Languages Draconic
SQ favored terrain (swamp +2), hold breath, track +1, wild
empathy +4
Combat Gear waters of the Whispering River (5 doses;see page 8); Other Gear bracers of armor +1, javelins (3),
masterwork morningstars (2), 31 gp

compared to:

Languages Draconic
Special Abilities
SQ favored terrain (swamp +2), hold breath, track +1, wild empathy +4
Combat Gear waters of the Whispering River (5 doses;see page 8); Other Gear bracers of armor +1, javelins (3),
masterwork morningstars (2), 31 gp

I put the Special Abilities line in the second instance, but the instance that didn't have the Special Abilities header works. It thinks that the S.A. header is part of the language line.
See my explanation above re order of parsing. The parser looks for SQ as the next heading after languages and so it lumps "special abilities" into the language text.


Very minor examples indeed, especially considering it was the first file I tried.. The parser is a real help. :)
Glad you find it a help.

The big thing is not to rearrange the headings from those detailed in the creature statblock. I'm guessing you may have had issues with the copy paste adding a space in "defense" as this would break the parsing - and you tried to fix the wrong thing?

Check the "gotchas" listed in post #1. :)

A good place to look is the .fpf file created in the first step of parsing - this creates a standard format of all of the headings and it is usually obvious by looking at this file where the problem has occurred in your text file. If not, enable logging and look in the .log file - this may help pinpoint where issues occur.

But, the golden rule is just copy/paste from the PDF and check of erroneous spaces - don't try to rearrange the headings (unless it is obvious they don't conform to the statblock standard).

wbcreighton
January 31st, 2012, 19:15
I'm interested to hear why they are different? So, usually you don't need to change the order of the text that results from the copy/paste - were you having issues?

Good question. No cut and paste issues.


I'm guessing you are parsing the Golden Skeletons for the SQ Fiery death example? I can just copy/paste this out of the PDF - but in my example "Defense" comes out as "Defe nse" and I just remove the space - that is all I do.

Same here. Every Defense line in this module comes with a space in Defense.


Special abilities should always be the last entry in your statblock. AND, don't confuse Special Qualities (SQ) with special abilities - SQ comes between Languages and Environment.

I think this was the source of the problem. I must have inserted a Special Abilities line, and the problems flowed from that.


But, the golden rule is just copy/paste from the PDF and check of erroneous spaces - don't try to rearrange the headings (unless it is obvious they don't conform to the statblock standard).

Which is what I did on the second computer, judging by my review of the 2 files. I didn't insert any Special Abilities lines and it worked fine.

Thanks for the super detailed response.

Dershem
February 28th, 2012, 03:36
Bump to go back to page 1

Leonal
March 4th, 2012, 01:57
Trying to parse Carrion Crown stat blocks, but it keeps adding the base attack string after the charisma stat making quite a mess.

E.g.

Str 0, Dex 23, Con 0, int 8, Wis 14, Cha 17
Base Atk +7; CMB +13; CMD 26 (30 vs. trip)
feats Blind-Fight
turns to

<charisma type="number">17Baseatk+7;CMB+13;CMD26(30vs.trip)featsBlind-Fight</charisma>

Any idea what's wrong?

Edit: Seems to mess up when I copy from Foxit, but not from Adobe reader. That solves the problem...:)

Trenloe
March 17th, 2012, 19:46
Replying to this post (http://www.fantasygrounds.com/forums/showpost.php?p=121650&postcount=9) in a different thread to keep all things creature parser in one thread.

Sorry, lichrbringer, I thought the changes needed for running HeroLab statblocks through the parser were included in the readme.txt file. Post #9 of this thread describes what to do:


Remove all occurrences of -------------------- in the file. Remove the whole line so there are no empty lines in the individual creature statblock.
Have at least one blank line between each creature in the file. But, remove the "--------------------" between each creature.
Add an XP line between between the Name/CR line and the Type line for each creature.
Remove the HeroLab notice at the bottom of the file.


IT's recently been pointed out that the Melee attacks ("Melee" entry) that HeroLab exports is not compatible with the Paizo statblock format, so it makes the Attack section in FG incorrect (in terms of how many attacks a single attack and a full attack make).

For example, the first creature in your statblock file (Asar the Chelaxian fighter) has a melee attack entry of:

Melee +1 Longsword +10 (1d8+5/19-20/x2) and
Claw x2 (Skeletal Champion) +8 x2 (1d4+6/20/x2) and
Gauntlet (from Armor) +8 (1d3+4/20/x2) and
Unarmed Strike +8 (1d3+4/20/x2)
By the statblock definition, this would result in the attack entry being all of these attacks at once. Change the "and" entry to "or".

Plus, if there are any attacks that would be combined in a full attack separate them by a comma ",". But, looking at the statblock, HeroLab doesn't calculate the penalties for using mutlitple hands at once unless you put check/ticks in the 1st/2nd hand entries on the HeroLab Weapons tab.

Hope all of the above makes sense.

lichtbringer
March 17th, 2012, 20:14
Thanks a lot for your answer! iI tried all the above. It works fine till roldare. Maybe you have an idea why it wont go any further? There is an error message:

Processing creature: ASAR
Processing creature: BAT SWARM
Processing creature: BEETLE, GIANT BOMBARDIER
Processing creature: FROG, GIANT
Processing creature: KASSEN'S GOLEM
Processing creature: ORC
Processing creature: ROLDARE
Processing creature:
Error in ReadWriteFormattedCreature, Message: Die leere Zeichenfolge '' ist kein g&#252;ltiger lokaler Name.
Processing creature: SHADOW
Error in ReadWriteFormattedCreature, Message: Der Writer ist geschlossen oder weist den Fehlerstatus auf.
Processing creature:
Error in ReadWriteFormattedCreature, Message: Die leere Zeichenfolge '' ist kein g&#252;ltiger lokaler Name.
Processing creature: SKELETON, BLOODY (HUMAN)
Error in ReadWriteFormattedCreature, Message: Der Writer ist geschlossen oder weist den Fehlerstatus auf.
Processing creature:
Error in ReadWriteFormattedCreature, Message: Die leere Zeichenfolge '' ist kein g&#252;ltiger lokaler Name.
Processing creature: WOLF
Error in ReadWriteFormattedCreature, Message: Der Writer ist geschlossen oder weist den Fehlerstatus auf.
Processing creature:
Error in ReadWriteFormattedCreature, Message: Die leere Zeichenfolge '' ist kein g&#252;ltiger lokaler Name.
Processing creature: ZOMBIE, PLAGUE (HUMAN)
Error in ReadWriteFormattedCreature, Message: Der Writer ist geschlossen oder weist den Fehlerstatus auf.
Processing creature:
Error in ReadWriteFormattedCreature, Message: Die leere Zeichenfolge '' ist kein g&#252;ltiger lokaler Name.
Error in btnStartParse_Click, Message: Der Writer ist geschlossen oder weist den Fehlerstatus auf.
Module file created:

Trenloe
March 18th, 2012, 06:37
Thanks a lot for your answer! iI tried all the above. It works fine till roldare. Maybe you have an idea why it wont go any further? There is an error message:

Processing creature: ASAR
Processing creature: BAT SWARM
Processing creature: BEETLE, GIANT BOMBARDIER
Processing creature: FROG, GIANT
Processing creature: KASSEN'S GOLEM
Processing creature: ORC
Processing creature: ROLDARE
Processing creature:
Error in ReadWriteFormattedCreature, Message: Die leere Zeichenfolge '' ist kein g&#252;ltiger lokaler Name.
Processing creature: SHADOW
Error in ReadWriteFormattedCreature, Message: Der Writer ist geschlossen oder weist den Fehlerstatus auf.
Processing creature:
Error in ReadWriteFormattedCreature, Message: Die leere Zeichenfolge '' ist kein g&#252;ltiger lokaler Name.
Processing creature: SKELETON, BLOODY (HUMAN)
Error in ReadWriteFormattedCreature, Message: Der Writer ist geschlossen oder weist den Fehlerstatus auf.
Processing creature:
Error in ReadWriteFormattedCreature, Message: Die leere Zeichenfolge '' ist kein g&#252;ltiger lokaler Name.
Processing creature: WOLF
Error in ReadWriteFormattedCreature, Message: Der Writer ist geschlossen oder weist den Fehlerstatus auf.
Processing creature:
Error in ReadWriteFormattedCreature, Message: Die leere Zeichenfolge '' ist kein g&#252;ltiger lokaler Name.
Processing creature: ZOMBIE, PLAGUE (HUMAN)
Error in ReadWriteFormattedCreature, Message: Der Writer ist geschlossen oder weist den Fehlerstatus auf.
Processing creature:
Error in ReadWriteFormattedCreature, Message: Die leere Zeichenfolge '' ist kein g&#252;ltiger lokaler Name.
Error in btnStartParse_Click, Message: Der Writer ist geschlossen oder weist den Fehlerstatus auf.
Module file created:
It's the empty "SPECIAL ABILITIES" entry for Roldare that is causing the issue. If the parser finds a heading, it expects there to be data after the heading. So, remove this heading and it should parse through Roldare without error.

lichtbringer
March 18th, 2012, 12:08
It worked. I need to correct a few things but its a great tool and saves so much time. Thank you for your help!

darkling
March 28th, 2012, 21:34
Okay.

The parser is parsing some Hero lab statblock outputs fine, no errors, but I'm getting an XML error when opening the module in FG.

The error is "Database Error: A XML parse error occurred processing file...........Error on line 46: Error reading end tag."

Line 46:
<p><b><u>Special Abilities</u>:</b> </p><p><b>Augury (1/day) (Sp)</b> Use Augury as a spell-like ability 1/day Change Shape (boar, giant spider, rat, or raven, beast shape I) You can assume the form of a monstrous spider, raven, rat or boar. Combat Casting +4 to Concentration checks to cast while on the defensive. </p><p><b>Comm</p><p><b>une (1/week) (Sp)</b> Commune 1/week, ask 6 questions Corrupting Touch (2r) (5/day) (Sp)</b> Melee touch attack leaves target shaken and -2 save vs. enchantment spells for 2 rounds. Damage Reduction (5/good or silver) You have Damage Reduction against all except Good or Silver attacks. Damage Resistance, Acid (10) You have the specified Damage Resistance against Acid attacks. Damage Resistance, Cold (10) You have the specified Damage Resistance against Cold attacks. Damage Resistance, Fire (5) You have the specified Damage Resistance against Fire attacks. Darkvision (60 feet) You can see in the dark (black and white vision only). </p><p><b>Detect Good (At will) (Sp)</b> As the spell. </p><p><b> Caster level 6th Detect Magic (At will) (Sp)</b> As the spell. Caster level 6th Eschew Materials Cast spells without materials, if component cost is 1 gp or less. </p><p><b>Fast Healing 2 (Ex)</b> You heal damage every round if you have UNDER 1 HP. Flight (50 feet, Perfect) You can fly! Flyby Attack You can take a standard action during your move action while flying. Immunity to Fire You are immune to fire damage. Immunity to Poison You are immune to poison. Infernal +2 DC on Charm spells. </p><p><b>Infernal Resistances (Ex)</b> You gain fire resistance 5 and +2 to saves vs. poison. </p><p><b>Invisibility (At will) (Sp)</b> As the spell, self only. </p><p><b> Caster level 6th Poison: Sting-Injury (DC 16) (Ex)</b> Poison deals 1d2 DEX damage, 1/round for 6 rds, cure 1 save. </p><p><b>Suggestion (1/day) (Sp)</b> Suggestion (DC 15) 1/day</p>

edit: Okay, I solved that. For some reason the parser is adding a </p><p><b> in the middle of the word 'Commune'. Stripping that out fixed it. Second NPC in the same file has the same error, line 90:

Line 90:
<p><b><u>Special Abilities</u>:</b> </p><p><b>Animal Companion Link (Ex)</b> You have a link with your Animal Companion. </p><p><b>Bestial Mount (Ex)</b> At 5th level, the mounted fury gains the service of a feral mount. This ability functions as a druid's animal companion, using the barbarian's level -4 as her effective druid level. This companion must be one that she is capable of riding and is suit Darkvision (60 feet) You can see in the dark (black and white vision only). </p><p><b>Fast</p><p><b> Rider (Ex)</b> Mount's speed + 10 Ferocious Mount (Ex)</b> Your mount rages, too. </p><p><b></p><p><b>Fiend Totem, Lesser (Su)</b> Gain d8 gore attack while raging Light Sensitivity (Ex)</b> Dazzled as long as they remain in bright light. Mounted Combat Once per round you can attempt to negate a hit to your mount in combat. </p><p><b>Rage (13 rounds/day) (Ex)</b> +4 Str, +4 Con, +2 to Will saves, -2 to AC when enraged. </p><p><b>Share Spells with Companion (Ex)</b> Spells cast on you can also affect your Companion, if it's within 5 feet. </p><p><b>Trap Sense +1 (Ex)</b> +1 bonus on reflex saves and AC against traps.</p>

It looks like... "Fast Rider" got a </p><p><b> jammed in the middle of it too.

Okay, there's more than that. I'm having no luck with this. I have no idea what is going on anymore. Help!

Trenloe
March 28th, 2012, 21:52
Okay.

The parser is parsing a statblock fine, but I'm getting an XML error when opening the module in Fantasy Grounds.



That line is what is triggering the error. The error is "Database Error: A XML parse error occurred processing file...........Error on line 46: Error reading end tag."

edit: Okay, I solved that. For some reason the parser is adding a </p><p><b> in the middle of the word 'Commune'. Stripping that out fixed it.

Second NPC in the same file has the same problem, line 90:



It looks like... "Fast Rider" got a </p><p><b> jammed in the middle of it too. I fixed one by removing Commune and the other by editing the db.xml and removing the extraneous PPB.

I'll leave this here even though I fixed the problem. It may be useful. I dunno.
The parser makes a best effort to highlight special abilities in bold and move these to a new line so that they are easier to read in the notes tab. Hence the end paragraph (</p>), begin new paragraph (<p>) and begin bold (<b>) tags being added. It does ths by searching the special ability text for (Sp), (Ex) or (Su) (the 3 main special ability types) and then steps back from that point to the beginning of a line or the end of the previous paragraph (based on finding a period "."). Without seeing your source file that you are loading into the parser, I wouldn't be able to see what is causing the problem. It could be a newline character somewhere or an issue with the text encoding used in the source file.

Anyway, glad you managed to fix it and post here so that others having the same issue will know what to look for. :)

darkling
March 28th, 2012, 21:54
No, I haven't fixed it.

This is completely not working.

Trenloe
March 28th, 2012, 21:56
No, I haven't fixed it.

This is completely not working.
I've pm'd you with my email address so you can send me the text source file you are using.

darkling
March 28th, 2012, 22:01
Thanks ;D Sorry, I thought I fixed it and then it started popping up new errors.

PoisonAlchemist
May 5th, 2012, 02:30
Thread, why you no sticky? I spent all afternoon looking for you.

Blackfoot
August 11th, 2012, 17:31
A couple things I noticed about the parser that would be nice to change:

Languages, these are being reported to the 'Other' tab and there is actually a spot for them now on the main tab. The tag for languages is <languages>.. (yeah.. surprising huh? :) )

Racial Modifiers, these are not being broken out from 'Skills' and it would be nice if they were yanked and dropped onto the 'Other' tab. They end up being 'rollable' where they are and it's kinda tweaked.

Blackfoot
August 11th, 2012, 17:38
Another thought... but somewhat more complicated... Some critters have 'Companion' rules as part of their writeup. Is it worth building in a catch for that info?

OK.. one MORE thought.
Many creatures have both a short description at the beginning of their writeup and a longer description at the end... is there any way to separate these and list them on the Other tab... short at the beginning and long at the end?

Trenloe
August 11th, 2012, 17:54
Languages, these are being reported to the 'Other' tab and there is actually a spot for them now on the main tab. The tag for languages is <languages>.. (yeah.. surprising huh? :) )
I'll look into that.


Racial Modifiers, these are not being broken out from 'Skills' and it would be nice if they were yanked and dropped onto the 'Other' tab. They end up being 'rollable' where they are and it's kinda tweaked.
It's a little bit of a pain having them show up as rollable, I agree. But, I don't want to deviate much from the standard Pathfinder Statblock and it is at the end of the skills that racial modifiers are displayed. I'll have a think about it though...

I won't have time to create an udpate for a few weeks. The main item I want to work on for the next update is NPC spells - putting them in the spells tab. This would be the most advantageous piece of new functionality in the parser.

I hope people who've used the parser in the past have kept the text statblock file so you can just run it through the parser again when I release an update.

Blackfoot
August 11th, 2012, 17:56
How are you going to make that work? Most of the writeups are pretty vague on spells, I guess you can pull them in from available modules.

Trenloe
August 11th, 2012, 18:09
Another thought... but somewhat more complicated... Some critters have 'Companion' rules as part of their writeup. Is it worth building in a catch for that info?
Yeah, a bit complicated judging on my brief look at how the companion stats are listed in the bestiaries. I think this will have to be something on the wishlist for now - although when I'm doing updates I may get a flash of inspiration. ;)


OK.. one MORE thought.
Many creatures have both a short description at the beginning of their writeup and a longer description at the end... is there any way to separate these and list them on the Other tab... short at the beginning and long at the end?
I could look for a new heading "Description" after special abilities and then just dump everything after that into a "Description" heading on the other tab. The only real problem here is that once you get to parsing the special abilities there is a chance that "description" might appear in special abilities and screw the final parsing up. But, if I just looked for it as a header - "Description" on it's own line (like Offense, Defense, etc.) then that should work.

Also, there's not an easy way to distinguish paragraph breaks in the copy/pasted text from a PDF. Each line of text ends in a CRLF (carriage return, line feed) so is essentially a new paragraph in itself. I may initially just have to do this as a bulk "dump" of everything and then leave it up to an individual to put the paragraph tags <P> around each paragraph.

Trenloe
August 11th, 2012, 18:13
How are you going to make that work? Most of the writeups are pretty vague on spells, I guess you can pull them in from available modules.
I was just going to link to the Complete Paizo spells module. I haven't had a good look at how the DB entry looks for NPC spells, so I may end up having to parse some key bits out of the spell module to get it to work.

Perhaps the first release will require the GM to go into each spellcaster NPC within FG and select "reparse spell actions" to get all the data out of the module spell entry correctly.

Blackfoot
August 11th, 2012, 18:14
The
Description
idea seems like a good one. If the parser user knows about the tag they can add it, if not they can leave out the long description entirely... and it would make it an easy edit on the statblock rather than juggling one has to do now.

Trenloe
August 11th, 2012, 18:16
I was just going to link to the Complete Paizo spells module. I haven't had a good look at how the DB entry looks for NPC spells, so I may end up having to parse some key bits out of the spell module to get it to work.

Perhaps the first release will require the GM to go into each spellcaster NPC within FG and select "reparse spell actions" to get all the data out of the module spell entry correctly.
Looking at the DB format it doesn't even link to a spell module of the spell that was dragged onto the NPC spell class. So, I'd have to extract all the info from the module and put it in the NPC module DB.

I knew it wasn't going to be a simple task - hence why I haven't started it yet as I know it will take a long time to get it even 80% right.

Blackfoot
August 11th, 2012, 18:17
I figured as much. Ouch. :)

Talen
August 18th, 2012, 16:49
So the parser went through the new season "Rise of the Goblin Guild" fairly well, ( I thought) but everything from Tactics on down didnt populate (Tactics, Statistics, feats, etc)

Any idea what Im missing here? Somewhat related...cant I just unlock and edit - doesnt seem to let me do that either. HEre's an example of what I parsed

Ekkie L CR 2
XP 1
Female goblin expert 4 (Pathfinder RPG Bestiary 156)
NE Small humanoid (goblinoid)
Init +3; Senses darkvision 60 ft.; Perception +6
DEFENSE
AC 17, touch 14, flat-footed 14 (+3 armor, +3 Dex, +1 size)
hp 22 (4d8+4)
Fort +1, Ref +4, Will +3
OFFENSE
Speed 30 ft.
Melee masterwork dogslicer +4 (1d4+1/19–20)
TACTICS
During Combat Ekkie attempts to flee, continuing the chase, using Acrobatics to avoid attacks of opportunity from nearby PCs.
Morale Ekkie surrenders if someone successfully pins her, if she is reduced to 12 hit points or fewer, or if a PC blocks her escape by getting to the Nightsoil Alley square before her.
STATISTICS
Str 12, Dex 16, Con 10, Int 9, Wis 8, Cha 9
Base Atk +3; CMB +5; CMD 16
Feats Agile Maneuvers, Weapon Finesse
Skills Acrobatics +10, Disable Device +10, Escape Artist +10, Linguistics +4, Perception +6, Ride +7, Sleight of Hand +8, Stealth +16
Languages Common, Goblin, Varisian
Combat Gear necklace of fireballs type II (with two 2d6 spheres remaining), potion of cure light wounds; Other Gear masterwork studded leather, masterwork dogslicer, wayfinder, backpack, cage-brother’s skull, horse meat rations from the Mariska Knackery (3 days’ worth), masterwork thieves’ tools

Trenloe
August 18th, 2012, 16:57
It worked fine for me - I copy/pasted the text you included in the post above and ran it through the parser - check you're using V1.0.0.15.

What text editor are you using?

Also, you can't unlock statblocks within a module (as it's read only), you need to drag it to an NPC slot and then you can edit it there.

Talen
August 18th, 2012, 17:07
Thats the one Im using....but I did need to uninstall the prior version....maybe that didnt go so clean...I used the MS uninstaller and immediately reinstalled....any issues with doing that?

Also...saving as ANSI text in Microsoft notepad.

Trenloe
August 18th, 2012, 17:13
Both of the installation method (it's only a single executable that is installed on top of all the .NET stuff, so as long as you see the version it's OK) and the notepad are fine.

During parsing there is an intermediate file created - with the .fpf extension (it will be the same name as your text file, but with .fpf). Have a look in that file (open it in notepad), it is basically the sections that the parser has stripped out of your text file - it may help to show the section where the issue is occurring.

Also, make sure you only have blank lines between creature statblocks - not in the the middle of them.

Talen
August 18th, 2012, 17:38
Theres definitely something wrong with the formatting...but Im not seeing it in notepad. The fpf file shows it being cut off from tactics on down. Ill keep playing with it, but if someone cared to take a look, here are the zipped fpf, text and mod files created.

Trenloe
August 18th, 2012, 17:47
Theres definitely something wrong with the formatting...but Im not seeing it in notepad. The fpf file shows it being cut off from tactics on down. Ill keep playing with it, but if someone cared to take a look, here are the zipped fpf, text and mod files created.
Its the "space" character on the end of "TACTICS " that is causing the issue. I thought I'd coded to remove all trailing spaces - but obviously not tactics (the other main headings work OK).

A quick way to remove them is to use Notepad++, select all of the text, and then Edit -> Blank Operations -> Trim Trailing Space.

I'll update the next release to ignore trailing spaces.

Trenloe
August 18th, 2012, 17:50
Out of interest, what PDF reader are you copying the text from? I've just downloaded the scenario and copy/paste for me from Adobe Reader X doesn't get the spaces.

Blackfoot
August 18th, 2012, 18:00
Hmm.. it definitely is screwing up right there. I ran through the file as well and in the log it seems to be having trouble finding the TACTICS header even though it is clearly there.


8/18/2012 11:37:09 AM: FormatDataFile: Written Melee line as: masterwork dogslicer +4 (1d4+1/19-20)
8/18/2012 11:37:09 AM: FormatDataFile: End of Offense section - sOffenseText =
8/18/2012 11:37:09 AM: FormatDataFile: The title of the next section to parse should be in sCurrentLine = TACTICS
8/18/2012 11:37:09 AM: FormatDataFile: Should be at Staistics line - Calling GetAndFormatLine "Statistics" to step to next line.
8/18/2012 11:37:09 AM: FormatDataFile: Calling GetAndFormatLine "XXXXXXXX" to retrieve al remaining data for this creature.
8/18/2012 11:37:09 AM: FormatDataFile: Remaining data to parse = STATISTICS Str 12, Dex 16, Con 10, Int 9, Wis 8, Cha 9 Base Atk +3; CMB +5; CMD 16 Feats Agile Maneuvers, Weapon Finesse Skills Acrobatics +10, Disable Device +10, Escape Artist +10, Linguistics +4, Perception +6, Ride +7, Sleight of Hand +8, Stealth +16 Languages Common, Goblin, Varisian Combat Gear necklace of fireballs type II (with two 2d6 spheres remaining), potion of cure light wounds; Other Gear masterwork studded leather, masterwork dogslicer, wayfinder, backpack, cage-brother's skull, horse meat rations from the Mariska Knackery (3 days' worth), masterwork thieves'

Talen
August 18th, 2012, 18:05
That did the trick (using notepad++ toeliminate the trailers)! Thank you for taking the time to walk me through - as always your help is invaluable in making these games run as well as they do.

I had the genius idea of cutting from Adobe Reader 9 into MS Word 2007 and then pasting into notepad. I had *thought* that would make spotting formatting issues easier. Little off on that assessment.

Add thank you Blackfoot as well!

Trenloe
August 18th, 2012, 18:14
No problem - glad to help.

I've started looking into parsing directly out of the PDF - not just creatures but story entries, images, etc. However, my first investigations show that this will be very, very hard (if not next to impossible). I need to be able to identify different formats used within the PDF to try to identify what each type of text is. This may never be 100% accurate (or, require a config file be created for each scenario)... This won't be available anytime soon (if ever). So, keep doing what you're doing...

Blackfoot
August 18th, 2012, 18:18
I'm actually wondering how it got as far as tactics without screwing up. Shouldn't it have missed OFFENSE and DEFENSE as well? Both of those had trailing spaces too.

Trenloe
August 18th, 2012, 18:22
I'm actually wondering how it got as far as tactics without screwing up. Shouldn't it have missed OFFENSE and DEFENSE as well? Both of those had trailing spaces too.
I added the tactics code in a later release to the code that checks for OFFENSE, DEFENSE etc. I thought I would have used the same code as the other headings (which does strip trailing spaces), but I obviously didn't. I don't have the latest code with me, so I can't check. But, I've put this in my list of updates for the next version.

Tubel
August 31st, 2012, 12:23
Holy Mother of God! That is brilliant!! Trenloe, thank you so much for this sausage machine magic!

I don't know how much time I've spent copying NPCs laboriously by hand into my burnt offereings module, but this sure did the trick for chapter 4.

If you're interested in hearing the tweaking issues I had with a straight cut from the Rise of the Runelords anniversary edition PDF then this is what caused me grief.

1. the "CR #" in the PDF appeared after the XP bit so I had to manually shift those entries around
2. I copied the traps in at first and that caused their entry to concatenate with the following critter - removing the traps from my txt fixed that.
3. I noticed the spells didn't go into the spell tab in FG. Not sure if that is a 'feature' or whether that is normal. They seemed to appear in the other tab.

All in all though that saved a hell of a lot of time (and given I've got 5 more modules of the rise of the runelords to go, it will be worth the hour it took me to figure it all out)

thanks again!

Talen
September 8th, 2012, 10:52
Just an fyi since its the first time I've come across it. Some PDF's will eliminate the space in the cr line. "CR 9" works. "CR9" does not.

Trenloe
September 10th, 2012, 07:41
2. I copied the traps in at first and that caused their entry to concatenate with the following critter - removing the traps from my txt fixed that.
Traps aren't part of the creature parser. I may look into it in future, but it's not high on the list.


3. I noticed the spells didn't go into the spell tab in FG. Not sure if that is a 'feature' or whether that is normal. They seemed to appear in the other tab.
This is normal and how the parser is currently designed. Spells in the spells tab is on the to-do list, but may not be done for a while as this will require a lot of additional coding to do as most of the functionality is tied into the dropping of the spell link into the tab and not the background NPC Fantasy Grounds DB format.

Ironman
October 9th, 2012, 04:16
I know this is going to sound dumb, but I have tried to use this several times and I have been very unsuccessful. Is this something someone who is not very computer literate can use? If so could someone give me a step by step?

Trenloe
October 9th, 2012, 04:32
I know this is going to sound dumb, but I have tried to use this several times and I have been very unsuccessful. Is this something someone who is not very computer literate can use? If so could someone give me a step by step?
There are some basic steps included in the readme.txt file in the zip file downloaded from the first post.

The main thing to know is that the application takes a text file as input. This text file contains creature statblocks that adhere to the Paizo format as defined in the first chapter of the Pathfinder Bestiaries.

I've tried to design it so you can just copy/paste the creature statblocks out of a PDF - there are some gotchas depending on what your source PDF is, see the first post.

There is an "Example Creatures File.txt" file in the downloaded zip that provides you with an example.

If you have specific issues please post here.

Ironman
October 9th, 2012, 04:58
Thanks Trenloe! It am always amazed at what I can learn by reading the directions and why I never go to them first. This is a really great program and an incredible time saver.

Bidmaron
October 14th, 2012, 16:38
Glad it's working for you. :) Yeah, I've been very surprised with the time save - I imported all the custom monsters from Carrion Crown 2 in about 5 minutes! :D

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...

Looks like "Gear" slipped through my "do comparisons case insensitive" code. I'll update in the next release. Before then, if you want to avoid "no match" appearing, use "Gear", "Combat Gear" and "Other Gear" (leading capitals on all).

Yep, I'm sure anything other than creature stat blocks will break the parser. I've no plans to bring in traps - basically, because there is nowhere to put them in Fantasy Grounds! I suppose they could be put in as freeform story entries, but you may as well copy/paste them directly into FG yourself...
Does my trap extension (https://www.fantasygrounds.com/forums/showthread.php?t=10092&highlight=trap) not work? This should give you a place to put traps.

Blackfoot
October 14th, 2012, 19:33
Does my trap extension (https://www.fantasygrounds.com/forums/showthread.php?t=10092&highlight=trap) not work? This should give you a place to put traps.
Isn't this incorporated into the base ruleset now.. or at least something similar? I know traps are an option in the 3.5e/PF creatures tab now.

Trenloe
October 14th, 2012, 23:22
Does my trap extension (https://www.fantasygrounds.com/forums/showthread.php?t=10092&highlight=trap) not work? This should give you a place to put traps.
As Blackfoot says, traps are now in the V2.9.1 3.5E ruleset.

I may look at putting traps in the "creature" parser in the future, but it's not high on the list at the moment. NPC spells are the next big release I'm working on but it's slow going.

Bidmaron
October 15th, 2012, 00:42
I was just reacting to the post where he said he had nowhere to put trap info. I've been away from FG for almost two years, so it may well have been added while I wasn't looking. But if it has, I don't understand why the parser fellow said there was nowhere to put trap info.

Trenloe
October 15th, 2012, 00:57
But if it has, I don't understand why the parser fellow said there was nowhere to put trap info.
This post you are referencing is from over 1 year ago - the trap functionality was added after that. Hence, that's why the parser fellow (me!) said there was nowhere to put the trap info back then. :)

See my post 2 lines above (post #111) - traps are on my list, but they are not a priority at the moment.

Bidmaron
October 15th, 2012, 01:11
Trenloe, thank you very much for the work you've done on this, and I hope I didn't come across ungrateful that you hadn't done the traps.

Trenloe
October 15th, 2012, 01:16
Trenloe, thank you very much for the work you've done on this, and I hope I didn't come across ungrateful that you hadn't done the traps.
No worries. :)

hamlyntp
November 19th, 2012, 22:28
I was wondering if anyone has tried parsing in any of the npc's from the Shattered Star AP yet? I'm having problems with them as cut and paste of the txt is putting large spaces between many of the words its really frustrating me as I parsed a lot of nps's from Council of Thieves and it worked brilliantly but I can't do it for Shattered Star : ) I dont think its a problem with the parser but the particular font paizo used for the new AP anyone else tried this yet or know of a work around?

Trenloe
November 19th, 2012, 23:54
I was wondering if anyone has tried parsing in any of the npc's from the Shattered Star AP yet? I'm having problems with them as cut and paste of the txt is putting large spaces between many of the words its really frustrating me as I parsed a lot of nps's from Council of Thieves and it worked brilliantly but I can't do it for Shattered Star : ) I dont think its a problem with the parser but the particular font paizo used for the new AP anyone else tried this yet or know of a work around?
Can you give a couple of examples (perhaps just provide Shattered Star AP part number, and the page number on the PDF so that it will avoid any chance of spoilers) and I'll have a quick look. I've tried a couple of statblocks from part 1 and 4 and they seem to work for me OK.

hawkwind
December 15th, 2012, 18:06
First a big thank you for this tool its one of the things that sold me on using Fantasy grounds.
Is the Parser a windows only tool?

inside the mod file is there a xml file you can use as a character sheet, the reason I ask is that I want to use some the iconics in the npc codex

Trenloe
December 16th, 2012, 02:17
First a big thank you for this tool its one of the things that sold me on using Fantasy grounds.
I'm glad you find it useful. :) I must admit, it exceeded my hopes from when I first had the idea while on holiday last year and spent the flight home thinking about it.


Is the Parser a windows only tool?
Yes it is. I developed it in MS Visual Studio - VB .NET to be precise.


inside the mod file is there a xml file you can use as a character sheet, the reason I ask is that I want to use some the iconics in the npc codex
I'm guessing you want to use NPCs as PCs? Unfortunately, there isn't a way to convert an NPC into a fully fledged PC. Blackfoot has put together an extension that allows a player to control an NPC here: http://www.fantasygrounds.com/forums/showthread.php?t=17846

hawkwind
December 16th, 2012, 07:42
it looks as though Herolab are going to release the whole of the Npc Codex as a por file soon which will be handy

Trenloe
December 16th, 2012, 08:53
it looks as though Herolab are going to release the whole of the Npc Codex as a por file soon which will be handy
Yep that will be nice - for free too, at least according to the newsletter: http://wolflair.com/index.php?context=newsletter&page=october_2012#pathfinder

darkling
December 19th, 2012, 19:10
Once again, I'm experiencing a lot of errors with using this parser with statblocks exported from Hero Lab. :(

The parser is claiming to have no problems itself. But once I attempt to activate the .mod in FG, I get a "Database Error: A XML parse error occurred processing file har:db.xml - Error on line 46: Error reading end tag."

I look at line 46, and I can see why. The XML is just plain broken:


<p><b><u>Special Abilities</u>:</b> </p><p><b>Aura of Courage +4 (10' radius) (Su)</b> You are immune to Fear. Allies within aura gain a morale bonus to saves vs Fear. </p><p><b>Aura of Good (Ex)</b> The paladin has an Aura of Good with power equal to her class level. </p><p><b>Detect Evil (At will) (Sp)</b> You can use detect evil at will (as the spell). </p><p><b>Divine Bond (Weapon +1) (7 minutes) (1/day) (Sp)</b> Weapon shines with light and gains enhancement bonuses or chosen properties. </p><p><b>Immune to Fear (Ex)</b> You are immune to all fear effects. Immunity to Disease You are immune to diseases. </p><p><b>Just</p><p><b>ice/Law Variant Channeling (±2 Sacred) Perception, Sense Motive, attack & save bonus/zone of truth Lay on Hands (3d6) (4/day) (Su)</b> You can heal 3d6 damage, 4/day Mercy (Dazed) (Su)</b> When you use your lay on hands ability, it also removes the dazed condition. </p><p><b>Mercy (Shaken) (Su)</b> When you use your lay on hands ability, it also removes the shaken condition. </p><p><b>Paladin Channel Positive Energy 4d6 (2/day) (DC 14) (Su)</b> Positive energy heals the living and harms the undead; negative has the reverse effect. Point Blank Shot +1 to attack and damage rolls with ranged weapons at up to 30 feet. Precise Shot You don't get -4 to hit when shooting or throwing into melee. Rapid Reload (Heavy crossbow) You can reload fast with one type of Crossbow or Firearm. </p><p><b>Smite Evil (3/day) (Su)</b> +1 to hit, +7 to damage, +1 deflection bonus to AC when used.</p>

which is generated from:

Special Abilities
Aura of Courage +4 (10' radius) (Su) You are immune to Fear. Allies within aura gain a morale bonus to saves vs Fear.
Aura of Good (Ex) The paladin has an Aura of Good with power equal to her class level.
Detect Evil (At will) (Sp) You can use detect evil at will (as the spell).
Divine Bond (Weapon +1) (7 minutes) (1/day) (Sp) Weapon shines with light and gains enhancement bonuses or chosen properties.
Immune to Fear (Ex) You are immune to all fear effects.
Immunity to Disease You are immune to diseases.
Justice/Law Variant Channeling (±2 Sacred) Perception, Sense Motive, attack & save bonus/zone of truth
Lay on Hands (3d6) (4/day) (Su) You can heal 3d6 damage, 4/day
Mercy (Dazed) (Su) When you use your lay on hands ability, it also removes the dazed condition.
Mercy (Shaken) (Su) When you use your lay on hands ability, it also removes the shaken condition.
Paladin Channel Positive Energy 4d6 (2/day) (DC 14) (Su) Positive energy heals the living and harms the undead; negative has the reverse effect.
Point Blank Shot +1 to attack and damage rolls with ranged weapons at up to 30 feet.
Precise Shot You don't get -4 to hit when shooting or throwing into melee.
Rapid Reload (Heavy crossbow) You can reload fast with one type of Crossbow or Firearm.
Smite Evil (3/day) (Su) +1 to hit, +7 to damage, +1 deflection bonus to AC when used.


The thing that confuses me is that this is pretty much consistent. I get this with every single NPC I attempt to export now. Am I the only person who uses Hero Lab to make NPC's? Maybe it's because I'm reaching a higher level of statblock complexity because of a higher level of play, but I really hope that something can still be done to help with this. Fixing this always takes me forever. It's always the Special Abilities line. The parser can't handle something there. Is there anything that can be done? :)

Trenloe
December 19th, 2012, 20:21
Once again, I'm experiencing a lot of errors with using this parser with statblocks exported from Hero Lab. :(

The parser is claiming to have no problems itself. But once I attempt to activate the .mod in FG, I get a "Database Error: A XML parse error occurred processing file har:db.xml - Error on line 46: Error reading end tag."

I look at line 46, and I can see why. The XML is just plain broken:



which is generated from:



The thing that confuses me is that this is pretty much consistent. I get this with every single NPC I attempt to export now. Am I the only person who uses Hero Lab to make NPC's? Maybe it's because I'm reaching a higher level of statblock complexity because of a higher level of play, but I really hope that something can still be done to help with this. Fixing this always takes me forever. It's always the Special Abilities line. The parser can't handle something there. Is there anything that can be done? :)
Please attach an example of the text file you are parsing.

darkling
December 19th, 2012, 20:39
Sure thing. :)

Trenloe
December 20th, 2012, 00:43
One thing to try - makes sure each line of the special abilities ends in a full-stop (period). This is used by the parser when it is trying to work out what section of the ability header to put in bold.

I'm not sure why the current one is splitting up Just-ice, it might be a limit to how far back the code looks for a full-stop.

Anyway, darkling, please send through the example text file you are parsing so I can try to work out what is causing this and fix if possible.

Cheers!

darkling
December 20th, 2012, 01:26
Oh whoops. I attached it to the previous post. ^^^^ :)

Trenloe
December 20th, 2012, 07:59
It's as I suspected - the entries in the Special Abilities that don't end in a full-stop (period) are causing the issues.

Just add a . to the end of the lines that don't have a period/full-stop. "Lay on hands" for all three NPCs and "Justice/Law variant" for one.

S Ferguson
January 15th, 2013, 21:17
Works beautifully with NeoExodus. Praise to you! I might get my campaign in after all.:)

hawkwind
March 11th, 2013, 23:15
I'm usually pretty good with the parser but I must be tired tonight as i can't seem to get it to work

this is my error message

Reading data file: C:\Users\Falafel\Documents\thornkeep\accursed halls.txt
Logging to: C:\Users\Falafel\Documents\thornkeep\accursed halls.txt.log
Formatting creature stat block: Murgo the Oracle CR 2
Processing creature: Murgo the Oracle
Error in ReadWriteFormattedCreature, Message: Index was outside the bounds of the array.
Processing creature:
Error in ReadWriteFormattedCreature, Message: The empty string '' is not a valid local name.
Error in btnStartParse_Click, Message: The Writer is closed or in error state.
Module file created: C:\Users\Falafel\Documents\thornkeep\accursedhalls .mod
attached is my file

hawkwind
March 11th, 2013, 23:18
sorry some how the file didn't attach possibly because its a text file
here are the contents, any help would be appreciated

goblin leader
Murgo the Oracle CR 2
XP 1
NE Small humanoid
lnit +5; Senses darkvision 60 ft., vision; Perception +2
DEFENSE
AC 16, touch 12, flat-footed 15 (+4 armor, +1 Dex, +1 size)
hp 23 (3d8+6)
Fort +2, Ref +2, Will +5; +4 vs. disease
OFFENSE
Speed 30 ft.
Melee mwk longspear +3 (1d6-1/x3)
Oracle Spells Known (CL 3rd; concentration +4)
1st (6/day) -bane (DC 12), burning hands (DC 12), cause fear (DC 12),
doom (DC 12), inflict light wounds (DC 12)
O (at will) -bleed (DC 11), create water, detect magic, light, resistance
Mystery flame
STATISTICS
Str 8, Dex 12, Con 12, Int 13, Wis 14, Cha 13
Base Atk +2; CMB +O; CMD 11
Feats Combat Casting, Improved Initiative
Skills Acrobatics +6, Climb +4, Heal +8, Sense Motive +8, Spellcraft +7,
Stealth +8; Racial Modifiers +4 Ride, +4 Stealth
Languages Common, Goblin
SQ oracle's curse (wasting), revelations (burning magic, fire breath [3d4,
1/day, DC 12])
Combat Gear potion of cure light wounds, acid (2); Other Gear
masterwork chain shirt, masterwork longspear

Leonal
March 12th, 2013, 00:43
In the text you pasted "Init" is written with a lowercase "l" and not capital "I".
Change this to I and the error goes away.

Also, but not relevant to the parser, the 0lvl spells use a capital "O" and not a zero in your text.

hawkwind
March 12th, 2013, 01:23
thanks a lot, that was driving me nuts

guppyfish
April 9th, 2013, 17:20
I, too, am being driven crazy. I keep reading and rereading the text and I just can't figure out what's wrong. I did have an A-ha! moment when I saw that, originally, the CMB didn't have + in front of the number, but alas, that was not the issue, I suppose.

This is the text I'm trying to parse:


Shalelu Andosana CR 5
XP 1,600
Female elf fighter 2, ranger 4
CG Medium humanoid (elf)
Init +3; Senses low-light vision; Perception +12
DEFENSE
AC 19, touch 14, flat-footed 15 (+4 armor, +3 Dex, +1 dodge, +1 natural)
HP 53 (6d10+16)
Fort +10, Ref +8, Will +3; +2 vs. enchantments, +1 vs. fear
Defensive Abilities bravery +1
OFFENSE
Speed 30 ft.
Melee mwk short sword +8/+3 (1d6+1/19-20)
Ranged +1 composite longbow +11/+6 (1d8+1/x3)
Space 5 ft., Reach 5 ft.
Special Attacks favored enemy (goblinoids +2)
Ranger Spells Prepared (CL 1st; concentration +2)
1st-Resist Energy
TACTICS
During Combat Shalelu prefers to fight with her bow, resorting to melee only when truly desperate or when an ally seems in dire need of healing from her wand.
Morale Shalelu is loyal to her friends, and as long as even one of them remains in danger, she won't abandon them. That said, if she feels she can escape, get help, and return in time to save anyone captured by enemies before it's too late, she might try to do so.
STATISTICS
Str 12, Dex 16, Con 14, Int 12, Wis 13, Cha 8
Base Atk +6; CMB +7; CMD 21
Feats Dodge, Endurance, Point-Blank Shot, Precise Shot, Rapid Shot, Skill Focus (Acrobatics), Weapon Focus (composite longbow)
Skills Acrobatics +12, Knowledge (nature) +8, Perception +12, Stealth +15, Survival +10, Swim +10
Languages Common, Elven, Goblin
SQ elven magic, favored terrain (forest +2), hunter's bond (companions), PC gear, track +2, weapon familiarity, wild empathy +3
Treasure sleep arrows (10), potion of delay poison, potions of lesser restoration (2), wand of cure light wounds (25 charges), antitoxin (2)


This is the Error Message from the log:

4/9/2013 9:42:56 AM: Calling sub ReadWriteFormattedCreature
4/9/2013 9:42:56 AM: ReadWriteFormattedCreature: Entered sub routine.
4/9/2013 9:42:56 AM: ReadWriteFormattedCreature: Looking for Description, line read =
4/9/2013 9:42:56 AM: ReadWriteFormattedCreature: Looking for NAME/CR, line read =
4/9/2013 9:42:56 AM: ReadWriteFormattedCreature: Processing creature:
4/9/2013 9:42:56 AM: ReadWriteFormattedCreature: Looking for XP, line read =
4/9/2013 9:42:56 AM: ReadWriteFormattedCreature: Looking for Creature Type, line read =
4/9/2013 9:42:56 AM: ReadWriteFormattedCreature: Creating XML structure...
4/9/2013 9:42:56 AM: ReadWriteFormattedCreature: Error Message: System.ArgumentException: The empty string '' is not a valid local name.
at System.Xml.XmlWellFormedWriter.WriteStartElement(S tring prefix, String localName, String ns)
at System.Xml.XmlWriter.WriteStartElement(String localName)
at PFRPGFGCreatureParser.Form1.ReadWriteFormattedCrea ture(StreamReader reader, XmlWriter writer)
4/9/2013 9:43:00 AM: Exiting sub ReadWriteFormattedCreature - will enter again unless it is the end of the intermediary formatted file.
4/9/2013 9:43:00 AM: Calling sub CloseBaseXML
4/9/2013 9:43:00 AM: Error in btnStartParse_Click, Message: System.InvalidOperationException: The Writer is closed or in error state.
at System.Xml.XmlWellFormedWriter.AdvanceState(Token token)
at System.Xml.XmlWellFormedWriter.WriteEndElement()
at PFRPGFGCreatureParser.Form1.CloseBaseXML(XmlWriter writer)
at PFRPGFGCreatureParser.Form1.btnStartParse_Click(Ob ject sender, EventArgs e)

Trenloe
April 9th, 2013, 17:57
The parser looks for "gear" towards the end of the parse to locate where the "Gear" section starts. Unfortunately, for some reason, Paizo decided to put "PC gear" in the SQ section for this NPC so the parser thinks this is where the gear entry starts. Remove that and it should parse OK.

guppyfish
April 9th, 2013, 18:20
<sniffle> I'm so happy. Thank you so very much!

Trenloe
April 9th, 2013, 18:29
<sniffle> I'm so happy. Thank you so very much!
No worries.

If you have issues parsing something in the future, open the .fpf file that is created during the first pass of parsing (same name as your .txt file in the same directory). This "may" give you some pointers to where the issue lies. For the issue you had the final section of the .fpf file showed this:

SQ:elven magic, favored terrain (forest +2), hunter's bond (companions), PC
NOMATCH:gear, track +2, weapon familiarity, wild empathy +3
TREASURE:sleep arrows (10), potion of delay poison, potions of lesser restoration (2), wand of cure light wounds (25 charges), antitoxin (2)
The NOMATCH tag in the middle of the SQ line, just before"gear" pointed me to where the issue was occurring.

hawkwind
April 14th, 2013, 19:01
The curse of the Old ones is effecting me

this freezes the parser don't know why

THE VISITANT CR 8
XP 1
CE Mil-go Cleric 7
Init +7; Senses blindsight 30 ft., low-light vision; Perception +17
DEFENSE
AC 22, touch 18, flat-footed 14 ( +7 Dex, +1 dodge, +4 natural)
hp 107 (10d8+63)
Fort +14, Ref +10, Will +9
DR 5/slashing; Immune cold, plant traits; Resist electricity 10, fire 10
OFFENSE
Speed 30 ft., fly 50 ft . (good)
Melee 4 claws +14 (1d4+4 plus grab)
Special Attacks channel negative energy 5/day (DC 13, 2d6),
evisceration, sneak attack +2d6, wooden fist (+1, 7 rounds/day)
Spell-Like Ability (CL 3rd; concentration + 5)
7/ day-touch of chaos
Cleric Spells Prepared (CL 3 rd; concentration +7)
2nd-barkskin°, cure moderate wounds (DC 16), hold person (DC 16)
1st-cure light wounds (3), protection from law0
O (at will)-bleed (DC 14), create water, mending, stabilize
D Domain spell; Domains Chaos, Plant
TACTICS
During Combat The Visitant starts combat by using its wand at invisibility
(via Use Magic Device). It then proceeds to use its summon monster
scrolls. Once it has summoned several allies, it casts protection from
law and moves to a flanking position-PCs with healing capacities are
its preferred targets.
Morale If reduced to fewer than 30 hit points, the Visitant attempts
to flee, making for area C14 so it can escape into the woods to the
north. If it manages to do so, it can become a harrowing recurring

villain.
STATISTICS
Str 18, Dex 24, Con 23, Int 23, Wis 18, Cha 15
Base Atk +7; CMB +11 (+15 grapple); CMD 29 (37 vs. trip)
Feats Combat Reflexes, Dodge, Selective Channeling, Skill Focus (Use
Magic Device), Weapon Finesse
Skills Bluff +19, Disguise +19, Fly +24, Heal +17, Knowledge (religion)

+19,
Perception +17, Spellcraft +19, Use Magic Device +18
Languages Aklo, Azlanti, Mi-Go; cannot speak
SQ deceptive, item creation, no breath, starflight
Gear scroll of summon monster III, scroll of summon monster IV,
wand of charm monster (10 charges), wand of invisibility
(15 charges), wand of sound burst (15 charges)
SPECIAL ABILITIES
Deceptive (Ex) A mi-go is a master of deception, and gains a +4 racial
bonus on Bluff and Disguise checks. Bluff and Disguise are always
class skills for mi-go.
Evisceration (Ex) A mi-go's claws are capable of swiftly and painfully
performing surgical operations upon helpless creatures or creatures it
has grappled. When a mi-go succeeds at a grapple check (in addition
to any other effects caused by a successful check), it deals its sneak
attack damage to the victim. A creature that takes this damage
must succeed at a DC 18 Fortitude save or take an additional 1d4
points of ability damage from the invasive surgery (the type
of ability damage dealt is chosen by the mi-go at the time
the evisceration occurs). The save DC is Dexterity-based.
Item Creation (Ex) All mi-go possess the ability to create
strange items that blur the line between magic and
technology, given time and resources. But this mi-go doesn't have
time to take advantage of this ability during this adventure.
Sta rflight (Su) A mi-go can survive in the void of outer space, and flies
through space at an incredible speed. Although exact travel times
vary, a trip within a single solar system normally takes 3d20 months,
while a trip beyond should take 3d20 years (or more, at the GM's
discretion)-provided the mi-go knows the way to its destination .

Trenloe
April 14th, 2013, 19:52
The curse of the Old ones is effecting me

this freezes the parser don't know why

THE VISITANT CR 8
XP 1
CE Mil-go Cleric 7
Init +7; Senses blindsight 30 ft., low-light vision; Perception +17
DEFENSE
AC 22, touch 18, flat-footed 14 ( +7 Dex, +1 dodge, +4 natural)
hp 107 (10d8+63)
Fort +14, Ref +10, Will +9
DR 5/slashing; Immune cold, plant traits; Resist electricity 10, fire 10
OFFENSE
Speed 30 ft., fly 50 ft . (good)
Melee 4 claws +14 (1d4+4 plus grab)
Special Attacks channel negative energy 5/day (DC 13, 2d6),
evisceration, sneak attack +2d6, wooden fist (+1, 7 rounds/day)
Spell-Like Ability (CL 3rd; concentration + 5)
7/ day-touch of chaos
Cleric Spells Prepared (CL 3 rd; concentration +7)
2nd-barkskin°, cure moderate wounds (DC 16), hold person (DC 16)
1st-cure light wounds (3), protection from law0
O (at will)-bleed (DC 14), create water, mending, stabilize
D Domain spell; Domains Chaos, Plant
TACTICS
<Rest of statblock>
Change "Spell-like Ability" to be "Spell-Like Abilities".

This is the first time I've seen this issue - the statblock doesn't adhere to the Paizo standard. Out of curiosity, where is this creature from?

hawkwind
April 14th, 2013, 20:12
That was quick- thanks alot
Its from a level yet to be explored in the PFS mini campaign I am running, according to the pazio boards this critter caused or nearly caused a few tpk's

Trenloe
April 14th, 2013, 20:49
That was quick
Its from a level yet to be explored in the PFS mini campaign I am running, according to the pazio boards this critter caused or nearly caused a few tpk's
OK, thanks - found it. I hope Paizo haven't changed the spreadsheet they use to make statblocks to now use "Spell-like Ability" when there is only one ability... I'll have to keep an eye on that and see if I can code for it. But, this is the first time I've seen it, so hopefully it is just a one off and someone decided to manually make the title more grammatically correct...

hawkwind
April 14th, 2013, 22:38
the book was first published 4 to 5 months ago so I think its a one off

chillybilly
April 21st, 2013, 16:20
This mod is amazing. I literally just cut and pasted from a pdf and it parsed it 100% accurately on the first time. I was dumbstruck by the ease.

When looking over my NPCs and trying to drag and drop spells onto the caster, I noticed the spells from the library don't drop onto the NPC sheets (they just drop an empty spell template). I assume this was what you guys were talking about over the last few pages of this thread. My question is, has a solution been found? I think Trinloe was working on it (if I understood the thread correctly) but he said it was slow and difficult work. How's it going?

Just curious. I'd hate to do this stuff manually if an automated solution has been invented.

Thanks again for this amazing mod.

JohnD
April 21st, 2013, 17:51
Nevermind... as usual after posting for help I figured it out. :o

lachancery
May 2nd, 2013, 05:25
Hmm. The parser is locking up on this creature. Looking at the cleric sample included with the parser, I can't figure out what's wrong.

First, the log:

01/05/2013 11:02:40 PM: Starting Application. App Exe: Pathfinder Tool - FG Creature Parser Product Version: 1.0.0.15
01/05/2013 11:02:40 PM: Reading data file: ...\Kingmaker 2 Creatures.txt
01/05/2013 11:02:40 PM: Calling sub FormatDataFile.
01/05/2013 11:02:40 PM: Entered Sub FormatDataFile.
01/05/2013 11:02:40 PM: FormatDataFile: Read past starting blank lines (if any).
01/05/2013 11:02:40 PM: FormatDataFile: Opened StreamWriter.
01/05/2013 11:02:40 PM: FormatDataFile: Written DESCRIPTION line:
01/05/2013 11:02:40 PM: FormatDataFile: Written NAME line: Tiressia CR 4
01/05/2013 11:02:40 PM: FormatDataFile: Reading and formatting creature stat block: Tiressia CR 4
01/05/2013 11:02:40 PM: FormatDataFile: Written XP line: XP 1,200
01/05/2013 11:02:40 PM: FormatDataFile: Written TYPE line: Female dryad druid 2 (Pathfinder RPG Bestiary 116) CG Medium fey
01/05/2013 11:02:40 PM: FormatDataFile: Written INIT line: Init +5; Senses low-light vision; Perception +14
01/05/2013 11:02:40 PM: FormatDataFile: got the line ending in DEFENSE Defense
01/05/2013 11:02:40 PM: FormatDataFile: got the line ending in OFFENSE DR 5/cold iron; Weaknesses tree dependent
01/05/2013 11:02:40 PM: GetAndFormatLine: Searching for 2 strings: tactics ,statistics
01/05/2013 11:02:40 PM: FormatDataFile: Retrieved OffenseText Speed 30 ft. Melee mwk sickle +10 (1d6-1) Ranged mwk longbow +10 (1d8-1/x3) Domain Spell-Like Ability (CL 2nd; concentration +8) 8/day-storm burst Spell-Like Abilities (CL 6th; concentration +12) Constant-speak with plants At will-entangle (DC 17), tree shape, wood shape (1 lb. only) 3/day-charm person (DC 17), deep slumber(DC 19), tree stride 1/day-suggestion (DC 19) Druid Spells Prepared (CL 2nd; concentration +7) 1st-faerie fire, goodberry, magic fang, obscuring mistD 0 (at will)-guidance, purify food and drink, stabilize, virtue D Domain spell; Domain Weather
01/05/2013 11:02:40 PM: FormatDataFile: Written SPEED line: 30 ft.
01/05/2013 11:02:40 PM: FormatDataFile: Written Melee line as: mwk sickle +10 (1d6-1)
01/05/2013 11:02:40 PM: FormatDataFile: Written Ranged line as: mwk longbow +10 (1d8-1/x3) Domain

Now the stat block for this creature in the text file:

Tiressia CR 4
XP 1,200
Female dryad druid 2 (Pathfinder RPG Bestiary 116)
CG Medium fey
Init +5; Senses low-light vision; Perception +14
Defense
AC 18, touch 15, flat-footed 13 (+5 Dex, +3 natural)
hp 48 (6d6+2d8+18)
Fort +9, Ref +10, Will +13
DR 5/cold iron
Weaknesses tree dependent
Offense
Speed 30 ft.
Melee mwk sickle +10 (1d6–1)
Ranged mwk longbow +10 (1d8–1/×3)
Domain Spell-Like Ability (CL 2nd; concentration +8)
8/day—storm burst
Spell-Like Abilities (CL 6th; concentration +12)
Constant—speak with plants
At will—entangle (DC 17), tree shape, wood shape (1 lb. only)
3/day—charm person (DC 17), deep slumber(DC 19), tree stride
1/day—suggestion (DC 19)
Druid Spells Prepared (CL 2nd; concentration +7)
1st—faerie fire, goodberry, magic fang, obscuring mistD
0 (at will)—guidance, purify food and drink, stabilize, virtue
D Domain spell; Domain Weather
TACTICS
During Combat Tiressia tries to avoid melee combat,
using entangle to hinder foes and deep slumber on
any creature attacking her tree. She uses her scroll to
summon additional creatures to help Falchos in battle,
while jumping from tree to tree using tree stride and tree
meld to attack enemies at a distance with her longbow.
Morale Tiressia retreats into her oak when reduced to 20 hit
points or fewer, praying that her attackers get bored and leave.
Statistics
Str 8, Dex 20, Con 15, Int 14, Wis 20, Cha 22
Base Atk +4; CMB +9; CMD 18
Feats Agile Maneuvers, Great Fortitude, Stealthy,
Weapon Finesse
Skills Climb +8, Craft (wood sculpture) +17, Diplomacy +15, Escape
Artist +16, Handle Animal +15, Heal +14, Knowledge (nature)
+13, Perception +14, Stealth +16, Survival +16
Languages Common, Elven, Sylvan; speak with plants
SQ nature bond (Plant domain), nature sense, tree meld, wild
empathy +8, woodland stride
Combat Gear goodberries (5), potion of cure moderate wounds
(2), scroll of summon nature’s ally II, wand of cure light wounds
(26 charges), 6 feather tokens (tree); Other Gear masterwork
longbow with 20 arrows, masterwork sickle, 178 gp

lachancery
May 3rd, 2013, 23:22
Located the problem. In the source PDF for this NPC, the entry below the ranged attack (Domain Spell-Like Ability) is written in the singular form. It must be "Abilities".

JohnD
May 4th, 2013, 00:56
I've found that I get most of my errors from this utility when trying to parse something that has Cleric levels/abilities. Coincidence?

Trenloe
May 4th, 2013, 19:29
Located the problem. In the source PDF for this NPC, the entry below the ranged attack (Domain Spell-Like Ability) is written in the singular form. It must be "Abilities".
This is the same issue that hawkwind had a few posts above. It seems to be very rare that Paizo use the singular (this is only the second occurrence that I know of). However, I've tagged this to be updated in the next release.

Trenloe
May 8th, 2013, 23:35
When looking over my NPCs and trying to drag and drop spells onto the caster, I noticed the spells from the library don't drop onto the NPC sheets (they just drop an empty spell template). I assume this was what you guys were talking about over the last few pages of this thread. My question is, has a solution been found? I think Trinloe was working on it (if I understood the thread correctly) but he said it was slow and difficult work. How's it going?

Just curious. I'd hate to do this stuff manually if an automated solution has been invented.

Thanks again for this amazing mod.
You shouldn't have any issues dropping spells onto an NPC sheet - once you have created the spell class you should just be able to drop spells from the spell modules onto the spell class. Remember to unlock the NPC before trying to make any changes.

Also, remember to prepare the spells, otherwise when you lock the NPC (or close it) the spells go into "Combat" mode and only those prepared will be seen.

Callum
June 20th, 2013, 21:53
Thanks for this fantastic tool, Trenloe - I've just used it for the first time, and it works a treat!

One thing I noticed is that the XP values go into the xml as (for example) "XP 100" - since it's a number tag, shouldn't it really just be "100"? I know the values aren't used currently in FG, but it bothered me!

Trenloe
June 21st, 2013, 19:54
One thing I noticed is that the XP values go into the xml as (for example) "XP 100" - since it's a number tag, shouldn't it really just be "100"? I know the values aren't used currently in FG, but it bothered me!
I've updated the code in the current development stream to remove the XP entry and also to remove any commas in the number.

S Ferguson
June 21st, 2013, 19:58
I've updated the code in the current development stream to remove the XP entry and also to remove any commas in the number.

But, I, loved, those, commas.:D

Thanks for the update, it's been working great so far in my Exodus, and now Obsidian Twilight games. Good show.

Cheers,
SF

Trenloe
June 21st, 2013, 20:12
But, I, loved, those, commas.:D

Thanks for the update, it's been working great so far in my Exodus, and now Obsidian Twilight games. Good show.
The change has only been made in the dev version, which won't be released for a while yet. So, enjoy those commas for a little while longer.

I was hoping, at some point, to have written a small extension that would have used the XP values from the creatures when creating an encounter - so that it would auto total the XP for the whole encounter and calculate the CR too. This would help GMs to make challenging (or not) encounters on the fly and would also allow the adjusted XP of the encounter to be used when dragged to the party sheet for XP allocation.

S Ferguson
June 21st, 2013, 20:16
The change has only been made in the dev version, which won't be released for a while yet. So, enjoy those commas for a little while longer.

I was hoping, at some point, to have written a small extension that would have used the XP values from the creatures when creating an encounter - so that it would auto total the XP for the whole encounter and calculate the CR too. This would help GMs to make challenging (or not) encounters on the fly and would also allow the adjusted XP of the encounter to be used when dragged to the party sheet for XP allocation.

That's an excellent idea. Hope to see it in the beta!;)

Callum
June 21st, 2013, 21:46
I've updated the code in the current development stream to remove the XP entry and also to remove any commas in the number.
That's great - thanks, Trenloe!

Might I be so bold as to make a few more constructive suggestions? Of course, I don't know how feasible these are, so feel free to ignore them.

Firstly, could the creature's languages appear in the Languages slot on the Main tab, not as text in the Other tab?

Secondly, could the text formatting in the Other tab be adjusted to make it more clear and easy to read (like the standard layout)? I've attached a screenshot of an NPC where I've edited the text alongside the one straight from the parser to show what I mean.

Note that these aren't criticisms - the parser is already great; I'm just hoping to make it even greater!

Trenloe
June 21st, 2013, 23:32
Might I be so bold as to make a few more constructive suggestions? Of course, I don't know how feasible these are, so feel free to ignore them.

Firstly, could the creature's languages appear in the Languages slot on the Main tab, not as text in the Other tab?
I don't know why I didn't do this in the first place. Looking at the original software specification I wrote for this I don't have languages as an FG field for an NPC so I must have missed that.

It's an easy fix so I've included it in the dev code.


Secondly, could the text formatting in the Other tab be adjusted to make it more clear and easy to read (like the standard layout)? I've attached a screenshot of an NPC where I've edited the text alongside the one straight from the parser to show what I mean.

Note that these aren't criticisms - the parser is already great; I'm just hoping to make it even greater!
Yeah, a lot more could be done on the Other tab in terms of better formatting - that is a nice to have at the moment, but I will look into it at some point. Just keep in mind that the more carriage returns/new lines there are in the other tab then the longer the page will be - this could be very long for some high CR creatures and require a lot of scrolling! :-o But, if it is more readable then that is probably preferable.

Blackfoot
June 21st, 2013, 23:43
Is it possible to do single spacing for some of that stuff on the 'Other' Tab? When I was working on some critters I messed around with doing spell lists as a 'list' and it condensed the information into a smart looking format.. the only problem was it bulleted all the spell levels which wasn't so great.

Readable is preferable to less scrolling IMO.

Trenloe
June 22nd, 2013, 01:10
Is it possible to do single spacing for some of that stuff on the 'Other' Tab? When I was working on some critters I messed around with doing spell lists as a 'list' and it condensed the information into a smart looking format.. the only problem was it bulleted all the spell levels which wasn't so great.
The issue here is that not all HTML tags are supported by the formatted text control. Some of this is discussed here: http://www.fantasygrounds.com/forums/showthread.php?t=14323

The main tag that is not supported is the break <br> tag that would be nice here. There may be a possibility of using table specifications to reduce the blank space between rows.

If someone can mess around and come up with a nice format that works within the FG 3.5e/PF ruleset for the NPC other tab formatted text control then I'll consider putting it in the next release of the parser. At the moment, for me, this is a very low priority and there are other pieces of functionality I want to work on before I look into making the other tab "pretty". :)

S Ferguson
June 22nd, 2013, 03:05
The issue here is that not all HTML tags are supported by the formatted text control. Some of this is discussed here: http://www.fantasygrounds.com/forums/showthread.php?t=14323

The main tag that is not supported is the break <br> tag that would be nice here. There may be a possibility of using table specifications to reduce the blank space between rows.

If someone can mess around and come up with a nice format that works within the FG 3.5e/PF ruleset for the NPC other tab formatted text control then I'll consider putting it in the next release of the parser. At the moment, for me, this is a very low priority and there are other pieces of functionality I want to work on before I look into making the other tab "pretty". :)

That the spirit, function before form, how dada-esque of you.;)

Callum
June 23rd, 2013, 13:33
The issue here is that not all HTML tags are supported by the formatted text control. Some of this is discussed here: http://www.fantasygrounds.com/forums/showthread.php?t=14323

The main tag that is not supported is the break <br> tag that would be nice here. There may be a possibility of using table specifications to reduce the blank space between rows.

If someone can mess around and come up with a nice format that works within the FG 3.5e/PF ruleset for the NPC other tab formatted text control then I'll consider putting it in the next release of the parser. At the moment, for me, this is a very low priority and there are other pieces of functionality I want to work on before I look into making the other tab "pretty". :)
I agree absolutely that making it look pretty isn't a good use of time! Putting all the spell names in italics, for example, would take an age to code and isn't necessary. However, spacing stuff out is much easier to do, and the main thing that improves readability and usability, in my opinion. The second most important thing is making the headings bold (which you have already done). I'd also keep the underlining just for sections (such as Tactics), and drop the colons.

So you just need to go from this:

<text type="formattedtext">
<p><b><u>Spells Known</u>:</b> (CL 1st; concentration +2) 1st (2/day)-cure light wounds, hideous laughter (DC 12) 0 (at will)-daze (DC 11), ghost sound (DC 11), mage hand, message</p>
<p><b><u>Tactics</u>:</b> <b>During Combat</b> The warchanter continues her bardic performance during combat, using her whip to try to trip PCs. She casts hideous laughter on any PC who seems to be particularly dangerous, and cure light wounds on herself after she is first wounded. <b>Morale</b> The warchanter fights to the death.</p>
</text>
to this:

<text type="formattedtext">
<p><b>Spells Known </b>(CL 1st; concentration +2) </p>
<p>1st (2/day) - cure light wounds, hideous laughter (DC 12) </p>
<p>0 (at will) - daze (DC 11), ghost sound (DC 11), mage hand, message </p>
<p><b><u>Tactics </u></b></p>
<p><b></b><b>During Combat </b>The warchanter continues her bardic performance during combat, using her whip to try to trip PCs. She casts hideous laughter on any PC who seems to be particularly dangerous, and cure light wounds on herself after she is first wounded. <b></b></p>
<p><b>Morale </b>The warchanter fights to the death. </p>
</text>

Trenloe
June 23rd, 2013, 17:46
Using the paragraph "<p>" tags is exactly what I originally used when I first started doing some formatting in the "other" tab. This creates a double new line - i.e. a blank line between each paragraph tag.

But, as mentioned above (post #155), for creatures with a lot of info in the other tab this results in a very long entry - which has to be scrolled through, even with a big window. It seemed clunky, so I removed the <p> for anything other than new sections.

Callum
June 23rd, 2013, 18:15
Hmm...well, I disagree, but it's your parser! I think the blank line between paragraphs is actually very helpful when you have a long block of text, as it enables you to scan through quickly and find the section you're looking for. I've used this layout myself with several high-level monsters, and - like Blackfoot - I found that I preferred readability over less scrolling. Most abilities have more than a line or two of text, so the overhead of one more line per paragraph isn't that great. I realise that the original Pathfinder stat blocks don't have blank lines between abilities, but they have indented paras instead, which allows the quick visual scan to work.

Trenloe
June 23rd, 2013, 18:22
Using the paragraph "<p>" tags is exactly what I originally used when I first started doing some formatting in the "other" tab. This creates a double new line - i.e. a blank line between each paragraph tag.

But, as mentioned above (post #155), for creatures with a lot of info in the other tab this results in a very long entry - which has to be scrolled through, even with a big window. It seemed clunky, so I removed the <p> for anything other than new sections.
Having said that, I have started experimenting with format changes as part of the spell parsing functionality in V1.1 (next release). On the left is an example of the current format of "Cleric Spells Prepared" and on the right is the same creature with <p> tags between each spell level. I'd like to be able to reduce the spaces between each line, but I don't think this is possible in the FG formattedtext control.

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Spell%20Formatting.JPG

And as a teaser, here is the spell tab for the same creature in V1.1. I still need to do coding for spontaneous spell casting and spell like abilities. And then lots and lots of testing.

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Star%20Archon%20Spell%20Teaser.JPG

Trenloe
June 23rd, 2013, 18:27
Hmm...well, I disagree, but it's your parser! I think the blank line between paragraphs is actually very helpful when you have a long block of text, as it enables you to scan through quickly and find the section you're looking for. I've used this layout myself with several high-level monsters, and - like Blackfoot - I found that I preferred readability over less scrolling. Most abilities have more than a line or two of text, so the overhead of one more line per paragraph isn't that great. I realise that the original Pathfinder stat blocks don't have blank lines between abilities, but they have indented paras instead, which allows the quick visual scan to work.
I agree - blank lines between actual paragraphs is what is needed. But not blank lines between every new line/sub-section - which is what I was trying to explain regarding the <p> tags within the FG formattedtext control.

I'm really not going to do much work on this for a while. If you manage to come up with some good formatting without blank lines between sub-sections (i.e. don't just throw <p> tags everywhere) let me know the FG code and I'll look at it.


Thanks. :)

Trenloe
June 23rd, 2013, 19:05
I hope I didn't come across as brusque and dismissive in the previous post? What I was trying to say was: I'll look at putting the <p> tags in sometime in the future, but what I'd really like is a way of doing new-lines without the extra blank line (like the HTML <br> tag). So, if anyone comes up with a way of doing this, please let me know.

Callum
June 23rd, 2013, 19:41
Wow, that looks fantastic, Trenloe! If you can get it to automatically populate the Spells tab, that'll save a huge amount of time in getting the NPCs ready for play. You could also then keep the spells listing on the Other tab in its compact form - though I would put spaces either side of the dash that comes just before each level's list of spells, and maybe add a semicolon at the end of each level, too.

I'd still like to lose all the colons, and also the underlining except for section headings, but I can manually change those if you're going to do all the spells for me! ;)

Trenloe
June 23rd, 2013, 19:46
Damn you, you've got me looking at options now... ;)

A couple of options that do compact down the spells without the blank line: the first is using a table, the second is using a list. I'm liking the list. :)

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Spell%20List%20Options.JPG

Callum
June 23rd, 2013, 21:31
Yes, I like the list, too - it seems odd when you first look at it, but makes sense when you get used to it. I notice that Blackfoot said earlier that he didn't like a bulleted spell list, though, and the table format is closer to the original.

I wouldn't put the spell levels in bold. You could try putting each entire line of spells in italics (eg from implosion to miracle).

S Ferguson
June 24th, 2013, 01:37
Damn you, you've got me looking at options now... ;)

A couple of options that do compact down the spells without the blank line: the first is using a table, the second is using a list. I'm liking the list. :)

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Spell%20List%20Options.JPG

I like the list too.:)

Cheers,
SF

damned
June 24th, 2013, 03:07
i just dont want to meet this monster - ever.

S Ferguson
June 24th, 2013, 03:09
i just dont want to meet this monster - ever.

Oh, come on! Just Once. :D

Cheers,
SF

Callum
June 26th, 2013, 23:17
I'm going to say one more thing, and then leave Trenloe to get on with his outstanding work. If you're going to keep the colons, they should be adjacent to the word to their left. That underlined space haunts my dreams!

Trenloe
June 26th, 2013, 23:47
That underlined space haunts my dreams!

I like haunting people's dreams, so I think I'll just leave it in! ;)

Being serious, there is actually no space in the formattedtext code, for example the following appears with a space before the : despite there not being one in the data.


b><u>Spell-Like Abilities</u>:</b>

Looks like the formattedtext control is adding the space in.

Looks like your dreams will be forever haunted! :-o

Or, I may just remove them - I'll see how I feel. I actually like them! :D

Callum
June 27th, 2013, 11:05
You're quite right, Trenloe -the formattedtext control adds a space in after a section of formatted text. I've noticed this when applying formatting using the GUI, and I've learned to always include punctuation in the formatting to minimise the appearance of extraneous spaces! This means that the punctuation itself gets formatted, which is not ideal, but is definitely the lesser of the two evils. So, in your example, you need to change

<b><u>Spell-Like Abilities</u>:</b>
to

<b><u>Spell-Like Abilities:</u></b>
in order to get rid of that haunting space.

I actually don't mind the colons, myself - dumping them seems to be a stylistic decision that Paizo have made. So I'd be happy to put them back in to ability descriptions, for example:


Explosive Rebirth (Su): When killed, a star archon explodes...

For spell lists (and SLAs, etc), the colon needs to go after the parenthetical info, as in:


Cleric Spells Prepared (CL 19th; concentration +26):

Also, whether or not you keep them in other places, they really shouldn't appear after section headings:


Special Abilities

Blackfoot
June 27th, 2013, 18:11
Personally, I like the colons... I might like them better without the space between the text and the underlined title.. but I tend to add them when I reconstruct my 'Other' tabs.

S Ferguson
June 27th, 2013, 19:23
Personally, I like the colons... I might like them better without the space between the text and the underlined title.. but I tend to add them when I reconstruct my 'Other' tabs.

What he said.

Macgreine
July 4th, 2013, 04:03
Hey guys,
I am working with some stat blocks from some third party adventures from Frog God and Necromancer. They are formatted for Pathfinder but the dont seem to go through the parser right. I was wondering if someone could take a look at a sample and tell me whats wrong with it and if its a simple edit I can do them all that way.
Thanks , Mac


DREAD WRAITH CR 11
XP 12,800
LE Large undead (incorporeal)
Init +13; Senses darkvision 60 ft., lifesense 60 ft.; Perception
+23
Aura unnatural aura (30 ft.)
AC 26, touch 26, flat-footed 16 (+7 deflection, +9 Dex, +1
dodge, –1 size)
hp 184 (16d8+112)
Fort +12; Ref +14; Will +14
Defensive Abilities channel resistance +2, incorporeal; Immune
undead traits
Weakness sunlight powerlessness
Spd fly 60 ft. (good)
Melee incorporeal touch +20 (2d6 negative energy plus 1d6
Con drain)
Space 10 ft.; Reach 10 ft.
Special Attacks create spawn
Str —, Dex 28, Con —, Int 17, Wis 18, Cha 24
Base Atk +12; CMB +13; CMD 40
Feats Improved Natural Attack (incorporeal touch), Blind Fight, Combat Reflexes, Improved Initiative, Dodge, Mobility,
Spring Attack, Step Up
Skills Diplomacy +23, Fly +30, Intimidate +26, Knowledge
(planes) +19, Knowledge (religion) +22, Perception +23,
Sense Motive +23, Stealth +24
Languages Common, Giant, Infernal
Create Spawn (Su) A humanoid slain by a dread wraith becomes
a full ordinary wraith in 1d4 rounds. Spawn are under
the command of the wraith that created them until its death, at
which point they lose their spawn penalties and become freewilled
wraiths. They do not possess any of the abilities they
had in life.
Constitution Drain (Su) Creatures hit by a dread wraith’s
touch attack must succeed on a DC 25 Fortitude save or take
1d6 points of Constitution drain. On each successful attack, the
wraith gains 5 temporary hit points. The save DC is Charismabased.
Lifesense (Su) A dread wraith notices and locates living creatures
within 60 feet, just as if it possessed the blindsight ability.
Sunlight Powerlessness (Ex) A dread wraith caught in sunlight
cannot attack and is staggered.
Unnatural Aura (Su) Animals do not willingly
approach within 30 feet of a dread wraith, unless a master
makes a DC 25 Handle Animal, Ride, or wild empathy
check.

Macgreine
July 4th, 2013, 05:33
I think I figured it out. Theres no paragraph space between the divisions.

Talen
August 14th, 2013, 23:52
This may be obvious to some, but just came across this one. A monster name with a period will blow things up. For example, Mr. Plugg in the skull and shackles ap.

Trenloe
August 15th, 2013, 07:27
This may be obvious to some, but just came across this one. A monster name with a period will blow things up. For example, Mr. Plugg in the skull and shackles ap.
Thanks for raising this.

A little bit more info about exactly what "will blow things up" means would have helped me identify the issue quicker. I was quite disappointed when there were no fragments of NPC statblocks flying around - it really wasn't that impressive! ;)

I've included a fix in version 2.0 - which will hopefully be out next month.

Talen
August 15th, 2013, 13:13
Thanks for raising this.

A little bit more info about exactly what "will blow things up" means would have helped me identify the issue quicker. I was quite disappointed when there were no fragments of NPC statblocks flying around - it really wasn't that impressive! ;)

I've included a fix in version 2.0 - which will hopefully be out next month.

Sorry, was sending this as I was walking out the door! Here's what happened: the parse created the mod and I didn't notice an error. But when I opened the mod and tried to add mr. Plugg to my list of mpc's, a new blank npc would be created in my mod when i tried to open him prior to dragging him over and fg would hang and crash when I did drag him over.

The pyrotechnics may, admittedly have been unrelated to the parser.

Nickademus
August 15th, 2013, 13:17
and fg would hang and crash when I did drag him over.

I've been noticing this happen with items in parcels in FG as well. Perhaps the bug is not just in the parser. Perhaps items such as 'rope, hemp (50 ft.)' have problems with the period in the object creation process... Just a thought.

Trenloe
August 15th, 2013, 16:08
I've been noticing this happen with items in parcels in FG as well. Perhaps the bug is not just in the parser. Perhaps items such as 'rope, hemp (50 ft.)' have problems with the period in the object creation process... Just a thought.
This is completely related to how the XML name tag is handled within Fantasy Grounds. i.e. the <rope, help (50 ft.)> XML start tag for the record in the module.

For the creature parser I had a already written code to remove most incompatible characters from the XML name, I just hadn't included a period because it is actually valid for normal XML tags - obviously not for FG.

Talen
August 15th, 2013, 19:20
So, Im very rusty with the parser and I must be missing something in this text. Anyone able to take the time and spot my mistake?

HOLY AHENDILE Sub1 CR 2
xp 100
Female human sorcerer 3
LE Medium humanoid (human)
Init +2; Senses low-light vision; Perception +0
DEFENSE
AC 16, touch 12, flat-footed 14 (+4 armor, +2 Dex)
hp 19 (3d6+6)
Fort +2, Ref +3, Will +3
Resist cold 5, fire 5
OFFENSE
Speed 30 ft.
Melee mwk dagger +1 (1d4–1/19–20)
Bloodline Spell-Like Abilities (CL 3rd; concentration +6)
6/day—minute meteors (1d4+1 fire, DC 14)
Sorcerer Spells Known (CL 3rd; concentration +6)
1st (6/day)—burning hands (DC 14), mage armor, ray of
enfeeblement (DC 14)
0 (at will)—acid splash, bleed (DC 13), daze (DC 13), detect
magic, read magic
TACTICS
Before Combat: Holy Ahendile casts mage armor on herself.
During Combat: Holy Ahendile uses ray of enfeeblement to
weaken a strong melee threat. She hesitates to use burning
hands for fear of damaging the property, but she casts it
anyway once she has taken any damage. She uses her wand
of cure light wounds to heal her allies, though she uses her
False Casting feat to hide the true nature of her healing magic.
Morale: If reduced to fewer than 10 hit points, she uses her
wand to heal herself. If unable to heal herself or convinced
that she has lost, Ahendile orders her surviving thugs to
cover her retreat.
STATISTICS
Str 8, Dex 14, Con 13, Int 12, Wis 10, Cha 17
Base Atk +1; CMB +0; CMD 14
Feats Defensive Combat Training, False Casting, False Focus,
Magical Aptitude
Skills Bluff +9, Knowledge (local) +2, Knowledge (religion) +5,
Sleight of Hand +3, Spellcraft +9, Use Magic Device +11
Languages Common, Hallit
SQ false piety, lay healer
Combat Gear potion of invisibility, scroll of scare, wand of cure
light wounds (25 charges); Other Gear mwk dagger, silver
unholy symbol of Razmir, 113 gp
SPECIAL ABILITIES
False Piety (Ex) A Razmiran priest gains Knowledge (religion)
and Perform as class skills, but loses Appraise and Fly as
class skills. She gains half her level as a bonus to activate
spell trigger and spell completion items that use divine
spells. She gains False Focus as a bonus feat but does not
gain Eschew Materials.
Lay Healer (Su) At 3rd level, the Razmiran priest adds aid
to her list of spells known. At 5th level she adds remove
disease to her list of spells known. These replace the
bloodline spells that she would normally gain at 3rd and 5th
level respectively.

Trenloe
August 15th, 2013, 19:32
So, Im very rusty with the parser and I must be missing something in this text. Anyone able to take the time and spot my mistake?
Where's it failing? What errors are you getting?

Trenloe
August 15th, 2013, 19:38
It really helps if you let us know exactly what issue you are experiencing when posting about issues - this helps anyone who looks at this for you to know exactly where to look, and doesn't waste their time trying to work out what problem you're having.

You get a faster response and the people who help you aren't spending additional time trying to work out what your issue is.

Trenloe
August 15th, 2013, 19:45
So, Im very rusty with the parser and I must be missing something in this text. Anyone able to take the time and spot my mistake?
Works fine for me. Just copied and pasted the text into Notepad++, save the text file and parsed.

https://dl.dropboxusercontent.com/u/39085830/Screenshots/TalenTest.JPG

Talen
August 15th, 2013, 19:59
Thanks for the quick response Trenloe, and understood. Here's the screenshot of what I saw that made me think there was an error along with the log file.




46594660

Trenloe
August 15th, 2013, 20:23
Its not "HOLY AHENDILE Sub1" that is causing the problem - it is the CR entries without a space between CR and the number - e.g. "RAMZIRI THUG CR1" - put a space between the CR and the 1.

Talen
August 15th, 2013, 20:34
Its not "HOLY AHENDILE Sub1" that is causing the problem - it is the CR entries without a space between CR and the number - e.g. "RAMZIRI THUG CR1" - put a space between the CR and the 1.

Thanks for taking the time to help!

hawkwind
August 16th, 2013, 14:14
I'm having a problem with the same adventure as Talen but with the higher tier BBEG

this is my critter

HOLY AHENDILE CR 5
xp 2
Female human sorcerer (Razmiran priest) 6
LE Medium humanoid (human)
Init +2; Senses low-light vision; Perception +0
DEFENSE
AC 16, touch 12, flat-footed 14 (+4 armor, +2 Dex) hp 35
(6d6+12)
Fort +4, Ref +5, Will +6
Resist cold 5, fire 5
OFFENSE
Speed 30 ft.
Melee mwk dagger +3 (1d4–1/19–20)
Bloodline Spell-Like Abilities (CL 6th; concentration +10)
7/day—minute meteors (1d4+3 fire, DC 17)
Sorcerer Spells Known (CL 6th; concentration +10)
3rd (4/day)—lightning bolt (DC 18), remove disease (DC 17)
2nd (6/day)—acid arrow, aid, flaming sphere (DC 17)
1st (7/day)—burning hands (DC 16), mage armor, magic
missile, ray of enfeeblement (DC 15)
0 (at will)—acid splash, bleed (DC 14), daze (DC 14), detect
magic, prestidigitation, read magic, resistance
STATISTICS
Str 8, Dex 14, Con 13, Int 12, Wis 10, Cha 18
Base Atk +3; CMB +2; CMD 17
Feats Defensive Combat Training, False Casting, False Focus,
Magical Aptitude, Spell Focus (evocation)
Skills Bluff +13, Knowledge (arcana) +6, Knowledge (local) +2,
Sleight of Hand +5, Spellcraft +12, Use Magic Device +15
Languages Common, Hallit
SQ false piety, lay healer
Combat Gear potion of invisibility, scroll of bear’s endurance,
scroll of levitate, scroll of scare, wand of cure moderate
wounds (12 charges); Other Gear mwk dagger, aegis of
recoveryAPG, cloak of resistance +1, silver unholy symbol of
Razmir, 18 gp
SPECIAL ABILITIES
False Piety (Ex) A Razmiran priest gains Knowledge (religion)
and Perform as class skills, but loses Appraise and Fly as
class skills. She gains half her level as a bonus to activate
spell trigger and spell completion items that use divine
spells. She gains False Focus as a bonus feat but does not
gain Eschew Materials.
Lay Healer (Su) At 3rd level, the Razmiran priest adds aid
to her list of spells known. At 5th level she adds remove
disease to her list of spells known. These replace the
bloodline spells that she would normally gain at 3rd and 5th
level respectively.


and this is my error

Reading data file: C:\Users\falafel\Documents\Falafel\Documents\glass river\holyglasstxt.txt
Logging to: C:\Users\falafel\Documents\Falafel\Documents\glass river\holyglasstxt.txt.log
Formatting creature stat block: HOLY AHENDILE CR 5
Error in FormatDataFile, Message: startIndex cannot be larger than length of string.
Parameter name: startIndex
Formatting creature stat block: level respectively.
Processing creature: HOLY AHENDILE
Processing creature:
Error in ReadWriteFormattedCreature, Message: Index was outside the bounds of the array.
Processing creature:
Error in ReadWriteFormattedCreature, Message: Index was outside the bounds of the array.
Processing creature:
Error in ReadWriteFormattedCreature, Message: The empty string '' is not a valid local name.
Error in btnStartParse_Click, Message: The Writer is closed or in error state.
Module file created: C:\Users\falafel\Documents\Falafel\Documents\glass river\holyglasstxt.mod

any ideas and apologies if we have both ruined the playing of this adventure for you

Trenloe
August 16th, 2013, 14:49
I'm having a problem with the same adventure as Talen but with the higher tier BBEG

this is my critter

HOLY AHENDILE CR 5
xp 2
Female human sorcerer (Razmiran priest) 6
LE Medium humanoid (human)
Init +2; Senses low-light vision; Perception +0
DEFENSE
AC 16, touch 12, flat-footed 14 (+4 armor, +2 Dex) hp 35
(6d6+12)
...

The HP entry is not on it's own line. Change it to:

AC 16, touch 12, flat-footed 14 (+4 armor, +2 Dex)
hp 35 (6d6+12)

A good indicator for this is that when you get your first error, don't click the OK button but look in the .fpf file as well as the .log file at that point - this will give a better idea of where the error was occurring.

The .fpf file is a first-pass parsing of the statblock - putting the information in labelled lines. So, it can be easier to see where errors are occurring. For this specific creature the .fpf file showed the following when the first error occurred (again, don't press the OK button when the first error appears):

DESCRIPTION:
NAME:HOLY AHENDILE CR 5
XP:xp 2
TYPE:Female human sorcerer (Razmiran priest) 6 LE Medium humanoid (human)
INIT:Init +2; Senses low-light vision; Perception +0
Nothing more was in the .fpf file, so this started me looking at the lines following the initiative line in the statblock, which led me to seeing that HP was not on it's own line.

hawkwind
August 16th, 2013, 15:15
thanks a lot

hawkwind
September 27th, 2013, 11:15
Another problem stat block
any help would be appreciated

Trenloe
September 27th, 2013, 17:47
Another problem stat block
any help would be appreciated
2 issues:

VETERAN BUCCANEER CR 2 didn't have a space between Ranged and mwk - put the space in and the errors will be fixed. The parser looks for "Ranged " (with a space on the end) and so wouldn't find this entry.
ALMANT ENDERIOShl CR 5 has "statistics" in the tactics list at the beginning of a line, 2 lines above the main "STATISTICS" header (which is used as an important placeholder in the parser). Move the "statistics" in tactics onto the end of the previous line and this should parse fully - this would not raise an error, but all statblock info after this point would not be parsed.

hawkwind
September 27th, 2013, 19:33
Thanks for that, I will be able to run a PFS session this week

Wenin
October 11th, 2013, 07:30
I'm encountering an oddity.

I'm attempting to get all the Feats listed under the Special Abilities section.

If I use the below text, I don't get an error, but the format appears to ignore that the Feats are listed on their own lines, and combines them to the previously listed Special Ability.



Special Abilities
+4 bonus on initiative checks You gain the Alertness feat while your familiar is within arm's reach.
Allied Spellcaster +2 vs. SR if adj ally with same feat. More if has same spell.
Combat Casting +4 to Concentration checks to cast while on the defensive.
Deliver Touch Spells Through Familiar (Su) Your familiar can deliver touch spells for you.
Empathic Link with Familiar (Su) You have an empathic link with your Arcane Familiar.
Focused Spell You can cast a spell that gains +2 DC against one of its multiple targets.
Force Missile (8/day) (Sp) Magic Missile hits for 1d4+3
Greater Spell Focus (Evocation) +1 to the Save DC of spells from one school.
Hero Points (1) Hero Points can be spent at any time to grant a variety of bonuses.
Intense Spells +3 (Su) Evocation spells deal listed extra damage.
Magical Lineage (Burning Hands) A chosen spell counts as 1 level lower when metamagic feats are applied to it.
Share Spells with Familiar Can cast spells with a target of "You" on the familiar with a range of touch.
Speak with Animals (Ex) Your familiar can communicate with animals similar to itself.
Speak With Familiar (Ex) You can communicate verbally with your familiar.
Spell Focus (Evocation) Spells from one school of magic have +1 to their save DC.
Varisian Tattoo (Evocation) Spells from chosen school gain +1 caster level.
Wrath (Evocation) Evokers revel in the raw power of magic, and can use it to create and destroy with shocking ease.


If I use the following text:


Special Abilities
Allied Spellcaster +2 vs. SR if adj ally with same feat. More if has same spell.
Combat Casting +4 to Concentration checks to cast while on the defensive.
Magical Lineage (Burning Hands) A chosen spell counts as 1 level lower when metamagic feats are applied to it.
Hero Points (1) Hero Points can be spent at any time to grant a variety of bonuses.
Share Spells with Familiar Can cast spells with a target of "You" on the familiar with a range of touch.
Focused Spell You can cast a spell that gains +2 DC against one of its multiple targets.
Spell Focus (Evocation) Spells from one school of magic have +1 to their save DC.
Greater Spell Focus (Evocation) +1 to the Save DC of spells from one school.
Varisian Tattoo (Evocation) Spells from chosen school gain +1 caster level.
Wrath (Evocation) Evokers revel in the raw power of magic, and can use it to create and destroy with shocking ease.
+4 bonus on initiative checks You gain the Alertness feat while your familiar is within arm's reach.
Deliver Touch Spells Through Familiar (Su) Your familiar can deliver touch spells for you.
Empathic Link with Familiar (Su) You have an empathic link with your Arcane Familiar.
Force Missile (8/day) (Sp) Magic Missile hits for 1d4+3
Intense Spells +3 (Su) Evocation spells deal listed extra damage.
Speak with Animals (Ex) Your familiar can communicate with animals similar to itself.
Speak With Familiar (Ex) You can communicate verbally with your familiar.


I get the following error:
Database Error: A XML parse error occurred processing file AsGoodAsItGetsNPCs:db.xml - Error on line 46: Error reading end tag.

The following also throws the same error, but won't throw an error if I remove the Focused Spell line.


Special Abilities
Deliver Touch Spells Through Familiar (Su) Your familiar can deliver touch spells for you.
Empathic Link with Familiar (Su) You have an empathic link with your Arcane Familiar.
Force Missile (8/day) (Sp) Magic Missile hits for 1d4+3
Intense Spells +3 (Su) Evocation spells deal listed extra damage.
Speak with Animals (Ex) Your familiar can communicate with animals similar to itself.
Speak With Familiar (Ex) You can communicate verbally with your familiar.
Focused Spell You can cast a spell that gains +2 DC against one of its multiple targets.

Wenin
October 11th, 2013, 07:40
Perhaps it has to do with the order of items listed in this line?


SQ +4 bonus on initiative checks, arcane bonds (sukooth, scorpion, greensting), deliver touch spells through familiar, empathic link with familiar, force missile (8/day), hero points, intense spells +3, share spells with familiar, speak with animals, speak with familiar, specialized schools (wrath [evocation])


The parser doesn't throw any errors. The error I'm getting appears in FG when I activate the module.

Trenloe
October 11th, 2013, 22:00
The parser lumps all of the special abilities section into one big lump of text and then attempts to format them based off finding an ability type of (Sp), (Su) or (Ex) - it was designed this way as all Paizo statblocks list the ability type and they are frequently on multiple lines, especially when copied from a PDF.

In order to get it to parse other special abilities, add a (Sp) for spell like abilities, (Su) for Supernatural abilities and (Ex) for Extraordinary Abilities. More info on these here: http://paizo.com/pathfinderRPG/prd/glossary.html#_appendix-1-special-abilities

Also, the parser will identify where the special ability title begins by looking back for a period (.) and then will put the title on a new line and with a bold font. The parser then uses the FG formatted text XML tags of <p></p> to split lines as new paragraphs and <b></b> to highlight the ability titles in bold.

So, in order to get it to work properly (only for special abilities):

Add a (Sp), (Su) or (Ex) after each ability title.
Make sure the end of the previous line has a period. Some Hero Lab abilities do not do this so keep an eye out for them.

If you get a XML error when you open the NPC in Fantasy Grounds it is more than likely that this line splitting and ability title highlighting has not worked and the formatted text control XML tags are out of synch. If you know XML you can look in the db.xml file created in a folder in the directory containing the text parse (folder name is the same as the text file) - look for the <text type="formattedtext"> section and try to work out where the <p></p> and <b></b> tags are causing the error - if you're not familiar with XML don't worry about it.

I think you are getting the error due to the following lines:

Empathic Link with Familiar (Su) You have an empathic link with your Arcane Familiar.
Force Missile (8/day) (Sp) Magic Missile hits for 1d4+3
Intense Spells +3 (Su) Evocation spells deal listed extra damage.
When the parser reaches the "Intense Spells +3 (Su)" section it will parse back for a period - which is before the "Force Missile" entry. Force missile has already been formatted correctly (because the previous line ends in a period) but the parser thinks this is the beginning of the "Intense Spells" section and so throws some <p> and <b> tags in there which more than likely break the XML and give the error you are seeing.

Simple fix - put a period on the end of the Force Missile line:

Force Missile (8/day) (Sp) Magic Missile hits for 1d4+3.

Hope the above makes sense and that the period fix works.

Wenin
October 11th, 2013, 22:21
Darn it! You beat me by 19 minutes!

I figured out the issue as well. =)

Blackfoot
November 22nd, 2013, 22:45
Trenloe, did you ever address the issue that the 'xp' element of the parser is creating a string for a number definition? I'm not sure this information gets used anyway.. but it seems like it would create an error if it was.
Example of output from version 1.0.0.15:
<xp type="number">XP 200</xp>

Trenloe
November 22nd, 2013, 22:48
Trenloe, did you ever address the issue that the 'xp' element of the parser is creating a string for a number definition? I'm not sure this information gets used anyway.. but it seems like it would create an error if it was.
Example of output from version 1.0.0.15:
<xp type="number">XP 200</xp>
It's not used at all by Fantasy Grounds. But, it has been addressed in the V2 parser, which I'll release once I've tested it with FG 3.0 live.

Blackfoot
November 22nd, 2013, 23:01
That's what I figured.. I just wanted to be sure you were aware of it.

Skellan
November 24th, 2013, 02:54
The creature parser is my favourite thing ever. Can wait for the next version. Did you say you were adding spells?

Trenloe
November 24th, 2013, 20:10
The creature parser is my favourite thing ever. Can wait for the next version. Did you say you were adding spells?
Yep, spells (And spell like abilities) being added is the main functionality upgrade in the creature parser. There are others - bug fixes, formatting changes to the other tab, etc..

Here is a teaser of a spell tab. This is the Star Archon from the Bestiary 1 - straight copy/paste of the statblock gives this auto adding of spells.

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Star%20Archon%20Spell%20Teaser.JPG

Skellan
November 24th, 2013, 20:30
Omg, thats awesome. I seriously cant wait for this :)

jshauber
November 30th, 2013, 04:56
Yep, spells (And spell like abilities) being added is the main functionality upgrade in the creature parser. There are others - bug fixes, formatting changes to the other tab, etc..

Here is a teaser of a spell tab. This is the Star Archon from the Bestiary 1 - straight copy/paste of the statblock gives this auto adding of spells.

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Star%20Archon%20Spell%20Teaser.JPG

DAMN!!!!

I think Trenloe just became my favorite person!!!!

Having spells auto-populate by having them in stat block is AWESOME!!!! I have found setting up spells/spell-like abilities to be the more time consuming of all activities in getting FG set up to run a game.

I may just wait until V 2.0 is released make the campaign I have planned, I can spend my time making/finding maps instead.

Nickademus
November 30th, 2013, 05:31
Are the spell actions (Cast, Damage, Heal and Effect) still created by the internal FG parsing? Or does the Creature Parser have some effect on what the spell actions for each spell are?

Blackfoot
November 30th, 2013, 05:50
I believe he mentioned at one point that it was using the FG parsing to gather the data... so it still won't build effects for all of your spells but it will do more than half the job for you.

jshauber
November 30th, 2013, 05:54
I believe he mentioned at one point that it was using the FG parsing to gather the data... so it still won't build effects for all of your spells but it will do more than half the job for you.

Effects I have gotten good at, filling in the spell lists and having the data there will be a huge time saver.

Trenloe
November 30th, 2013, 06:49
Are the spell actions (Cast, Damage, Heal and Effect) still created by the internal FG parsing? Or does the Creature Parser have some effect on what the spell actions for each spell are?
After consultation with M_W he said that it would be best if I don't build the effects directly into the spells and keep with the internal FG parsing. At the time he said that there were plans for spells and effects so it would be best if I kept things as they are with the current spell format and not do too much extra. I don't know if the changes are still planned to spells/effects or not, not what the changes might be.

Nickademus
November 30th, 2013, 10:18
Good to know.

chillybilly
December 9th, 2013, 15:02
Really looking forward to the V2.0. Like everyone else, I hate, hate, hate inputting spells into my mobs after they are parsed. What an incredible time saver.

Wenin
January 12th, 2014, 03:45
I'm unable to determine what is wrong with the following stat block. If I remove either of the Spells Known section, I no longer get an error. I think I saw in an earlier post that someone got a stat block working and it included two sets of Spells Known sections.



Belster Silverkin CR 4
XP 1200
Male Human (Chondathan) Bard (Celebrity) 4/Sorcerer 1
NG Medium humanoid (human)
Init +0; Senses Perception +6
Defense
AC 11, touch 11, flat-footed 11
hp 30 (4d8+1d6)
Fort +2, Ref +5, Will +8; +4 vs. bardic performance, sonic, and language-dependant effects
Offense
Speed 30 ft.
Special Attacks bardic performance, bardic performance: countersong, bardic performance: distraction, bardic performance: fascinate, bardic performance: inspire competence
Spell-Like Abilities
7/day—laughing touch
Bard (Celebrity) Spells Known (CL 4th; concentration +8):
2nd (2/day)—cure moderate wounds, minor image (DC 16)
1st (4/day)—hypnotism (DC 17), expeditious retreat, skill lore, restful sleep (DC 15)
0 (at will)—mage hand, message, ghostharp, lullaby (DC 16), cleanse of alcohol, cloth armor
Sorcerer Spells Known (CL 1st; concentration +5):
1st (4/day)—color spray (DC 15), comprehend languages
0 (at will)—mending, detect magic, prestidigitation (DC 14), light
Statistics
Str 10, Dex 10, Con 10, Int 14, Wis 12, Cha 18
Base Atk +3; CMB +3; CMD 14
Feats Eschew Materials, Instrumental, Luck of Heroes, Quick Draw, Skill Focus (Perform), Spellsong
Traits the dalelands (human region)
Skills Acrobatics +8, Appraise +7, Bluff +15, Climb +4, Diplomacy +15, Disguise +9, Escape Artist +4, Fly +4, Intimidate +8, Knowledge (history) +8, Knowledge (religion) +10, Knowledge (The Dalelands (includes Cormanthor Drow, Elven Court) local) +10, Linguistics +6, Perception +6, Perform (string instruments) +15, Sense Motive +5, Sleight of Hand +5, Spellcraft +6, Stealth +4, Use Magic Device +9
Languages Chondathan, Common, Damaran, Elven, Halfling
SQ bardic knowledge, bloodlines (fey), famous, hero points, versatile performance abilities (string instruments), well versed
Other Gear Lute
Special Abilities
Bardic Knowledge +2 (Ex) Add +2 to all knowledge skill checks.
Bardic Performance (Su) (14 rounds/day) Your performances can create magical effects.
Bardic Performance: Countersong (Su) Counter magical effects that depend on sound.
Bardic Performance: Distraction (Su) Counter magical effects that depend on sight.
Bardic Performance: Fascinate (2 targets) (DC 16) (Su) One or more creatures becomes fascinated with you.
Bardic Performance: Inspire Competence +2 (Su) +2 competence bonus for one ally on a skill check.
Eschew Materials (Ex) Cast spells without materials, if component cost is 1 gp or less.
Famous +1 (Ex) The Dales - With natives of selected region gain bonus to Diplomacy & Intimidate.
Fey (Su) +2 to save DCs from spells of the Compulsion subschool.
Instrumental (Ex) When activating a magical instrument as a fullround or standard action, you may begin a bardic performance as a free action. Your performance must use a Perform skill appropriate to the instrument Alternatively, you may expand 2 rounds of bardic performance.
Laughing Touch (7/day) (Su) Melee touch attack leaves target able to take only move actions.
Quick Draw (Ex) Draw weapon as a free action (or move if hidden weapon). Throw at full rate of attacks.
Spellsong (Ex) Combine spellcasting and bardic performance.
Versatile Performance (String Instruments) +15 (Ex) You may substitute the final value of your Perform: String Instruments skill for Bluff or Diplomacy checks.
Well Versed (Ex) +4 save vs. bardic performance, sonic, and language-dependent effects.

Wenin
January 12th, 2014, 04:16
Another issue I'm encountering is getting the following error when I attempt to open my NPC gallery.



Database Error: A XML parse error occurred processing file AsGoodAsItGetsNPCs:db.xml - Error on line 813: Error reading end tag.


Line 813 of my campaign's db.xml file is the following:



<id-00007>
<public />
<holder name="Kenneth" owner="true" />
<armorcheckmultiplier type="number">0</armorcheckmultiplier>
<label type="string">Profession</label>
<misc type="number">0</misc>
<ranks type="number">0</ranks>
Line 813--> <shortcut type="windowreference">
<class></class>
<recordname></recordname>
</shortcut>
<showonminisheet type="number">0</showonminisheet>
<stat type="number">0</stat>
<state type="number">1</state>
<statname type="string">wisdom</statname>
<total type="number">0</total>



The following link is to the TXT file I use to convert into a Module.

https://www.dropbox.com/s/mvv52gw5yojke1f/As%20Good%20As%20It%20Gets%20NPCs.txt

Trenloe
January 12th, 2014, 10:42
I'm unable to determine what is wrong with the following stat block. If I remove either of the Spells Known section, I no longer get an error. I think I saw in an earlier post that someone got a stat block working and it included two sets of Spells Known sections.
The parser only checks for "spells known" once. It will do "spells prepared" in additional to "spells known" but it will only do each of these titles once.

This version of the parser only puts the spells section in the "other" tab, so you can parse the NPC twice - with a different name and only one of the "spells known" section present; and then copy/paste the extra section from/to the Other tab in the NPC when it is in FG. Or just remove one of the spells known sections and manually paste that into the NPC once in FG.

Trenloe
January 12th, 2014, 10:50
Another issue I'm encountering is getting the following error when I attempt to open my NPC gallery.



Line 813 of my campaign's db.xml file is the following:
Put a period . at the end of the Sacred Summons line for Alexis Arlington. When the parser is formatting the special abilities (new lines, making the titles bold, etc.) it needs to know where the end of the previous special ability is - it does this by looking for a full-stop/period character. The majority of stat blocks have this correct - it mostly appears in statblocks generated in Hero Labs. So, just something to have a quick check when you are copying/pasting NPCs statblocks. Also the first place to look if you get an XML error similar to the one you got.

Wenin
January 12th, 2014, 16:41
Thank you, I thought I had caught all the missing periods =)

Trenloe
February 22nd, 2014, 16:24
Beta version of the creature parser v2 available here: http://www.fantasygrounds.com/forums/showthread.php?20522-Pathfinder-Creature-Parser-V2-Beta-Version

Skellan
February 22nd, 2014, 16:35
omg - love you!

chillybilly
February 22nd, 2014, 16:40
Thank you very much for this! I suspect that so many people have been wishing and waiting for this that we may want to just start a new thread called, Trenloe is the Best.

Wenin
May 18th, 2014, 16:21
Is it possible to associate an Icon with a monster when designing the stat blocks?

Trenloe
May 18th, 2014, 16:49
Is it possible to associate an Icon with a monster when designing the stat blocks?
See "token reference" in post #1 of this this. I also recommend you use v2 of this parser: https://www.fantasygrounds.com/forums/showthread.php?20522-Pathfinder-Creature-Parser-V2-Beta-Version

You can add a token to the creature/s once you have parsed and opened the module in FG. Drag the creature from the library to your campaign NPC list so that you can modify it (you can't modify the Libary entry), unlock the NPC and drag a token to the token entry on the NPC window.

Wenin
June 1st, 2014, 18:52
I still haven't switched over to the new Alpha version, I'm getting a number of XML errors. In the meantime the beta is still working nicely for me.

The issue I'm currently encountering is with the Ecology section. If I have anything listed after the Treasure entry, it is all placed under the Treasure entry rather than in its own set of paragraphs. How do I get it to accept it as the ecology description?

Aurumvorax CR 9
XP 6,400
N Small magical beast
Init +8; Senses darkvision 60 ft., low-light vision, scent; Perception +13
DEFENSE
AC 23, touch 15, flat-footed 19 (+4 Dex, +8 natural, +1 size)
hp 132 (12d10+48)
Fort +14; Ref +12; Will +7
Defensive Abilities ferocity; DR 10/piercing or slashing; Immune poison; Resist fire 10
OFFENSE
Speed 30 ft., burrow 10 ft.
Melee bite +18 (1d6+5 plus grab), 4 claws +18 (1d4+5 plus grab)
Special Attacks rake (4 claws +18, 1d4+5)
TACTICS
During Combat The aurumvorax attacks by biting a foe and holding on with its powerful jaws. It then rips the foe apart with its claws. An aurumvorax that grabs its prey with its jaws does not release the hold unless broken until either it or its prey is dead.
STATISTICS
Str 21, Dex 18, Con 18, Int 2, Wis 13, Cha 11
Base Atk +12; CMB +16 (+24 grapple); CMD 30 (42 vs. trip)
Feats Bleeding Critical, Critical Focus, Great Fortitude, Improved Initiative, Iron Will, Skill Focus (Perception)
Skills Perception +13, Stealth +17
ECOLOGY
Environment temperate plains, hills, or forests
Organization solitary or pair
Treasure standard
Aurumvoraxes are very aggressive creatures, and lead solitary lives except when they mate. Adults typically claim the hunting area within a mile of their warrens, ruthlessly driving away other predators. In addition to fresh meat, aurumvoraxes are fond of gnawing on metals (particularly gold and copper), though whether they do this to sharpen their teeth or because of some nutritional need is unknown. Aurumvorax warrens can stretch for thousands of feet, often winding deep into the earth. The avaricious appetite of aurumvoraxes has earned them the appellation "golden gorger" among dwarves, who have lost more than a few miners to the dangerous beasts.
In battle, an aurumvorax latches onto its victim with its jaws and gouges savage wounds with its claws. It rarely looses its grip before it or its foe is dead. It typically attacks the nearest living creature regardless of size, and ignores any wounds it suffers at the hands of others until its prey is dead.
A typical aurumvorax is only 3 feet long but weighs more than 200 pounds, for it is densely packed with muscle and thick, sturdy bones. Its fur is golden, while its claws are black and sharp. Its weight relative to its body size makes it a poor swimmer, and most dislike crossing water, though they can trundle along the bottom of still or slow water if necessary.
Adult aurumvoraxes are impossible to train, but their offspring are valued for training as guard beasts. A healthy aurumvorax kit can be sold for 5,000 gp or more to a discerning buyer. Female aurumvoraxes rarely give birth to more than one offspring at a time, and are ferociously protective of their young.
An aurumvorax drags its prey back to its lair to consume at its leisure, and its bone-midden often contains valuable belongings from past kills. Uneaten precious metals, discarded gems, and well-chewed metal items can also be found in its warrens. Despite its metallic coloration, an aurumvorax is not vulnerable to attacks that target metal, such as heat metal or the touch of a rust monster—in fact, aurumvoraxes easily kill and eat rust monsters, and some dwarf clans use aurumvorax pets to protect their storehouses against them.
SPECIAL ABILITIES
Grab (Ex) An aurumvorax can grab a foe of up to one size category larger than itself. It gains a +8 racial bonus to grapple attempts due to its multiple claws.
Critical Focus (Ex) Aurumvorax receive a +4 circumstance bonus on attack rolls made to confirm critical hits.
Bleeding Critical (Ex) Whenever the Aurumvorax scores a critical hit with its claws or bite, its opponent takes 2d6 points of bleed damage each round on his turn, in addition to the damage dealt by the critical hit. Bleed damage can be stopped by a DC 15 Heal skill check or through any magical healing. The effects of this feat stack.

Trenloe
June 1st, 2014, 19:27
I still haven't switched over to the new Alpha version, I'm getting a number of XML errors. In the meantime the beta is still working nicely for me.

The issue I'm currently encountering is with the Ecology section. If I have anything listed after the Treasure entry, it is all placed under the Treasure entry rather than in its own set of paragraphs. How do I get it to accept it as the ecology description?

Aurumvorax CR 9
XP 6,400
N Small magical beast
Init +8; Senses darkvision 60 ft., low-light vision, scent; Perception +13
DEFENSE
AC 23, touch 15, flat-footed 19 (+4 Dex, +8 natural, +1 size)
hp 132 (12d10+48)
Fort +14; Ref +12; Will +7
Defensive Abilities ferocity; DR 10/piercing or slashing; Immune poison; Resist fire 10
OFFENSE
Speed 30 ft., burrow 10 ft.
Melee bite +18 (1d6+5 plus grab), 4 claws +18 (1d4+5 plus grab)
Special Attacks rake (4 claws +18, 1d4+5)
TACTICS
During Combat The aurumvorax attacks by biting a foe and holding on with its powerful jaws. It then rips the foe apart with its claws. An aurumvorax that grabs its prey with its jaws does not release the hold unless broken until either it or its prey is dead.
STATISTICS
Str 21, Dex 18, Con 18, Int 2, Wis 13, Cha 11
Base Atk +12; CMB +16 (+24 grapple); CMD 30 (42 vs. trip)
Feats Bleeding Critical, Critical Focus, Great Fortitude, Improved Initiative, Iron Will, Skill Focus (Perception)
Skills Perception +13, Stealth +17
ECOLOGY
Environment temperate plains, hills, or forests
Organization solitary or pair
Treasure standard
Aurumvoraxes are very aggressive creatures, and lead solitary lives except when they mate. Adults typically claim the hunting area within a mile of their warrens, ruthlessly driving away other predators. In addition to fresh meat, aurumvoraxes are fond of gnawing on metals (particularly gold and copper), though whether they do this to sharpen their teeth or because of some nutritional need is unknown. Aurumvorax warrens can stretch for thousands of feet, often winding deep into the earth. The avaricious appetite of aurumvoraxes has earned them the appellation "golden gorger" among dwarves, who have lost more than a few miners to the dangerous beasts.
In battle, an aurumvorax latches onto its victim with its jaws and gouges savage wounds with its claws. It rarely looses its grip before it or its foe is dead. It typically attacks the nearest living creature regardless of size, and ignores any wounds it suffers at the hands of others until its prey is dead.
A typical aurumvorax is only 3 feet long but weighs more than 200 pounds, for it is densely packed with muscle and thick, sturdy bones. Its fur is golden, while its claws are black and sharp. Its weight relative to its body size makes it a poor swimmer, and most dislike crossing water, though they can trundle along the bottom of still or slow water if necessary.
Adult aurumvoraxes are impossible to train, but their offspring are valued for training as guard beasts. A healthy aurumvorax kit can be sold for 5,000 gp or more to a discerning buyer. Female aurumvoraxes rarely give birth to more than one offspring at a time, and are ferociously protective of their young.
An aurumvorax drags its prey back to its lair to consume at its leisure, and its bone-midden often contains valuable belongings from past kills. Uneaten precious metals, discarded gems, and well-chewed metal items can also be found in its warrens. Despite its metallic coloration, an aurumvorax is not vulnerable to attacks that target metal, such as heat metal or the touch of a rust monster—in fact, aurumvoraxes easily kill and eat rust monsters, and some dwarf clans use aurumvorax pets to protect their storehouses against them.
SPECIAL ABILITIES
Grab (Ex) An aurumvorax can grab a foe of up to one size category larger than itself. It gains a +8 racial bonus to grapple attempts due to its multiple claws.
Critical Focus (Ex) Aurumvorax receive a +4 circumstance bonus on attack rolls made to confirm critical hits.
Bleeding Critical (Ex) Whenever the Aurumvorax scores a critical hit with its claws or bite, its opponent takes 2d6 points of bleed damage each round on his turn, in addition to the damage dealt by the critical hit. Bleed damage can be stopped by a DC 15 Heal skill check or through any magical healing. The effects of this feat stack.
That doesn't conform to the Paizo Statblock standard. Ecology doesn't actually have descriptive text like that. More info here: http://paizo.com/pathfinderRPG/prd/monsters/introduction.html

This would more be covered by the "Description" field (put before the Name/CR line) however that field was never really meant to have a lot of text (although it could) as it was just meant for the physical description that Paizo frequently puts before the create name, especially in the bestiary books.

Version 2 of the parser caters for text such as this using the EXTRA FORMATTED DATA section at the end of the statblock, see post #2 of the V2 Beta thread: http://www.fantasygrounds.com/forums/showthread.php?20522-Pathfinder-Creature-Parser-V2-Beta-Version&p=169001&viewfull=1#post169001

darrenan
July 27th, 2014, 22:22
Trying to parse an entry from the NPC codex and it's failing on the first line:

ARCANE EXPERIMENTER CR 13

Seems that if I change the word "EXPERIMENTER" to anything else (such as "ARCANE TINKERER") it works. Also, just the word "EXPERIMENTER" by itself fails to parse. I'm guessing it's the "XP"? Any way around this?

UPDATE: Ignore. I was using an old version of the parser. Re-installed and the issue went away.