Levels and upgrades
How minion levels work, how range and height shape the work area, the stat limits per type and how upgrade items are applied.
Minions get better in two ways. Players buy levels, which raise every stat at once for a price, and they apply upgrade items, which push one stat further on top of the level. With the shipped settings the two come one after the other: levels first, then upgrades once the minion is at its highest level. Both stop at the limits you set for each type, so you stay in control of how strong a minion can get.
Levels
Every type file has a levels section. Each level sets the minion's stats while it is at that level, and what it costs to reach the next one.
| Key | What it sets |
|---|---|
range | Blocks from the minion to the edge of its work area |
delay | Seconds between actions. Never below 1 |
storage | Storage slots |
fuel-efficiency | How much less fuel each action uses, in percent from 0 to 100 |
cost | What the next level costs, using currency ids from upgrades.yml |
description | Lines shown on the Level button while this is the next level |
requirements | What a player needs before buying this level, see Level requirements |
The chunk loader and chunk collector use chunk-radius instead of range. See Chunk loader and Chunk collector.
The shipped miner looks like this:
| Level | range | delay | storage | fuel-efficiency | cost to reach the next level |
|---|---|---|---|---|---|
| 1 | 1 (3x3) | 10 | 9 | 0 | money: 10000 |
| 2 | 2 (5x5) | 8 | 18 | 5 | money: 25000 |
| 3 | 3 (7x7) | 6 | 27 | 10 | money: 60000 |
| 4 | 3 (7x7) | 4 | 36 | 15 | none, highest level |
levels:
1:
range: 1
delay: 10
storage: 9
fuel-efficiency: 0
cost:
money: 10000
2:
range: 2
delay: 8
storage: 18
fuel-efficiency: 5
cost:
money: 25000- The highest level number in the file is the highest level a minion can reach. Add a
5:block to add a fifth level. - A key left out of a level carries over from the level before it.
- A cost can list more than one currency, for example
money: 50000anddiamonds: 10together. The player needs all of them.
A level with no cost makes the next level free. Only the highest level should be without a cost. When a lower level has none, the console warns about it each time the type file loads.
Buying a level
Open the minion menu, click Upgrades, then click the Level button. The player needs upgrade access on that minion. A purchase is refused when:
| Refused when | Message key |
|---|---|
| The minion is already at its highest level | upgrade.max-level |
A currency in the cost does not exist in upgrades.yml, or cannot work right now (for example Vault has no economy) | upgrade.currency-missing |
| A requirement of the next level is not met | upgrade.requirement-missing |
| The player does not have enough of every currency | upgrade.cannot-afford |
| Taking the payment failed part way, in which case nothing is taken | upgrade.payment-failed |
Admins can set a level directly with /minion admin setlevel <level> while looking at a minion. It skips the cost and the requirements. See Admin tools.
What the next level changes
The Level button shows players what they get before they pay. Its lore lines come from gui.yml, under upgrades.items.level (and minion.items.upgrade-level for the hidden copy in the minion menu):
level:
lore:
- "<#b6f5b6>▸ <white>Level: <green>%current% <white>➜ <green>%next%"
- "%level_changes%"
- "<#b6f5b6>✪ <white>Cost: <green>%cost%"
- "%level_description%"
- "%requirements%"
- ""
- "<yellow>Click to upgrade."
change-lines:
area: "<#b6f5b6>▣ <white>Area: <green>%from% <white>➜ <green>%to%"
delay: "<#b6f5b6>⌚ <white>Delay: <green>%from%s <white>➜ <green>%to%s"
storage: "<#b6f5b6>▤ <white>Storage: <green>%from% <white>➜ <green>%to% slots"
fuel-efficiency: "<#b6f5b6>✹ <white>Fuel saving: <green>%from%% <white>➜ <green>%to%%"
chunk-radius: "<#b6f5b6>▦ <white>Chunk radius: <green>%from% <white>➜ <green>%to%"
connections: "<#b6f5b6>☍ <white>Connections: <green>%from% <white>➜ <green>%to%"
cost-line: "<#b6f5b6> • <white>%entry%"
requirement-met: "<green>✔ <white>%requirement%"
requirement-missing: "<red>✘ <white>%requirement%"A lore line that is only one of these placeholders turns into one line per entry, or disappears when there is nothing to show:
| Placeholder | Becomes |
|---|---|
%level_changes% | One change-lines line for each stat the next level changes. Stats that stay the same are left out, so a type only shows what it actually gains |
%cost_items% | One cost-line per part of the cost, such as 10,000 coins and 5 Diamonds on their own lines. Use it instead of %cost% for costs with several currencies |
%level_description% | The next level's description lines from the type file |
%requirements% | One requirement-met or requirement-missing line for each of the next level's requirements |
The single values are there too, for lore written your own way: %range_current%, %range_next%, %area_current%, %area_next%, %delay_current%, %delay_next%, %storage_current%, %storage_next%, %fuel_efficiency_current%, %fuel_efficiency_next%, %chunk_radius_current%, %chunk_radius_next%, %connections_current% and %connections_next%. They show the level's own values, before upgrades. A stat the type does not have shows None, and the next value shows Max at the highest level.
An unchanged level button from an older version is replaced with this lore when the plugin updates gui.yml. Lore you changed yourself is kept.
Level requirements
A level can ask for more than money. Requirements belong to the level being bought, so this makes level 3 need a rank and a player level:
levels:
3:
range: 3
description:
- "<gray>Mines a seven by seven area."
requirements:
permissions:
- "rank.vip"
placeholders:
- "%player_level% >= 10"
display:
- "VIP rank"
- "Level 10"| Key | What it does |
|---|---|
permissions | Permissions the player must have |
placeholders | PlaceholderAPI conditions the player must meet, written as a placeholder, a comparison and a value. The comparisons are >=, <=, >, <, == and !=. Numbers are compared as numbers, anything else as text without caring about capitals |
display | The text shown for each requirement on the Level button and in the refusal message, in order, permissions first. A requirement with no text here shows its permission or condition as written |
- Requirements are checked before any payment, so a refused purchase never takes anything. A
LEVELupgrade item checks the requirements of every level it would give, too. - Placeholder conditions need PlaceholderAPI. Without it they count as not met, and the console says why once.
- Both sides of a condition are filled in, so
%player_level% >= %some_other_placeholder%works. - Every shipped level from level 2 up has empty
descriptionandrequirementskeys ready to fill in.
Currencies (VAULT, ITEM and COMMAND) are set up in upgrades.yml. The shipped file has money (Vault), tokens (a command based currency) and diamonds (an item currency). See Fuel and upgrades files.
Range and height
Range is counted in blocks out from the minion on every side. The menu shows it as the size of the square:
range | Work area from above |
|---|---|
| 1 | 3x3 |
| 2 | 5x5 |
| 3 | 7x7 |
| 4 | 9x9 |
| 5 | 11x11 |
height in the type file sets how many blocks up and down from the minion the area reaches. height: 1 covers the minion's own layer plus one layer above and one below. It is the same at every level and no upgrade changes it.
| Shipped type | height |
|---|---|
| Miner, farmer | 1 |
| Hunter, fisherman | 2 |
| Lumberjack | 6 |
The block the minion stands in and the block under it are never part of its work area.
Stat limits per type
Three keys at the top of a type file cap a stat no matter what the level or upgrades say.
| Key | What it caps | Shipped miner |
|---|---|---|
min-delay | The shortest delay, in seconds. Never below 1 | 2 |
max-range | The largest range, in blocks | 5 |
max-storage | The largest storage, in slots | 90 |
Fuel efficiency is always capped at 100. A max-range or max-storage of 0 also hides that part of the minion menu, which is how the chunk loader has no storage.
The shipped caps sit above the level 4 values on purpose, so upgrades still have room once the levels are done. Every shipped type with storage has max-storage: 90 against 36 slots at level 4, and the fisherman's min-delay is 2.
Levels first, then upgrades
upgrades:
require-max-level: trueWith require-max-level: true, the shipped value, every upgrade item except a LEVEL upgrade is refused with upgrade.needs-max-level until the minion reaches the highest level in its type file. Until then the Speed, Storage size, Range, Fuel efficiency and Connections buttons in the minion menu show their locked-lore from gui.yml, which says which level unlocks them.
Set it to false to allow upgrades at any level, as in 1.0.0-1.
Upgrade items
Upgrade items live under upgrades in upgrades.yml. Each entry is one item with one effect.
upgrades:
speed:
kind: SPEED
amount: 2
types: all
max-per-minion: 2
max-per-kind: 2
minimum-delay: 2
item:
material: SUGAR
name: "<aqua>Minion Speed Upgrade"kind | What amount does |
|---|---|
STORAGE | Adds that many storage slots |
SPEED | Removes that many seconds from the delay |
RANGE | Adds that many blocks of range |
FUEL_EFFICIENCY | Makes each action use that many percent less fuel |
LEVEL | Raises the level by that many, up to the highest level |
These five work on every type, except SPEED on the chunk loader. Seven more kinds are for one profession or one purpose: FIRE_ASPECT, DAMAGE and LOOTING for hunters, SILK_TOUCH for miners and farmers, RELIABILITY for every type, CONNECTIONS for chunk collectors and REPLANT for lumberjacks. See Upgrade kinds for all twelve.
| Key | What it does |
|---|---|
types | all, or a list of type ids that may use it |
max-per-minion | How many times this entry can go on one minion. 0 means no limit |
max-per-kind | How many upgrades of this kind a minion may hold in total, counting every entry of that kind. 0 means no limit |
minimum-delay | SPEED only. The shortest delay this upgrade may bring a minion down to |
fuel-increase | How many percent more fuel each action uses for each time this entry is applied. Left out, fuel.upgrade-increase in config.yml is used, 10 by default. See Fuel |
A type file can also narrow things down with allowed-upgrades, either all or a list of upgrade ids from upgrades.yml.
The shipped file has three storage upgrades (storage-1 adds 9, storage-2 adds 18, storage-3 adds 27, three in total per minion), speed (minus 2 seconds, twice), range (plus 1), fuel-efficiency (5 percent less fuel, twice), and the profession upgrades fire-aspect, sharpness, looting, silk-touch, reliability, connections and auto-replant. The full table is on Upgrade kinds. There is no LEVEL upgrade in the shipped file, add one if you want it.
Upgrade effects add on top of the level and stay when the minion levels up. They still stop at the type's stat limits: a storage upgrade that would go past max-storage fills up to the limit and no further.
Every applied upgrade other than a LEVEL upgrade also makes each action use more fuel, and adds to the chance of a breakdown unless it is a RELIABILITY upgrade. With the shipped config.yml each one adds 10 percent fuel use per action (fuel.upgrade-increase). Each one that is not a RELIABILITY upgrade also adds 0.02 percent breakdown chance per action (breakdowns.chance-per-upgrade) and 500 money on the repair price (breakdowns.repair-cost-per-upgrade). See Fuel and Breakdowns and repairs.
Applying an upgrade
There are three ways, and each uses up one upgrade item.
- Right click the minion while holding the upgrade item. Any kind works this way.
- Click it in the upgrades menu. Open the minion menu, click Upgrades, then click or shift click the upgrade item in your own inventory. Any kind works this way, and the menu shows the new values at once. See Minion menu.
- Drop it on the matching button, when the server shows those buttons. The Speed, Storage size, Range, Fuel efficiency and Connections buttons of the minion menu ship hidden. A
LEVELupgrade goes on the Level button of the upgrades menu. The profession kinds have no button.
Players need upgrade access on the minion. Admins give upgrade items with /minion upgrade <player> <upgrade> [amount], and players can buy them if you add them to the shop.
Why an upgrade is refused
The checks run in this order, and the item is kept when one fails.
| Refused when | Message key |
|---|---|
The kind does not fit the type (see Upgrade kinds), the upgrade's types leaves this type out, the type's allowed-upgrades leaves the upgrade out, or a REPLANT upgrade is used on a lumberjack that is not set to replant: UPGRADE in TREE mode | upgrade.wrong-type |
upgrades.require-max-level is on, the upgrade is not a LEVEL upgrade and the minion is below its highest level | upgrade.needs-max-level |
This entry is already on the minion max-per-minion times | upgrade.entry-max |
The minion already holds max-per-kind upgrades of this kind | upgrade.kind-max |
The stat is already at its limit: storage at max-storage, range at max-range, delay at its floor, fuel efficiency at 100, level at the highest level, connections at max-connections, looting at upgrades.max-looting, reliability at 100, or silk touch or replant already applied | upgrade.at-limit |
The delay floor for SPEED is the highest of min-delay in the type file, the minimum-delay of any speed upgrade on the minion, and 1.
Upgrade counts on the minion item
The minion item's lore in the type file can show what is on the minion, so players can see it before placing it or trading it.
| Placeholder | Shows |
|---|---|
%level% | The level |
%fuel% | Fuel actions stored |
%upgrades% | Every upgrade item applied, of every kind |
%storage_upgrades% | Storage upgrades applied |
%speed_upgrades% | Speed upgrades applied |
%range_upgrades% | Range upgrades applied |
%fuel_upgrades% | Fuel efficiency upgrades applied |
item:
lore:
- "<#b6f5b6>✦ <white>Level: <green>%level%"
- "<#b6f5b6>❖ <white>Upgrades: <green>%upgrades%"The shipped type files use this same Upgrades: line with %upgrades%, so it counts every upgrade on the minion. Swap it for one of the kinds, such as %storage_upgrades%, if you only want to show that kind.
Minion menu
Every button in the minion menu, the upgrades, storage, saplings, repair and view menus, who can use each one and which minions hide which buttons.
Upgrade kinds
Every upgrade kind, which minion types take it, what its amount does, where it stops, and the upgrade items upgrades.yml ships with.