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

Module fails to import movement #40

Closed FrankIsAtank closed 1 year ago

FrankIsAtank commented 1 year ago

Using :

The module fails to import movement speeds correctly. For example the following block

A MONSTER Small aberration, neutral evil Armor Class 17 (natural armor) Hit Points 21 (2d10 + 10) Speed 30 ft., fly 30 ft. (hover), swim 30 ft.

gives the error

foundry.js:59187 Model Validation Errors [Actor5e.system]: Model Validation Errors [NPCData.attributes]: Model Validation Errors [NPCData.attributes.movement]: Model Validation Errors [NPCData.attributes.movement.burrow]: must be an integer [NPCData.attributes.movement.climb]: must be an integer fetch @ foundry.js:59187

foundry.js:747 Error: Actor5e [U14aIryTKojoDzLr] Model Validation Errors [Actor5e.system]: Model Validation Errors [NPCData.attributes]: Model Validation Errors [NPCData.attributes.movement]: Model Validation Errors [NPCData.attributes.movement.burrow]: must be an integer [NPCData.attributes.movement.climb]: must be an integer [Detected 1 package: 5e-statblock-importer] at SchemaField._validateType (commons.js:4098:15) at SchemaField.validate (commons.js:3824:37) at Actor5e.validate (commons.js:5492:35) at ClientDatabaseBackend._preUpdateDocumentArray (foundry.js:12717:13) at ClientDatabaseBackend._updateDocuments (foundry.js:12630:33) at ClientDatabaseBackend.update (commons.js:6796:24) at async Actor5e.updateDocuments (commons.js:6153:23) at async Actor5e.update (commons.js:6250:23) at async sbiParser.setSpeedAsync (sbiParser.js:399:17) at async sbiParser.parseInput (sbiParser.js:128:13) at async HTMLButtonElement. (sbiWindow.js:58:21) onError @ foundry.js:747

Only the walking speed is correct, other movement types are ignored.

jbhaywood commented 1 year ago

Looks like the one of those updates broke something. I'm on system 2.0.3 and build 10.288 it works fine. I'll update and see what's going on. Thanks for the report.

jbhaywood commented 1 year ago

Fixed in version 1.5.8.