Closed MaxPat931 closed 7 months ago
That senses thing is really weird. The regex is failing to match anything on the second time through. The only reason I can think of is because it's using the "global" flag. But other things are using it, like speed, and they don't have the same problem. Luckily you don't really need to import twice in a row though, since you can just copy the actor or the token once they're in Foundry.
I did make a minor fix so that it at least picks up any special sense text.
If you want to tackle those other issues, go for it. Hopefully it's a bit easier to work on now. I'm going to take a Foundry module break and work on my campaign. Of course the party zigged when I thought they would zag and now I have a bunch of planning to do. 😅
If not, I'll get to it eventually.
I have been trying to install 5e Statblock Importer and keep getting this message: "ERROR: Unable to Load valid module manifest data from: "HTTPS://raw.githubusercontent.com/jbhaywood/5e-statblock-importer/main/module.json" Cannot read properties of (undefined reading '0) - I am using the latest version of Foundry 11 Build 314. This module previously worked in another world, and was a life saver - is there a fix to the above, I would love to know how to fix it.
I have been trying to install 5e Statblock Importer and keep getting this message: "ERROR: Unable to Load valid module manifest data from: "HTTPS://raw.githubusercontent.com/jbhaywood/5e-statblock-importer/main/module.json" Cannot read properties of (undefined reading '0) - I am using the latest version of Foundry 11 Build 314. This module previously worked in another world, and was a life saver - is there a fix to the above, I would love to know how to fix it.
Can you open a new issue on this? It sounds like a more serious issue that what's being reported here. About the actual error, I just updated to the same Foundry build and aren't seeing any module.json issues. I'm not sure what's going on there.
I am also seeing the error where spell attacks are being interpreted as weapon attacks, and it changes the attack/damage values despite what is in the imported text.
Text: Bugbear Channeler Medium Humanoid (Bugbear), Any Alignment
Armor Class 14 (Studded Leather) Hit Points 102 (12d8 + 48) Speed 30 ft.
STR 10 (+0) DEX 15 (+2) CON 18 (+4) INT 15 (+2) WIS 16 (+3) CHA 18 (+4)
Saving Throws Wis +6, Cha +7 Skills Arcana +5, Perception +6, Stealth +5, Survival +6 Senses Darkvision 60 ft., passive Perception 16 Languages Common, Goblin Proficiency Bonus +3 Challenge 7 (2,900 XP)
Bugbear’s Inspiration. Allied Humanoids within 15 feet of the channeler who can see or hear them have advantage on Wisdom and Charisma saving throws.
ACTIONS
Multiattack. The channeler makes two Channeling Staff attacks.
Channeling Staff. Melee Spell Attack: +7 to hit, reach 5 ft., one target. Hit: 8 (1d8 + 4) bludgeoning damage plus 9 (2d8) lightning damage. If the target is a Large or smaller creature, the channeler can move them up to 10 feet horizontally.
Vine Eruption (3/Day; 4th-Level Spell). The channeler attempts to use primal magic to overload a creature they can see within 60 feet of them. The target must make a DC 15 Constitution saving throw as thorny vines erupt from their body and attempt to envelop them. On a failed save, the target takes 27 (5d10) piercing damage and is restrained until the vines are destroyed. On a successful save, the target takes half as much damage and isn’t restrained. A creature restrained in this way takes 5 (1d10) piercing damage at the start of each of their turns. The vines have AC 15, 10 hit points, and immunity to psychic damage.
Ball Lightning (1/Day; 7th-Level Spell; Concentration). The channeler creates a 20-foot-radius sphere of electricity centered on a point they can see within 120 feet of them. The sphere lasts for 1 minute. When an enemy starts their turn in that area, they must succeed on a DC 15 Dexterity saving throw or take 27 (6d8) lightning damage. As a bonus action, the channeler can move the sphere up to 20 feet.
REACTIONS
Shared Shield (2/Day; 2nd-Level Spell). When a creature the channeler can see within 30 feet of them is hit with an attack, the channeler can create a barrier of magical force around that target. Until the start of the channeler’s next turn, the target gains a +5 bonus to AC, including against the triggering attack.
UTILITY SPELLS
In addition to any other spells in this stat block, the channeler can cast the following spells, using Charisma as the spellcasting ability (spell save DC 15):
At will: light A, message A 1/day each: detect magic A, disguise self A, identify +
Actually, it's not just spell attacks:
Here's a basic greatsword attack it's just decided to deduct 2 from.
Bugbear Commander Medium Humanoid (Bugbear), Any Alignment
Armor Class 18 (Plate) Hit Points 97 (15d8 + 30) Speed 30 ft.
STR 18 (+4) DEX 15 (+2) CON 15 (+2) INT 17 (+3) WIS 14 (+2) CHA 15 (+2)
Saving Throws Wis +5, Cha +5 Skills Intimidation +5, Persuasion +5, Stealth +5, Survival +5 Senses Darkvision 60 ft., passive Perception 12 Languages Common, Goblin Proficiency Bonus +3 Challenge 5 (1,800 XP)
Commander’s Inspiration. Allied Humanoids within 30 feet of the commander who can see or hear them have advantage on Wisdom and Charisma saving throws and gain a +1 bonus to weapon attack and damage rolls.
ACTIONS
Multiattack. The commander makes two Greatsword or two Longbow attacks.
Greatsword. Melee Weapon Attack: +7 to hit, reach 5 ft., one target. Hit: 11 (2d6 + 4) slashing damage, and one ally within 30 feet of the target who can see the commander has advantage on their next melee attack roll made against the target before the start of the commander’s next turn.
Longbow. Ranged Weapon Attack: +5 to hit, range 150/600 ft., one target. Hit: 6 (1d8 + 2) piercing damage.
Bark Orders (Recharge 6). Each ally within 60 feet of the commander who can hear and understand them can use a reaction to move up to their speed and make a weapon attack.
REACTIONS
Bolstering Pride. When another creature within 60 feet of the commander who can hear and understand them makes a saving throw, the commander can give that creature advantage on the saving throw.
Yea, there are likely several things that need to be updated for the new 2.4 version of DnD, the above seems to be caused by all actions defaulting to Dexterity. The Human Storm Wizard may be a good outlier example as well since the Arcane Staff should be set to Int
I've been importing from a variety of sources and am consistently seeing the problems that I suspect are 2.4 issues. Maybe that should be a separate issue, since it's not just a Flee, Mortals problem.
These new issues should be fixed in v1.81.6. It would be useful to open new issues for any remaining problems, with one issue per problem. That would make them easier to track.
Sorry about the large issue, thought it made sense to keep everything in one since it was related to an individual source, but I see how that makes it challenging to track and handle. It looks like a lot of the items I brought up in the original comment have been fixed and I appreciate that a lot. I was finally able to find some time to come back around to this and there are still a few things I've noticed, but I will create new issues for the individual items, and I have some PRs ready too.
Thanks for looking into those other issues! I super appreciate it. It can be tough to make sure every edge case is handled correctly. Of course, eventually ChatGPT will replace all of this hand made parsing code. 😅
Sorry to be a pain, but there are some things still not working as expected with the latest update First, and weirdest, the Senses parsing seems to only work the first time an actor is imported, then doesnt work until you refresh
https://github.com/jbhaywood/5e-statblock-importer/assets/86370342/67f50f92-88b3-400c-b8ca-1c8257d2bc09
Abilities Some FM actors (Goblin Assassin for example) seem to have their Abilities in a different format, some are on separate lines, and those import fine, some on one line and those dont import ability scores at all
works (fire Giant Red Fist)
Damage Immunities/Resistances/Vulnerablities and Condition Immunities
;
or sometimes in parenthesis (Hobgoblin Smokebinder)When these special characters/custom items are present on the actor, they are imported somewhere in the data, but not quite accurately as you do not see them in the config![image](https://github.com/jbhaywood/5e-statblock-importer/assets/86370342/6124eb1c-2ced-4865-a170-d6c9890ebd6f)
Armors Some armors are not being picked up, mostly an issue if they also have a shield, seems to be due to missing the word![image](https://github.com/jbhaywood/5e-statblock-importer/assets/86370342/bceb6689-5317-4a1e-9567-9722d014c21f)
armor
on these, I've noticed Padded, Studded Leather, Plate, Half Plate, SplintAction Types It looks like all Actions are assumed to be Weapon Attacks, but several monsters (including official monsters, particularly in Mordenkainen's) have actions that are Melee or Ranged Spell Attacks
(Human Storm Wizard)