Heroes
On this page(35)
Heroes are small mobs that fight the mobs of a player's zone, each by its role. Only their viewers see them: no real entity exists. Their kills pay the player but never count as progress. Use them as a collectible helper system with its own upgrades and store unlocks.
| Files | modules/heroes/config.yml, modules/heroes/heroes/ (one file per hero), modules/heroes/hero-enchants/ (one file per Hero Enchant), modules/heroes/guis/heroes.yml, modules/heroes/guis/enchants.yml |
| Player command | /heroes (aliases /hero, /heros) |
| Admin commands | /dungeons admin heroes ... |
| Switch | enabled: (first key of modules/heroes/config.yml) + /dungeons reload |
With the module off, /heroes goes away and every active hero falls asleep. Heroes, health, upgrades and Hero Enchants stay stored.
How it works
What a hero deals
Every hit of a hero is one swing of the player times the hero's stats.damage. The swing uses the sword's damage and the player's boosters, without an enchant.
- Its kills PAY the player, with their boosters.
- Its hits may roll the player's sword enchants at
combat.enchant-proc-factor(0.25) of their chance. - Each hit shows the damage hologram, like the player's own hit.
Heroes NEVER count for the player's progress. No swings, damage or kills in the stats, no aura, armor, totem or crystal progress, and no momentum. The grind summary still shows what they paid.
The money they pay counts in the player's earned:<currency> stat, so milestones and tops built on it move.
Roles
Each hero file sets one role:
| Role | How it fights |
|---|---|
ranged | Stands at its range and shoots. The hit lands when the projectile arrives. |
melee | Walks to the mob and hits beside it. |
radius | Shoots. The hit also reaches up to 8 of your mobs within role-params.radius of the target. |
buff | Shoots. Every role-params.buff.every-seconds, your other active heroes get more attack speed and damage. |
heal | Shoots. Every role-params.heal.every-seconds, your active hero with the least health heals amount. |
A shooting hero throws role-params.projectile.type: ARROW, TRIDENT, ITEM (with item: a material) or NONE (the hit lands at once).
A hero picks your nearest mob that no other hero of yours fights. When none is free, it picks any mob. It attacks on its own rhythm (attacks-per-second), never in bursts.
Health
| State | Meaning |
|---|---|
| Active | Fighting. It loses health.drain-per-minute (12) health per minute. At 0 it falls asleep and despawns. |
| Ready | Asleep with at least health.min-to-summon (25) health. It can be summoned. |
| Recovering | Asleep below min-to-summon. The menu shows the time until it is fully healed. |
| Locked | Not unlocked yet. |
An asleep hero heals health.heal-per-minute (2.4) per minute, more with its regeneration upgrade. It heals by the time passed, also while the player is offline.
Summoning
The player must stand on the mob floor (the mob area) of their zone. Heroes need the zones and sword modules on.
- Right click a hero in
/heroesto summon it. Right click it again to put it to sleep. - Summon All summons every Ready hero. A right click on Summon All puts every active hero to sleep.
- Up to
combat.max-active-heroes(10) fight at once.
Your heroes fall asleep, with the health they have, when you:
- leave the mob area, or move to another zone or stage;
- quit, die or change world.
Auto Heroes
With the heroes.auto-summon setting on (Automation tab of /settings), your Ready heroes come back by themselves. This runs every auto-summon.check-seconds (5) while you stand in your zone.
- It needs the permission
sndungeons.heroes.auto. Without it, the setting stays locked off. - A hero you put to sleep by hand stays asleep. Summon it again, or use Summon All, to bring it back.
Who sees the heroes
Other players see your heroes like your mobs, within visual.view-range blocks. The isolated zone worlds keep their solo and island rules. The heroes.view-others setting hides other players' heroes from you only.
Unlocking
A hero with free: true is unlocked for everyone. Any other hero unlocks with:
- the permission
sndungeons.heroes.unlock.<hero>(for ranks and store packages); /dungeons admin heroes unlock <player> <hero>(crates, vouchers, stores).
Upgrades
The /heroes menu sells the upgrades of the selected hero:
| Upgrade | What one level adds (per-level) |
|---|---|
speed | A share of its walk speed (0.005 = +0.5%). |
fortify | A share of its max health. |
haste | A share of its attacks per second. |
regeneration | A share of its healing while asleep. |
| specials | Effects of the hero engine, such as the Archer's Bounty Hunter, Flame and Volley. |
A click buys one level. A shift click buys every level your balance covers.
The Hero Enchants are GLOBAL upgrades: one level works for every hero of yours. They are bought in the Hero Enchants menu.
Configuration
health
| Key | Default | What it does |
|---|---|---|
health.drain-per-minute | 12 | Health an active hero loses per minute. At 0 it falls asleep and despawns. |
health.heal-per-minute | 2.4 | Health a sleeping hero heals per minute. Its regeneration upgrade and Hero Enchants add on top. |
health.min-to-summon | 25 | Health a hero needs to be summoned (Ready). Below it, it is Recovering. |
combat
| Key | Default | What it does |
|---|---|---|
combat.enchant-proc-factor | 0.25 | The player's enchant chance times this, on a hero's hit (0 to 1; 0 = never). |
combat.max-active-heroes | 10 | The most heroes of one player fighting at once (1 to 32). |
auto-summon
| Key | Default | What it does |
|---|---|---|
auto-summon.check-seconds | 5 | How often the automatic summon looks for Ready heroes. |
visual
| Key | Default | What it does |
|---|---|---|
visual.view-range | 48 | How far, in blocks, other players see your heroes (8 to 128). |
visual.name-offset | 0.35 | Height of the name above a hero's head, in blocks. |
commands.main
| Key | Default | What it does |
|---|---|---|
commands.main.command | heroes | Command name. '' = no /heroes command (the API keeps working). |
commands.main.aliases | [hero, heros] | Other names of the command. |
commands.main.permission | '' | Permission for the command and every button of the heroes menus. '' = everyone. |
commands.main.menu | heroes | The menu /heroes opens (a file of modules/heroes/guis/). '' = /heroes lists your heroes in chat. |
The display-name key ('&6Heroes') is the module's name in /dungeons admin modules.
Hero files
Each file of modules/heroes/heroes/ is one hero. The file name is its id: lowercase letters, digits and -.
The folder is created with five heroes only while it does not exist. From then on the files are yours: never merged, never re-created. Delete a file and the hero is gone. Copy one under another name for a new hero.
| Shipped hero | Name | Role | Free |
|---|---|---|---|
archer | Forest Archer | ranged | yes |
gladiator | Crimson Gladiator | melee | no |
wizard | Undead Wizard | radius | no |
bard | Magical Bard | buff | no |
angel | Battle Angel | heal | no |
Identity
| Key | Archer value | What it does |
|---|---|---|
order | 1 | Its place in /heroes (lowest first, then the id). |
name | 'Forest Archer' | Its name. |
color | '#0b6010' | Color of its name and armor ({color} of the menus), as #rrggbb. |
free | true | true = unlocked for everyone. |
locked-text | one line | The lore of its tile while it is locked. |
role | ranged | ranged, melee, radius, buff or heal. An unknown role makes the hero not load. |
stats
| Key | Archer value | What it does |
|---|---|---|
stats.damage | 1.0 | Each hit deals one swing of the player times this. |
stats.attacks-per-second | 1.0 | Its attack rhythm. |
stats.max-health | 100 | Its max health. |
stats.speed | 3.0 | Blocks per second while it walks. |
stats.range | 12 | How far it shoots from. melee ignores it. |
A stat of 0 or less is refused: the hero uses its default, with one console warning.
role-params
| Key | Shipped value | What it does |
|---|---|---|
role-params.projectile.type | ARROW | What a shooting role throws: ARROW, TRIDENT, ITEM or NONE. |
role-params.projectile.speed | 1.6 | Projectile speed, in blocks per tick. |
role-params.projectile.item | NOTE_BLOCK (bard) | The material thrown when type is ITEM. |
role-params.radius | 3.0 | The area of a radius hit, in blocks. |
role-params.buff.attack-speed | 0.2 (bard) | buff: extra attack speed for the other heroes (0.2 = +20%). |
role-params.buff.damage | 0.0 (bard) | buff: extra damage for the other heroes (a share). |
role-params.buff.seconds | 5 (bard) | buff: how long the buff lasts. |
role-params.buff.every-seconds | 10 (bard) | buff: how often the buff is given. |
role-params.heal.amount | 15 (angel) | heal: the health given to your active hero with the least health. |
role-params.heal.every-seconds | 8 (angel) | heal: how often it heals. |
look
| Key | Archer value | What it does |
|---|---|---|
look.entity | ZOMBIE | The mob type drawn. Only its viewers see it. |
look.baby | true | true = the baby form. |
look.head.texture | '' | A base64 head texture (the "Value" on minecraft-heads.com). Also the head of its menu tile. '' = none. |
look.chest.material, look.legs.material, look.feet.material | leather pieces | Armor pieces. Leather is dyed with color: (#rrggbb), or the hero's color. |
look.weapon.material | BOW | The item in its hand. |
look.weapon.custom-model-data | 0 | Custom model data of the weapon. |
look.name | '{color}{name} &8[&f{hp}&c❤&8]' | The text over it: {color}, {name}, {hp} and {max_hp}. |
upgrades
The four stat upgrades: speed, fortify, haste and regeneration. Each has:
| Key | Archer speed value | What it does |
|---|---|---|
upgrades.<id>.currency | souls | The currency the levels are bought with. |
upgrades.<id>.max-level | 100 | The highest level. |
upgrades.<id>.per-level | 0.005 | The share one level adds (0.005 = +0.5%). |
upgrades.<id>.cost.type | linear | linear or exponential. |
upgrades.<id>.cost.starting-cost | 1000000 | The price of the first level. |
upgrades.<id>.cost.increase-cost-by | 1000000 | Linear: the amount added per level. |
upgrades.<id>.cost.growth | not set | Exponential: each level costs this many times the one before. |
The price of level L to L + 1 is starting-cost + increase-cost-by x L (linear) or starting-cost x growth^L (exponential).
specials
specials.<id> are the special upgrades of THIS hero. Each one is an effect of the hero engine. It takes the keys of a Hero Enchant file below: effect, chance-per-level, max-level, params, currency and cost.
The name shown is special.<id> of modules/heroes/lang/messages_en.yml. Without it, the id shows in words (bounty-hunter = Bounty Hunter). A special id cannot be a stat upgrade id.
modules/heroes/heroes/archer.yml (specials)
specials:
bounty-hunter:
effect: bounty
chance-per-level: 0.003
max-level: 100
params:
damage: 10
currency: souls
cost:
type: linear
starting-cost: 2200000
increase-cost-by: 2200000Hero Enchant files
Each file of modules/heroes/hero-enchants/ is one Hero Enchant. The file name is its id. Shipped examples: barrage, frenzy, bloodlust, chain-strike and phoenix.
The folder follows the same owner rule as the heroes: created once, then yours.
Hero Enchants are a separate, simpler system than the sword enchants: one effect from a fixed list, with its params. Sword enchants are documented in How Enchants Work.
| Key | Barrage value | What it does |
|---|---|---|
order | 1 | Its place in the Hero Enchants menu (lowest first, then the id). |
name | '&cBarrage' | Its name (color codes allowed). |
icon.material | NETHERITE_SWORD | The material of its tile. |
description | one line | The lines of its tile ({description} of the menu). |
effect | extra-hit | One effect of the engine (table below). |
max-level | 100 | The highest level. |
chance-per-level | 0.2 | The chance in percent per level. Needed by every effect that triggers on a chance. |
params | hits: 1 | The parameters the effect needs. |
currency | souls | The currency the levels are bought with. |
cost | linear, 7000 + 700 per level | Same format as the upgrade costs above. |
The chance of a level is level x chance-per-level percent, at most 100%. For example, 0.02 at level 50 gives 1%.
Effects
| Effect | When | Params |
|---|---|---|
extra-hit | Chance on a hit | hits: more hits of the same damage (at most 10). |
frenzy | Chance on a hit | attack-speed more attacks per second (0.2 = +20%) for seconds. |
bloodlust | Every hit | per-hit more damage per hit, up to max (shares, both per level). It starts again when the hero falls asleep. |
chain | Chance on a hit | The hit jumps to targets more mobs (at most 8) within radius, each for damage of it. |
shockwave | Every every-seconds | damage of the hero's hit (per level) to your mobs within radius of its target. |
echo | Chance on a hit | A copy of the hero fights for seconds. One echo per player at a time. |
phoenix | Chance when its health reaches 0 | It comes back with health of its max health (0.5 = half) instead of falling asleep. |
bounty | Chance on a hit | Its next target is your mob of the highest rarity, hit for damage times the hit. |
burn | Chance on a hit | damage times the hit, over seconds. |
volley | Chance on a hit | Its next hits attacks come at once (at most 10). |
stat | Always | Per level: speed, health, attack-speed and/or regeneration (shares: 0.01 = +1%). At least one. |
Every extra damage an effect deals is a hit of the hero: it pays, never progress.
An unknown effect, a missing param, or a chance effect without chance-per-level makes that enchant or special not load (one console warning). A param above its cap is cut to the cap.
Menus
Heroes menu
modules/heroes/guis/heroes.yml (id heroes:heroes), 6 rows:
| Letter | Tile |
|---|---|
h | Region hero-slots: one hero per cell, in order. |
u | Region upgrade-slots: the selected hero's four stats, then its specials. |
S | Region summon-all: Summon All. |
E | Opens the Hero Enchants menu. |
I | How heroes work. |
# | Filler. |
The heroes and specials have no fixed number, so the plugin paints these cells from templates:. Move, add or remove cells in the layout and the plugin follows.
| Template | Role |
|---|---|
hero | Click behavior of a hero cell: left click selects, right click summons or puts to sleep. |
hero-ready, hero-active, hero-recovering, hero-locked | The looks of a hero cell, by its state. |
hero-locked-line | One lore line per locked-text line (the {locked_text} line). |
upgrade | Click behavior of an upgrade cell: click buys one level, shift click every level you can pay. |
upgrade-buyable, upgrade-maxed, special-buyable, special-maxed | The looks of an upgrade cell. |
summon-all, summon-all-look, summon-all-line | Summon All, its look, and one lore line per hero ({heroes}). |
Hero locals: {hero}, {name}, {color}, {role}, {hp}, {max_hp}, {damage}, {attack_speed}, {heal_time}, {selected}. Upgrade locals: {upgrade}, {level}, {max}, {current}, {next}, {cost}.
Hero Enchants menu
modules/heroes/guis/enchants.yml (id heroes:enchants), 5 rows, paged:
| Letter | Tile |
|---|---|
e | One Hero Enchant per cell, in order, over its icon. |
<, > | Previous and next page. |
B | Back to /heroes. |
The templates enchant (click: one level, shift click: every level), enchant-buyable, enchant-maxed and enchant-line paint the cells. Locals: {enchant}, {enchant_id}, {level}, {max}, {cost}, {description}.
Action tags
[heroes] open <heroes|enchants>, [heroes] summon-all, [heroes] store-all, [heroes] hero <id>, [heroes] upgrade <id> and [heroes] enchant <id>. Each follows the permission of /heroes. See Menus and Action Tags.
Player settings
| Setting | What it does |
|---|---|
heroes.view-others | Off hides other players' heroes from you only. |
heroes.auto-summon | Auto Heroes (default off; needs sndungeons.heroes.auto). |
Commands
| Command | Permission | Description |
|---|---|---|
/heroes | commands.main.permission ('' = everyone) | Opens the heroes menu: summon, upgrades, Summon All, Hero Enchants. |
/dungeons admin heroes unlock <player> <hero> | sndungeons.admin.heroes.unlock | Unlocks a hero for an online player. |
/dungeons admin heroes lock <player> <hero> | sndungeons.admin.heroes.lock | Takes the admin unlock of a hero back from an online player. |
/dungeons admin heroes heal <player> [hero] | sndungeons.admin.heroes.heal | Heals one hero (or every hero) of an online player to full. |
/dungeons admin heroes upgrade <player> <hero> <upgrade> <level> | sndungeons.admin.heroes.upgrade | Sets a hero upgrade level of an online player, free. |
/dungeons admin heroes enchant <player> <enchant> <level> | sndungeons.admin.heroes.enchant | Sets a Hero Enchant level of an online player, free. |
/dungeons admin heroes info <player> | sndungeons.admin.heroes.info | Shows the heroes, their health, levels and fight of an online player. |
| Permission | Default | What it gives |
|---|---|---|
sndungeons.heroes.auto | false | The Auto Heroes setting. |
sndungeons.heroes.unlock.<hero> | not declared | Unlocks a hero that is not free. |
Full lists: Commands and Permissions.
Placeholders
The heroes placeholders are listed in Placeholders. The most useful:
| Placeholder | Value |
|---|---|
%sndungeons_heroes_unlocked%, _active, _ready | How many of your heroes are unlocked, fighting and Ready |
%sndungeons_hero_<id>_state% | locked, ready, active or recovering (_label for the word) |
%sndungeons_hero_<id>_hp%, _max_hp | A hero's health and max health |
%sndungeons_hero_<id>_heal_time% | Time until it is fully healed |
%sndungeons_hero_<id>_upgrade_<upgrade>_level%, _max, _cost | A hero upgrade (empty cost at the max) |
%sndungeons_hero_enchant_<id>_level%, _max, _cost | A Hero Enchant |
Tips
- Sell heroes on a store with
free: falseand the permissionsndungeons.heroes.unlock.<hero>. - A heal or buff hero pays off only beside other heroes: price the support roles accordingly.
drain-per-minuteagainstheal-per-minutesets the fight to rest ratio. The shipped 12 and 2.4 rest five minutes per minute fought.- After editing a hero, run
/dungeons reloadand check the console for warnings about refused keys.
Default modules/heroes/config.yml
enabled: true
# ============================================================
# SnDungeons - heroes 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 heroes off on
# /dungeons reload; /heroes disappears and every active hero falls asleep.
# The heroes, their health, upgrades and the Hero Enchants of every player
# stay stored.
# A hero is a mob only its viewers see that fights the mobs of its player's
# zone by its role. Each hit is one swing of the player times the hero's
# damage: its kills PAY the player (with their boosters) and may roll the
# player's enchants at a reduced chance, but they NEVER count for the
# player's progress (stats, milestones, auras, armors, totems).
# The heroes are the files of modules/heroes/heroes/ and the Hero Enchants
# the files of modules/heroes/hero-enchants/ (created with examples only
# while each folder does not exist; yours from then on).
# Name of the module in /dungeons admin modules (color codes allowed).
display-name: '&6Heroes'
health:
# The health an active hero loses per minute while it fights. At 0 it
# falls asleep and despawns.
drain-per-minute: 12
# The health a sleeping hero heals per minute (its regeneration upgrade
# and the regeneration of the Hero Enchants add on top). It heals by the
# time passed, also while its player is offline.
heal-per-minute: 2.4
# The health a hero needs to be summoned (Ready); below it, it is
# Recovering.
min-to-summon: 25
combat:
# The chance of the player's sword enchants on a hit of a hero: their
# chance times this (0 to 1; 0 = a hero never procs an enchant).
enchant-proc-factor: 0.25
# The most heroes of one player fighting at once (1 to 32).
max-active-heroes: 10
auto-summon:
# How often (seconds) the automatic summon looks for Ready heroes. It
# works only for a player with the setting heroes.auto-summon on (the
# Automation tab of /settings) AND the permission sndungeons.heroes.auto,
# while they stand in the mob area of their zone. A hero the player sent
# to rest by hand (a right click in /heroes) is skipped until they summon
# it again by hand or Summon All.
check-seconds: 5
visual:
# How far, in blocks, the other players see your heroes (8 to 128).
view-range: 48
# The height of the name above a hero's head, in blocks.
name-offset: 0.35
commands:
# /heroes opens the heroes menu. If another plugin already has this name
# or an alias, SnDungeons takes it (command priority).
main:
# Command name; '' = no /heroes command (the API keeps working).
command: heroes
# Other names of the command.
aliases:
- hero
- heros
# Permission needed to use the command, and every button of the heroes
# menus. '' = everyone.
permission: ''
# The menu /heroes opens: a file of modules/heroes/guis/ without .yml.
# '' = no menu: /heroes lists your heroes in chat.
menu: heroesExample hero: modules/heroes/heroes/archer.yml
# ============================================================
# SnDungeons - heroes module: one hero (archer)
# An OWNER file: SnDungeons wrote it only because modules/heroes/heroes/
# did not exist, and never touches it again (no merge, no re-seed).
# Delete it and the hero is gone; copy it under another name for a new
# hero (the file name is its id: lowercase letters, digits and '-').
# Re-read on /dungeons reload.
# ============================================================
# The place of the hero in /heroes (lowest first, then the id).
order: 1
name: 'Forest Archer'
# The color of its name and of its armor ({color} of the menus): #rrggbb.
color: '#0b6010'
# true = every player has it unlocked. Otherwise a player unlocks it with
# the permission sndungeons.heroes.unlock.archer or with
# /dungeons admin heroes unlock <player> archer (crates, vouchers, stores).
free: true
# The lore of its tile while it is locked.
locked-text:
- '&7Unlock this hero at &estore.example.com'
# How it fights: ranged (stands at its range and shoots), melee (walks to the
# mob and hits beside it), radius (shoots, and the hit also reaches up to 8
# of your mobs within role-params.radius of the target), buff (shoots, and
# every role-params.buff.every-seconds gives your other active heroes more
# attack speed and damage) or heal (shoots, and every
# role-params.heal.every-seconds heals your active hero with the least
# health). An unknown role makes the hero not load.
role: ranged
stats:
# Each hit deals one swing of the player times this.
damage: 1.0
attacks-per-second: 1.0
max-health: 100
# Blocks per second while it walks.
speed: 3.0
# How far it shoots from (melee ignores it: it walks next to the mob).
range: 12
role-params:
# What flies to the mob of a shooting role: ARROW, TRIDENT, ITEM (item: a
# material) or NONE (the hit lands at once). speed: blocks per tick.
projectile:
type: ARROW
speed: 1.6
# The area of a radius hit, in blocks.
radius: 3.0
look:
# A mob only its viewers see (never a real entity).
entity: ZOMBIE
baby: true
# The head it wears (and the head of its tile in /heroes): the base64
# texture of a head (the "Value" of a head on minecraft-heads.com). '' = no
# head (the mob's own face; the tile shows a plain head).
head:
texture: ''
# Dyed leather (color: #rrggbb, the hero's color when missing) or any item.
chest:
material: LEATHER_CHESTPLATE
legs:
material: LEATHER_LEGGINGS
feet:
material: LEATHER_BOOTS
weapon:
material: BOW
custom-model-data: 0
# The text over it: {color}, {name}, {hp} and {max_hp} (its health).
name: '{color}{name} &8[&f{hp}&c❤&8]'
# The stat upgrades of this hero (the /heroes menu: a click buys a level, a
# shift click every level your balance covers). per-level: the share one
# level adds (0.005 = +0.5%) to its walk speed (speed), max health (fortify),
# attacks per second (haste) or healing while asleep (regeneration).
# cost: the price of the level L -> L + 1, starting-cost + increase-cost-by x
# L (type: linear) or starting-cost x growth^L (type: exponential).
upgrades:
speed:
currency: souls
max-level: 100
per-level: 0.005
cost:
type: linear
starting-cost: 1000000
increase-cost-by: 1000000
fortify:
currency: souls
max-level: 100
per-level: 0.005
cost:
type: linear
starting-cost: 800000
increase-cost-by: 800000
haste:
currency: souls
max-level: 100
per-level: 0.005
cost:
type: linear
starting-cost: 1200000
increase-cost-by: 1200000
regeneration:
currency: souls
max-level: 100
per-level: 0.0065
cost:
type: linear
starting-cost: 900000
increase-cost-by: 900000
# The special upgrades of THIS hero: each an effect of the engine (the same
# as the Hero Enchants: extra-hit, frenzy, bloodlust, chain, shockwave, echo,
# phoenix, bounty, burn, volley, stat; see modules/heroes/hero-enchants/ for
# what each does and needs). chance-per-level: the chance in percent per
# level (0.003 at level 10 = 0.03%). The name shown is special.<id> of the
# module messages, else the id in words.
specials:
bounty-hunter:
effect: bounty
chance-per-level: 0.003
max-level: 100
params:
damage: 10
currency: souls
cost:
type: linear
starting-cost: 2200000
increase-cost-by: 2200000
flame:
effect: burn
chance-per-level: 0.007
max-level: 100
params:
damage: 5
seconds: 5
currency: souls
cost:
type: linear
starting-cost: 1800000
increase-cost-by: 1800000
volley:
effect: volley
chance-per-level: 0.007
max-level: 100
params:
hits: 5
currency: souls
cost:
type: linear
starting-cost: 2000000
increase-cost-by: 2000000Example Hero Enchant: modules/heroes/hero-enchants/barrage.yml
# ============================================================
# SnDungeons - heroes module: one Hero Enchant (barrage)
# An OWNER file: SnDungeons wrote it only because
# modules/heroes/hero-enchants/ did not exist, and never touches it again.
# Delete it and the enchant is gone; copy it under another name for a new
# one (the file name is its id). Re-read on /dungeons reload.
# A Hero Enchant is GLOBAL: it works for every hero of the player.
#
# effect: one of the engine (an unknown effect, or a param it needs that
# is missing, makes the enchant not load):
# extra-hit (a chance on a hit): params.hits more hits (at most 10)
# frenzy (a chance on a hit): params.attack-speed more attacks per second
# (0.2 = +20%) for params.seconds
# bloodlust (every hit): params.per-hit more damage per hit, up to
# params.max (shares, both per level); it starts again when the hero
# falls asleep
# chain (a chance on a hit): the hit jumps to params.targets more mobs
# (at most 8) within params.radius, each for params.damage of it
# shockwave (every params.every-seconds): params.damage of the hero's hit
# (per level) to your mobs within params.radius of its target
# echo (a chance on a hit): a copy of the hero fights for params.seconds
# (one at a time per player)
# phoenix (a chance when the health reaches 0): it comes back with
# params.health of its max health instead of falling asleep
# bounty (a chance on a hit): its next target is your mob of the highest
# rarity, hit for params.damage times the hit
# burn (a chance on a hit): params.damage times the hit over
# params.seconds
# volley (a chance on a hit): its next params.hits attacks come at once
# (at most 10)
# stat (always): per level, params.speed, params.health,
# params.attack-speed and/or params.regeneration (shares: 0.01 = +1%)
# chance-per-level: the chance in percent per level (0.02 at level 50 = 1%).
# cost: the price of the level L -> L + 1 (type linear: starting-cost +
# increase-cost-by x L; type exponential: starting-cost x growth^L).
# ============================================================
order: 1
name: '&cBarrage'
icon:
material: NETHERITE_SWORD
description:
- 'Chance for your heroes to hit twice.'
effect: extra-hit
max-level: 100
chance-per-level: 0.2
params:
hits: 1
currency: souls
cost:
type: linear
starting-cost: 7000
increase-cost-by: 700