Page 1 of 11 123 ... Last
  1. #1

    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 push the button again, all fields will be overwritten in that case.

    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 a line feed.
    • HP, HP Abilities, Immunities, Weaknesses, and Resistances are all on the same line, terminated with a line feed.
    • 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 a line feed.
    • Each Melee and Ranged strike entry is its own complete line, terminated with a line feed (this is really only important for the last strike entry, as we 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) should be terminated with two line feeds, and the title of the ability and the ability description should be separated by a single line feed. NOTE: This is new behavior as of version 1.2 of this extension and release 14 of the ruleset, currently in the Test channel. If you are using a previous version of the ruleset, the old behavior is that each creature ability (name, traits and description) be on its own line terminated with a line feed.


    If you have problems with a stat block, the first thing to do is to run through each of the items above to make sure you're not violating any of the assumptions. Helpful Hint: If you need to combine multiple lines into one, you can select all lines in the stat block control, and then press CTRL+J

    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.
    3/4/2020 1.0 V1. Fixed negative level issue.
    3/6/2020 1.1 Resolve most spell parsing issues. Add parse log functionality.
    3/28/2020 1.1.1 The string 'creature' in the first line of the stat block is now compared case insensitively.
    3/27/2020 1.2 Change parsing logic for interaction, reactive, automatic, offensive, and proactive abilities for ruleset version 14. Do not use with rulesets prior to release 14!!!
    3/28/2020 1.2.1 The string 'creature' in the first line of the stat block is now compared case insensitively. Do not use with rulesets prior to release 14!!!
    3/28/2020 1.2.2 Fix nil reference script error. Do not use with rulesets prior to release 14!!!
    4/19/2020 1.2.3 Compensate for change in GameSystem.actionTextToSymbols function return signature (now returns two values). Check for long versions of saving throw names and shorten them before parsing.

    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; April 19th, 2020 at 18:22.

  2. #2
    For ruleset releases < 14: PF2CreatureParser.ext v1.1.1
    For ruleset releases >= 14: PF2CreatureParser.ext v1.2.3
    Last edited by darrenan; April 19th, 2020 at 18:23.

  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
    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
    @Trenloe can we get a community extensions post spun up for PF2?

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Newcastle, UK (for a bit)
    Posts
    26,063
    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 16 Fantasy Grounds Online RPG Convention - Postponed New date To Be Confirmed.
    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
    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
    Newcastle, UK (for a bit)
    Posts
    26,063
    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 16 Fantasy Grounds Online RPG Convention - Postponed New date To Be Confirmed.
    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
  •  
Joshua Stream Pre

Log in

Log in