Skip to content

Allow drag and drop of effects on items#1766

Merged
Fyorl merged 3 commits intofoundryvtt:2.0.xfrom
ElfFriend-DnD:akrigline/dragDropItemEffects
Sep 19, 2022
Merged

Allow drag and drop of effects on items#1766
Fyorl merged 3 commits intofoundryvtt:2.0.xfrom
ElfFriend-DnD:akrigline/dragDropItemEffects

Conversation

@akrigline
Copy link
Collaborator

@akrigline akrigline commented Sep 3, 2022

This change introduces drag and drop handlers for the Item Sheet to allow Effects to be dragged and dropped between items.

This also allows effects to be drag and dropped from an item onto an actor to emulate applying the effect.

Use Cases:

  • Having configured a "Poisoned Dagger" with a "Poisioned" Effect, I would like to be able to quickly copy that effect to a "Poisioned Longsword".
    • Said items would not need to transfer their effect to their parent actor in order for the GM to use them on enemies.
  • An item which replicates the effects of a spell that has active effects configured can quickly clone the effect of that spell.

Methodology

Copies what core does for dropping active effects on Actor Sheets, with one change:

  • Sets the origin of the created effect to be the uuid of the new parent item.

Research

I've been doing this with with the module: Drop Effects on Items for several months and it's been very useful.

@akrigline akrigline added ux User experience related features or bugs system: active effects labels Sep 3, 2022
@akrigline akrigline self-assigned this Sep 3, 2022
@arbron arbron added this to the D&D5E 2.1.0 milestone Sep 9, 2022
@Fyorl Fyorl changed the base branch from master to 2.0.x September 12, 2022 17:08
Copy link
Contributor

@Fyorl Fyorl left a comment

Choose a reason for hiding this comment

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

Good stuff, thanks. Just some code style suggestions from me.

akrigline and others added 2 commits September 17, 2022 13:48
Co-authored-by: Kim Mantas <kim.mantas@gmail.com>
@akrigline
Copy link
Collaborator Author

changes made @Fyorl thanks for the suggestions :)

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

Labels

system: active effects ux User experience related features or bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants