editor enchantments - magemonkeystudio/divinity GitHub Wiki

✨ Editor: Enchantments

The Enchantments editor option allows you to assign one or more enchantments to generated items, with control over how many enchantments roll, whether they are safe, and what levels they can be.


βš™οΈ What the Editor Lets You Modify

  • Minimum enchantments – how few enchantments can roll
  • Maximum enchantments – how many enchantments can roll
  • Safe enchantments only – restricts to enchantments allowed on the item type
  • Safe enchantment levels only – restricts to the max vanilla level
  • List of enchantments – choose which enchantments can roll and their level range

πŸ“„ Example (Item Generator File)

enchantments:
  minimum: 1
  maximum: 2
  safe-only: false
  list:
    sharpness: '1:2'
    knockback: '1:2'
    efficiency: '1:2'
    silk_touch: 0:1
    smite: '1:2'
  safe-levels: true

πŸ” Notes

  • "1:2" means a random level between 1 and 2
  • "0:2" means a random level between 0 and 2
  • safe-only: true restricts enchantments to what’s valid for the item (e.g., no Fire Aspect on a shovel)
  • safe-levels: true ensures enchantment levels do not exceed the vanilla cap

🧾 Explanation of Fields

Field Description
minimum Minimum number of enchantments to apply.
maximum Maximum number of enchantments to apply.
safe-only If true, only enchantments valid for the item type will be used.
safe-levels If true, limits levels to vanilla-safe values.
list Enchantments and their level range (min:max). "0:2" means any level between 0 and 2.

πŸ§ͺ Use Case

  • Add flavor or power scaling to loot
  • Allow unsafe enchantments for unique or cursed items
  • Mix rare and basic enchantments randomly for more variety

Return to: Item Generator Module