Skip to content

[#5152] Create new usage message and migrate existing messages#5153

Merged
arbron merged 3 commits into
5.3.xfrom
chat/usage
Feb 13, 2026
Merged

[#5152] Create new usage message and migrate existing messages#5153
arbron merged 3 commits into
5.3.xfrom
chat/usage

Conversation

@arbron

@arbron arbron commented Feb 10, 2025

Copy link
Copy Markdown
Collaborator

Adds a new usage message type that stores the usage cause, consumption deltas, and appliable effects in its system data. A migration has been added to convert all existing messages with the flags.dnd5e.messageType set to usage to this new message type and move any other flag data into the system data.

Closes #5152

@arbron arbron added api migration The feature involves a system migration system: activities labels Feb 10, 2025
@arbron arbron added this to the D&D5E 4.4.0 milestone Feb 10, 2025
@arbron arbron self-assigned this Feb 10, 2025
Comment thread module/documents/activity/mixin.mjs Outdated
@arbron
arbron changed the base branch from 4.3.x to 4.4.x February 24, 2025 17:31
@Fyorl
Fyorl force-pushed the 4.4.x branch 2 times, most recently from ecdba9c to 52777c2 Compare March 5, 2025 15:07
@Fyorl
Fyorl force-pushed the 4.4.x branch 2 times, most recently from 338f711 to 6710279 Compare March 21, 2025 14:38
@Fyorl
Fyorl force-pushed the 4.4.x branch 2 times, most recently from 7f3a393 to d6936bb Compare April 4, 2025 14:48
@arbron arbron removed this from the D&D5E 4.4.0 milestone Apr 16, 2025
@arbron
arbron changed the base branch from 4.4.x to 5.0.x May 5, 2025 21:26
@arbron
arbron changed the base branch from 5.0.x to 5.1.x May 30, 2025 16:56
@Fyorl
Fyorl force-pushed the 5.1.x branch 2 times, most recently from dc12c96 to 054e58d Compare June 17, 2025 12:20
@arbron
arbron changed the base branch from 5.1.x to 5.2.x October 15, 2025 22:24
@arbron
arbron changed the base branch from 5.2.x to 5.3.x January 26, 2026 18:12

@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.

Good change, feels cleaner. I did notice quite a few places that we are still referencing the use flags, like concentrationId, enchantmentProfile, etc. Is the intention that these stay as flags?

Also some lingering references to the now-migrated flags:

  • activity/mixin.mjs L275, 276, 721, 1008
  • activity/summon.mjs L81

Comment thread module/data/chat-message/usage-message-data.mjs Outdated
Comment thread module/migration.mjs
Comment thread module/migration.mjs Outdated
Adds a new `usage` message type that stores the usage cause,
consumption deltas, and appliable effects in its system data.
A migration has been added to convert all existing messages with
the `flags.dnd5e.messageType` set to `usage` to this new message
type and move any other flag data into the system data.

Closes #5152

@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.

Just wanted to re-iterate my comment about what the plan is for the other use flags we still have like spellLevel, concentrationId, enchantmentProfile, etc., in case you missed it.

@arbron
arbron requested a review from Fyorl February 13, 2026 18:10
@arbron

arbron commented Feb 13, 2026

Copy link
Copy Markdown
Collaborator Author

Just wanted to re-iterate my comment about what the plan is for the other use flags we still have like spellLevel, concentrationId, enchantmentProfile, etc., in case you missed it.

Moved dnd5e.scaling, dnd5e.use.spellLevel, and dnd5e.use.concentrationId into the system data. I've left enchantmentProfile out because that is only used by one specific advancement type, so it feels more like flag data.

@Fyorl Fyorl added the breaking Breaking changes label Feb 13, 2026
@arbron arbron added this to the D&D5E 5.3.0 milestone Feb 13, 2026
@arbron
arbron merged commit 2898052 into 5.3.x Feb 13, 2026
@arbron
arbron deleted the chat/usage branch February 13, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api breaking Breaking changes migration The feature involves a system migration priority: medium system: activities system: chat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert usage chat messages into custom message type

3 participants