Skip to content

Gem Definitions

Gem definition files are stored in gems/*.yml. A gem definition describes how the gem item is recognized, which socket types it supports, what effects it provides, and how inlay, extraction, and upgrade costs are handled.

Top-level fields

FieldTypeRequiredDescription
idstringYesUnique gem id.
display_namestringYesDisplay name in MiniMessage format.
gem_typestringYesGem type, such as attack, defense, utility, or universal.
levelintegerNoBase gem level.
item_sourceslistYesItem sources used to identify this gem item.
custom_model_dataintegerNoOptional custom model data.
effectslistNoEffects applied when the gem is inlaid.
socket_compatibilitylistNoSocket types that can accept this gem.
inlay_costobjectNoCost paid when inlaying.
extract_costobjectNoCost paid when extracting.
extract_returnobjectNoHow the gem is returned after extraction.
upgradeobjectNoUpgrade settings.
actionsobjectNoActions executed on success or failure.

Minimal example

yaml
id: "ruby_basic"
display_name: "<red>Ruby</red>"
gem_type: "attack"
level: 1
item_sources:
  - "minecraft-redstone"
socket_compatibility:
  - "attack"
  - "universal"
effects:
  - type: "variables"
    variables:
      physical_attack: 5
  - type: "ea_attribute"
    ea_attributes:
      physical_attack: 5.0

Effect types

TypeDescription
variablesRuntime variables used by lore templates and formulas.
ea_attributeEmakiAttribute PDC attributes written to equipment.
es_skillEmakiSkills skill attachments.
name_actionName operations applied to equipment.
lore_actionLore operations applied to equipment.

Cost example

yaml
inlay_cost:
  currencies:
    - provider: "vault"
      currency_id: ""
      base_cost: 1000
      cost_formula: "%base_cost% * %level%"
      display_name: "<gold>Coins</gold>"
  materials:
    - item_sources:
        - "minecraft-gold_nugget"
      amount: 1

Upgrade example

yaml
upgrade:
  enabled: true
  max_level: 4
  gui_template: "upgrade/default"
  failure_penalty: "none"
  success_rates:
    2: 100.0
    3: 80.0
    4: 60.0
  levels:
    2:
      display_name: "<red>Ruby II</red>"
      effects:
        - type: "variables"
          variables:
            physical_attack: 12
        - type: "ea_attribute"
          ea_attributes:
            physical_attack: 12.0
      materials:
        - item_sources:
            - "minecraft-gold_nugget"
          amount: 3

Design notes

  • Use stable item_sources instead of display names or lore matching.
  • Keep gem_type and socket_compatibility simple and easy to understand.
  • Write real stats through ea_attribute; use lore actions only for presentation.
  • Use extract_return and upgrade failure penalties carefully on high-value gems.