For the complete documentation index, see llms.txt. This page is also available as Markdown.

🩸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

  1. When a player unlocks a skill with a degradation block, the skill's degradationXp is set to maxDegradationXp.

  2. Every CycleInterval days, removePerCycle XP is subtracted from degradationXp for each unlocked skill in that category.

  3. When degradationXp hits 0:

    • The skill effect is disabled (treated as not-unlocked for effect calculations)

    • devhub_skillTree:client:listener:skillDegraded fires

  4. Any XP the player earns in the same category also restores degradation XP by the same amount.

  5. When degradation XP reaches reactivationThreshold, the skill effect comes back online:

    • devhub_skillTree:client:listener:skillDegradedRecovered fires

Cycles are applied:

  • On player load β€” based on the stored lastDegradationCycle timestamp

  • Every 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 = {...} block

  • Disable for a specific category β€” make sure no skill in that category has a degradation block

Last updated