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. Lowercased on load; the file is skipped when blank.
display_namestringNoDisplay name in MiniMessage format. Defaults to id.
lorelistNoLore of the gem item itself.
gem_typestringNoGem type, such as attack, defense, utility, or universal. Defaults to universal.
levelintegerNoBase gem level. Defaults to 1, minimum 1.
item_sourceslistYesItem sources used to identify this gem item. The gem is skipped when it cannot be parsed.
custom_model_dataintegerNoOptional custom model data.
effectslistNoEffects applied when the gem is inlaid.
socket_compatibilitylistNoSocket types that can accept this gem. Empty means any socket type.
required_gemslistNoGem ids this gem depends on.
conflicting_gemslistNoGem ids that conflict with this gem.
inlay_costobjectNoCost paid when inlaying.
extract_costobjectNoCost paid when extracting.
extract_returnobjectNoHow the gem is returned after extraction.
upgradeobjectNoUpgrade settings.
actions.inlay_successlistNoAction lines run after a successful inlay.
actions.extract_successlistNoAction lines run after a successful extraction.

Listing universal in socket_compatibility lets the gem go into any socket type.

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

TypePayload keyDescription
variablesvariablesRuntime variables used by lore templates and formulas.
ea_attributeea_attributesEmakiAttribute PDC attributes written to equipment.
es_skilles_skillsEmakiSkills skill attachments.
name_actionname_actionsName operations applied to equipment.
lore_actionlore_actionsLore operations applied to equipment.

Values under variables and ea_attributes may be numbers or expressions and can reference %level%; keys resolved earlier in the same block are available as variables to later expressions.

Top-level form

Besides the effects list, the parser also accepts variables, ea_attributes, name_actions, and lore_actions written directly on the gem root:

yaml
variables:
  physical_attack: 8
ea_attributes:
  physical_attack: 8.0

variables and ea_attributes merge both forms, with keys from effects overriding top-level keys. For name_actions and lore_actions, a top-level value takes precedence and the matching effects entry is ignored. Skills can only be declared through es_skill inside effects.

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.