jbhaywood / 5e-statblock-importer

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

Bug: not importing Attributes #69

Closed Stormthirst closed 9 months ago

Stormthirst commented 9 months ago

Statblock generated at: https://cros.land/ai-powered-dnd-5e-monster-statblock-generator/ Everything else seems to work well

Thrain Ironhelm Medium humanoid (dwarf), lawful good Armor Class 14 (chain mail) Hit Points 114 (12d10 + 48) Speed 25 ft. STR DEX CON INT WIS CHA 18 (+4) 12 (+1) 18 (+4) 12 (+1) 16 (+3) 12 (+1) Saving Throws CON +8, WIS +6 Skills Perception +6, Athletics +8 Damage Resistances Cold, Fire Damage Immunities None Condition Immunities None Senses Darkvision 60 ft., passive Perception 16 Languages Common, Dwarvish Challenge 5 (1,800 XP) Dwarven Resilience. Thrain has advantage on saving throws against poison and resistance to poison damage. Tactical Leader. Thrain can use a bonus action on his turn to grant one ally of his choice within 30 feet a d4 bonus to their next attack roll or saving throw. This ability recharges after Thrain takes a short or long rest. Actions Multiattack. Thrain makes two primary attacks. Battleaxe. Melee Attack: +7 to hit, reach 5 ft., one target. Hit: 13 (2d8 + 4) slashing damage. Tactical Strike (Recharge 4-6). Each creature within a 20-foot radius of Thrain must make a DC 15 Dexterity saving throw. On a failure, a target takes 13 (2d8 + 4) piercing damage and is affected by the Restrained condition (escape DC 14). Until this condition ends, the target is also affected by the Disadvantage condition and has disadvantage on Dexterity saving throws unless it fulfills Thrain's command. If the saving throw is successful, the target is pushed 15 feet away from Thrain. At the start of each of Thrain's turns, each restrained target takes 13 (2d8 + 4) piercing damage. A creature within 5 feet of a restrained target can use an action to make a DC 14 Strength check and, on a success, free the target. Commanding Presence. As a bonus action, Thrain can issue a command to inspire and bolster one friendly creature of his choice within 60 feet. The creature gains a 1d4 bonus to its next attack roll or saving throw. This ability recharges after Thrain takes a short or long rest.

jbhaywood commented 9 months ago

Is that the actual text you're pasting into the window? A big block, without individual lines, isn't going to work. It expects that the statblock is broken up into separate lines.

Stormthirst commented 9 months ago

I've just done a test monster from the same app:

Test Monster Small beast, unaligned Armor Class 14 Hit Points 5 (2d4) Speed 30 ft. STR DEX CON INT WIS CHA 10 (+0) 14 (+2) 10 (+0) 2 (-4) 10 (+0) 4 (-3) Senses Passive Perception 10 Challenge 1/8 (25 XP) Keen Smell. The test monster has advantage on Wisdom (Perception) checks that rely on smell. Nimble Escape. The test monster can take the Disengage or Hide action as a bonus action on each of its turns. Actions Bite. Melee Weapon Attack: +3 to hit, reach 5 ft., one target. Hit: 4 (1d4 + 2) piercing damage.

Is how it comes out - I think github's "code" section got rid of the line returns.

jbhaywood commented 9 months ago

I just pushed a change last night that will fix the one thing I can see that wouldn’t have worked before. I’m not at my computer to test right now, but it looks like that statblock should work. Can you update the module on your end and try again?

Stormthirst commented 9 months ago

Updated. It's still throwing up an error with Test Monster - I think it's the "Senses Passive Perception 10" line.

jbhaywood commented 9 months ago

I'll check it out when I get a chance.

Stormthirst commented 9 months ago

I'm using Foundry on Linux - is there anyway for your module to write about the errors it's come across to the log file?

jbhaywood commented 9 months ago

If there is, I wouldn't know how to do that. I'm a Linux noob.

jbhaywood commented 9 months ago

Should be fixed with v1.81.3. The problem was that there wasn't a language defined.