dnd5e icon indicating copy to clipboard operation
dnd5e copied to clipboard

Add support for enchanting items

Open Fyorl opened this issue 11 months ago • 5 comments

Must Haves

  1. Add a new category to feature Items called 'Enchantment'. Alternatively add a new enchantment Item type.
  2. Enchantments should specify whether they can be bound to a limited number of Items or not and, if so, how many.
    • These references to other Items must be UUIDs to allow enchanting other creatures' Items.
  3. Enchantments should specify whether they can be changed on a short rest, a long rest, or at will.
  4. Enchantments should specify which type of Item they can apply to: weapon, equipment, etc.
  5. Add a new 'Enchantment' concept to ActiveEffect5e.
    • Implemented via flags until v12 where we switch to ActiveEffect#system.
  6. Enchantment Items should house an Enchantment ActiveEffect as the blueprint for the ActiveEffects that will be bound to enchanted Items.
  7. Allow for dragging-and-dropping this Enchantment ActiveEffect onto another Item to enchant it.
  8. The Item sheet for Enchantments should:
    1. Show which Items the Enchantment is bound to.
    2. Allow unbinding from those Items.

Ideal

  1. Other Item sheets should:
    1. Indicate somewhere if the Item has an Enchantment bound to it.
  2. Enchantment ActiveEffects should contain a JSON blob that defines a diff that can be applied to the Enchanted Item. The diffs are applied during Item preparation.
  3. Using the Enchantment Item posts it to the chat where other users can drop their Items onto it to bind their Item to the Enchantment.

Nice to Haves

  1. When performing a rest, show a dialog allowing the player to change any Enchantments they have bound.
  2. Provide a user-friendly configuration interface for configuring common Enchantments instead of having to edit JSON.
  3. Enchantments should have a way to configure additional restrictions such as 'only two-handed weapon', or 'only a ranged weapon'.

Fyorl avatar Mar 22 '24 14:03 Fyorl

If this is a new feature type, this seems like a good way to structure Artificer Infusions.

JPMeehan avatar Mar 22 '24 15:03 JPMeehan

Example Usage

Weapon +1

Applied to: Any Weapon Changes:

  • name: append " +1"
  • description: append <p><em>Whether through demonic blessing, celestial bequeathment, crazed experiment, or skillful craft, this weapon has been enhanced to bring more bloodshed by the bearer.</em></p>\n<p>You have a bonus to attack and damage rolls made with this magic weapon.</p>
  • system.properties: add mgc
  • system.magicalBonus: override 1

Vicious Weapon

Applied to: Any Weapon Changes:

  • name: prepend "Vicious"
  • description: append <p>When you roll a 20 on your attack roll with this magic weapon, your critical hit deals an extra 2d6 damage of the weapon’s type.</p>
  • system.properties: add mgc
  • system.critical.damage: override 2d6

Helm of Awareness

Applied to: Equipment (helmet) Changes:

  • name: override "Helm of Awareness"
  • description: append <p>While wearing this helmet, a creature has advantage on initiative rolls. In addition, the wearer can’t be surprised, provided it isn’t &Reference[incapacitated].</p> Should also apply a transferred active effect that adds advantage on initiative rolls.

arbron avatar Mar 22 '24 17:03 arbron

With those examples, it's not entirely clear what this feature is.

Are they enchantments in the sense of temporary buffs, enhancements, whatever you may want to call it, or a utility for easily making, say, a magical variant of weapons and armors, such as a +2 weapon or shield?

Or is this both?

krbz999 avatar Mar 24 '24 17:03 krbz999

It's a general framework that will hopefully cover several concepts from the game system. So, both, and more, I suppose.

Fyorl avatar Mar 24 '24 18:03 Fyorl

I guess also for something like the Elemental Weapon spell. Add a 1d4 of specific damage to a specific weapon for the spells duration

Zanderaf avatar Mar 24 '24 18:03 Zanderaf

I know theres an option to append text onto an item through one of the PR's but would it be at all possible to allow the enchanted item's descriptions to have text appended to them as well?

Zanderaf avatar May 04 '24 17:05 Zanderaf

I know theres an option to append text onto an item through one of the PR's but would it be at all possible to allow the enchanted item's descriptions to have text appended to them as well?

That should already be possible.

krbz999 avatar May 04 '24 18:05 krbz999

Since most of this is done I've split the final bullet points off into their own PRs:

  • https://github.com/foundryvtt/dnd5e/issues/3589
  • https://github.com/foundryvtt/dnd5e/issues/3590

arbron avatar May 20 '24 17:05 arbron