Enchant YAML Reference
Complete guide to creating & configuring custom enchants — stats, abilities, mechanics, triggers, formulas, placeholders, and conflict groups.
File Structure
Each enchant is a separate YAML file in the plugins/OmniEnchant/enchants/ folder. File name = enchant ID.
plugins/OmniEnchant/ ├── config.yml # General settings ├── enchant.yml # Display & rarity config ├── settings/ │ ├── application.yml # Drag-drop, success/failure rate │ ├── display.yml # Rarity colors, display mode │ ├── dust.yml # Lucky Dust config │ ├── enchant-browser.yml # Enchant Browser GUI │ ├── enchant-table.yml # Custom Enchant Table │ ├── extraction.yml # Extraction Scroll config │ ├── fusion.yml # Fusion recipes │ ├── tier-shop.yml # Tier Shop GUI │ └── vanilla-enchants.yml # Vanilla enchant overrides └── enchants/ ├── aegis.yml # Each file = 1 enchant ├── divine.yml ├── frenzy.yml └── ...
Base Fields (Required)
Every enchant YAML file must have these base fields:
name: "&6Aegis" # Display name (color codes) lore: # Description, {KEY} = placeholder - "&8Balanced protection granting &a{HP_PCT}% &8max health" - "&8and &a{DEF_PCT}% &8defense." max-level: 5 # Maximum enchant level rarity: EPIC # COMMON, UNCOMMON, RARE, EPIC, LEGENDARY success-rate: 70 # % base success when applying failure-rate: 5 # % destroy item on failure applicable-to: [CHESTPLATE, HELMET] # Allowed item types conflicts: [umbra] # Conflicts with other enchants
applicable-to supports: SWORD, AXE, BOW, CROSSBOW, PICKAXE, SHOVEL, HOE, HELMET, CHESTPLATE, LEGGINGS, BOOTS, SHIELD, ARMOR (= all armor), WEAPON (= all weapons).
Stats — Permanent & Conditional
Add/modify MythicLib stats on items. Supports both permanent and conditional (trigger-based) stats.
Permanent Stats (Always Active)
stats: attack-damage: formula: "1.5+({level}-1)*1" key: AD # Placeholder: {AD} in lore physical-damage: formula: "12+({level}-1)*8" key: PD critical-strike-chance: formula: "5+({level}-1)*2.5" key: CSC
Relative Stats (Percentage-Based)
stats: attack-damage: formula: "2+({level}-1)*1" key: AD_PCT type: RELATIVE # Percentage-based modifier max-health: formula: "3+({level}-1)*1.5" key: HP_PCT type: RELATIVE
Conditional Stats (Trigger-Based)
stats: critical-strike-chance: formula: "95+({level}-1)*1" key: CSC mode: ATTACK # MythicLib TriggerType chance: formula: "5+({level}-1)*5" key: CHANCE duration: formula: "100" # 100 ticks = 5s key: DUR cooldown: formula: "200" # 200 ticks = 10s key: CD
mode uses MythicLib TriggerType: ATTACK, WHEN_HIT, DAMAGED, KILL, RIGHT_CLICK, LEFT_CLICK, SNEAK, TIMER, LOGIN, SHOOT_BOW
Abilities — MythicLib Skills
Attach MythicLib skills to enchants with configurable modifiers.
ability: smite_heal: type: HEAL # MythicLib SkillHandler ID mode: ATTACK heal: formula: "2+({level}-1)*1" key: HEAL chance: formula: "20"
type is the MythicLib SkillHandler ID: FIREBALL, SPARKLE, HEAL, EARTH_SPIKE, FIRE_METEOR, ARCANE_HAIL, FREEZING_CURSE, POWER_MARK, SHULKER_MISSILE...
Mechanics — Custom Engine
40+ custom-coded mechanics independent of MythicLib. Vein mining, telekinesis, auto replant, multiply drops, and more.
mechanics: - type: TELEKINESIS mode: BREAK_BLOCK
Available Mechanics
| Type | Mode | Description |
|---|---|---|
TELEKINESIS | BREAK_BLOCK | Auto-send drops to inventory |
VEIN_MINER | BREAK_BLOCK | Mine entire ore veins (BFS) |
TREE_FELLER | BREAK_BLOCK | Chop entire trees |
MULTIPLY_DROPS | BREAK_BLOCK | Multiply block drops |
SMELTING | BREAK_BLOCK | Auto-smelt ore drops |
AUTO_REPLANT | BREAK_BLOCK | Auto-replant crops |
EXPLOSIVE | BREAK_BLOCK | Mine in a 3×3 area |
LIFESTEAL | ATTACK | Heal on each hit |
CRITICAL_BOOST | ATTACK | Random crit buff |
THORNS | DEFEND | Reflect damage |
SOUL_HARVEST | KILL_ENTITY | Harvest souls from kills |
EXP_BOOST | BREAK_BLOCK/KILL_ENTITY | Increase EXP drops |
Conflict System
Enchants can conflict with each other, preventing both from being on the same item.
# divine.yml: conflicts: [umbra] # reaper.yml: conflicts: [ruin] # bulwark.yml: conflicts: [vitality] # juggernaut.yml: conflicts: [lethality]
Conflicts are bidirectional. Define on both sides for clarity.
Formula Engine
All numeric values support formulas with {level} and {item_level} variables.
"10" # Fixed value "5+({level}-1)*3" # Lv1=5, Lv2=8, Lv3=11 "10-({level}-1)*0.5" # Decreasing (cooldown) "({level}^2)*2" # Exponential scaling "100/{level}" # Inverse scaling "-0.5+({level}-1)*-0.2" # Negative (trade-off) # Supported operators: + - * / ^ ()
Lore Placeholders
Use {KEY} in lore: to display dynamic values from formulas.
| Placeholder | Source | Description |
|---|---|---|
{KEY} | stat/ability | Formula value at current level |
{DUR} | conditional stat/trigger | Duration (seconds, auto ÷20) |
{CD} | conditional stat/trigger | Cooldown (seconds) |
{CHANCE} | conditional stat/ability | Activation chance (%) |
{CHANCE_ENCHANT} | base field | Success rate |
{MULT} | ability/mechanic | Multiplier value |
Full Example — Complete Enchant
# Frenzy — High damage at the cost of defense name: "&cFrenzy" lore: - "&8Increases attack by &a{AD_PCT}% &8and crit" - "&8chance by &a{CSC}%&8, but reduces defense by &a{DEF}&8." max-level: 4 rarity: EPIC applicable-to: [SWORD] stats: attack-damage: formula: "4+({level}-1)*1.5" key: AD_PCT type: RELATIVE critical-strike-chance: formula: "6+({level}-1)*1.5" key: CSC defense: formula: "-0.5+({level}-1)*-0.2" key: DEF