dmrickey / fvtt-ckl-roll-bonuses

Provides bonuses to various types of rolls. Some of these are for variable changes that the system can't handle (like Inspiration). Some are a fake implementation of changes that the system just doesn't support.
MIT License
2 stars 1 forks source link

Adding a weapon target type to an actor in a compendium makes the actor unuseable #43

Closed Orskelo closed 1 month ago

Orskelo commented 1 month ago

Trying to target a specific ability on an actor with Roll Bonuses on a compendium actor causes it to target that ability in the compendium and not that ability on an actor.

For example, I was trying to add an Ability Focus on a monster statblock and targeted their one ability as a source. The exported file read

"bonus_dc": "2",
          "target_weapon": [
            "Compendium.moduleName.bestiary.Actor.uxfqwJVzn2EBhwpk.Item.M76Bl0Wk69uIbIg8"
          ]

and if targeted while they were imported into the game it read

"bonus_dc": "2",
          "target_weapon": [
            "Actor.V170jZaqUtl5DjIe.Item.M76Bl0Wk69uIbIg8"
          ]

When the ability was chosen from the compendium and the monster sheet closed it was unable to be re-opened. These are the errors received

Error: Error thrown in hooked function 'onGetRollData' for hook 'pf1GetRollData'. fromUuidSync was invoked on UUID 'Compendium.moduleName.bestiary.Actor.Y1rq0uatDrORZzin.Item.M76Bl0Wk69uIbIg8' which references an Embedded Document and cannot be retrieved synchronously.
[Detected 5 packages: ckl-roll-bonuses(2.14.4), system:pf1(10.7), lib-wrapper(1.12.15.0), monks-active-tiles(11.27), monks-enhanced-journal(11.09)]

Error: An error occurred while rendering ActorSheetPFNPC 200. fromUuidSync was invoked on UUID 'Compendium.moduleName.bestiary.Actor.Y1rq0uatDrORZzin.Item.M76Bl0Wk69uIbIg8' which references an Embedded Document and cannot be retrieved synchronously.
[Detected 5 packages: ckl-roll-bonuses(2.14.4), lib-wrapper(1.12.15.0), system:pf1(10.7), monks-active-tiles(11.27), monks-enhanced-journal(11.09)]

Adding the ability as a focus while imported into the game and then moved to a module does not result in any problems other than the ability focus target getting removed, but I assume that's because of IDs changing.

dmrickey commented 1 month ago

Thanks for the detailed report (this much detail would have been helpful the first time this issue was brought 😅). But as mentioned on discord I've already resolved this for the next release. I'll leave this issue open until the release is finalized (and hopefully remember to come back and close it at that point 🙃).

dmrickey commented 1 month ago

Fixed in 2.15.0