Skip to content

Cauldron of Plentiful Resources

When Cauldron of Plentiful Resources is installed and its Effect Interface setting is on, Token Light Condition routes effect creation through Cauldron of Plentiful Resources rather than creating ActiveEffects directly on the actor.

Both conditions must be true at world ready time:

  • game.modules.get('chris-premades')?.active is true.
  • game.settings.get('chris-premades', 'effectInterface') is true.

If either is false, the module falls back to its normal per-system path described in System Support. No integration code runs.

The check runs once after the world is ready, with a 100 ms delay to let Cauldron of Plentiful Resources finish its own init. It does not re-run when Cauldron of Plentiful Resources’ setting is toggled at runtime. Reload the world after enabling its Effect Interface for the integration to take effect.

During initialization the module looks for the Cauldron of Plentiful Resources effect-interface Item, identified by item.flags['chris-premades'].effectInterface. If found:

  • The module checks whether the Cauldron of Plentiful Resources Item already has effects with flags.tokenlightcondition.type === 'dark' or 'dim'.
  • For each missing one, it creates an ActiveEffect on the Cauldron of Plentiful Resources Item using the same EFFECT_DATA factory as the generic path: same names, ids, icons, and statuses described in Active Effects.

The Cauldron of Plentiful Resources Item holds the Dark Lighting and Dim Lighting effect templates that will be applied to tokens.

When a D&D 5e or other generic-path token resolves to Dark or Dim:

  1. The module re-checks that Cauldron of Plentiful Resources is active and its Effect Interface is on.
  2. It calls _findCPREffect(effectType) to locate the matching effect on the Cauldron of Plentiful Resources Item.
  3. It clones the effect’s data, sets statuses: [effectType], and creates an ActiveEffect on the actor with keepId: true.

If the Cauldron of Plentiful Resources Item or the matching effect cannot be found at apply time, the module logs a warning and falls back to creating the effect using the local EFFECT_DATA factory. No effect creation is lost.

Clearing always uses the generic clear path: any ActiveEffect on the actor whose flags.tokenlightcondition.type is set is deleted, regardless of how it was created.

The Cauldron of Plentiful Resources integration is a no-op on Pathfinder 2e. PF2e systems use the Item-based effect path described in System Support and never route through Cauldron of Plentiful Resources.

With Logging Level set to All Messages, look for these strings to confirm the integration:

  • Setting up Chris's Premades integration
  • Created CPR effect: dark / Created CPR effect: dim
  • CPR integration completed successfully
  • Created CPR <type> effect: (per-token apply path)

The log strings above are the literal output emitted by the source code and have not been updated to the current module display name.

If you see CPR Effect Interface item not found, the Cauldron of Plentiful Resources Item with the effectInterface flag is missing. Recreate it from the module’s settings and reload the world.