kandashi / dnd5e-helpers-cover-expansion Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
It seems that there is some kind of error in the calculation of cover with creatures at 0 hp, when it is intended that they do NOT offer cover.
Then i remove the token concentrating in case it could cause some kind of error, but it remains the same.
In the console there does not seem to be any error
The creature with 0 hp is a zombie, medium size.
Good time of day. Another question from the series "Either skis don't go, or I'm stupid".
I don't understand how to configure the mod. It would seem that everything is simple, you enter the necessary sizes in the lines, save and enjoy life. But not everything is so simple. In the noDeadTokenSizesName line, I specified med, and it seems that this should mean that when a Medium-sized token dies, it stops giving shelter to +2 targets behind it. But no, there is no dynamic change happening.
And when I take a token of a Huge size, during life it gives +5 goals behind it, but after death it ignores the setting that it should continue to give +5 (because of its size, it does not deflate like a ball, right?) and it starts to give only +2 to the shelter.
I'm confused and don't understand anything. Help please.
I am getting incorrect cover values and the following error when running dnd5e-helpers, dnd5e-helpers-cover-expansion, and perfect-vision together.
VM145093:7 TypeError: Cannot set properties of undefined (setting 'cover')
[Detected 3 packages: dnd5e-helpers-cover-expansion, lib-wrapper, perfect-vision]
at Function.userDefined (tokenCover.js:33)
at tokenCover.js:66
at Function._call (eval at <anonymous> (libWrapper-consts.js:9), <anonymous>:4:14)
at Function.call (foundry.js:179)
at Canvas.draw (foundry.js:17698)
at async Canvas.<anonymous> (canvas.js:39)
at async Scene.view (foundry.js:15619)
at async Game.initializeCanvas (foundry.js:4514)
at async Game.setupGame (foundry.js:4388)
at async Game._initializeGameView (foundry.js:5213)
at async Game.initialize (foundry.js:4286)
_call @ VM145093:7
call @ foundry.js:179
draw @ foundry.js:17698
async function (async)
draw @ foundry.js:17671
🎁call_wrapped @ libWrapper-wrapper.js:467
wrapper @ patch.js:17
🎁call_wrapper @ libWrapper-wrapper.js:576
🎁Canvas.prototype.draw#0 @ libWrapper-wrapper.js:164
view @ foundry.js:15619
Scene.view @ monks-tokenbar.js:96
initializeCanvas @ foundry.js:4514
async function (async)
initializeCanvas @ foundry.js:4509
setupGame @ foundry.js:4388
async function (async)
setupGame @ foundry.js:4375
_initializeGameView @ foundry.js:5213
_initializeView @ foundry.js:5189
initialize @ foundry.js:4286
async function (async)
initialize @ foundry.js:4280
🎁call_wrapped @ libWrapper-wrapper.js:467
🎁libWrapperInit @ libWrapper-api.js:698
async function (async)
🎁libWrapperInit @ libWrapper-api.js:688
🎁Game.prototype.initialize#0 @ libWrapper-wrapper.js:162
window.addEventListener.once @ foundry.js:53613
async function (async)
window.addEventListener.once @ foundry.js:53612
Tokens at 0 hp still provide cover and there is an error in the console log:
tokenCover.js:109
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'setFlag')
[Detected 1 package: dnd5e-helpers-cover-expansion]
at modules/dnd5e-helpers-cover-expansion/scripts/modules/tokenCover.js:109:30
at Function._call (foundry.js:294:14)
at Function.callAll (foundry.js:253:12)
at TokenDocument5e._preUpdateTokenActor (foundry.js:18946:13)
at async TokenDocument5e._preUpdate (foundry.js:18874:7)
at async ClientDatabaseBackend._preUpdateDocumentArray (foundry.js:10146:7)
at async ClientDatabaseBackend._updateEmbeddedDocuments (foundry.js:10095:22)
at async Function.updateDocuments (common/abstract/document.mjs:373:21)
at async TokenDocument5e.update (common/abstract/document.mjs:456:21)
at async TokenDocument5e.modifyActorDocument (foundry.js:18756:5)
at async Function.updateDocuments (common/abstract/document.mjs:373:21)
at async Actor5e.update (common/abstract/document.mjs:456:21)
*** Module Version
v0.2.01
*** Foundry
v9 Build 269
*** System
dnd5e v1.6.3
*** Modules
DnD5e Helpers v4.2.0
*** Description
Pressuming I understand the code correctly, line 105 produces an uncaught error, if the actor's prototype token is updated and no token is placed on the canvas as actor.getActiveTokens()[0]
is undefined.
*** Steps taken
I tested the code with actor.getActiveTokens()[0]?.document
and this seems to fix the error, but it is unknown to me, if this is a viable solution or if this would cause other problems.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.