Content generated with AI — it may contain mistakes.

Configuring

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:

PrizeStored asWhat winning it gives
A patternpattern:<id> — pattern:sentryThat pattern, to combine with any material the player owns.
A materialmaterial:<id> — material:netheriteThat 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:

config.yml
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
KeyWhat it does
nameWhat menus and messages call it.
colorThe colour its name and its prizes are written in.
chanceHow often a crate lands on it, relative to the other rarities.
priorityWhere it sits in menus; lower comes first.

The shipped catalogue has 29 prizes:

RarityPatternsMaterials
Common85
Rare44
Epic52
Legendary1 — Silence0

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.

chance is a weight, not a percentage

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% 1

Every 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.

RefusalMessage
No exyliaarmortrims.cratefeature-locked
crate.enabled is offcrate.disabled
Not enough keyscrate.no-keys — %amount% is the cost, %keys% what they hold.
Their last opening is still fallingcrate.busy
The catalogue is emptycrate.empty

What comes out

crate.reward decides:

ValueWhat a crate hands over
UNLOCKThe prize is unlocked on the account. It cannot be traded. The default.
ITEMA token item instead of an unlock.
BOTHUnlocked, 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.

config.yml
shop:
  enabled: true
  tier-prices:
    common: 500
    rare: 1500
    epic: 4000
    legendary: 10000
KeyDefaultWhat it does
enabledtrueWhether locked entries can be bought from the trim menu.
tier-pricesaboveThe 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:

trims.yml
patterns:
  silence:
    tier: legendary
    price: 25000                          # the default currency
materials:
  netherite:
    tier: epic
    price: {amount: 50, currency: gems}   # a named currency
RuleDetail
CurrenciesA number is ExyliaLib's default currency; currency names another one. The economy is ExyliaLib's, over ExyliaEconomy, Vault or PlayerPoints.
Not for saleSomething 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 typoA price that cannot be read — zero, negative, text — is no price: the entry is not for sale rather than free.
One at a timeOne 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

config.yml
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
KeyDefaultWhat it does
enabledtrueOff, the crate says so instead of opening.
start-keys0Keys a player is given the first time they are seen.
duplicate-refund1Keys handed back for something already owned.
rewardUNLOCKUNLOCK, ITEM or BOTH — see above.
blocks[]The blocks that open the crate. Bind them in game, not by hand.
max-at-once4How many crates one player may open in one go. The screen fits seven. exyliaarmortrims.crate.multi.<n> raises it per rank.
spin-frames34How many faces the first reel runs through before it stops. Capped at 200, about eleven seconds.
stagger-seconds2.0How long after one reel stops the next one does. 0 stops them together.
openingINVENTORYINVENTORY: the reels fall down menus/crate_open.yml. SPATIAL: the opening plays in the world — see below.
key-itemaboveHow 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 clear

They 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.

Permissions and unlocks are two separate ways in

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