jbhaywood / 5e-statblock-importer

A module for FoundryVTT that creates a new actor from any 5e monster or NPC statblock.
MIT License
18 stars 14 forks source link

Statblock won't import #118

Closed ChaosRiderGustaph closed 2 months ago

ChaosRiderGustaph commented 2 months ago

Hey,

Tried using different layouts for statblocks, but I ran in a couple of problems. When I try the following nothing is properly generated, just the name and the features. No attributes, no hitpoints, AC, etc ;

Mind-Stolen Acolyte Medium aberration, chaotic evil Armor Class 12 Hit Points 45 (7d8 + 14) Speed 30 ft. STR 12 (+1) DEX 14 (+2) CON
14 (+2) INT 14 (+2) WIS 10 (+0) CHA 6 (-2) Saving Throws CON +4, WIS +0 Skills Perception +2 Damage Resistances psychic Condition Immunities frightened, charmed Senses blindsight 30 ft. (blind beyond this radius), passive Perception 12 Languages Deep Speech, Common (understands but can't speak) Challenge 1 (200 XP)

So I tried the Glabrezu example ;

Glabrezu Large fiend (demon), chaotic evil Armor Class 17 (natural armor) Hit Points 157 (15d10 + 75) Speed 40 ft. STR DEX CON INT WIS CHA 20 (+5) 15 (+2) 21 (+5) 19 (+4) 17 (+3) 16 (+3) Saving Throws Str +9, Con +9, Wis +7, Cha +7 Damage Resistances cold, fire, lightning; bludgeoning, piercing, and slashing from nonmagical attacks Damage Immunities poison Condition Immunities poisoned Senses truesight 120 ft., passive Perception 13 Languages Abyssal, telepathy 120 ft. Challenge 9 (5,000 XP) Innate Spellcasting. The glabrezu’s spellcasting ability is Intelligence (spell save DC 16). The glabrezu can innately cast the following spells, requiring no material components: At will: darkness, detect magic, dispel magic 1/day each: confusion, fly, power word stun Magic Resistance. The glabrezu has advantage on saving throws against spells and other magical effects. Actions Multiattack. The glabrezu makes four attacks: two with its pincers and two with its fists. Alternatively, it makes two attacks with its pincers and casts one spell. Pincer. Melee Weapon Attack: +9 to hit, reach 10 ft., one target. Hit: 16 (2d10 + 5) bludgeoning damage. If the target is a Medium or smaller creature, it is grappled (escape DC 15). The glabrezu has two pincers, each of which can grapple only one target. Fist. Melee Weapon Attack: +9 to hit, reach 5 ft., one target. Hit: 7 (2d4 + 2) bludgeoning damage.

But no actor is generated and foundry gives the following error ;

Uncaught (in promise) Error: undefined. Could not parse actor, errors: [Error: Could not parse element: "Parser error for [parseAbilitiesWTC] -> Error: Could not find ability line\nParser error for [parseMultiLineAbilitiesWTC] -> Error: Invalid format for multi line stat parsing.\nParser error for [parseVerticalKeyValueAbilitiesWTC] -> Error: Could not parse abilities with parseVerticalKeyValueAbilitiesWTC\nParser error for [parseVerticalNameValModFormatWTC] -> Error: Could not parse abilities with parseVerticalNameValModFormatWTC\nParser error for [parseGPTBlockAbilities] -> Error: Line does not contain two abilities\nParser error for [parseInlineAbilityValueModWTC] -> Error: Could not find ability line"] [Detected 1 package: foundry-vtt-content-parser(0.2.50)] at tryActorParse (typeGuardParserRunners.ts:219:9) at textToActor (index.ts:8:10) at txtRoute (handleInput.ts:8:17) at importActorForm.processActorInput [as _handler] (handleInput.ts:59:5) at importActorForm._updateObject (importGenericForm.ts:25:10) at importActorForm._onSubmit (foundry.js:6665:18)

ChaosRiderGustaph commented 2 months ago

Just to be sure I copied the Glabrezu statblock from DnD Beyond. Glabrezu Large Fiend (Demon), Chaotic Evil

Armor Class 17 (natural armor) Hit Points 157 (15d10 + 75) Speed 40 ft.

STR 20 (+5)

DEX 15 (+2)

CON 21 (+5)

INT 19 (+4)

WIS 17 (+3)

CHA 16 (+3)

Saving Throws STR +9, CON +9, WIS +7, CHA +7 Damage Resistances Cold, Fire, Lightning; Bludgeoning, Piercing, and Slashing from Nonmagical Attacks Damage Immunities Poison Condition Immunities Poisoned Senses Truesight 120 ft., Passive Perception 13 Languages Abyssal, Telepathy 120 ft. Challenge 9 (5,000 XP) Proficiency Bonus +4

Innate Spellcasting. The glabrezu's spellcasting ability is Intelligence (spell save DC 16). The glabrezu can innately cast the following spells, requiring no material components:

At will: darkness, detect magic, dispel magic

1/day each: confusion, fly, power word stun

Magic Resistance. The glabrezu has advantage on saving throws against spells and other magical effects.

Actions Multiattack. The glabrezu makes four attacks: two with its pincers and two with its fists. Alternatively, it makes two attacks with its pincers and casts one spell.

Pincer. Melee Weapon Attack: +9 to hit, reach 10 ft., one target. Hit: 16 (2d10 + 5) bludgeoning damage. If the target is a Medium or smaller creature, it is grappled (escape DC 15). The glabrezu has two pincers, each of which can grapple only one target.

Fist. Melee Weapon Attack: +9 to hit, reach 5 ft., one target. Hit: 7 (2d4 + 2) bludgeoning damage.

Generates a actor with the name, spells and features. No attributes, AC, hitpoits, etc.

The featues and attacks are missing their damage rolls etc.

jbhaywood commented 2 months ago

Are you up to date on everything? Here's what I get with the Glabrezu... image

The attacks are rolling correctly also. Here's what I get with the Mind Stolen Acolyte... image

ChaosRiderGustaph commented 2 months ago

Thanks for the quick response,

Foundry version 12 stable - Build 331 DnD 5e 3.31 5e Statblock importer 1.83.01

According to Foundry everything is up to date

ChaosRiderGustaph commented 2 months ago

I tried disabling all the other modules except 5e statblock importer and now it works. So probably there's some interference. I'll try to find out wich one is causing problems

ChaosRiderGustaph commented 2 months ago

Found the culprit, apparently I was still using Foundry VTT Content Parser