PDA

View Full Version : Import Collection



Zarestia
December 4th, 2022, 21:32
Forge: https://forge.fantasygrounds.com/shop/items/931/view
Github: https://github.com/ZarestiaDev/Import-Collection

This extension is a collection of importers for different ruleset record types. These importers don't aim to be 100% precise but rather 95% because formatting is never correct and not everything can be accounted for. If you find any errors, please post them in this thread with the source text and error message or missing/wrong imported values.
Only legal sources will be allowed in this extension (meaning official PDFs and sites mostly).
On release, there is only one supported ruleset and one supported record type. More are to come in the future.

Support Table:


Ruleset
Record Types
Source


PFRPG
NPC
Archives of Nethys



Tutorial:

Open the NPC sidebar
Click on the new import icon
Paste the content from Name-CR until the line before Description in the first window
Paste the content from the Description in the second window
Hit import
Check whether everything is correct


If you want more importers, you can either suggest one by posting in this thread with the ruleset, record type and source or you can create a Pull Request via Github. I tried to write understandable code :)

Ulric
December 5th, 2022, 13:20
Please add Starfinder to your extension!

Zarestia
December 9th, 2022, 16:41
v0.2 - PFRPG-NPC spell support (https://github.com/ZarestiaDev/Import-Collection/releases/tag/v0.2)

Add

Support for Spells and Spell-Like abilities
A spellclass gets created and spells are copied from loaded modules. Prepared and known casters work accordingly. Spell-like abilities are put in a spell-level according to the usage per day, otherwise level 0. Possible DCs need to be adjusted manually!

Changed

Attack detection now works more modular and detects more possible patterns


PFRPG NPCs are now considered done.

Importing a Solar:
https://forge.fantasygrounds.com/images/7147f363b7cfa3e7465b48c4c8f2c20c.gif

Chronikoce
December 14th, 2022, 15:04
Since it works with PF, does that mean it will work with standard 3.5 statblocks too?

Zarestia
December 14th, 2022, 19:50
Since it works with PF, does that mean it will work with standard 3.5 statblocks too?

All 3.5e SRD NPCs should already be available in FGU.
I don't know of anything else available online for 3.5e.

That's why I did it especially for PFRPG, so no, this is currently not working with 3.5e.

XenusUk
December 19th, 2022, 00:06
Is this the replacement for CreatureLab?

Zarestia
December 19th, 2022, 13:39
Is this the replacement for CreatureLab?

It's more of an alternative which is actively supported by it's dev.

XenusUk
December 20th, 2022, 00:13
Quick test, works fine with a copy of a NPC from Archives of Nethys (as expected).
Will not work with PF stat blocks from any other source (yet).
Tried pfsrd: https://www.d20pfsrd.com/bestiary/npc-s/npcs-cr-2/cultist-human-cleric-3a/
Not even close, which was suprising as the stat blocks look the same at first glance. Hopefully this can be extended easily as pfsrd has a lot more NPCs available.
CreatureLab did import the pfsrd NPC up to start of the spell block.

XenusUk
December 20th, 2022, 00:32
Also appears to work almost with AoN monsters.
Tried Zana: https://www.aonprd.com/MonsterDisplay.aspx?ItemName=Zana
The first attack option was missing but everything else imported.

Arimil508
December 20th, 2022, 01:04
From my understanding the reason why it does not full compatible is because most of the stuff is hard coded to check formatting. so if you convert something to be similar to Archives of Nethys stat blocks it will work fine.

besides using it to convert online stat block i use something like this for homebrew monsters i or my friends make. all i need to keep in mind is the formatting changes.

XenusUk
December 20th, 2022, 01:24
From my understanding the reason why it does not full compatible is because most of the stuff is hard coded to check formatting. so if you convert something to be similar to Archives of Nethys stat blocks it will work fine.


pfsrd like AoN uses the pf stat block format, so it's more than similar, but the import doesn't work. Without knowing the exact way the hard coding works, it will be difficult to use any other source of stat blocks. I'd like to use it on other published stat blocks but that will be extremely difficult if I have to edit it to match whatever standard the AoN importer uses, I expect reading the code would help, but that shouldn't be necessary. I am hoping the developer can improve the code to be a bit more flexible in parsing the stat blocks so that it works on a wider set of sources.

XenusUk
December 20th, 2022, 01:52
..back from reading code.

Ok, one change needed, ignore empty lines.
suggest change to .nextImportLine function to skip a blank line.
Testing using pfsrd cleric block above with blank lines manually removed allows the code to work as expected on this stat block.

XenusUk
December 20th, 2022, 02:05
AoN Issues:
Using the AoN cleric example: https://www.aonprd.com/NPCDisplay.aspx?ItemName=Heretic%20(Cultist)
The Spell-Like Abilities need to be separated from the spells because they are NOT in the spell list, they're under "special abilities" in FGU in the case of cleric domain powers. Because they don't match a spell name, they're not imported.
Also the spells don't take into account the standard list of suffixes used in pf stat blocks e.g. "D" for domain spells, any spell with a suffix is not imported. See CreatureLab for suffix detection code.

It would be nice if the feat description links were included in the "other" tab.

Zarestia
December 20th, 2022, 14:15
Will not work with PF stat blocks from any other source (yet).
Tried pfsrd: https://www.d20pfsrd.com/bestiary/npc-s/npcs-cr-2/cultist-human-cleric-3a/
Not even close, which was suprising as the stat blocks look the same at first glance. Hopefully this can be extended easily as pfsrd has a lot more NPCs available.
CreatureLab did import the pfsrd NPC up to start of the spell block.

Works fine for me (except the non-existent Domain Spell-Like Abilities). You have to start on the line "Cultist CR 2" and end on the line before "About", like I've written in the first post.


Also appears to work almost with AoN monsters.
Tried Zana: https://www.aonprd.com/MonsterDisplay.aspx?ItemName=Zana
The first attack option was missing but everything else imported.

Thanks for reporting that, I'll get that pattern fixed.


..back from reading code.

Ok, one change needed, ignore empty lines.
suggest change to .nextImportLine function to skip a blank line.
Testing using pfsrd cleric block above with blank lines manually removed allows the code to work as expected on this stat block.

Blank lines automatically are truncated before the import process even starts by CoreRPG functions. The posted Cleric works like I've written. If it's not working for you, please post the exact text you're trying to use.

Actually, pretty much everyhting on pfsrd should be supported (as giving out a 95% correct result), I just didn't go out of my way to test on their site.


AoN Issues:
Using the AoN cleric example: https://www.aonprd.com/NPCDisplay.aspx?ItemName=Heretic%20(Cultist)
The Spell-Like Abilities need to be separated from the spells because they are NOT in the spell list, they're under "special abilities" in FGU in the case of cleric domain powers. Because they don't match a spell name, they're not imported.
Also the spells don't take into account the standard list of suffixes used in pf stat blocks e.g. "D" for domain spells, any spell with a suffix is not imported. See CreatureLab for suffix detection code.

It would be nice if the feat description links were included in the "other" tab.

I'll get that fixed.

XenusUk
December 21st, 2022, 17:18
Further testing:
I can't reproduce the problem with pfsrd copied enties, hopefully the issue I had has gone away.

Using AoN Local Celebrity
This line: Fort +2, Ref +4, Will +3; +4 vs. bardic performance, language-dependent, and sonic
THe circumstantial bonuses (bold) don't get converted.
Looking at FGU NPCs, these are placed under "SQ", so you'll need to append the other text that currently gets imported to that.
Tried to narrow down the issue on melee attacks not importing.
This line: Melee mwk rapier +5 (1d6+1/18–20) or whip +4 (1d3+1 nonlethal)
doers not import at all. If I remove from "or" onward the first attack imports. I assume this is the same issue I reported earlier.

Tested with Tome of Horrors Complete (pf version):
Didn't import the line: Environment any (Plane of Air)
General issue with import that if the stat block doesn't have explicit named sections (Offence, Defence, Attributes), that throws the import out by one line each time. You can manually work around by adding these lines.
Could you make these lines optional in the import and not advance a line when they're not present?
When the special abilities are read, any superfluous CR's are removed, making the text readable - this is great.

Tested with the Hound of Night stat block from Courts of the Shadow Fey. THis works pretty well. I had to remove some line breaks manually because the pdf formatting.
Issue with metamagic enhanced spells: At will—quickened dimension door (self only)
Line does not import. metamagic needs to be ignored and also the () limitation when matching spell name.

Zarestia
December 21st, 2022, 19:14
Attack pattern for "or" is fixed, for now only in the Github repo, I'll upload a new version after I've fixed more things.

@XenusUK
Could you please either link the NPC statblocks, post the whole text or even screenshot the statblock?
With only those snippets, while still possible, it's troublesome to test/iterate.

XenusUk
December 23rd, 2022, 18:37
For most of these, just drop the line into/replacing a working import of your choice. I'll post full statblocks later.

Local Celebrity is here: https://www.aonprd.com/NPCDisplay.aspx?ItemName=Local%20Celebrity

XenusUk
December 23rd, 2022, 18:54
The AoN statbloick for Aeriel Servant works fine: https://www.aonprd.com/MonsterDisplay.aspx?ItemName=Aerial%20Servant

Tome of Horrors works aparts from the Environment line, but I can't see the difference (minor bug?):

Aerial Servant CR 11
XP 12,800

N Medium outsider (air, elemental, extraplanar)

Init +10; Senses darkvision 60 ft.; Perception +19

Offense

AC 24, touch 16, flat-footed 18 (+6 Dex, +8 natural)

hp 138 (12d10+72)

Fort +10; Ref +14; Will +10

Defensive Abilities natural invisibility; DR 10/magic; Immune elemental traits

Defense

Speed 60 ft., fly 60 ft. (perfect)

Melee 2 slams +19 (2d8+6 plus grab)

Special Attacks constrict (2d8+6), wind blast

Attributes

Str 23, Dex 22, Con 23, Int 4, Wis 10, Cha 11

Base Atk +12; CMB +18 (+22 grapple); CMD 34

Feats Alertness, Combat Reflexes, Improved Initiative, Iron Will, Power Attack, Weapon Focus (slam)

Skills Fly +20, Knowledge (planes) +5, Perception +19, Stealth +20, Survival +12; Racial Modifiers +4 Survival

Languages Auran, Common

SQ improved tracking, link with caster

Environment any (Plane of Air)

Organization solitary

Treasure none

Improved Tracking (Ex) An aerial servant takes no penalty

to Survival checks when tracking and moving at any speed.

Link with Caster (Ex) When summoned, an aerial servant

creates a mental link between itself and the caster who

summoned it. Should the aerial servant fail the mission it

has been assigned, it returns to the caster and attacks him.

The aerial servant can find the caster as long as they both

are on the same plane of existence. If the caster leaves

the plane, the link is temporarily broken. Once the caster

returns or the aerial servant enters the plane the caster is on,

the link is immediately reestablished and the aerial servant

moves at full speed toward the caster’s current location.

Only when the aerial servant or caster is destroyed, is the

link permanently broken.

Natural Invisibility (Su) This ability is constant, allowing an

aerial servant to remain invisible even when attacking. This

ability is inherent and is not subject to the invisibility purge

spell. Against foes that cannot pinpoint it, the aerial servant

gains a +20 bonus on Stealth checks when moving, or +40

when standing still—these bonuses are not included in the

statistics above. This ability does not function when an aerial

servant is on the Astral Plane or Ethereal Plane, but instead

grants the creature concealment (20% miss chance).

Wind Blast (Su) Once every 1d4 rounds, as a standard

action, an aerial servant can release a blast of wind in an

80-foot line. A creature struck takes 4d8 points of damage

and those up to the aerial servant’s size or smaller are

knocked down and back 2d10 feet. An affected creature

can attempt a DC 22 Reflex save to reduce the damage

by half and avoid being knocked down. The save DC is

Constitution-based.

Zarestia
December 23rd, 2022, 19:29
The AoN statbloick for Aeriel Servant works fine: https://www.aonprd.com/MonsterDisplay.aspx?ItemName=Aerial%20Servant

Tome of Horrors works aparts from the Environment line, but I can't see the difference (minor bug?):

Aerial Servant CR 11
XP 12,800

N Medium outsider (air, elemental, extraplanar)

Init +10; Senses darkvision 60 ft.; Perception +19

Offense

AC 24, touch 16, flat-footed 18 (+6 Dex, +8 natural)

hp 138 (12d10+72)

Fort +10; Ref +14; Will +10

Defensive Abilities natural invisibility; DR 10/magic; Immune elemental traits

Defense

Speed 60 ft., fly 60 ft. (perfect)

Melee 2 slams +19 (2d8+6 plus grab)

Special Attacks constrict (2d8+6), wind blast

Attributes

Str 23, Dex 22, Con 23, Int 4, Wis 10, Cha 11

Base Atk +12; CMB +18 (+22 grapple); CMD 34

Feats Alertness, Combat Reflexes, Improved Initiative, Iron Will, Power Attack, Weapon Focus (slam)

Skills Fly +20, Knowledge (planes) +5, Perception +19, Stealth +20, Survival +12; Racial Modifiers +4 Survival

Languages Auran, Common

SQ improved tracking, link with caster

Environment any (Plane of Air)

Organization solitary

Treasure none

Improved Tracking (Ex) An aerial servant takes no penalty

to Survival checks when tracking and moving at any speed.

Link with Caster (Ex) When summoned, an aerial servant

creates a mental link between itself and the caster who

summoned it. Should the aerial servant fail the mission it

has been assigned, it returns to the caster and attacks him.

The aerial servant can find the caster as long as they both

are on the same plane of existence. If the caster leaves

the plane, the link is temporarily broken. Once the caster

returns or the aerial servant enters the plane the caster is on,

the link is immediately reestablished and the aerial servant

moves at full speed toward the caster’s current location.

Only when the aerial servant or caster is destroyed, is the

link permanently broken.

Natural Invisibility (Su) This ability is constant, allowing an

aerial servant to remain invisible even when attacking. This

ability is inherent and is not subject to the invisibility purge

spell. Against foes that cannot pinpoint it, the aerial servant

gains a +20 bonus on Stealth checks when moving, or +40

when standing still—these bonuses are not included in the

statistics above. This ability does not function when an aerial

servant is on the Astral Plane or Ethereal Plane, but instead

grants the creature concealment (20% miss chance).

Wind Blast (Su) Once every 1d4 rounds, as a standard

action, an aerial servant can release a blast of wind in an

80-foot line. A creature struck takes 4d8 points of damage

and those up to the aerial servant’s size or smaller are

knocked down and back 2d10 feet. An affected creature

can attempt a DC 22 Reflex save to reduce the damage

by half and avoid being knocked down. The save DC is

Constitution-based.

Offense and Defense is swapped here and Attributes should be Statistics. I'll get an updated version out soonish.

XenusUk
December 23rd, 2022, 19:37
That was my edit snafu, the pdf omits these lines, so I had to put something in to align the block to the expected layout, basically anything works as filler.

Zarestia
December 23rd, 2022, 22:07
v0.3 Generalization and Fixes (https://github.com/ZarestiaDev/Import-Collection/releases/tag/v0.3)

Added

Link to extension forge page in announcement text

Changed

Generalized skip options (such that defense, offense, statistics and ecology are not mandatory)
Generalized special qualities including situational save bonus

Fixed

Fixed attack pattern for "or"
Detection of all metamagic spells, these should now import correctly as base spell. The corresponding metamagic option must be entered/changed manually after import.
Detection of spells with domain suffix, these should now import correctly.


Feats can be interacted with my tooltips extension.

Edit: Domain spell-like abilities will stay for now as they are because there isn't a consistent way to differentiate between them and other spell-like abilities. For most cases these are handled as spells either way, so you'd still have to create them manually.

Zarestia
February 23rd, 2023, 23:17
v0.4 Feb-2023 ruleset update (https://github.com/ZarestiaDev/Import-Collection/releases/tag/v0.4)

Changed

Migrated getDatabaseNode() to DB functions


I'll see to other additions after the 2023-Feb ruleset update aftermath