Skip to content

Recipes & Star System

Enhancement recipes define the enhancement rules for equipment, including match conditions, economy costs, star stages, material requirements, and success rates. Each recipe corresponds to a YAML file in the recipes/ directory.

Full Recipe Format

yaml
# Recipe unique identifier
id: weapon_physical

# Display name (supports MiniMessage format)
display_name: "<gold>物理武器强化"

# GUI template (references a template file name under the gui/ directory)
gui_template: strengthen_gui

# ===== Economy Configuration =====
economy:
  # Currency list (supports multiple currencies)
  currencies:
    - provider: vault          # Economy provider: vault | excellenteconomy
      currency_id: default     # Currency ID (ExcellentEconomy only)
      base_cost: 100           # Base cost
      cost_formula: "{base_cost} * {star} * 1.5"  # Cost formula
      display_name: "金币"     # Currency display name

# ===== Limits Configuration =====
limits:
  # Maximum star level
  max_star: 12
  # Maximum temper level
  max_temper: 10
  # Success rate bonus per temper level (percentage)
  temper_chance_bonus_per_level: 1.5
  # Success rate cap (percentage)
  success_chance_cap: 95.0

# ===== Success Rate Configuration =====
# Overrides the global success_rates in config.yml
success_rates:
  1: 100
  2: 95
  3: 85
  4: 75
  5: 65
  6: 55
  7: 45
  8: 35
  9: 25
  10: 18
  11: 12
  12: 6

# ===== Match Rules =====
# Determines which equipment can use this recipe
match:
  # Item source type matching
  source_types:
    - minecraft
    - neigeitems

  # Item source ID matching (exact match)
  source_ids:
    - "minecraft:iron_sword"
    - "minecraft:diamond_sword"
    - "neigeitems:flame_blade"

  # Item source ID pattern matching (regex)
  source_patterns:
    - "minecraft:.*_sword"
    - "neigeitems:.*_blade"

  # Equipment slot group matching
  slot_groups:
    - MAIN_HAND
    - OFF_HAND

  # Lore contains matching (item Lore contains specified text)
  lore_contains:
    - "物理武器"
    - "近战"

  # Stat existence matching (item has any of the specified stats)
  stats_any:
    - physical_damage
    - attack_speed

# ===== Stat Line Definitions =====
# Stat growth provided by enhancement, cumulative per star level
stat_lines:
  physical_damage:
    base: 5.0
    per_star: 3.0
    formula: "{base} + {per_star} * {star}"
  attack_speed:
    base: 0.1
    per_star: 0.05
    formula: "{base} + {per_star} * {star}"

# ===== Star Stage Definitions =====
stars:
  1:
    name: "★"
    stats:
      physical_damage: 5.0
      attack_speed: 0.1
    attributes:
      攻击力: 5.0
    materials:
      - item: "minecraft:iron_ingot"
        amount: 3
      - item: "neigeitems:strengthen_stone_1"
        amount: 1
    economy_override:
      currencies:
        - provider: vault
          base_cost: 50
          cost_formula: "50"
          display_name: "金币"
    structured_presentation:
      name_contributions:
        star_suffix:
          order: 99
          format: " <yellow>★"
      lore_sections:
        strengthen_info:
          order: 80
          lines:
            - "<gray>强化等级:<yellow>★"
            - "<gray>物理伤害:<white>+5.0"
    success_actions:
      - "playsound sound=block.anvil.land volume=1.0 pitch=1.2"
      - "sendmessage message=<green>强化成功!当前星级:★"
    failure_actions:
      - "playsound sound=block.anvil.destroy volume=1.0 pitch=0.5"
      - "sendmessage message=<red>强化失败..."

  2:
    name: "★★"
    stats:
      physical_damage: 11.0
      attack_speed: 0.2
    attributes:
      攻击力: 11.0
    materials:
      - item: "minecraft:iron_ingot"
        amount: 5
      - item: "neigeitems:strengthen_stone_1"
        amount: 2
    structured_presentation:
      name_contributions:
        star_suffix:
          order: 99
          format: " <yellow>★★"
      lore_sections:
        strengthen_info:
          order: 80
          lines:
            - "<gray>强化等级:<yellow>★★"
            - "<gray>物理伤害:<white>+11.0"
    success_actions:
      - "playsound sound=block.anvil.land volume=1.0 pitch=1.4"
      - "sendmessage message=<green>强化成功!当前星级:★★"
    failure_actions:
      - "playsound sound=block.anvil.destroy volume=1.0 pitch=0.5"
      - "sendmessage message=<red>强化失败..."

  # ... more star stages

# ===== Structured Presentation =====
# Global display template (structured_presentation in star stages overrides this)
structured_presentation:
  name_contributions:
    star_suffix:
      order: 99
      format: " <yellow>{star}"
  lore_sections:
    strengthen_info:
      order: 80
      lines:
        - "<gray>强化等级:<yellow>{star}"
        - "<gray>锻印等级:{temper_color}{temper}/{max_temper}"

Star Stage Skill Effects

Star stages can declare skill IDs through the effects list. After enhancement, the system accumulates and merges skill IDs from the current star level and all levels below, writing them to the equipment's PDC.

yaml
stars:
  5:
    name: "★★★★★"
    stats:
      physical_damage: 50.0
    effects:
      - type: skill
        skills:
          - "flame_burst"
          - "power_strike"

Skill IDs are cumulative — if ★3 declares "fireball" and ★5 declares "flame_burst", a ★5 equipment will have both skills. Skills are also reduced accordingly when downgrading.

Available Variables

Text fields, actions, and display templates in recipes support the following variables:

VariableDescriptionExample Value
{star}Current star level (after enhancement)3
{temper}Current temper level5
{max_temper}Maximum temper level10
{temper_color}Color tag corresponding to temper level<green>
{sign}Positive/negative sign of the stat value+
{value}Stat value15.0
{player}Player nameSteve
{show_item}Item display component (for hover display in chat messages)

Default Recipe Overview

Recipe IDMax StarMatch RulePrimary Stats
weapon_physical12Melee weaponsPhysical damage, attack speed
weapon_projectile12Ranged weaponsProjectile damage, fire rate
weapon_spell12Spell weaponsSpell damage, cast speed
armor_guard12ArmorArmor, toughness
generic_visual6Any equipmentVisual effects only
offhand_focus10Offhand itemsOffhand stats

Material Tiers

Material requirements typically increase with star level, forming a tiered consumption pattern:

Star RangeTypical MaterialQuantity Trend
★1 ~ ★3Basic Enhancement Stone1 ~ 3
★4 ~ ★6Intermediate Enhancement Stone2 ~ 4
★7 ~ ★9Advanced Enhancement Stone3 ~ 5
★10 ~ ★12Legendary Enhancement Stone4 ~ 6

The specific material requirements for each star stage are defined in stars.<level>.materials.

GUI Layout

The enhancement interface is a 5-row (45-slot) chest GUI:

Row 1: [  ] [  ] [  ] [  ] [  ] [  ] [  ] [  ] [  ]
Row 2: [  ] [  ] [  ] [  ] [TG] [  ] [PV] [  ] [  ]
Row 3: [  ] [  ] [M1] [M2] [  ] [  ] [  ] [  ] [  ]
Row 4: [  ] [  ] [M3] [M4] [TP] [  ] [  ] [CF] [  ]
Row 5: [  ] [  ] [  ] [  ] [  ] [  ] [  ] [  ] [  ]

TG = target_item       Target equipment slot (slot 13)
PV = preview_display   Preview display slot (slot 15)
TP = temper_display    Temper info display (slot 22)
M1 = material_input_1  Material input slot 1 (slot 19)
M2 = material_input_2  Material input slot 2 (slot 20)
M3 = material_input_3  Material input slot 3 (slot 29)
M4 = material_input_4  Material input slot 4 (slot 30)
CF = confirm           Confirm button (slot 40)
SlotNumberDescription
target_item13Place the equipment to be enhanced
preview_display15Shows the preview of the enhanced result
temper_display22Shows current temper level and bonus info
material_input_119Material input slot 1
material_input_220Material input slot 2
material_input_329Material input slot 3
material_input_430Material input slot 4
confirm40Confirm enhancement button

Tip

The preview_display slot shows a real-time preview of the equipment after successful enhancement, including stat changes and display effects. Players can review the expected result before confirming.

Released under the GPL-3.0 License