Mystery Loots

How Mystery Loots work

Each file in the /config/loots folder is a group where you can create loots. Groups are useful for making loots of the same rarity that have the same settings. For example, you might have a "common" group with many common loots that all have the same effects.

How to create a Group

  1. Open the /config/loots folder.

  2. Copy one of the group files that are already there, and paste it in the same folder.

  3. That's it! Now you can make loots inside the new group file.

How to create a Loot inside a Group

All the loots in a group are found under the loot-creator section. To make a new loot, just copy one of the existing loots and paste it. Then, change the settings to what you want.

Here's an example of three different loots named "iron-loot", "gold-loot", and "diamond-loot":

loot-creator:
    iron-loot:
        [...]
    gold-loot:
        [...]
    diamond-loot:
        [...]

To check if your loots were created, use the command /mb listloots in the game.

Assigning a Group/Loot to a Box

  1. Open the /config/boxes folder.

  2. Choose a box file and open it.

  3. Find the loots-assigned section.

  4. Assign a loot using the example below as a guide.

Each loot is added using either an 'id' or 'file' setting, along with a 'chance' setting.

  • 'id' is the unique name of the loot (/mb listloots).

  • 'file' is the name of the file that has the loot IDs you want to add.

  • 'chance' is how likely it is for the loot to be given, written as a percentage.

loots-assigned:
- "id{common-loot} | chance{75}"
- "id{dust-loot} | chance{25}"
- "file{loot-group.yml} | chance {100}"

The drop chances don't have to add up to 100. The plugin has a smart system that figures out the weighted drop chances for each loot. You can also use numbers bigger than 100 (like 1000, 2000, etc.) or numbers with decimals (like 0.1, 0.5, etc.).

Mystery Loot Config

# ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
# ■ ░█▀▄▀█ ░█──░█ ░█▀▀▀█ ▀▀█▀▀ ░█▀▀▀ ░█▀▀█ ░█──░█ ░█▀▀█ ░█▀▀▀█ ▀▄░▄▀ ░█▀▀▀ ░█▀▀▀█             ■
# ■ ░█░█░█ ░█▄▄▄█ ─▀▀▀▄▄ ─░█── ░█▀▀▀ ░█▄▄▀ ░█▄▄▄█ ░█▀▀▄ ░█──░█ ─░█── ░█▀▀▀ ─▀▀▀▄▄             ■
# ■ ░█──░█ ──░█── ░█▄▄▄█ ─░█── ░█▄▄▄ ░█─░█ ──░█── ░█▄▄█ ░█▄▄▄█ ▄▀░▀▄ ░█▄▄▄ ░█▄▄▄█ BY XERICKER ■
# ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

# •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# Customize various events that will happen after a loot is revealed.
# •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

events-settings:
  loot-discovered:
    send-broadcasts:
      - "&d🌟 {PLAYER} &efound &r{LOOT_NAME} &ein &r{BOX_NAME}"
    play-sounds:
      - ENTITY_PLAYER_LEVELUP;1.0;1.0
    spawn-fireworks:
      - "type{BALL_LARGE} | flicker{true} | trail{false} | p{0} | c{rgb(213,115,255)} | f{WHITE,rgb(255,255,255)}"
  loot-duplicated:
    send-broadcasts:
    play-sounds:
      - ENTITY_VILLAGER_NO;1.0;1.0
    spawn-fireworks:
      - "type{STAR} | flicker{false} | trail{false} | p{0} | c{rgb(213,115,255)} | f{WHITE,rgb(255,255,255)}"

# •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# This section defines the effects that will be played when a loot is revealed.
# You can assign different effects based on whether the loot was discovered for the
# first time or duplicated. Each line under the "loot-discovered" and "loot-duplicated" keys
# represents an effect ID from the effects.yml file.
# •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

effects-settings:
  loot-discovered:
    - "common-spiral-popper"
    - "common-firework-show"
  loot-duplicated:
    - "common-confetti"

# •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# This is where you create the actual loots. Follow these steps:
#
# 1. Copy the loot template (e.g., "common-loot") and paste it to create a new loot.
# 2. Give each loot a unique ID (e.g., "common-loot", "rare-loot").
# 3. Customize the loot settings:
#    - "name": Set the display name of the loot.
#    - "valuable": Determine if the Treasure Hunter upgrade affects the loot chance (true/false).
#    - "drop-duplicate": Specify whether the loot can be received more than once (true/false).
#    - "box-appearance":
#       - data: Material;Model
#       - head:
#         - Player heads: "player->xeRicker"
#         - Custom heads: "custom->[Minecraft URL]"
# 4. Configure the actions when the loot is discovered (received for the first time) and duplicated (received more than once):
#    - "dust-to-give": Set the amount of Mystery Dust to give the player.
#    - "commands": Add console commands to execute when the loot is received.
# 5. After creating your loots, assign their IDs (e.g., "common-loot", "rare-loot") to the desired boxes in the "opening-settings.loots-assigned" section.
#
# Note: The commands support various built-in placeholders and PlaceholderAPI (if installed).
# •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

loot-creator:
  common-loot:
    name: "&aCommon Loot"
    valuable: false
    drop-duplicate: true
    box-appearance:
      data: ENDER_CHEST;0
      head: ""
    loot-discovered:
      dust-to-give: 0
      commands:
        - "console command"
    loot-duplicated:
      dust-to-give: 100
      commands:
        - "console command"
  dust-loot:
    name: "&d{DUST_TO_GIVE} Mystery Dust"
    valuable: true
    drop-duplicate: false
    box-appearance:
      data: ENDER_CHEST;0
      head: ""
    loot-discovered:
      dust-to-give: 100
      commands:
        - "console command"
    loot-duplicated:
      dust-to-give: 0
      commands:
        - "console command"

Last updated