Pricing and Prestige
On this page(4)
Every enchant level is bought with a currency. The cost: block of the enchant sets the curve. Prestige lets a maxed enchant start again at level 0 with a star: a higher chance, but dearer levels.
The level price
The price of going from level L to L + 1 (L starts at 0):
is-exponential | Formula |
|---|---|
false (default) | starting-cost + increase-cost-by x L |
true | starting-cost x exponential-growth ^ L |
cost: { currency: souls, starting-cost: 100, increase-cost-by: 50 } # 100, 150, 200, 250...
cost: { currency: souls, starting-cost: 200, is-exponential: true, exponential-growth: 1.08 } # 200, 216, 233...How the two curves grow:
| Level bought | Linear 100 + 50 x L | Exponential 200 x 1.08 ^ L |
|---|---|---|
| 1 | 100 | 200 |
| 10 | 550 | 400 |
| 50 | 2,550 | 8,686 |
| 100 | 5,050 | 407,363 |
An exponential curve explodes at high levels. Use it for short enchants (max-level up to a few
hundred) or a growth close to 1 (1.01 to 1.05). Use a linear curve for enchants of thousands of
levels.
The menu buttons show the total price of a range (%sndungeons_enchant_<id>_cost_10%, _cost_max). Players always see the exact amount before they click.
How players buy
/sword enchants, or a right click with the sword, opens the list. A tile opens the enchant's upgrade menu.- One button per entry of
enchants.upgrade-amounts([1, 10, 50, 100, 250, 500, 1000]shipped) buys exactly that many levels. It buys nothing past the max level, or when the balance does not cover it. - Max buys every level the balance covers, at most 10000 at once, never past the max level.
- Each purchase is one charge of the whole price, one log row and one event. The menu stays open with the new values, and the sword is rebuilt.
- A purchase click within
enchants.upgrade-click-grace-ticks(10 shipped) after the menu opened or a purchase answer is ignored. A double click never buys twice. - While a purchase of the player runs, another one is refused.
Admins give levels for free with /dungeons admin sword enchant <player> <enchant> <levels>, up to the max level. max and reset set every enchant (or one) to its max or to 0.
Prestige
At its max level, the Prestige button of the upgrade menu puts the enchant back at level 0
with one star more. The global rules are enchants.prestige of modules/sword/config.yml:
enchants:
prestige:
max-stars: 10 # 0 to 1000; 0 = no prestige
cost-multiplier: 3.0 # 1 to 1000: every level costs x this per star
power-per-star: 0.04 # 0 to 100: the chance factor per star
price: # the price of the prestige itself
currency: '' # '' = free
base: 0
growth: 1.0| What | Formula | Example |
|---|---|---|
| Chance | The chance at your level x (1 + power-per-star x stars), before the boosters | 0.04 and 5 stars = x1.2 |
| Level price | Every level x cost-multiplier ^ stars | 3 and 2 stars = x9 |
| Prestige price | price.base x price.growth ^ (stars before), in price.currency |
An enchant file overrides any of these keys with its own prestige: block. A missing key keeps the
global one:
# This enchant: only 3 stars, each one +10% chance, levels x2 per star.
prestige:
max-stars: 3
power-per-star: 0.1
cost-multiplier: 2# This enchant has no prestige at all.
prestige:
max-stars: 0More about prestige:
- Expressions read the stars as
{prestige}, the chance factor as{prestige_power}and the max as{max_prestige}. A bonus can grow with the stars:'{damage} * (3 + {prestige})'. - The sword lore uses
item.enchant-line-prestigefor an enchant with a star, and shows an enchant with stars even at level 0. [reset-enchants]and[reset-enchant] <id>reset levels, never stars./dungeons admin sword prestige <player> <enchant> <stars>sets the stars of an online player.
Balancing an enchant
Four numbers decide how strong an enchant is: the chance, the cooldown, the effect (multiplier or reward) and the price. A good rule is to think in damage per second.
| Effect | What to weigh |
|---|---|
A single hit of {damage} * X | Average gain per swing = chance x X. At 5% and 10x, about +50% damage |
| An area hit | Multiply by the mobs it usually reaches (max-mobs, the area's mob count) |
| A cooldown | It caps procs: at most one per cooldown-ticks / 20 seconds |
| Fighters | per-second x damage x lifetime / 20 per proc, per fighter |
| Rewards | Compare with what one mob kill pays at that stage |
| Rarity upgrades | A better rarity multiplies the rewards of that mob |
Tips:
- Chance and cooldown work together. A 100% chance with a 10 second cooldown is a reliable "every 10 seconds" effect. A low chance with no cooldown feels like a lucky crit.
- Let the level scale one thing. Scale the chance (
{ min, max }) or the effect ({level}in the amount), not both steeply. Otherwise the top levels run away. - Gate the flashy parts. Use
requirement: '{level} >= 500'for an extra effect at high levels. Players then feel a milestone. - Price the heavy enchants higher. Fighters, area hits and set-rarity outperform a single hit.
- Remember the boosters.
{damage}already includes damage boosters, and the chance boosters multiply every chance.