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

Swarm and custom type support #78

Closed MaxPat931 closed 7 months ago

MaxPat931 commented 7 months ago

Closes #76 and closes #77

Ironically there is still an issue with Flee Mortals swarms, because of the way their statblock is formatted, the importer gets caught on the following line but I think that there are so few swarms in the book, and it seems like a niche case that this should be fine

image

My first attempt as solving for this was to 'hard-code' the types into the racialDetails regex, but that made it insanely long, and wouldnt support custom types, so I think this is a better solution

jbhaywood commented 7 months ago

Can you post the names of specific 'Flee, Mortals!' monsters that this PR would address so I can test locally? I have the book, so don't need the full statblock.

MaxPat931 commented 7 months ago

Yea it should be for any Swarm creature, from FM or WotC Here's the current import of one from each (FM - Swarm of Skitterlings, WotC - Swarm of Poisonous Snakes) image

And with this PR Skitterlings (without adjusting for the aforementioned troublesome line on the left, and with adjusting for it in the middle) image

jbhaywood commented 7 months ago

Looks good!