Content generated with AI — it may contain mistakes.

ExyliaMines/GuidesUpdated in v1.8.0

Add lucky rewards

Give any block of a mine a rare chance to pay a prize, with a title for the finder and an announcement.

Page 10 of 283 min read

Lucky rewards are rare prizes a mine hands out on top of whatever its blocks pay: a key, a stack of diamonds, a sum of money, a command. They belong to the mine, not to a material, so any block broken there may give one.

Before you start#

You need a mine with at least one block that gets broken, so the prize has something to ride on.

Steps#

Open the lucky rewards

Run /minesadmin, open your mine, pick Rewards and then Rewards ▸ Lucky rewards. ExyliaLib's loot editor opens.

Add a prize

Add a line: an item, money or a command. Name it the way a player should read it, because that name goes into the title and the announcement.

Set its chance

Give the line a percentage. It can go well below one: 0.05 is one block in two thousand.

Choose who hears about it

Set announcements.lucky in config.yml to OFF, NEARBY or SERVER, or leave the default NEARBY. See "Who hears about it" below.

Check that it works#

Temporarily set the chance to 100 and break a block in the mine. You get the prize, see the "LUCKY BLOCK" title and the announcement goes out. Set the real chance back afterwards.

How lucky rewards work#

The lucky rewards screen is ExyliaLib's loot editor, with the same three kinds of line as a loot table: an item, money, or a command. See Loot and effects for what each one is and how a command line chooses who runs it.

Each line is its own chance, a percentage that may go well below one: 0.05 is one block in two thousand. Every line is rolled on its own every time a block of the mine is broken through the mine — a composition block, a level, a degrade stage — so most breaks give nothing and, rarely, two prizes come up together.

What is applied to a prize#

WhatApplies?
FortuneOnly to the chance, through fortune.lucky-per-level in config.yml. Off by default; 0.1 makes every chance ×1.3 at Fortune III. The prize itself is never multiplied by Fortune.
BoostsYes: drops multiplies items and money multiplies money.
Boosters from other pluginsYes, with permission modifiers: for items, and for money in the default currency.
ExyliaMarketItem prizes are offered to the miner's autosell.
Auto-pickupYes, as the mine says, or always with exyliamines.autopickup.

Who hears about it#

For every prize, the finder sees the lucky.found title, and the lucky.announcement line goes to whom announcements.lucky in config.yml says:

ValueWho
OFFNobody.
NEARBYPlayers within announcements.radius blocks of the block, 64 by default. The default.
SERVEREveryone online.
plugins/ExyliaMines/lang/en/messages.yml
yaml
lucky:
  announcement: '[sound:ENTITY_PLAYER_LEVELUP|1.0|1.4]%prefix% {highlight}%player% {letters}found {accent}%reward% {letters}in {highlight}%mine_name%{letters}!'
  found:
    text: '{accent}&l✦ LUCKY BLOCK'
    subtitle: '{letters}%reward%'
    fade-in: 0.25
    stay: 1.5
    fade-out: 0.5
    time-style: auto
  secret-reward: a secret reward
  editor-title: '{primary}&lLUCKY REWARDS {letters_black}» {letters}%mine_name%'
  count: '{success}%count% reward(s)'

%reward% names the prize the way a player would:

Prize%reward%
An itemIts custom name, or the line's name, preceded by the amount when more than one: 3x Diamond.
MoneyThe line's name.
A commandsecret-reward, "a secret reward": a command is not something to read out in chat.

The announcement also takes %player%, %mine_name% and %mine_id%; the title takes %reward% and %mine_name%. Empty a line to turn it off.

Something missing on this page? Tell us on Discord