death-save / combat-utility-belt

Combat Utility Belt module for Foundry Virtual Tabletop
https://deathsave.dev
GNU General Public License v3.0
53 stars 58 forks source link

"Enhanced Conditions does not work this game system" showing for dnd5e #620

Closed stalker168 closed 2 years ago

stalker168 commented 2 years ago

CUB Enhanced Condition does not work on this game system. Please check the CUB Wiki for more information. This is the message the module gives me when I try to interact with the Condition Lab. The problem appeared after updating the modules and restarting the CUB module.

When you click on the "Condition Lab" button, this notification appears instead of the window image

When creating a new game with the same system version and CUB version, the Condition Lab button works correctly. The bug persists in the cloned version of the game. The message occurs even when only one CUB module is running.

eclarke12 commented 2 years ago

@stalker168 we were talking on Discord?

stalker168 commented 2 years ago

@eclarke12 no, we didn't speak on Discord. And I won't be able to speak normally because I don't know English well.

eclarke12 commented 2 years ago

@eclarke12 no, we didn't speak on Discord. And I won't be able to speak normally because I don't know English well.

I meant "text" speak :) And don't worry you are doing fine!

I have seen reports of this issue since the update and will dive in over the next couple of days.

stalker168 commented 2 years ago

@eclarke12 My discord nickname is Salamander#5299. I can be found on the Foundry VTT server.

eclarke12 commented 2 years ago

@eclarke12 My discord nickname is Salamander#5299. I can be found on the Foundry VTT server.

Thanks! I don't think I need any more information at this time, but I will let you know.

stalker168 commented 2 years ago

@eclarke12 I created a new world. Problems with Concentration saving throws. I guess this is due to the fact that I play in Russian. While I was switching languages ​​and switching concentrator between MIDI and CUB, the same error occurred again. I can't say exactly at what point it happened. But exactly somewhere in this range.

CaosFR commented 2 years ago

Hi, I have the same issue since today. On a new world it's work. I use the Concentration saving throws of CUB. If I turn off Concentration in MIDI and/or CUB, the problem persit.

I got this error on startup when Enhanced Condition is ON :

Uncaught (in promise) TypeError: Cannot read properties of null (reading '0')
[Detected 2 packages: combat-utility-belt, lib-wrapper]
    at sidekick.js:293
    at Array.map (<anonymous>)
    at Function.generateUniqueSlugId (sidekick.js:293)
    at enhanced-conditions.js:781
    at Array.map (<anonymous>)
    at Function._prepareStatusEffects (enhanced-conditions.js:779)
    at Function._updateStatusEffects (enhanced-conditions.js:754)
    at Function._onReady (enhanced-conditions.js:87)
    at signal.js:94
    at Function._call (eval at <anonymous> (listeners.js:91), <anonymous>:4:14)
    at Function.callAll (foundry.js:153)
    at Game.setupGame (foundry.js:4403)
    at async Game._initializeGameView (foundry.js:5213)
    at async Game.initialize (foundry.js:4286)
(anonyme) | @ | sidekick.js:293
  | generateUniqueSlugId | @ | sidekick.js:293
  | (anonyme) | @ | enhanced-conditions.js:781
  | _prepareStatusEffects | @ | enhanced-conditions.js:779
  | _updateStatusEffects | @ | enhanced-conditions.js:754
  | _onReady | @ | enhanced-conditions.js:87
  | (anonyme) | @ | signal.js:94
  | _call | @ | VM6973:4
  | callAll | @ | foundry.js:153
  | setupGame | @ | foundry.js:4403
  | await in setupGame (asynchrone) |   |  
  | _initializeGameView | @ | foundry.js:5213
  | _initializeView | @ | foundry.js:5189
  | initialize | @ | foundry.js:4286
  | await in initialize (asynchrone) |   |  
  | 🎁call_wrapped | @ | libWrapper-wrapper.js:502
  | 🎁libWrapperInit | @ | libWrapper-api.js:777
  | await in 🎁libWrapperInit (asynchrone) |   |  
  | 🎁Game.prototype.initialize#0 | @ | libWrapper-wrapper.js:182
  | window.addEventListener.once | @ | foundry.js:53613

When I turn OFF to ON "Enhanced Condition" this issue :

Uncaught (in promise) TypeError: Cannot read properties of null (reading '0')
[Detected 1 package: combat-utility-belt]
    at sidekick.js:293
    at Array.map (<anonymous>)
    at Function.generateUniqueSlugId (sidekick.js:293)
    at enhanced-conditions.js:781
    at Array.map (<anonymous>)
    at Function._prepareStatusEffects (enhanced-conditions.js:779)
    at Function._updateStatusEffects (enhanced-conditions.js:754)
    at Function._onReady (enhanced-conditions.js:87)
    at Object.onChange (settings.js:182)
    at Setting._onUpdate (foundry.js:15975)
    at ClientDatabaseBackend.callback (foundry.js:8963)
    at foundry.js:8915
    at Array.map (<anonymous>)
    at ClientDatabaseBackend._handleUpdateDocuments (foundry.js:8915)
    at ClientDatabaseBackend._updateDocuments (foundry.js:8803)
    at async Function.updateDocuments (document.mjs:366)
    at async Setting.update (document.mjs:448)
    at async ClientSettings.set (foundry.js:1204)
    at async CUBPuter._updateObject (cub-puter.js:339)
    at async CUBPuter._onSubmit (foundry.js:2825)
  | (anonyme) | @ | sidekick.js:293
-- | -- | -- | --
  | generateUniqueSlugId | @ | sidekick.js:293
  | (anonyme) | @ | enhanced-conditions.js:781
  | _prepareStatusEffects | @ | enhanced-conditions.js:779
  | _updateStatusEffects | @ | enhanced-conditions.js:754
  | _onReady | @ | enhanced-conditions.js:87
  | onChange | @ | settings.js:182
  | _onUpdate | @ | foundry.js:15975
  | callback | @ | foundry.js:8963
  | (anonyme) | @ | foundry.js:8915
  | _handleUpdateDocuments | @ | foundry.js:8915
  | _updateDocuments | @ | foundry.js:8803
  | await in _updateDocuments (asynchrone) |   |  
  | _onUpdate | @ | foundry.js:15975
  | callback | @ | foundry.js:8963
  | (anonyme) | @ | foundry.js:8915
  | _handleUpdateDocuments | @ | foundry.js:8915
  | _updateDocuments | @ | foundry.js:8803
  | await in _updateDocuments (asynchrone) |   |  
  | update | @ | backend.mjs:154
  | await in update (asynchrone) |   |  
  | updateDocuments | @ | document.mjs:366
  | update | @ | document.mjs:448
  | set | @ | foundry.js:1204
  | _updateObject | @ | cub-puter.js:339
  | _onSubmit | @ | foundry.js:2825

I have test on a older version of libWrapper but same issue. I use a french translate of the system of DnD and Foundry.

Edit 30/11/2021 : With this module "https://github.com/League-of-Foundry-Developers/foundryvtt-forien-copy-environment" I have export the configuration of the "broken world" and import to the new working world. After that CUB dont work, so the configuration look like broken since update.

From the export file If I back the active configuration of CUB to default it's work. ("key": "combat-utility-belt.activeConditionMap")

Default : foundry-settings-export.zip

It's cool but I loose all my configuration. I find the problem and delete this ligne in my custom "combat-utility-belt.activeConditionMap" : {\"name\":\"Concentrating\",\"icon\":\"icons/svg/d20-black.svg\"}

Since update this ligne was add but I have already the same in french. This create a conflit with : {\"id\":\"concentrating\",\"name\":\"Concentré\",\"icon\":\"modules/combat-utility-belt/icons/concentrating.svg\",\"referenceId\":\"@Compendium[combat-utility-belt.conditionsdnd5e.nSoKejZfahbxfggp]\",\"applyTrigger\":\"\",\"removeTrigger\":\"\",\"options\":{\"overlay\":false,\"removeOthers\":false,\"markDefeated\":false,\"outputChat\":true}}

Hope this can help

eclarke12 commented 2 years ago

@stalker168 / @CaosFR It looks like the issue was that Concentrator was creating a duplicate condition because it did not detect the existing one based on the name (language difference). I have fixed the bug in Enhanced Conditions that occurs when a condition name is duplicated. This will be fixed in the next update and it should just work when your world loads. You can then go into the Condition Lab and delete the duplicate Concentrating condition.

Also make sure you set the Concentrator Concentrating Condition Name setting to the correct name (eg. Concentré in French)

CaosFR commented 2 years ago

Thanks for you job :). Yes "Concentrating Condition Name" is set to "Concentré" ;)