[Feature Request] [1.20] Perk Bonus Limiting
SomewhatDamaged opened this issue ยท 4 comments
Describe the solution you'd like
A way, on a perk-by-perk basis, to limit the bonuses being applied to numerical values.
If multiplicative bonuses (see #242) are implemented, it would be good to be able to set limits to how much they can boost.
This would probably be best if it could be configured on a perk-by-perk basis, so a limit would apply to all sources of pmmo:damage_boost
, for example.
Ex:
All bonuses up to 2.0x count fully.
Between 2.0 and 4.0 it costs 2 for every 1 gain.
Between 4.0 and 8.0 it costs 4 for every 1 gain.
Hard cap at 8.0x.
So, if I had a 4.2x bonus with pmmo:damage_boost
, the actual bonus would be 3.1x
The first 2.0x goes through fully, then the remaining 2.2x is halved to 1.1x and added to the base multiplier.
Why is this feature needed
Because if you provide stacking bonuses, players will exploit them. This allows sane levels to be preserved, while still rewarding players who push to higher amounts.
Describe alternatives you've considered
Human sacrifice! Dogs and cats living together! Mass hysteria!
I see the value in a bonus that has diminishing returns. It's certainly programmable, but a considerable configuration challenge. Users already have the ability to use max_boost
on most Perks to set a ceiling on their benefits. I will add this to the 1.20 features list.
@SomewhatDamaged Could you give me an example of how you envision this being configured?
Note: I am assuming you can specify an array in .toml
[[Perks.For_Event.SKILL_UP.combat]]
per_level = 0.005
perk = "pmmo:attribute"
attribute = "minecraft:generic.attack_damage"
cap = [ 2.0, 4.0, 8.0 ]
The last value of the array (even if it only has one) is the hard cap. So [ 1.0 ]
would be the same as if you did max_boost = 1.0
Every other value in the array is a soft cap, with half as much gain from skill levels applying for each cap passed.
So for the above:
Between 0 bonus and 2.0 bonus, things apply as normal. (per_level = 0.005
)
Between 2.0 bonus and 4.0 bonus, per_level
would be halved. (per_level = 0.0025
)
Between 4.0 bonus and 8.0 bonus, per_level
would be quartered. (per_level = 0.00125
)
8.0 bonus is the hard cap.
I like this idea, but the implementation really falls on specific perks to apply. for example, some features like night vision don't have per-level scaling, so you'd want to implement this as part of a per-level perk which could utilize the functionality. Since I don't plan on expanding perks in pmmo at this time, i'm going to close this.