Sword Attributes
On this page(11)
Sword Attributes are a ladder of passive levels that follow one leveling track, rebirth by default. Each level lists its complete boosts, and a player gets the boosts of the highest level they unlocked. There are no points, purchases or clicks. You use attributes to make every rebirth feel stronger without extra systems to learn.
| Files | modules/attributes/config.yml, modules/attributes/levels.yml, modules/attributes/guis/menu.yml, modules/attributes/lang/messages_en.yml |
| Player command | /attributes (alias /attribute) |
| Admin commands | None: the level follows the leveling |
| Switch | enabled: (first key of modules/attributes/config.yml) + /dungeons reload |
How it works
- The leveling decides. Your attribute level is the highest level of
levels.ymlyou unlocked. A level unlocks once yourlevelingtrack reaches itsrequired. - It follows up and down. Reaching a rebirth raises it. An admin who lowers a player's rebirth lowers it too.
- No message. The level shows in
/attributes, in/boostsand on the sword, but reaching one sends nothing on purpose. - Nothing is stored. The level is worked out from the leveling, so turning the module off loses nothing.
Boosters
The player gets one additive booster per target of their level, with the id attribute-<target> and the name booster-name. It adds to the base of its target, together with perks, auras, totems and armors. Crystals multiply that total instead. See Boosters.
The boosters update when the player joins and when their level of the leveling changes. A reload that changed the config, levels.yml or the leveling updates them too. They all go when the module is switched off.
The sword
To show the level on the sword, add a line like this to item.lore of modules/sword/config.yml:
- '&7Attribute: &a%sndungeons_attribute_level%'Keep that line only while the module is on. The sword is rebuilt when the level changes. While the module is on, the /sword menu shows a Sword Attributes button (the anvil, cell A). See Sword.
Configuration
| Key | Default | What it does |
|---|---|---|
enabled | true | The module switch. Off: /attributes and every attribute booster go. |
display-name | '&aSword Attributes' | The module's name in /dungeons admin modules. |
leveling | rebirth | The leveling whose level unlocks the attribute levels (a file id of levelings/). One that is not loaded gives nobody a level, with one warning. |
booster-name | 'Attribute' | The name of the attribute boosters in /boosts (shown plain). |
menu.boost-line.unlocked | ' 	fffac- &f{target} &8▪ &f{value}%' | One line of {boosts} for an unlocked level. {target} is the target's display-name in boosters.yml, {value} the bonus in percent. |
menu.boost-line.locked | ' &#d66161- &f{target} &8▪ &f{value}%' | The same for a locked level. |
menu.no-boosts | ' &8- &7None' | The {boosts} of a level without boosts ('' = an empty line). |
commands.main.command | attributes | The command name. '' = no command. |
commands.main.aliases | [attribute] | Other names. An alias that names another SnDungeons command is ignored, with a warning. |
commands.main.permission | '' | Needed for the command, the sword menu button and the page buttons ('' = everyone). |
commands.main.menu | menu | The menu /attributes opens (a file of modules/attributes/guis/). '' = a chat line with your level. |
The levels file
modules/attributes/levels.yml is yours. It is created once with five example levels, then never merged or rewritten. Edit, add or delete levels freely, then run /dungeons reload.
| Key | Example | What it does |
|---|---|---|
levels.<key> | '1' | One section per level. The key only names it in warnings. |
levels.<key>.required | 1 | The leveling level that unlocks it (a whole number, 0 or more). |
levels.<key>.boosts.<target> | currency:money: 0.05 | Its complete boosts. 0.05 = +5%. |
A level's number is its place once the levels are sorted by required. Levels written out of order are sorted, with one warning.
Each level lists its COMPLETE boosts, never an increase over the level before. A player at level 3 gets exactly the boosts of level 3.
The targets are booster targets of boosters.yml: currency:<id>, damage, enchants (the proc chance) and swings (the swings per second). Any other active target of that file works too.
One console warning skips each of these:
- A target that does not exist or is switched off in
boosters.yml. - A value that is not a number, or is negative.
- A level without
required.
Shipped levels (track rebirth):
| Level | required | Money and Souls | Damage and Enchants | Swings |
|---|---|---|---|---|
| 1 | 1 | +5% | none | +1% |
| 2 | 2 | +10% | +5% | +2% |
| 3 | 3 | +15% | +10% | +3% |
| 4 | 5 | +25% | +20% | +5% |
| 5 | 10 | +30% | +25% | +6% |
Menu
modules/attributes/guis/menu.yml (id attributes:menu, 5 rows, title "Sword Attributes"):
| Letter | Tile |
|---|---|
L | One tile per level, in order: unlocked (lime), locked (red) or no-leveling. empty fills a cell past the last level. |
I | Your attribute level, the highest one, and what the next one needs. |
< > | Previous and next page when there are more levels than L cells (-none on the first and last page). |
# | Filler. |
no-leveling shows on every level while leveling: names a leveling that is not loaded. The level templates take {level}, {required}, {leveling}, {leveling_small} and {boosts}. A click on a level does nothing.
The actions are [attributes] open (from another menu) and [attributes] page next|previous. They need the permission of /attributes. See Menus and Action Tags.
Commands
| Command | Permission | Description |
|---|---|---|
/attributes (alias /attribute) | commands.main.permission ('') | Opens the Sword Attributes menu. |
The module has no admin group. To change a player's attribute level, change their level of the leveling track (see Levelings). Full list: Commands.
Placeholders
Full list: Placeholders.
| Placeholder | Description |
|---|---|
%sndungeons_attribute_level%, _max | Your attribute level (0 = none) and the highest one |
%sndungeons_attribute_next_required% | The leveling level the next one needs (empty at the last) |
%sndungeons_attribute_leveling% | The leveling the attributes follow |
%sndungeons_attribute_boost_<target>% | What your attributes add to a target, in percent (0 without one) |
%sndungeons_attributes_enabled% | true while the module runs |
Tips
- Space the
requiredvalues out as your rebirths get harder. The shipped jump from 5 to 10 keeps the last level a real goal. - Point
leveling:at any track, not onlyrebirth. A main level track makes attributes a steady drip instead. - Test with the admin commands of the leveling track: set your rebirth, then check
/boosts.
Default modules/attributes/config.yml
enabled: true
# ============================================================
# SnDungeons - attributes module (Sword Attributes)
# 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 attributes off on
# /dungeons reload; /attributes disappears and every attribute booster goes.
# Nothing is stored: a player's attribute level is the highest level of
# levels.yml (in this folder) whose required is at most their level of the
# leveling below. No points, no purchases, no clicks: it follows that
# leveling up and down on its own, without a message (it shows in
# /attributes, in /boosts and on the sword).
# Name of the module in /dungeons admin modules (color codes allowed).
display-name: '&aSword Attributes'
# The leveling whose level unlocks the attribute levels (the id of a file of
# levelings/). One that is not loaded gives nobody a level (one warning).
leveling: rebirth
# The name of the attribute boosters in /boosts (one additive booster per
# target, id attribute-<target>; color codes allowed, shown plain).
booster-name: 'Attribute'
# The {boosts} of a level in the /attributes menu: one line per boost of the
# level ({target}: the target's display-name of boosters.yml, {value}: the
# bonus in percent), unlocked and locked, or no-boosts for a level without
# one ('' = an empty line).
menu:
boost-line:
unlocked: ' 	fffac- &f{target} &8▪ &f{value}%'
locked: ' &#d66161- &f{target} &8▪ &f{value}%'
no-boosts: ' &8- &7None'
# The /attributes command. command: '' = no command at all. permission: ''
# = everyone (it also gates the button of the sword menu). menu: the file of
# guis/ in this folder that a player opens with /attributes ('' = a chat line
# with their level instead). An alias that is the name of another SnDungeons
# command is ignored with a warning.
commands:
main:
command: attributes
aliases:
- attribute
permission: ''
menu: menuDefault modules/attributes/levels.yml
# ============================================================
# SnDungeons - attributes module: the attribute levels (Sword Attributes)
# Yours: created once with these examples and never merged or rewritten
# by the plugin; edit, add or delete levels freely. Re-read on
# /dungeons reload.
# ============================================================
# One section per level, in order (the key only names it in warnings; a
# level's number is its place once sorted by required):
# required the level of the module's leveling (leveling: of config.yml,
# rebirth as shipped) that unlocks it, a whole number 0 or more.
# boosts its COMPLETE boosts, never an increment over the level before:
# a player gets the boosts of the highest level they unlocked.
# target: bonus, additive (0.05 = +5%), one booster per target
# named booster-name of config.yml. Targets: currency:<id> (a
# currency of boosters.yml), damage, enchants (the proc chance)
# and swings (the swings per second).
# A target that does not exist or is switched off in boosters.yml, a value
# that is not a number or is negative, or a level without a required is
# ignored with a console warning.
levels:
'1':
required: 1
boosts:
currency:money: 0.05
currency:souls: 0.05
swings: 0.01
'2':
required: 2
boosts:
currency:money: 0.10
currency:souls: 0.10
damage: 0.05
enchants: 0.05
swings: 0.02
'3':
required: 3
boosts:
currency:money: 0.15
currency:souls: 0.15
damage: 0.10
enchants: 0.10
swings: 0.03
'4':
required: 5
boosts:
currency:money: 0.25
currency:souls: 0.25
damage: 0.20
enchants: 0.20
swings: 0.05
'5':
required: 10
boosts:
currency:money: 0.30
currency:souls: 0.30
damage: 0.25
enchants: 0.25
swings: 0.06