Page 1 of 5 123 ... Last
  1. #1
    darrenan's Avatar
    Join Date
    Jul 2011
    Location
    Sammamish, WA
    Posts
    972

    PF2CreatureParser Extension

    This extension adds a new "Parse" tab to the NPC window. The intended usage is as follows:

    1. Create a new NPC record.
    2. Paste stat block into the string control on the "Parse" tab.
    3. Make any manual edits (see assumptions and caveats below).
    4. Click "PARSE" button.


    At this point the NPC fields should be filled out. There is no harm in making more edits in the stat block control and then clicking PARSE again. In this case the entire block will be parsed again and all fields will be overwritten.

    How much of the creature should I copy and paste?

    The entire stat block starting with the line containing the name and level. Do not include the creature's flavor text. I would include an example picture, but I think I would be violating copyright if I did so?


    CAVEATS AND ASSUMPTIONS
    With their new stat block format, Paizo has not made it easy to parse these things. There are less keywords to look for compared to PF1 stat blocks, therefore there will be cases where simply copying and pasting a stat block from a PDF and blindly clicking PARSE will not yield the correct results. To make matters worse, I've already found instances of Paizo statblocks violating their own rules in The Bestiary (to be expected in a v1 publication). Luckily, clicking the PARSE button can be an iterative process and it's easy to adjust the stat block and try again. Usually the fix is as simple as deleting a CR/LF to get an entire thing (strike, ability, etc.) on the same line.

    Given that, here are some of the assumptions that the parser makes to be able do its job:
    • The "Items" entry is a single line terminated with CR/LF.
    • HP, HP Abilities, Immunities, Weaknesses, and Resistances are all on the same line, terminated with CR/LF.
    • Immunities, Weaknesses, and Resistances are in that exact order. If they are out of order you will get unexpected results.
    • Speed is on its own line, terminated with CR/LF.
    • Each Melee and Ranged strike entry is its own complete line, terminated with CR/LF (this is really only important for the last strike entry, as we can search for and split on 'Melee' and 'Ranged').
    • All Melee lines come before any Ranged lines. All Ranged lines come before any Spells entries. All Spells entries come before any abilities.
    • Each creature ability (interaction, automatic, reactive, offensive, and/or proactive) is its own self-contained line, terminated with CR/LF.


    The latest version of the extension will always be attached to post #2, below.

    Change History
    8/4/2019 0.0 Initial Version. Parses everything prior to 'Speed'.
    8/4/2019 0.1 Fix issue with Weaknesses and Resistances.
    8/4/2019 0.5 Everything except Spells and Rituals should be working now. Fixed a few bugs in the top sections.
    8/7/2019 0.6 Everything on the Main tab should now be populating correctly. Fixed all reported bugs. Handle lock/unlock button correctly.
    8/13/2019 0.9 Most everything should be working now, with a few caveats. See Known Issues below.

    KNOWN ISSUES
    • If you create a new NPC record, go directly to the Parse tab, paste the statblock and hit PARSE, you will end up with spell classes and levels, but no spells on the Actions tab. I'm still trying to figure out exactly why, and how to fix this. As a workaround, it seems like you need to make the Actions tab visible at least once before parsing.
    • Formulas are not being parsed yet.
    • I'm not done with Rituals yet. It will create the spell class, but no levels or spells.
    Last edited by darrenan; August 14th, 2019 at 05:48.

  2. #2
    darrenan's Avatar
    Join Date
    Jul 2011
    Location
    Sammamish, WA
    Posts
    972
    Last edited by darrenan; August 14th, 2019 at 05:42.

  3. #3
    This will be awesome! Can't wait.
    Ultimate License Owner since 2011 and FG GM since 2008
    Game Systems: 5E, Pathfinder, Starfinder, Call of Cthulhu, RoleMaster, C&C, Pathfinder 2

  4. #4
    darrenan's Avatar
    Join Date
    Jul 2011
    Location
    Sammamish, WA
    Posts
    972
    REPORTING BUGS/ISSUES
    When reporting bugs or issues with this extension please make sure that you have a way to reproduce the issue 100% of the time. Explain the symptom in this thread so other users can see what has been reported. Please send me the stat block that generated the error/issue via PM directly to me, so we don't clutter up this thread with lots of walls of text. I will get to bugs and issues as quickly as my schedule allows. Thank you for your patience!

  5. #5
    darrenan's Avatar
    Join Date
    Jul 2011
    Location
    Sammamish, WA
    Posts
    972
    @Trenloe can we get a community extensions post spun up for PF2?

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,944
    Quote Originally Posted by darrenan View Post
    @Trenloe can we get a community extensions post spun up for PF2?
    Done. And your extensions is the first one to be listed. Nice one!

    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  7. #7
    darrenan's Avatar
    Join Date
    Jul 2011
    Location
    Sammamish, WA
    Posts
    972
    Can you point me to the character code mappings for the action icons? I found 141 for single action, but having trouble tracking down the equivalents for the other action types. Thanks!

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,944
    Quote Originally Posted by darrenan View Post
    Can you point me to the character code mappings for the action icons? I found 141 for single action, but having trouble tracking down the equivalents for the other action types. Thanks!
    They're a bit all over the place to not use other characters that might be needed.

    • Free Action - 129
    • One Action - 141
    • Two Actions - 143
    • Three Actions - 144
    • Reaction - 157

    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  9. #9
    Having just finished Creature 2s, I thought to try this out. Put the .ext file into the extensions folder and loaded up FG. However, I am not finding a listing for that extension among my many options so wondering if I have done something wrong?
    Ultimate License Owner since 2011 and FG GM since 2008
    Game Systems: 5E, Pathfinder, Starfinder, Call of Cthulhu, RoleMaster, C&C, Pathfinder 2

  10. #10
    This extension file is empty, the reason for it not showing up in the load screen. can't extract nor read content when converted to a .zip file, the extract menu says the file is empty.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in