π©ΈDegradation
Overview
Skill degradation is an optional mechanic that gives unlocked skills a "stamina" pool which decays over time. If a player stops earning XP in a category, their unlocked skills slowly lose degradation XP each cycle. When the pool hits 0, the skill effect is disabled until the player earns enough XP back to reactivate it.
It's designed for servers that want skills to feel like a maintenance investment rather than a one-time unlock.
Set Config.SkillDegradation = nil to disable the system entirely. Skills without a degradation block are also exempt β opt-in per skill.
How it works
When a player unlocks a skill with a
degradationblock, the skill'sdegradationXpis set tomaxDegradationXp.Every
CycleIntervaldays,removePerCycleXP is subtracted fromdegradationXpfor each unlocked skill in that category.When
degradationXphits 0:The skill effect is disabled (treated as not-unlocked for effect calculations)
devhub_skillTree:client:listener:skillDegradedfires
Any XP the player earns in the same category also restores degradation XP by the same amount.
When degradation XP reaches
reactivationThreshold, the skill effect comes back online:devhub_skillTree:client:listener:skillDegradedRecoveredfires
Cycles are applied:
On player load β based on the stored
lastDegradationCycletimestampEvery hour for online players whose cycle interval has elapsed
The MaxMissedCycles setting caps how many cycles can be applied at once after a long offline period β so players who take a break don't lose all their degradation XP at once.
Global configuration (sh.main.lua)
Per-category overrides
Override the global defaults for specific categories. Any category not listed here uses the defaults above.
Per-skill configuration (sh.skills.lua)
Add a degradation block to any skill that should be subject to degradation:
In the exclusive version, this block can also be edited per-skill from the generator UI.
reactivationThreshold = 0 means the skill reactivates the moment any XP is earned in the category. Use a higher value if you want the player to "earn back" the skill.
Events
Both client and server versions are fired (each can be disabled via Config.DisabledListeners).
Client
Server
Disabling the system
Disable globally β set
Config.SkillDegradation = nil(or remove / comment out the block)Disable for a specific skill β remove its
degradation = {...}blockDisable for a specific category β make sure no skill in that category has a
degradationblock
Last updated