gioppoluca / 5e-spellblock-importer

Foundry VTT module to import 5e spells and items from statblock
MIT License
1 stars 0 forks source link

Issue Importing Spell #8

Closed DungeonDadDave closed 2 months ago

DungeonDadDave commented 6 months ago

Spell wont import. come up with error message to report via here.

I'm trying to import the following and it just errors

{ "name": "Ensnaring Strike", "type": "spell", "img": "icons/magic/nature/root-vine-entangled-humanoid.webp", "data": { "description": { "value": "

The next time you hit a creature with a weapon attack before this spell ends, a writhing mass of thorny vines appears at the point of impact, and the target must succeed on a Strength saving throw or be restrained by the magical vines until the spell ends. A Large or larger creature has advantage on this saving throw. If the target succeeds on the save, the vines shrivel away.

\n

While restrained by this spell, the target takes 1d6 piercing damage at the start of each of its turns. A creature restrained by the vines or one that can touch the creature can use its action to make a Strength check against your spell save DC. On a success, the target is freed.

\n

At Higher Levels. If you cast this spell using a spell slot of 2nd level or higher, the damage increases by 1d6 for each slot level above 1st.

", "chat": "", "unidentified": "" }, "source": "PHB pg. 219", "activation": { "type": "bonus", "cost": 1, "condition": "" }, "duration": { "value": 1, "units": "minute" }, "target": { "value": null, "width": null, "units": "", "type": "self" }, "range": { "value": null, "long": null, "units": "self" }, "uses": { "value": 0, "max": "0", "per": "" }, "consume": { "type": "", "target": "", "amount": null }, "ability": "", "actionType": "other", "attackBonus": 0, "chatFlavor": "", "critical": null, "damage": { "parts": [], "versatile": "" }, "formula": "", "save": { "ability": "", "dc": null, "scaling": "spell", "value": "" }, "level": 1, "school": "evo", "components": { "value": "", "vocal": true, "somatic": false, "material": false, "ritual": false, "concentration": true }, "materials": { "value": "", "consumed": false, "cost": 0, "supply": 0 }, "preparation": { "mode": "prepared", "prepared": true }, "scaling": { "mode": "level", "formula": "1d6" }, "attributes": { "spelldc": 10 }, "attunement": 0 }, "effects": [ { "_id": "6hAZJkE4UfjO7Adp", "changes": [ { "key": "flags.dnd5e.DamageBonusMacro", "mode": 0, "value": "ItemMacro.Ensnaring Strike", "priority": "20" } ], "disabled": false, "duration": { "startTime": null }, "icon": "icons/magic/nature/root-vine-entangled-humanoid.webp", "label": "Ensnaring Strike", "origin": "Compendium.midi-qol.midiqol-sample-items.dlP9fWGo3ggfkOfm", "transfer": false, "flags": { "dae": { "stackable": "none", "macroRepeat": "none", "specialDuration": [ "1Hit:mwak" ], "transfer": false, "durationExpression": "" }, "ActiveAuras": { "isAura": false, "radius": null, "aura": "None", "alignment": "", "type": "", "ignoreSelf": false, "height": false, "hidden": false, "hostile": false, "onlyOnce": false, "displayTemp": false }, "core": { "statusId": "" } }, "tint": null, "selectedKey": "flags.dnd5e.DamageBonusMacro" } ], "flags": { "midi-qol": { "onUseMacroName": "[postActiveEffects]ItemMacro", "effectActivation": false }, "core": { "sourceId": "Item.Z2bmzJrSSmIZdOFp" }, "itemacro": { "macro": { "data": { "_id": null, "name": "Ensnaring Strike", "type": "script", "author": "6vTpMaaKHYGwKSiO", "img": "icons/svg/dice-target.svg", "scope": "global", "command": "// Modules Required - Item Macro, MIDQOL, Dynamic Active Effects\n// Card settings - Target & range: Self\n// DAE settings - [1] flags.dnd5e.DamageBonusMacro / Custom / ItemMacro.Wrathful Smite \n\n// Notes - If you use convient effects; on line 26 - replace \"macro.CUB\" with \"macro.CE\"\n\nif (![\"mwak\",\"rwak\"].includes(args[0].item.data.actionType)) return {}; \nif (args[0].hitTargetUuids.length === 0) return {}; // did not hit anyone\n\nlet selected = await MidiQOL.MQfromActorUuid(args[0].actorUuid); \nlet DC = selected.data.data.attributes.spelldc;\n\nfor (let tokenUuid of args[0].hitTargetUuids) {\n const target = await fromUuid(tokenUuid);\n const targetActor = target.actor;\n \n const flavor = <p>${\"Strength Saving Throw\"}</p><p>${CONFIG.DND5E.abilities[\"str\"]} DC ${DC} </P>;\n let conSave = (await targetActor.rollAbilitySave(\"str\", { flavor, fastForward: false})).total; \n \n if (conSave < DC) {\n const effectData = {\n label: \"Ensnaring Strike\", \n icon: \"icons/magic/nature/root-vine-entangled-humanoid.webp\",\n changes: [\n {key: \"flags.midi-qol.OverTime\", mode: 0, value: \"turn=start,damageRoll=1d6,damageType=piercing,label=Ensnaring Strike\", priority: 20}, \n {key: \"data.attributes.movement.all\", mode: 0, value: \"0\", priority: 20},\n {key: \"flags.midi-qol.disadvantage.attack.all\", mode: \"0\", value: \"0\", priority: 20},\n {key: \"flags.midi-qol.grants.advantage.attack.all\", mode: 0, value: \"0\", priority: 20},\n {key: \"data.attributes.movement.walk\", mode: 5, value: \"0\", priority: 20}\n // macro to apply the damage\n ],\n \n origin: \"Ensnaring Strike\", \n disabled: false,\n duration: {rounds: 10, seconds: 60, startRound: undefined, startTime: undefined, startTurn: undefined, turns: undefined},\n icon: \"icons/magic/nature/root-vine-entangled-humanoid.webp\",\n label: \"Ensnaring Strike\"\n }\n await targetActor.createEmbeddedDocuments(\"ActiveEffect\", [effectData]);\n} \n}\nHooks.once(\"midi-qol.RollComplete\", (workflow) => {\n console.log(\"Deleting concentration\")\n const effect = MidiQOL.getConcentrationEffect(actor);\n if (effect) effect.delete();\n return true;\n})\nreturn{flavor: \"Ensnaring Strike\"}\n//return{damageRoll: 0, flavor: \"Ensnaring Strike\"}", "folder": null, "sort": 0, "permission": { "default": 0 }, "flags": {} } } }, "cf": { "id": "temp_ovon30cu8t", "color": "#000000" }, "midiProperties": { "nodam": false, "halfdam": false, "fulldam": false, "critOther": false, "concentration": false, "rollOther": false }, "autoanimations": { "killAnim": false, "below": false, "override": false, "targetToken": { "enable": false }, "sourceToken": { "enable": false }, "allSounds": { "explosion": { "audioExplodeEnabled": false, "file": "", "delay": 100, "volume": 0.25 }, "item": { "enableAudio": false, "file": "", "delay": 100, "volume": 0.25 } }, "autoOverride": { "enable": false }, "version": 2, "audio": { "a01": { "enable": false, "file": "", "delay": 100, "volume": 0.25 }, "e01": { "enable": false, "file": "", "delay": 100, "volume": 0.25 } } }, "exportSource": { "world": "lost-mines", "system": "dnd5e", "coreVersion": "9.255", "systemVersion": "1.5.7" } } }

can you please help.

image

gioppoluca commented 2 months ago

It does not import json can you paste here the non working spell? Or PM me.

rednek74 commented 2 months ago

I am getting the same error when I try and import a spell that I copy the text from PDF.

Locate Node 2nd-level divination Casting Time: 1 action Range: 1 mile Components: V, S Duration: Concentration, up to 10 minute You sense the direction of any earth node within range, which is doubled if you have visited the specific node before. The spell is blocked by even a thin sheet of lead, and it cannot detect nodes protected by a node lock spell. At Higher Levels. When you cast this spell using a spell slot of 3rd level or higher, the range increases by 1 mile for each slot level above 2nd

Example spell

gioppoluca commented 2 months ago

fixed by 1.3.4

rednek74 commented 2 months ago

It's happening again. I did the update and it was working. Not sure what is happening.


From: Luca Gioppo @.> Sent: Saturday, August 10, 2024 6:25 AM To: gioppoluca/5e-spellblock-importer @.> Cc: rednek74 @.>; Comment @.> Subject: Re: [gioppoluca/5e-spellblock-importer] Issue Importing Spell (Issue #8)

Closed #8https://github.com/gioppoluca/5e-spellblock-importer/issues/8 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/gioppoluca/5e-spellblock-importer/issues/8#event-13827566446, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASG6FBCTIJOWJ664XAXHH2LZQXTAHAVCNFSM6AAAAABF3M6XUOVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTHAZDONJWGY2DINQ. You are receiving this because you commented.Message ID: @.***>

gioppoluca commented 2 months ago

Send the text you pasted in the form. Otherwise could be difficult to debug, send It by pm if you do not want to paste here.

rednek74 commented 2 months ago

Node Door 3rd-level conjuration Casting Time: 1 action Range: Varies Components: V Duration: Instantaneous You instantly transfer yourself from your current earth node to any other earth node you have visit- ed. You always arrive exactly at the spot desired— whether by simply visualizing the area or by de- scribing your destination (for example, “the earth node that serves the kuo-toa as a secret temple to Blibdoolpoolp”). After using this spell, you can’t take any other actions until your next turn. If you arrive in an earth node that is already par- tially occupied by a newly added object, you arrive in the closest clear space in that node. If the earth node is completely filled or has been destroyed by any means, you bounce to the next closest earth node (determined randomly or by the DM). Each such “bounce” deals you and any who accompany you 1d10 force damage.

Worked for a little while then quit again. I did make sure to update


From: Luca Gioppo @.> Sent: Monday, August 12, 2024 12:59 PM To: gioppoluca/5e-spellblock-importer @.> Cc: rednek74 @.>; Comment @.> Subject: Re: [gioppoluca/5e-spellblock-importer] Issue Importing Spell (Issue #8)

Send the text you pasted in the form. Otherwise could be difficult to debug, send It by pm if you do not want to paste here.

— Reply to this email directly, view it on GitHubhttps://github.com/gioppoluca/5e-spellblock-importer/issues/8#issuecomment-2284505228, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASG6FBF372I7S2KPBBGZZ2TZRDSWBAVCNFSM6AAAAABF3M6XUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBUGUYDKMRSHA. You are receiving this because you commented.Message ID: @.***>

gioppoluca commented 2 months ago

now should work