Skip to content

[#6641] Allow standalone AE documents to be linked to activities#6800

Open
arbron wants to merge 5 commits into
6.0.xfrom
activity/remote-effects
Open

[#6641] Allow standalone AE documents to be linked to activities#6800
arbron wants to merge 5 commits into
6.0.xfrom
activity/remote-effects

Conversation

@arbron

@arbron arbron commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

Adds a new uuid field to applied effects data on activities which allows the effect to be retrieved from a compendium rather than from the item.

This is breaking change for Activity#applicableEffects, which now returns the effect profiles rather than the effects themselves. A new method getApplicableEffects has been added that retrieves the actual effect documents and is async so it can get them from the compendium.

Closes #6641

@arbron arbron added this to the D&D5E 6.0.0 milestone Mar 3, 2026
@arbron arbron self-assigned this Mar 3, 2026
@arbron arbron added breaking Breaking changes system: active effects system: activities compatibility Relating to compatibility issues with new core versions priority: high labels Mar 3, 2026
@arbron arbron changed the base branch from 5.3.x to 6.0.x June 2, 2026 17:49
Adds a new `uuid` field to applied effects data on activities which
allows the effect to be retrieved from a compendium rather than
from the item.

This is breaking change for `Activity#applicableEffects`, which now
returns the effect profiles rather than the effects themselves. A
new method `getApplicableEffects` has been added that retrieves the
actual effect documents and is async so it can get them from the
compendium.

Closes #6641
@arbron arbron force-pushed the activity/remote-effects branch from 9d144d4 to ab17bb2 Compare June 2, 2026 17:54
Comment thread module/applications/activity/activity-sheet.mjs Outdated
Comment thread module/applications/components/effect-application.mjs Outdated
Comment thread module/applications/components/effect-application.mjs Outdated
Comment thread module/data/activity/fields/applied-effect-field.mjs
Comment thread module/applications/activity/activity-sheet.mjs Outdated
Comment thread module/data/activity/_types.mjs Outdated
Comment thread module/applications/components/effect-application.mjs Outdated
- Adds support for remote enchantments in `EnchantActivity`
- Activity sheets now define what AE types they support
- Removed separate enchantment template in favor of sharing the
  standard activity effects list template
- Reworked `EffectApplicationElement` to not use `async` in the
  `connectedCallback`
- Fixed application of effect start time

@Fyorl Fyorl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enchant-enchantment.hsb now orphaned I think.

}

// Enable an existing effect on the target if it originated from this effect
const existingEffect = actor.effects.find(e => e.origin === origin.uuid);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the origin for remote effects is the item, I think multiple remote effects on one item would collide here.

* Type of active effects that can be added to applied effects.
* @type {string}
*/
static SUPPORTED_EFFECT_TYPE = "base";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to bite us when we inevitably want to allow for multiple AE types.

const level = this.relevantLevel;
return this.effects
.filter(e => e.effect && ((e.level.min ?? -Infinity) <= level) && (level <= (e.level.max ?? Infinity)));
return this.applicableEffects;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't filter for existing effects in applicableEffects anymore so we need to check internal uses of availableEnchantments and do the filtering there now I suppose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking changes compatibility Relating to compatibility issues with new core versions priority: high system: active effects system: activities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow standalone Active Effect documents to be linked to an activity

2 participants