item_stats damage - magemonkeystudio/divinity GitHub Wiki

🗡️ Editor: Damage Types

The Damage Types editor option lets you define what types of damage can roll on an item. These types are fully customizable, created manually in the plugin’s configuration files, and used to generate combat stats like Slashing, Piercing, Bludgeoning, etc.


📁 Where Damage Types Are Defined

Damage types are configured in your server’s plugins directory, typically at:

plugins/Divinity/item_stats/damage.yml

Each type must be created manually. This editor setting only controls which of those types the item is allowed to roll.

➡️ For more on how to define custom damage types, see: item_stats-damage


⚙️ What the Editor Does

In the Item Generator Editor, the Damage Types setting allows you to:

  • Choose which damage types are eligible to roll.
  • Assign a drop chance (weight) for each.
  • Set a minimum and maximum number of types that can be applied.
  • Use placeholders to format their appearance in the item’s lore.

📄 Example (Item Generator File)

damage-types:
  minimum: 1
  maximum: 1
  lore-format:
    - '%DAMAGE_PHYSICAL%'
    - '%DAMAGE__VANILLA_GENERIC%'
    - '%DAMAGE_SLASHING%'
    - '%DAMAGE_PIERCING%'
    - '%DAMAGE_BLUDGEONING%'

This allows exactly one damage type to roll from the list above, with its values formatted using the specified placeholders.


🔧 Placeholders

Placeholders are auto-generated for every valid damage type. Use the format:

%DAMAGE_{TYPE}%

Examples:

  • %DAMAGE_SLASHING%
  • %DAMAGE_FIRE%
  • %DAMAGE_MAGIC%

These are used in your lore-format section to insert the correct display line.


🧪 Use Case

Letting weapons roll from multiple damage types adds variety and allows you to:

  • Introduce elemental or magical variants of physical weapons.
  • Build stat-specific class gear (e.g., holy swords, fire daggers).
  • Add depth to loot generation across zones and difficulties.

Return to: Item Generator Module