caewok / fvtt-terrain-mapper

Paint coded terrain values on Foundry maps
MIT License
5 stars 6 forks source link

Bug with core effect (dnd5e system) #54

Open CaosFR opened 2 weeks ago

CaosFR commented 2 weeks ago

Hi ,

Thanks for your great module. If I use the variant encombered of dnd5e system I have a bug with your module :

Foundry v12 Dnd 3.31 Terrain mapper 0.4.5 No other module enable

image

CaosFR commented 2 weeks ago

Update, it's the same for all core effect. Exemple with poisoned

game:1 Uncaught (in promise) Error: undefined. The _id [dnd5epoisoned000] already exists within the parent collection: Actor [OJUmW18chuMQBzml] effects
[No packages detected]
    at /home/foundry/resources/app/dist/database/backend/server-backend.mjs:1:3158
    at Array.map (<anonymous>)
    at ServerDatabaseBackend._createDocuments (/home/foundry/resources/app/dist/database/backend/server-backend.mjs:1:3073)
    at ServerDatabaseBackend.create (/home/foundry/resources/app/common/abstract/backend.mjs:77:17)
    at async Semaphore._try (/home/foundry/resources/app/common/utils/semaphore.mjs:101:17)
caewok commented 2 weeks ago

What are you doing to get the error to show up? Can you walk me through the steps?

CaosFR commented 1 week ago

Thanks for your reply. I have made some tests.

It's very strange, The problem stems from an incompatibility between midi-qol (https://github.com/thatlonelybugbear/automated-conditions-5e) and your work. I hadn't checked because I was think your modules complementary (my fault).

If I disable your module or midi-qol it's ok (no error). I have try with differents configurations of midi (full automate, no automate), the problem persist.

The problem arises when you call up an effect that calls up the incapacitated effect (such as paralyzed, stunned, etc.).

Step to reproduce :

Other bug, If I open terrain book (with dfreds-convenient-effects active to). I dont think is linked, do you want a other issue ?

image

tweener67 commented 5 days ago

I have also seen a similar result which occurs anytime I use an active effect to add a condition it throws "The _id [dnd5ecursed00000] already exists within the parent collection". When the effect is later removed it throws "ActiveEffect "dnd5ecursed00000" does not exist!". I've tried adding a different condition and it throws dnd5e[condition] for each one.

In my case I have a spell which under effects applies a temporary condition. I have tried different conditions and it seems to work for all of them. Turning off Terrain-Mapper makes the error go away. I have not tried turning off MIDIQOL.

From the console window I get the following:

The _id [dnd5ecursed00000] already exists within the parent collection: Actor [RMuYEyBfrt6DrMy9] effects

Uncaught (in promise) Error: The _id [dnd5ecursed00000] already exists within the parent collection: Actor [RMuYEyBfrt6DrMy9] effects [No packages detected] at /opt/foundryvtt/dist/database/backend/server-backend.mjs:1:3158 at Array.map () at ServerDatabaseBackend._createDocuments (/opt/foundryvtt/dist/database/backend/server-backend.mjs:1:3073) at ServerDatabaseBackend.create (/opt/foundryvtt/common/abstract/backend.mjs:77:17) at async Semaphore._try (/opt/foundryvtt/common/utils/semaphore.mjs:101:17)

When removing the effect:

ActiveEffect "dnd5ecursed00000" does not exist!

foundry.js:3477 Uncaught (in promise) Error: ActiveEffect "dnd5ecursed00000" does not exist! [No packages detected] at file:///opt/foundryvtt/dist/database/backend/server-backend.mjs:1:6671 at Array.map () at ServerDatabaseBackend._deleteDocuments (file:///opt/foundryvtt/dist/database/backend/server-backend.mjs:1:6641) at ServerDatabaseBackend.delete (file:///opt/foundryvtt/common/abstract/backend.mjs:174:17) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Semaphore._try (file:///opt/foundryvtt/common/utils/semaphore.mjs:101:17)