The crate
Rarities, both kinds of key, the reels that fall or the 3D opening, the shop, and the blocks that open the crate.
The crate is how trims are won rather than given. A key is spent, a reel falls, and what it lands on
is unlocked on the player's account — owned for good, whatever happens to their rank afterwards. The
crate itself is ExyliaLib's; this plugin hands it the catalogue and reads its settings and lines from
config.yml and messages.yml.
It works in every mode: keys, the crate screens and crate blocks are there even with mode: item.
Opening it needs exyliaarmortrims.crate, which everybody holds by default.
What it can land on
Two kinds of prize, every one of them in trims.yml:
| Prize | Stored as | What winning it gives |
|---|---|---|
| A pattern | pattern:<id> — pattern:sentry | That pattern, to combine with any material the player owns. |
| A material | material:<id> — material:netherite | That material, to combine with any pattern the player owns. |
A combination is never a prize; its two halves are. A trim is worn once the player owns both halves, by node or by unlock.
Rarities
Every pattern and material declares a tier in trims.yml, and config.yml declares what
the tiers are, under crate.tiers:
crate:
tiers:
common:
name: "Common"
color: "{muted}"
chance: 60.0
priority: 1
rare:
name: "Rare"
color: "{info}"
chance: 25.0
priority: 2
epic:
name: "Epic"
color: "{accent}"
chance: 12.0
priority: 3
legendary:
name: "Legendary"
color: "{highlight}"
chance: 3.0
priority: 4| Key | What it does |
|---|---|
name | What menus and messages call it. |
color | The colour its name and its prizes are written in. |
chance | How often a crate lands on it, relative to the other rarities. |
priority | Where it sits in menus; lower comes first. |
The shipped catalogue has 29 prizes:
| Rarity | Patterns | Materials |
|---|---|---|
| Common | 8 | 5 |
| Rare | 4 | 4 |
| Epic | 5 | 2 |
| Legendary | 1 — Silence | 0 |
Nothing here is hard-coded. Delete legendary, invent mythic, rename all four: the key is the id
trims.yml writes as tier, and an entry naming a rarity that no longer exists falls back to the
first one. An entry with no tier is common.
The shares are worked out from the weights, so four rarities weighted 60/25/12/3 and four weighted
6/2.5/1.2/0.3 behave identically. Deleting a rarity re-spreads its odds across the rest instead of
leaving a three-percent hole.
Keys
Two kinds, and the crate takes both.
On the account
A number on the player's crate row. Nothing can be dropped, duped, or lost to a full inventory:
/armortrimsadmin keys give <player> <amount>
/armortrimsadmin keys take <player> <amount>
/armortrimsadmin keys set <player> <amount>
/armortrimsadmin keys check <player>Safe to run from console and for players who are offline — a shop, a vote listener or a reward plugin hands keys over the same way:
[console] armortrimsadmin keys give %player% 1Every player is given crate.start-keys keys — none by default — the first time they are seen.
In the hand
An item, so it can be sold, put in a kit, dropped and given to a friend:
/armortrimsadmin item key <player> [1-64]Right click a bound crate block holding one and it opens on the spot: one key, one reel, no question
screen. Left clicking never spends one — that is how a player asks what a block is. How the key is
drawn is crate.key-item in config.yml (material and glow) and key-item in messages.yml (name and
lore); it is recognised by what it carries in its data, not by its name or material. Keys that do not
fit in the inventory wait and are handed over on the player's next join, with rewards-claimed.
Opening
/armortrim crate, the TRIM CRATE button in the corner of the trim menu, the crate icon of the
3D wardrobe, or a bound block clicked without a key in hand. The
first screen asks only one thing: how many at once.
How many
menus/crate.yml. Choices are drawn up to crate.max-at-once — or the player's
exyliaarmortrims.crate.multi.<n>, the highest one they hold — capped at seven by the width of the
screen, and spread the way the reels will be — where you click is where that reel falls.
The reels fall
menus/crate_open.yml. One reel per crate, each running the full height of the chest, each with
its own finishing line crate.stagger-seconds after the one before it. A pattern is drawn on a
diamond chestplate wearing it, a material as its own icon.
What went past stays
Nothing is cleared when a reel stops. What it came within one slot of stays on screen, because half of what a crate is worth is the legendary that went past the line.
Paid out as each reel lands
Keys are spent and prizes decided before the first frame is drawn. Each reel pays out as it
stops, with crate.on-win or crate.on-duplicate and its own line in chat. Closing the window
mid-fall costs nothing.
Use the win
Clicking a prize on the reels opens the trim menu, where it is combined.
With crate.opening: SPATIAL the reels are replaced by the opening in the world — see
The 3D opening.
| Refusal | Message |
|---|---|
No exyliaarmortrims.crate | feature-locked |
crate.enabled is off | crate.disabled |
| Not enough keys | crate.no-keys — %amount% is the cost, %keys% what they hold. |
| Their last opening is still falling | crate.busy |
| The catalogue is empty | crate.empty |
What comes out
crate.reward decides:
| Value | What a crate hands over |
|---|---|
UNLOCK | The prize is unlocked on the account. It cannot be traded. The default. |
ITEM | A token item instead of an unlock. |
BOTH | Unlocked, and handed over as a token as well. |
A pattern or a material has no item of its own, so with every prize being a half ITEM and BOTH
behave as UNLOCK: a key never buys nothing. crate.won names what came out (%reward%) and its rarity (%tier%).
Duplicates
Landing on something the player already owns hands keys back, as many as crate.duplicate-refund
says, with crate.duplicate (%refund% is how many). At the default of 1 a duplicate is a free
re-roll rather than a loss.
Buying with currency
Anything still locked can be bought instead of won. A locked pattern or material with a price is drawn
by the menu's *_purchasable_template, with its price; clicking it asks the player to confirm,
charges them and unlocks it exactly as a crate would. The 3D wardrobe sells the same halves through
its BUY & SAVE button. Buying needs exyliaarmortrims.buy, which everybody holds by default.
shop:
enabled: true
tier-prices:
common: 500
rare: 1500
epic: 4000
legendary: 10000| Key | Default | What it does |
|---|---|---|
enabled | true | Whether locked entries can be bought from the trim menu. |
tier-prices | above | The price of each rarity, for an entry that sets none of its own. A rarity left out is not for sale. |
An entry in trims.yml can set its own price, which wins over its rarity's:
patterns:
silence:
tier: legendary
price: 25000 # the default currency
materials:
netherite:
tier: epic
price: {amount: 50, currency: gems} # a named currency| Rule | Detail |
|---|---|
| Currencies | A number is ExyliaLib's default currency; currency names another one. The economy is ExyliaLib's, over ExyliaEconomy, Vault or PlayerPoints. |
| Not for sale | Something already owned, by node or by unlock, is simply wearable. An entry with no price, priced in a currency no economy serves, or a player without exyliaarmortrims.buy, is drawn by *_locked_template as before. |
| A typo | A price that cannot be read — zero, negative, text — is no price: the entry is not for sale rather than free. |
| One at a time | One purchase per player at once. A failed unlock gives the money back. |
The confirmation and every outcome — bought, already owned, not enough money — are ExyliaLib's own
lines, under purchase in its messages.yml. After the purchase the menu reopens.
Settings
crate:
enabled: true
start-keys: 0
duplicate-refund: 1
reward: UNLOCK
blocks: []
max-at-once: 4
spin-frames: 34
stagger-seconds: 2.0
opening: INVENTORY
key-item:
material: TRIPWIRE_HOOK
glow: true| Key | Default | What it does |
|---|---|---|
enabled | true | Off, the crate says so instead of opening. |
start-keys | 0 | Keys a player is given the first time they are seen. |
duplicate-refund | 1 | Keys handed back for something already owned. |
reward | UNLOCK | UNLOCK, ITEM or BOTH — see above. |
blocks | [] | The blocks that open the crate. Bind them in game, not by hand. |
max-at-once | 4 | How many crates one player may open in one go. The screen fits seven. exyliaarmortrims.crate.multi.<n> raises it per rank. |
spin-frames | 34 | How many faces the first reel runs through before it stops. Capped at 200, about eleven seconds. |
stagger-seconds | 2.0 | How long after one reel stops the next one does. 0 stops them together. |
opening | INVENTORY | INVENTORY: the reels fall down menus/crate_open.yml. SPATIAL: the opening plays in the world — see below. |
key-item | above | How the key that can be held is drawn. Its name and lore are in messages.yml. |
on-spin, on-win and on-duplicate are full ExyliaLib effect blocks — title, action bar, boss bar,
sound, particle and firework — played as the reels turn, and then once per reel as it lands. They ship
as one sound each: BLOCK_NOTE_BLOCK_HAT, ENTITY_PLAYER_LEVELUP and BLOCK_NOTE_BLOCK_BASS.
The 3D opening
crate.opening: SPATIAL plays an opening in front of the player instead of the reels: a crate in the
world, a reel slowing onto the prize, the reveal and a preview of it — a pattern is tried on the player
as a full set in the first material of the catalogue, a material shows its icon. Sneaking skips to the
end and hands the prize over at once.
The prize is drawn the same way either way: keys, odds, duplicates and payouts do not change. Its look
is spatial/crate.yml, which is ExyliaLib's crate scene. A client older than 1.21.4 gets the reels.
Crate blocks
A physical block, anywhere in the world, that opens the crate when it is clicked:
/armortrimsadmin crate block add # the block you are looking at, up to six blocks away
/armortrimsadmin crate block remove
/armortrimsadmin crate block list
/armortrimsadmin crate block clearThey are written to config.yml, not into the world, so a bound block survives a schematic paste, a
world edit and a rollback. While it is bound it cannot be broken, blown up or pushed away, and clicking
it no longer does what its material does — a crate drawn on a barrel must not open a barrel.
Handing trims over without a crate
/armortrimsadmin unlocks grant <player> <prize>
/armortrimsadmin unlocks revoke <player> <prize><prize> is pattern:<id> or material:<id>. The same unlock a crate writes, for a reward plugin or
a support ticket. It outlives a rank running out and needs no permissions plugin. To take back
everything a player unlocked, use ExyliaLib's
player reset with @account.
A player may use a half they unlocked or one their rank grants. Selling every combination as a rank
is still two lines — exyliaarmortrims.pattern.* and exyliaarmortrims.material.* — and it is
independent of anything they unboxed.
Something missing on this page? Tell us on Discord