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

Attack names with punctuation are parsed into the text of the previous action #21

Closed MaineQat closed 2 years ago

MaineQat commented 2 years ago

This includes punctuation: comma, plus, hyphen, apostrophe

Example attack/weapon names affected include "Long sword +3, frost", "Dart-launcher", and "Cat o' nine tails".

Long sword +3, frost. Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 12 (1d10+7) magical slashing damage plus 3 (1d6) cold damage.

Dart-launcher. Ranged Weapon Attack: +2 to hit, range 12/60, one target. Hit: 10 (3d4+3) piercing damage.

Cat o' nine tails. Melee Weapon Attack: +2 to hit, reach 10 ft., one target. Hit 4 (1d6+3) slashing damaging plus 3 (1d6) piercing damage.

jbhaywood commented 2 years ago

This is fixed with version 1.3.2.

Out of curiosity, where did those statblocks come from? I noticed a couple errors with them, like "slashing damaging" instead of "slashing damage" and "Hit 4" instead of "Hit: 4". This things will confuse the parser since it's expecting those things to be formatted a very specific way.

MaineQat commented 2 years ago

Initially it was "Long sword +3, frost" that failed, so I tried different names on that one to see if other common punctuation also failed. The last two examples were thrown together as diverse examples rather than just stating the names, so those are just typos due to quick editing.

jbhaywood commented 2 years ago

Gotcha. Good to know. All of those names should work now.