Sword
On this page(19)
Every player has one sword, locked in their hotbar. Its tier sets a damage multiplier and extra swings per second, and players buy tiers in order. On the zone mobs the sword swings on its own, so a better tier and more levels mean faster kills. The sword also carries the enchants.
| Files | modules/sword/config.yml, modules/sword/tiers.yml, modules/sword/guis/ (tiers.yml, enchants.yml, enchants-2.yml, upgrade.yml), modules/sword/lang/messages_en.yml |
| Player command | /sword |
| Admin commands | /dungeons admin sword ... |
| Switch | enabled: (first key of modules/sword/config.yml) + /dungeons reload |
Switching it off removes /sword, and the online players lose their sword item. An offline player keeps theirs, rebuilt when the module is back. The tier every player reached stays stored. With the module off at startup, a sword already in an inventory stays a plain item, without lock or effect. Once the module is back, each player's sword is rebuilt when they arrive, and any other copy is removed.
The enchant files, presets and enchant menus belong to the sword module, but they have their own section: How Enchants Work.
How it works
The item
- The first sword. A player without a stored tier gets the sword of the lowest tier on their first join. It arrives
give-delay-ticksafter the join, so plugins that restore or clear the inventory run first. - Its slot. It sits in the hotbar
slot. An item of the player already there is moved to a free slot, never destroyed. With a full inventory the sword waits, and the player is told. - It is locked. It cannot be dropped, moved, swapped to the other hand, equipped or moved by pick block. It cannot go into a container, an item frame, an allay, an armor stand or a decorated pot.
- It is kept. It is not lost on death (it comes back one tick after the respawn), and it never breaks.
- One per player. A copy anywhere else in the inventory is removed whenever the sword is placed.
- It stays up to date. Its name and lore come from
item:. They are rebuilt whenever the tier, the level or an enchant level changes.
A sword that waits for room comes back on the next join, respawn, level change, upgrade or /dungeons reload. With enchants.open-on-right-click: true, a right click with the sword opens the enchants menu, like /sword enchants.
Tiers
The tiers live in modules/sword/tiers.yml. Players buy them in order, from the lowest number up. Every player starts at the lowest tier, whose cost is never charged.
/sword upgradebuys the next tier when your balance covers it, otherwise it shows how much you lack./sword maxbuys, one after another, every next tier your balance covers.- A player whose tier you remove keeps the highest tier below it.
Each tier bought is its own purchase: one COST change with the cause sword:upgrade:<tier>. It also writes one SWORD_UPGRADE row to the transaction log (currency sword:tier, amount 1, final = the tier). /sword max rebuilds the item once, after the last tier.
The setting sword.auto-max (tab Automation of /settings, off by default) buys every next tier the player can afford, like /sword max. It needs /sword max enabled and its permission. The Luck effect free-sword-tier can make a tier free.
Damage and swings
On the zone mobs the sword hits on its own (see Fighting and Rarities):
damage per swing = combat.base-damage x tier damage-multiplier x damage booster total
swings per second = (combat.swings-per-second + tier swings-per-second
+ combat.swings-per-level x levels gained) x swings booster totalThe swings stop at combat.max-swings-per-second. "Levels gained" are the levels of the combat.leveling track above its starting-level. The item and /sword show that track's level. See Boosters for the booster totals.
Example. A tier 2 sword (damage-multiplier: 2.75, swings-per-second: 0.5) with 100 levels gained, no boosters:
| Math | Result | |
|---|---|---|
| Damage per swing | 1.0 x 2.75 | 2.75 |
| Swings per second | 2.0 + 0.5 + 0.01 x 100 | 3.5 |
| Damage per second | 2.75 x 3.5 | 9.625 |
A stage 1 chicken of barn (116 health) then dies in about 12 seconds.
Vanilla hits. Outside the zone fight, the sword also works as a normal weapon on mobs (not on players or armor stands). With apply-to-vanilla-damage: true such a hit deals the vanilla damage times the tier's damage-multiplier. Only the item of the player's current tier counts. The sword gives no currency outside the zones.
The tiers menu
/sword opens modules/sword/guis/tiers.yml (named by commands.main.menu). It is managed by SnLib, and every tile under items: is yours.
C###i###P
#.abcde.#
#.fghij.#
##U#X#MA#| Letter | Tile |
|---|---|
i | Your sword: tier, damage, swings and the next tier (info, or info-done at the last tier) |
a to j | Tiers 1 to 10. A tier number the file does not have shows nothing. |
U | Upgrade: /sword upgrade |
M | Best Sword: /sword max |
X | Close |
P | The Tool Perks menu ([perks] open), while the perks module is on |
A | The Sword Attributes menu ([attributes] open), while the attributes module is on |
C | The Sword Crystals menu ([crystals] open), while the crystals module is on |
# | Filler (also in place of P, A and C while their module is off) |
A tier is four items on its cells, one per state of %sndungeons_sword_tier_<n>_state%:
| State | Meaning | Click |
|---|---|---|
equipped | The tier of your sword. It glows. | none |
owned | A tier below it. | none |
next | The next tier to buy. Shows its price. | Buys it like /sword upgrade |
locked | Any tier after that one. | A "no" sound |
More than 10 tiers: give each one its own letter and items.
| Tag | What it does | Follows |
|---|---|---|
[sword-menu] upgrade | Buys the next tier like /sword upgrade | commands.upgrade |
[sword-menu] max | Buys every tier the balance covers like /sword max | commands.max |
[sword-menu] open | Opens this menu | the /sword permission |
Every [sword-menu] tag also needs the permission of /sword. With commands.main.menu: '', /sword answers in chat instead. It shows your tier, damage multiplier and level, and the price of the next tier. It also shows your swings per second and damage per swing, both with boosters. See Menus and Action Tags.
Configuration
modules/sword/config.yml is managed: new keys merge in on boot and /dungeons reload reads it again.
General
| Key | Default | What it does |
|---|---|---|
enabled | true | The module switch. |
display-name | '&bSword' | The module's name in /dungeons admin modules. |
apply-to-vanilla-damage | false | true: a vanilla melee hit on a mob deals the vanilla damage times the tier's damage-multiplier. false: the vanilla damage. |
multiplier-decimals | 2 | Decimals shown for a multiplier and the swings per second, 0 to 6. Trailing zeros are dropped. {damage} follows currencies.number-format instead. |
slot | 0 | The hotbar slot of the sword, 0 to 8 (0 = the first one). |
give-delay-ticks | 1 | Ticks after a join before the sword is given or put back, 1 to 1200. |
item-flags | ['HIDE_ATTRIBUTES', 'HIDE_UNBREAKABLE'] | Tooltip flags. HIDE_ATTRIBUTES hides the vanilla attack damage, HIDE_UNBREAKABLE the "Unbreakable" line. Keep them quoted. |
The item
| Key | Default | What it does |
|---|---|---|
item.name | '{tier_name}' | The item name. |
item.lore | see the default file | The lore lines. |
item.enchant-line | '&8| {enchant} &f{level}' | One enchant of {enchants}: {enchant} its display-name, {level} its level, {max_level} its max-level. |
item.enchant-line-prestige | '&8| {enchant} &f{level} &e{prestige}{prestige_symbol}' | One enchant with prestige stars. It adds {prestige}, {max_prestige}, {stars} (the symbol once per star) and {prestige_symbol}. '' = always enchant-line. |
item.empty-enchants | '&8| &7None' | The {enchants} line without enchants. '' drops the line. |
max-level-label | '&c&lMAX' | Shown instead of the level of a maxed enchant, everywhere a level shows. '' = always the number. |
prestige-symbol | '★' | The symbol of a prestige star, in the lore, the menus and the placeholders. |
item.name and item.lore take these tokens, plus any PlaceholderAPI placeholder:
| Token | Value |
|---|---|
{tier_name}, {tier} | The tier's name and number |
{multiplier} | The tier's damage-multiplier |
{level} | The level of combat.leveling |
{damage} | combat.base-damage x the tier's damage-multiplier: one swing before boosters |
{swings} | The swings per second before boosters (/sword shows both with boosters) |
{enchant_count} | The enchants above level 0 |
{enchants} | A whole lore line holding it becomes one line per enchant above level 0, in the order of the enchants menu |
Lines of other modules. The shipped lore shows the sword perk ('%sndungeons_perk_display%') and the crystals. The crystals use '%sndungeons_crystals_header%' and one '%sndungeons_crystal_<n>_line%' per crystal slot. To show the sword attribute, add a line such as '&7Attribute: &a%sndungeons_attribute_level%'. The sword is rebuilt when the perk or the attribute level changes.
A lore line whose placeholders show nothing, or stay as written (that module is off, or PlaceholderAPI is missing), is left out. A line written blank ('') stays.
A lore is a list, and lists are never merged into an installed file. Your item.lore may have none of the perk, crystal or attribute lines. Then the module logs one console line on enable that names them. Copy them from the default file below.
Combat settings
The combat: block drives the zone mob fight (see Fighting and Rarities). /dungeons reload applies every change.
| Key | Default | What it does |
|---|---|---|
combat.base-damage | 1.0 | Each swing takes this x the tier's damage-multiplier from the mob's health. More than 0. |
combat.swings-per-second | 2.0 | The swings of every sword before its tier and level, more than 0. |
combat.max-swings-per-second | 20 | The most swings per second, 1 to 20 (20 = one swing every tick). |
combat.leveling | level | The leveling track whose levels add swings, a file of levelings/. '' = none. An unknown track adds nothing, with a warning. Its level is also the {level} of the item and of /sword. |
combat.swings-per-level | 0.01 | Swings per second added by each level gained in that track, 0 or more. With 0.01, 100 levels add one swing per second. |
combat.hit-distance | 6 | The farthest a player may stand from their target, 1 to 32 blocks. An attack from farther picks nothing, and walking away farther stops the hits. The game itself sends an attack from about 3 blocks. |
combat.stop-on-unequip | true | true: the hits stop as soon as you hold another item or an empty hand. false: a fight you started goes on while you hold anything, with your sword's damage. Starting a fight still needs the sword in hand. |
Amounts keep 15 significant digits: a swing below the 15th digit of a mob's health takes nothing. Keep base-damage x damage-multiplier within 15 digits of your stage healths.
Enchant limits
The enchants: block bounds the enchant effects of one player. Each key is explained in the enchant section:
| Key | Default | Page |
|---|---|---|
enchants.open-on-right-click | true | Menu Tiles |
enchants.max-sequences | 8 | Limits |
enchants.max-actions-per-tick | 200 | Limits |
enchants.max-particles-per-tick | 300 | Limits |
enchants.max-entities | 32 | Limits |
enchants.max-entities-per-tick | 8 | Limits |
enchants.max-npcs | 6 | Limits |
enchants.aim-height | 0.5 | Limits |
enchants.upgrade-amounts | [1, 10, 50, 100, 250, 500, 1000] | Menu Tiles |
enchants.upgrade-click-grace-ticks | 10 | Menu Tiles |
enchants.prestige.* | max-stars: 10, cost-multiplier: 3.0, power-per-star: 0.04, free | Pricing and Prestige |
Command settings
| Key | Default | What it does |
|---|---|---|
commands.main.command | sword | The name of /sword. '' = no /sword at all (the swords and the API keep working). |
commands.main.aliases | [] | Other names. |
commands.main.permission | '' | The permission to use /sword at all. '' = none. |
commands.main.menu | tiers | The menu /sword opens: a file of modules/sword/guis/ without .yml. '' = the chat status. |
commands.<sub>.enable | true | false: the subcommand does not exist. It is not tab-completed or listed in the help, and typing it answers "unknown subcommand". |
commands.<sub>.aliases | [] | Other names of the subcommand. |
commands.<sub>.permission | '' | The permission of the subcommand. '' = none. |
<sub> is upgrade, max or enchants. The menu's Upgrade and Best Sword buttons follow upgrade and max. The right click with the sword and every click of the enchants menus follow enchants.
When another plugin already has the name or an alias of /sword, SnDungeons takes it, and that plugin answers as /<plugin>:<name>. A server, vanilla or Brigadier command, or a root of another SnLib plugin with command priority, is never taken. Then /sword answers only as /sndungeons:<name>.
tiers.yml
modules/sword/tiers.yml is yours. The plugin creates it once, when it does not exist as the module enables, and never rewrites or merges it. A tier you delete stays deleted, and /dungeons reload reads the file again. An older install may still have a tiers: section in config.yml. It is copied into the new file once, with one console line, then ignored.
Each root key is a tier number: a whole number of 1 or more, quoted. Numbers need not be consecutive, and hundreds of tiers are fine.
| Key | Default | What it does |
|---|---|---|
name | the key | The item name, color codes allowed. |
material | WOODEN_SWORD | A sword: WOODEN_SWORD, STONE_SWORD, IRON_SWORD, GOLDEN_SWORD, DIAMOND_SWORD or NETHERITE_SWORD. Anything else reads WOODEN_SWORD. |
damage-multiplier | 1.0 | More than 0. |
swings-per-second | 0 | 0 or more, added to combat.swings-per-second while this is the player's tier. The total stops at combat.max-swings-per-second. |
cost.currency | A currency id of currencies/. | |
cost.amount | 0 or more. 150K and 2e5 work. A missing cost is free. | |
custom-model-data | none | A whole number for a resource pack model. |
item-model | none | The item model of 1.21.4+ resource packs, a namespaced key ('myserver:stone_blade'; no namespace = minecraft:). |
A broken value is ignored with a warning. A file without one readable tier keeps the module from enabling, with a console error.
modules/sword/tiers.yml (a third tier added)
'3':
name: '&fIron Sword'
material: IRON_SWORD
damage-multiplier: 7.5 # each swing takes 7.5 x base-damage
swings-per-second: 1.0 # added to combat.swings-per-second
cost:
currency: money
amount: '25M' # suffixes of currencies.number-format work
custom-model-data: 1003 # optional resource pack modelDefault modules/sword/tiers.yml
# The tiers of the sword, bought in order from the lowest number up; every
# player starts with the lowest one, whose cost is never charged. Keys are
# whole numbers of 1 or more, quoted; they need not be consecutive (hundreds
# of tiers are fine). Per tier:
# name: the item name (color codes allowed); missing = the key.
# material: a sword (WOODEN_SWORD, STONE_SWORD, IRON_SWORD, GOLDEN_SWORD,
# DIAMOND_SWORD or NETHERITE_SWORD); missing or not a sword = WOODEN_SWORD.
# damage-multiplier: more than 0; missing = 1.0.
# swings-per-second: 0 or more, added to combat.swings-per-second of
# config.yml while this is the player's tier (the total stops at
# combat.max-swings-per-second); missing = 0.
# cost: currency (a currency id) and amount (0 or more, 150K and 2e5 work);
# missing = free.
# custom-model-data: a whole number for a resource pack model; missing =
# none.
# item-model: the item model of 1.21.4+ resource packs, a namespaced key
# ('myserver:stone_blade'; no namespace = minecraft:); missing = none.
# A broken value is ignored with a warning. Deleting a tier removes it: a
# player whose tier was removed keeps the highest tier below it. This file is
# yours: the plugin creates it once and never rewrites it; /dungeons reload
# reads it again.
'1':
name: '&7Wooden Sword'
material: WOODEN_SWORD
damage-multiplier: 1.0
swings-per-second: 0
cost:
currency: money
amount: 0
'2':
name: '&7Stone Sword'
material: STONE_SWORD
damage-multiplier: 2.75
swings-per-second: 0.5
cost:
currency: money
amount: 150000
# custom-model-data: 1002
# item-model: 'myserver:stone_blade'Commands
Player commands
| Command | Default permission | Description |
|---|---|---|
/sword | none | Opens the sword tiers menu. |
/sword upgrade | none | Buys the next sword tier when your balance covers it. |
/sword max | none | Buys every next tier your balance covers, one after another. |
/sword enchants | none | Opens the enchants menu. |
/sword help | none | Lists the subcommands you can use. |
Admin commands
The admin group works on the enchants. See Testing Enchants for how to use them.
| Command | Permission | Description |
|---|---|---|
/dungeons admin sword enchant <player> <enchant> <levels> | sndungeons.admin.sword.enchant | Gives sword enchant levels. |
/dungeons admin sword testenchant <player> <enchant> [level] | sndungeons.admin.sword.testenchant | The next swing procs only that enchant. |
/dungeons admin sword max <player> [enchant] | sndungeons.admin.sword.max | Sets every enchant (or one) to its max-level, free. |
/dungeons admin sword reset <player> [enchant] | sndungeons.admin.sword.reset | Sets every enchant (or one) to level 0. |
/dungeons admin sword handrotation <yaw> <pitch> <roll> | sndungeons.admin.sword.handrotation | Turns the model of your own shown second hand until a reload. |
/dungeons admin sword momentum <player> <enchant|all> [value|max|clear|+N|-N] | sndungeons.admin.sword.momentum | Shows, sets, adds to, maxes or clears the momentum of an online player. |
/dungeons admin sword cooldown <player> <enchant|all> [reset|<seconds>] | sndungeons.admin.sword.cooldown | Shows, resets or sets the enchant cooldowns of an online player. |
/dungeons admin sword prestige <player> <enchant> <stars> | sndungeons.admin.sword.prestige | Sets the prestige stars of an online player's enchant. |
There is no admin command to set a tier. See Commands and Permissions.
Placeholders
The full list is in Placeholders.
| Placeholder | Value |
|---|---|
%sndungeons_sword_tier%, _tier_name | Your sword tier and its name |
%sndungeons_sword_multiplier%, _damage, _swings | Its multiplier, damage and swings, boosted like /sword |
%sndungeons_sword_level% | The level of combat.leveling |
%sndungeons_sword_next_tier%, _next_name, _next_cost, _next_currency | The next tier |
%sndungeons_sword_done% | true once you own the last tier |
%sndungeons_sword_tier_<n>_state% | owned, equipped, next, locked or none |
%sndungeons_sword_tier_<n>_name%, _multiplier, _damage, _material, _cost, _currency | One tier |
Other plugins read tiers and buy them through the public API. See Developer API.
Tips
- Balance tiers against your stage healths: compare
/sword(damage per swing and swings per second) with the next stage'shealth. /dungeons admin inspect player <player>shows the swing damage and swings of a player with each factor.- Give
swings-per-secondto a few tiers only: swings also come from levels and boosters, and the cap is 20.
Default modules/sword/config.yml
enabled: true
# ============================================================
# SnDungeons - sword module
# Managed by SnLib: new keys are auto-merged on boot; your values and
# comments are preserved. Re-read on /dungeons reload.
# ============================================================
# Switch of the module (the key above): false turns the sword off on
# /dungeons reload; /sword disappears, the online players lose their sword
# item (an offline player keeps theirs, rebuilt when the module is back) and
# the tier every player reached stays stored. Off at startup, the swords
# already in inventories stay as plain items until the module is back.
# The tiers (name, material, damage, swings, cost, model) live in tiers.yml
# of this folder; a tiers: section left here from an older version is read
# once to create tiers.yml, then ignored.
# Name of the module in /dungeons admin modules (color codes allowed).
display-name: '&bSword'
# true = a hit on a mob with the sword deals the vanilla damage times the
# damage-multiplier of the player's tier; false = the vanilla damage.
apply-to-vanilla-damage: false
# Decimals shown for a multiplier and for the swings per second (/sword, the
# {swings} of the sword item, %sndungeons_sword_swings%; 0 to 6); trailing
# zeros are dropped. {damage} follows currencies.number-format of config.yml.
multiplier-decimals: 2
# Hotbar slot of the sword (0 to 8, 0 = the first one). An item in that slot is
# moved to a free slot of the inventory; with a full inventory the sword waits
# for the next join, respawn, level change, upgrade or /dungeons reload.
slot: 0
# Ticks after a join before the sword is given or put back in its slot (1 to
# 1200; 20 = one second).
give-delay-ticks: 1
# Tooltip flags of the sword item: HIDE_ATTRIBUTES hides the vanilla attack
# damage (the multiplier changes it), HIDE_UNBREAKABLE the "Unbreakable" line
# (the sword never breaks). Keep the flags quoted.
item-flags: ['HIDE_ATTRIBUTES', 'HIDE_UNBREAKABLE']
# The sword item. name and lore take {tier_name}, {tier}, {multiplier} (the
# tier's damage-multiplier), {level} (the level of combat.leveling),
# {damage} (combat.base-damage x the tier's damage-multiplier: one swing
# before boosters), {swings} (the swings per second of the sword before
# boosters; /sword shows both with boosters) and {enchant_count} (the
# enchants above level 0), plus PlaceholderAPI placeholders. A lore line
# holding {enchants} becomes one line per enchant above level 0 (in the
# order of the enchants menu), or empty-enchants when there is none ('' drops
# the line). The sword is rebuilt when its tier, its level or an enchant
# changes, and on /dungeons reload. The shipped lore also shows the sword
# perk of the perks module ('%sndungeons_perk_display%': the sword is rebuilt
# when the perk changes) and the crystals of the crystals module
# ('%sndungeons_crystals_header%' and one '%sndungeons_crystal_<n>_line%' per
# slot of the crystals config slots.unlocks: 1, 2, 3...). To show the sword
# attribute level of the attributes module, add a line such as
# '&7Attribute: &a%sndungeons_attribute_level%': the sword is rebuilt when
# that level changes. A line whose placeholders show nothing, or stay as
# written (that module is off, or PlaceholderAPI is missing), is left out of
# the lore; a line written blank ('') stays.
item:
name: '{tier_name}'
lore:
- '&7Damage: &c{damage}x'
- '&7Swings: &e{swings}/s'
- ''
- '&7Enchants &8({enchant_count})'
- '{enchants}'
- ''
- '%sndungeons_perk_display%'
- '%sndungeons_crystals_header%'
- '%sndungeons_crystal_1_line%'
- '%sndungeons_crystal_2_line%'
- '%sndungeons_crystal_3_line%'
- '%sndungeons_crystal_4_line%'
- '%sndungeons_crystal_5_line%'
# One enchant of {enchants}: {enchant} is its display-name, {level} its
# level (max-level-label at its max-level) and {max_level} its max-level.
enchant-line: '&8| {enchant} &f{level}'
# One enchant that has prestige stars (see enchants.prestige): the keys of
# enchant-line plus {prestige} (its stars), {max_prestige}, {stars} (the
# symbol once per star) and {prestige_symbol}. '' = always enchant-line.
# Shows 'Firebolt MAX 10★' for a maxed enchant with 10 stars.
enchant-line-prestige: '&8| {enchant} &f{level} &e{prestige}{prestige_symbol}'
empty-enchants: '&8| &7None'
# Shown instead of the level of an enchant at its max-level, everywhere a
# level shows: the sword lore, the enchants menus, the messages and the
# {level} of the texts of the enchant files; '' = always the number.
max-level-label: '&c&lMAX'
# The symbol of a prestige star: the lore, the menus and the placeholders.
prestige-symbol: '★'
# Zone mob combat. Attacking one of your zone mobs (left click) with your own
# sword in your main hand, standing inside the columns of that zone's mob area
# or up to mobs.leave-area-distance blocks out of them (in the zones config;
# the height does not count) and within hit-distance of it, makes it your
# target: the sword then hits it on its own, swings-per-second times per
# second, until it dies. Attacking another of your mobs moves the target
# there (the one before keeps the health it has left). Clicking faster adds no
# damage: it only picks the target. The hits stop when the mob dies, when you
# are farther than hit-distance from it or than mobs.leave-area-distance from
# the columns of the area, leave its world, change stage, hold another item
# (unless stop-on-unequip below is false), die or quit. /dungeons reload
# applies every change.
combat:
# Damage of one swing: each swing takes base-damage x the damage-multiplier
# of your tier from the mob's health. More than 0. Amounts keep 15
# significant digits: a swing below the 15th digit of a mob's health takes
# nothing.
base-damage: 1.0
# Swings per second of every sword before its tier and level (more than 0):
# each tier adds its own swings-per-second (tiers.yml), each level gained
# in the leveling track below adds swings-per-level, and the total stops at
# max-swings-per-second.
swings-per-second: 2.0
# Most swings per second, from 1 to 20 (20 = one swing every tick).
max-swings-per-second: 20
# Leveling track (a file of the levelings folder) whose level adds swings per
# second; '' = none. An unknown track adds nothing, with a warning. Its level
# is also the {level} of the sword item and of /sword.
leveling: level
# Swings per second added by each level gained in that track (the levels
# above its starting-level), 0 or more: with 0.01, 100 levels add one swing
# per second.
swings-per-level: 0.01
# Farthest a player may stand from their target, in blocks (1 to 32): an
# attack from farther picks nothing, and walking away farther stops the
# hits. The game itself only sends an attack from about 3 blocks away.
hit-distance: 6
# true = the hits stop as soon as you hold another item (or an empty hand);
# false = once you started hitting a mob with your sword, the hits go on
# while you hold anything else, with your sword's damage (starting a new
# fight still needs the sword in your hand).
stop-on-unequip: true
# Sword enchants (the files of modules/sword/enchants and presets): these
# limits keep the effects of one player bounded. /dungeons reload applies them.
enchants:
# true = a right click with your own sword in your main hand (in the air, or
# on a block that is not a door, chest, button...) opens the enchants menu,
# like /sword enchants. It follows the same switches as that subcommand.
open-on-right-click: true
# Most effect sequences of one player alive at once (1 to 64). A proc while
# a player is at this limit does not run.
max-sequences: 8
# Most actions the sequences of one player run in one tick (10 to 10000);
# the rest waits for the next tick.
max-actions-per-tick: 200
# Most particles sent to one player in one tick (0 to 5000); the points past
# it are not sent.
max-particles-per-tick: 300
# Most effect entities (mobs, displays and lightning bolts of the enchants)
# one player sees at once (1 to 256); one past it does not appear.
max-entities: 32
# Most effect entities that appear for one player in one tick (1 to 64).
max-entities-per-tick: 8
# The level buttons of the upgrade menu of an enchant (modules/sword/guis/
# upgrade.yml), in order: each buys exactly that many levels, or nothing
# when it passes the max-level or the balance does not cover it. Whole
# numbers from 1 to 10000; the menu shows as many as its 'a' cells.
upgrade-amounts: [1, 10, 50, 100, 250, 500, 1000]
# Ticks after the upgrade menu opens, and after each purchase answer, in
# which a purchase click of the enchants menus is ignored (0 to 40; 10 = half
# a second, a double click): the second click of a double click never buys
# by accident. 0 turns it off.
upgrade-click-grace-ticks: 10
# The most fake players (the npc action of an enchant) one player can have
# alive at once, 1 to 32. They also count in max-entities.
max-npcs: 6
# Where the effects that fly at a mob on their own aim (movement to-target,
# the second hand's dash): a share of the mob's height above its feet,
# 0 to 1; 0.5 = the middle of its body, so a rabbit and a warden are both
# hit in the middle. An enchant file picks its own point with {target_pos}
# (the feet), {target_center} or {target_top}.
aim-height: 0.5
# Enchant prestige: once an enchant is at its max-level, the Prestige
# button of the upgrade menu puts it back at level 0 with one star more.
# Every star makes each level cost more and the enchant proc more often.
# An enchant file overrides any of these keys with its own prestige:
# section (see enchants/example.yml).
prestige:
# The most stars of an enchant, 0 to 1000 (0 = no prestige).
max-stars: 10
# Each star multiplies the price of every level by this, 1 to 1000:
# with 3, an enchant with 2 stars costs 9 times its base price.
cost-multiplier: 3.0
# Each star adds this to the proc chance factor, 0 to 100:
# chance x (1 + power-per-star x stars); 0.04 x 5 stars = x1.2. Enchants
# can also read it as {prestige_power} (and the stars as {prestige}).
power-per-star: 0.04
# The price of a prestige itself: currency '' = free. Otherwise
# base x growth ^ (the stars the enchant has before it).
price:
currency: ''
base: 0
growth: 1.0
# The /sword command. A permission of '' means no permission is needed. A
# subcommand with enable: false does not exist: it is not tab-completed, not
# listed in the help, and typing it answers "unknown subcommand".
commands:
# /sword alone shows the sender's tier, their damage multiplier, their swings
# per second and the price of the next tier. If another plugin already has this name or an alias,
# SnDungeons takes it (command priority) and that plugin keeps answering as
# /<plugin>:<name>. A server, vanilla or Brigadier command, or a root of
# another SnLib plugin with command priority, is never taken: then this one
# answers only as /sndungeons:<name>. To leave a name to another plugin,
# pick another one.
main:
# Command name; '' = no /sword command at all (the swords and the API keep
# working).
command: sword
# Other names of the command.
aliases: []
# Permission needed to use the command at all.
permission: ''
# The menu /sword opens: a file of modules/sword/guis/ without .yml (its
# Upgrade and Best Sword buttons follow upgrade and max below). '' = no
# menu: /sword shows your tier, damage and the next price in chat.
menu: tiers
# /sword upgrade: buys the next tier when the balance covers its price. Every
# subcommand block below takes the same keys.
upgrade:
# false = this subcommand does not exist.
enable: true
# Other names of the subcommand.
aliases: []
# Permission needed.
permission: ''
# /sword max: buys, one after another, every next tier the balance covers.
max:
enable: true
aliases: []
permission: ''
# /sword enchants: opens the enchants menu; clicking an enchant opens its
# upgrade menu (buy +1, +10, ... or Max). The right click with the sword and
# every click of both menus follow this enable and permission too.
enchants:
enable: true
aliases: []
permission: ''