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

FM Role adjustments and Subtype support #83

Closed MaxPat931 closed 10 months ago

MaxPat931 commented 10 months ago

Closes #82 and closes #81 Moves the <race> capture group to the Subtype field Moves the Role from the Subtype field to the Source Custom field Adds "Flee, Mortals!" to the Source Book field if Role is present

Sample: Chimeron Old | New image

MaxPat931 commented 10 months ago

Yea in roleDetails, the group doesnt get captured if it's a fractional CR, that's all I should be affecting. Current Regex image PR Regex image Or actually it looks like we could simplify it down to this \d+\s(?<role>\w+) image

It shouldnt have an impact on actually parsing the CR value though challengeDetails seems to capture those just fine, oddly I did not see the same thing with the Gnoll Abyssal Archer as you

Current import image

PR Import image And testing this shows a new issue, the Wildcat is listed as size "Tiny or Small" causing more of an issue with my new Custom Race handling, but I doubt there are a lot of statblocks this would impact?

jbhaywood commented 10 months ago

I see what you're saying. That makes sense. Yeah, the regex could be reduced. Up to you. I agree that the "Tiny or Small" issue is a small edge we probably don't need to worry about unless someone else brings it up.

MaxPat931 commented 10 months ago

fixed conflicts and went for the simpler regex