moo-man / WFRP4e-FoundryVTT

The premiere system for running grim and perilous games of Warhammer Fantasy Role-play in the Foundry VTT environment.
Apache License 2.0
92 stars 54 forks source link

[Core Rulebook] Unable to Place Soulfire #2205

Closed moo-man closed 2 months ago

moo-man commented 2 months ago

Cast Soulfie with Prayer Granted. Press Place Soulfire nothing happens. I am seeing console error

Uncaught (in promise) ReferenceError: undefined. effectData is not defined [Detected 1 package: system:wfrp4e(8.0.2)] at ChatWFRP._onPlaceAreaEffect (wfrp4e.js:5349:101) _onPlaceAreaEffect @ wfrp4e.js:5349 await in _onPlaceAreaEffect (async) dispatch @ jquery.min.js:2 v.handle @ jquery.min.js:2
From: steven.evans
foundry: 12.331
wfrp4e: 8.0.2
wfrp4e-core: 6.0.0
Active Modules: filepicker-plus, lib-wrapper, module-credits, socketlib, warhammer-lib, wfrp4e-gm-toolkit

StevenEvans1966 commented 2 months ago

can now place template after update to game system 8.0.3 but now get VM828:6 Uncaught (in promise) TypeError: undefined. Cannot read properties of undefined (reading 'result') [Detected 1 package: warhammer-lib(1.0.1)] at Object.eval (eval at execute (warhammer.js:319:21), :6:60) at WarhammerScript.execute (warhammer.js:319:121) at warhammer.js:957:73 at Array.map () at ActiveEffectWFRP4e.handleImmediateScripts (warhammer.js:957:62) at ActiveEffectWFRP4e._preCreate (warhammer.js:864:27) at async #preCreateDocumentArray (foundry-esm.js:56392:31) at async ClientDatabaseBackend._createDocuments (foundry-esm.js:56347:7) at async ActiveEffectWFRP4e.createDocuments (foundry-esm.js:11423:23) at async ActiveEffectWFRP4e.create (foundry-esm.js:11567:23) at async ActorWFRP4e.applyEffect (warhammer.js:4332:13) at async AreaHelpers.checkTokenAreaEffects (warhammer.js:3542:13) at async Semaphore._try (foundry-esm.js:6645:19)

moo-man commented 2 months ago

This I cannot reproduce, please make sure you're using an updated Soulfire item

StevenEvans1966 commented 2 months ago

The error appears to be with applying the effect to the target. If I place the template with no (enemy) tokens within it there is no error. When I testing using an orc (from Core rules) within the template the error appears.

I have traced the error to this line in the script

if (this.actor.has(game.i18n.localize("NAME.Daemonic")) || this.actor.has(game.i18n.localize("NAME.Undead")) || ["Goblin", "Orc", "Undead"].includes(this.actor.system.details.species.value))
{
    roll = await new Roll(`1d10 + ${this.effect.sourceTest.result.overcast.usage.other.current}`).roll()
}

this.effect.sourceTest is undefined