editor stat bonuses - magemonkeystudio/divinity GitHub Wiki
📈 Editor: Stat Bonuses
The Stat Bonuses editor allows you to configure stat-related bonuses that are applied to an item during generation. These bonuses can depend on the item's material or the player's class, and all affect item performance in different ways.
There are three types of stat bonuses available in the editor:
1️⃣ Material Modifiers
Material Modifiers increase the actual value that is rolled for a stat at generation time. This bonus is used in final calculations, but it is not shown as a separate line in the item's lore.
Instead, it adjusts the base stat result silently behind the scenes.
🔧 Can modify:
- Damage Types
- Defense Types
- Item Stats
- Fabled Attributes (if using the Fabled plugin)
- Ammo Stats
- Hand Stats
💡 Example
If an item rolls:
Slashing: 3–4
And the material modifier for NETHERITE_SWORD
is:
slashing: 2
Then the final value used for gameplay will be Slashing: 5–6
, but the lore will still only show the adjusted range (not the modifier separately).
This is great for defining shared files across materials while letting the material control scaling.
2️⃣ Material Bonuses
Material Bonuses are added to the rolled stat during item generation and also shown as a separate line in the item's lore.
Unlike modifiers, these bonuses are visibly displayed and meant to represent passive or secondary effects based on material.
They allow you to show added effects even if they don’t directly relate to the rolled stat.
💡 Example
If an item rolls:
Bludgeoning: 2–5
And the material bonus for IRON_AXE
is:
slashing: 1
The lore might look like:
Bludgeoning: 2–5
+1 Slashing
Material bonuses do affect gameplay, and the value is added on top of the base stat during use.
3️⃣ Class Bonuses
Class Bonuses add flat bonuses that only apply when the player belongs to a matching class. These bonuses are always visible in the lore, even if the player holding the item doesn't meet the requirement.
The effect is only applied if the player's class matches.
💡 Example
class-bonuses:
Warrior:
strength: 1
blunt: 2
Rogue:
dexterity: 2
In the lore, this would appear as:
[Class: Warrior] +1 Strength, +2 Blunt
[Class: Rogue] +2 Dexterity
But only the matching class will benefit from the stats in combat.
✅ Use Cases
- Use Material Modifiers to adjust base stats for stronger materials without cluttering the lore.
- Use Material Bonuses to add flavor or secondary traits visibly tied to material types.
- Use Class Bonuses to make items behave differently for different classes.
This system allows for powerful item diversity without duplicating files or bloating configuration.
Return to: Item Generator Module