Skip to content

Socket Item Definitions and GUI Templates

Socket item definition files are stored in items/*.yml. They define which equipment can have gem sockets, what socket types are available, which sockets are initially open, and which GUI templates should be used.

Socket item fields

FieldDescription
idUnique socket item definition id.
matchMatching rules for equipment.
slotsSocket slot list.
default_open_slotsSlot indexes that are open by default.
allowed_gem_typesGem type whitelist for this equipment.
max_same_typeMaximum gems of the same type. 0 means no limit.
max_same_idMaximum gems with the same gem id.
guiGUI template references.
name_actionsName operations applied when sockets are present.
lore_actionsLore operations applied when sockets are present.

Weapon socket item example

yaml
id: "weapon_socket_item"
match:
  item_sources:
    - "minecraft-diamond_sword"
  slot_groups:
    - "weapon"
  lore_contains: []
slots:
  - index: 0
    type: "attack"
    display_name: "<red>Attack Socket</red>"
  - index: 1
    type: "universal"
    display_name: "<white>Universal Socket</white>"
  - index: 2
    type: "defense"
    display_name: "<blue>Defense Socket</blue>"
default_open_slots:
  - 0
allowed_gem_types:
  - "attack"
  - "defense"
  - "utility"
  - "universal"
max_same_type: 0
max_same_id: 1
gui:
  gem_template: "gem/default"
  open_template: "open/default"

GUI directories

DirectoryPurpose
gui/gem/Inlay and extraction GUI templates.
gui/open/Socket opening GUI templates.
gui/upgrade/Gem upgrade GUI templates.

Use different socket definitions for weapons, armor, and accessories so gems cannot be inserted into unintended equipment.