Skip to content

Placeholder Reference ​

PlaceholderAPI Placeholders ​

Expansion identifier: emakigem

Prerequisite: PlaceholderAPI installed. Once installed, EmakiGem registers the following placeholders; all of them read gem data from the player's main-hand item

PlaceholderDescriptionExample
%emakigem_mainhand_opened_slots%Number of opened gem slots3
%emakigem_mainhand_total_slots%Total slots defined on the item5
%emakigem_mainhand_filled_slots%Slots with a gem socketed2
%emakigem_mainhand_item_definition_id%Gem item definition ID of the main-hand itemgem_socket_ring
%emakigem_mainhand_resonance_count%Number of active resonances2
%emakigem_mainhand_slot_<n>_gem%Gem ID at slot index nruby
%emakigem_mainhand_slot_<n>_level%Gem level at slot n3
%emakigem_mainhand_slot_<n>_opened%Whether slot n is openedtrue
%emakigem_mainhand_slot_<n>_type%Slot type at index nuniversal

Usage Example ​

yaml
lore:
  - '<gray>Slots: <white>%emakigem_mainhand_filled_slots%/%emakigem_mainhand_opened_slots%'
  - '<gray>Slot 1: <white>%emakigem_mainhand_slot_0_gem% Lv.%emakigem_mainhand_slot_0_level%'

Internal Template Variables ​

The item's structured_presentation is rendered by GemSnapshotBuilder, which provides the following template variables

Item-Level Variables ​

Scope: the item's overall lore template

VariableDescriptionExample
%item_definition_id%Gem item definition IDgem_socket_ring
%opened_slots%Number of opened slots3
%inlaid_slots%Number of slots with a gem socketed2
%total_slots%Total slot count5

Per-Slot Variables ​

Scope: each socketed gem's lore template

VariableDescriptionExample
%gem_id%Gem definition IDruby
%display_name%Gem display name at current level<red>Ruby III
%old_display_name%Gem display name at previous level<red>Ruby II
%current_level%Current gem level3
%target_level%Target gem level3
%level%Current gem level, the same value as %current_level%3
%gem_type%Gem typeuniversal
%<stat_id>%Formatted stat value for the gem at this level (dynamic)15

Template Example ​

yaml
structured_presentation:
  lore_actions:
    - action: "append"
      content:
        - "<gray>Slots: %inlaid_slots% (%opened_slots%/%total_slots%)"

# Gem definition (gems/*.yml): lore template for one level stage
stages:
  3:
    effects:
      - type: "lore_action"
        lore_actions:
          - action: "append"
            content:
              - "<gray>[%gem_id%] %display_name% <gray>Lv.%level%"
              - "<gray>  Attack: <white>+%physical_attack%"

Notes ​

  • <n> in PlaceholderAPI placeholders is the slot index, counted from 0
  • When the main-hand item has no gem data, placeholders return 0 or an empty string
  • Internal template variables only work within Gem's structured_presentation
  • %<stat_id>% is dynamic; the actual key comes from the stat configured in the gem definition