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

MonsterShuffler Stat importing? #101

Closed Sorry-Im-Stupid closed 6 months ago

Sorry-Im-Stupid commented 6 months ago

I've recently started migrating my campaign to foundry, and in doing so I found this module. It's a fantastic idea, but it is fairly dependent on formatting, which presents a small issue trying to copy over the NPCs I've been using, which I make on monstershuffler.com They almost work in your module if I export as plaintext, but there are a few details that your module doesn't recognize, and some that it doesn't know how to ignore. Here's what one of them looks like in plaintext:

Pinkie
Medium Humanoid (male Human), Chaotic Neutral
The Barbarian thug with a valuable family heirloom.
Armor Class 11 (hide)
Hit Points 22 (3d8 + 9)
Speed 30 ft
STR 15(+2) DEX 9(-1) CON 13(+1) INT 9(-1) WIS 9(-1) CHA 15(+2)
Saving Throws Str +4, Con +3
Skills Athletics +4, Intimidation +4, Nature +1
Senses passive Perception 9
Languages Common, Giant
Proficiency +2
Challenge 1 (200 XP)
TRAITS
Street Knowledge.  Pinkie knows who rule the underworld of his local area and can help allies and friends to get in contact with them. Pinkie can provide items that are illegal or can't be sold publicly, or help smuggle them in and out of town.
Reckless Attacks.  Pinkie throws aside all concern for defense to attack with fierce desperation. He gains advantage on melee weapon attack rolls using his Strength during one turn, but attack rolls against him have advantage until the next turn.
Danger Sense.  Pinkie has advantage on Dexterity saving throws against effects that he can see, such as traps and spells.
ACTIONS
Maul.  Melee Weapon Attack: +4 to hit, reach 5 ft, one target. Hit: 11 (2d6 + 4) bludgeoning damage.
Light Hammer.  Melee or Ranged Weapon Attack: +4 to hit, reach 5 ft or range 20/60 ft, one target. Hit: 6 (1d4 + 4) bludgeoning damage.
BONUS ACTIONS
Frenzy (While Raging).  Pinkie makes an additional attack with his Maul.
Rage.  Pinkie enters a state of frenzy, gaining new abilities and the following benefits if he isn't wearing heavy armor:
- he gains advantage on Strength checks and Strength saving throws;
- he gains resistance to bludgeoning, piercing and slashing damage
Pinkie's rage lasts for 1 minute or until he is knocked unconscious.

Your module gets the core stats perfectly, but it will add the history blurb to the Alignment field, ignore the personality trait, and on a character with magic, it will add the entire spellcasting section to the Action tab as a single item, and won't add any spells. I'd be happy to make a version of the import that can use these stat blocks, but I can't figure out how the module actually works as it does.

jbhaywood commented 6 months ago

I'd much rather see anyone generating statblocks follow the standard set by WotC than update this module to support every possible permutation of stats that people create, but I know that's unrealistic. Even a pro DM like Matt Colville can't help tweaking it to make it his own. :D

It's mostly because the more customizations are added, the harder it is to keep bugs from creeping in. I'd suggest reaching out to the owner of that site and see if they can modify how their stats are created. The more standardized they are, the more they can work with other tools like this one.

Sorry-Im-Stupid commented 6 months ago

I'll ask, but what exactly are the WotC standards for these?

jbhaywood commented 6 months ago

As far as I know, there isn't a spec that they've provided to the public, but if you look at any WotC statblock, in the SRD for example, you can see that they always follow a very specific layout. Certain things come before other things, Actions and such follow a specific format for their titles, certain wording is always used in a certain way, ("Melee Weapon Attack:", " innate spellcasting ability is Intelligence (spell save DC 11). It can innately cast the following spells, requiring no material components:"), etc.

Most third party publishers follow those same rules, and this modules really only works if folks are following them. It can handle some minor differences, or bigger ones for a popular book like Flee, Mortals!, but not much else beyond that because trying to make a computer understand random text is hard. Someone could probably get AI to do a better job these days though.