Shopkeeper

Overview

The Shopkeeper is a central game mechanic that allows players to purchase items during the preparation phase. Items are organized into categories, making it easy for players to find and purchase what they need.

Categories

The shop organizes items into the following categories:

  • Permanent/Upgrades: Items like swords and armor that persist and can be upgraded

  • Consumables: Items that can be purchased repeatedly (e.g., Golden Apples, Ender Pearls)

  • Eggs: Special items that spawn minions when right-clicked on the ground

  • TNT: Throwable explosives activated by left-clicking

Organizing items into categories helps players quickly find what they need during the preparation phase.

Configuration

Creating Items

  1. Access the /items/ directory.

  2. Identify an existing item file to use as a template.

  3. Duplicate the template file.

  4. Rename the duplicate file for your new item.

  5. Adjust the configuration to customize your item.

Item Modules

Items are configured using various modules that control their behavior and properties:

Module
Description

Prismatic

Controls whether the item is part of the prismatic item pool

Purchase

Defines buying conditions like cost and unlock requirements

Upgrade

Configures upgrade paths and tiers for items

Enchant

Handles enchantment application and limitations

Equipment-builder

Specifies inventory placement and item properties

Module Details

Prismatic Module

prismatic:
  is-prismatic: true  # Makes item available in prismatic pool (Round 3 default)

Purchase Module

purchase:
  gold-cost: 250      # Cost in gold
  round-unlock: 3     # Round when item becomes available
  consumable: false   # Whether item can be used multiple times
  category: "ARMOR"   # Shop category for the item

Always set appropriate round-unlock values to maintain game balance.

Making powerful items available too early can disrupt gameplay.

Upgrade Module

upgrade:
  shared-id: "chestplate"  # Groups items in same upgrade path
  upgrade-tier: 1          # Position in upgrade sequence

Items with the same shared-id form an upgrade path. Higher upgrade-tier values represent better versions of the item.

Enchant Module

enchant:
  is-enchant: true
  max-purchases: 2
  cost-increase-per-purchase: 25
  apply-to:
    - BOW
  apply-enchants:
    - "enchant{PUNCH} power{1}"

Equipment Builder Module

equipment-builder:
  38:  # Inventory slot number
    ignore-slot: false     # Force specific slot placement
    type: CHAINMAIL_CHESTPLATE
    amount: 1
    attributes:
      - "attribute{GENERIC_ARMOR} operation{ADD_NUMBER} value{5.0}"

Use the equipment-builder module to precisely control where and how items appear in the player's inventory.

Usage Examples

Iron Sword

purchase:
  gold-cost: 500
  round-unlock: 5
  consumable: false
  category: "WEAPONS"

upgrade:
  shared-id: "sword"
  upgrade-tier: 2

equipment-builder:
  0:
    ignore-slot: false
    lore:
      - "&8Permanent"
    type: IRON_SWORD
    amount: 1
    damage: 0
    model: 0
    glint: false
    head: ""
    attributes:
    potions:
    tags:
      - "key;value"
    enchants:

Speed Potion

purchase:
  gold-cost: 500
  round-unlock: 1
  consumable: true
  category: "POTIONS"

equipment-builder:
  0:
    ignore-slot: true
    lore:
      - "&8Consumable"
    type: POTION
    amount: 1
    damage: 0
    model: 0
    glint: false
    head: ""
    potions:
      - "effect{SPEED} duration{200} amplifier{1} ambient{false} particles{true}"
    tags:
      - "key;value"
    enchants:

Breeze Egg

purchase:
  gold-cost: 750
  round-unlock: 1
  consumable: true
  category: "SUMMONS"

equipment-builder:
  0:
    ignore-slot: true
    lore:
      - "&8Consumable"
    type: BREEZE_SPAWN_EGG
    amount: 1
    damage: 0
    model: 0
    glint: false
    head: ""
    potions:
    tags:
      - "key;value"
    enchants:

Sharpness Enchant

purchase:
  gold-cost: 500
  round-unlock: 1
  category: "ENCHANTS"

enchant:
  is-enchant: true
  max-purchases: 5
  cost-increase-per-purchase: 25
  apply-to:
    - WOODEN_SWORD
    - STONE_SWORD
    - IRON_SWORD
    - DIAMOND_SWORD
    - NETHERITE_SWORD
  enchants:
    - "enchant{SHARPNESS} power{1}"

equipment-builder:
  0:
    ignore-slot: false
    name: "Sword: Sharpness {ENCHANT_LEVEL}"
    lore:
      - ""
      - "&7Add &d🌟 Sharpness &7to &fSwords"
      - ""
      - "&7Max Enchant: &b{MAX_ENCHANT_LEVEL}"
      - "&7Can be purchased multiple times."
    type: ENCHANTED_BOOK
    amount: 1
    damage: 0
    model: 0
    glint: false
    head: ""
    potions:
    tags:
      - "key;value"
    enchants:

All Modules

prismatic:
  is-prismatic: true

purchase:
  gold-cost: 250
  round-unlock: 3
  consumable: false
  category: "ARMOR"

upgrade:
  shared-id: "chestplate"
  upgrade-tier: 1

enchant:
  is-enchant: true
  max-purchases: 2
  cost-increase-per-purchase: 25
  apply-to:
    - BOW
  apply-enchants:
    - "enchant{PUNCH} power{1}"

equipment-builder:
  38:
    ignore-slot: false
    lore:
      - "&8Permanent"
    type: CHAINMAIL_CHESTPLATE
    amount: 1
    damage: 0
    model: 0
    glint: false
    head: ""
    attributes:
      - "attribute{GENERIC_ARMOR} operation{ADD_NUMBER} value{5.0}"
    potions:
      - "effect{SLOW_FALLING} duration{200} amplifier{1} ambient{false} particles{true}"
    tags:
      - "key;value"
    enchants:
      - "enchant{MULTISHOT} power{1}"

Last updated