Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
SkillLoss
Server-synced skill loss on death: set the % lost per skill or per category, with entries for skills added by other mods. Admin-only config.
By TXC
| Date uploaded | 2 weeks ago |
| Version | 1.1.0 |
| Download link | TXC-SkillLoss-1.1.0.zip |
| Downloads | 210 |
| Dependency string | TXC-SkillLoss-1.1.0 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2351ValheimModding-Jotunn
Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.
Preferred version: 2.30.2README
Skill Loss
Controls how much of each skill players lose when they die. The config is admin-only and synced from the server, so every player on the server gets the same values.
Features
- A loss % for each vanilla skill, or one % per category (Combat, Utility, Crafting, Movement)
- Its own entry for every skill added by another mod, created automatically, plus a default for modded skills without one
- Optionally scales losses by the world's Death penalty modifier
- Optionally takes the loss from the skill's total XP instead of its level, so progress towards the next level isn't wiped
- Vanilla rules still apply: the No skill drain buff after dying and the skills reset on death world modifier work as normal
Configuration
BepInEx/config/txc.skillloss.cfg. All values are percentages (0-100) and default to 5, which is Valheim's loss on the Normal death penalty.
[General]
UseCategories = false # true = vanilla skills use [Categories] instead of their own entries
ApplyWorldDeathPenalty = false # true = multiply by the world's Death penalty (Normal x1, Easy x0.5, Hard x1.5...)
LossMode = Level # Level = % of the skill level, bar reset (vanilla); TotalXp = % of all XP earned, bar kept
[Categories]
Combat = 5
Utility = 5
Crafting = 5
Movement = 5
[Combat Skills] # also [Utility Skills], [Crafting Skills], [Movement Skills]
Swords = 5
[Modded Skills]
Default = 5
Ranching (123456789) = 5 # example: added automatically
Loss modes
- Level (default, vanilla): lose the % of the skill level, and the progress towards the next level is reset.
- TotalXp: lose the % of all XP ever earned in the skill. The level and progress bar are recalculated from what's left, so you only drop as far as the lost XP takes you. Higher levels cost more XP, so the same % is gentler here: 5% of XP is roughly 2% of the level (a skill at 40 with a half-full bar drops to 39 with a 66% bar). About 12% of XP matches vanilla's 5% of the level.
Modded skills
When a player loads a character, the mod adds a Skill Name (id) entry under [Modded Skills] for every skill added by another mod. The number in brackets identifies the skill; the name is only a label. Skills without an entry use Default.
A dedicated server has no character, so it can't find modded skills on its own. Launch the game once with the same modpack, then copy the updated config to the server. The server loads every entry in the file at startup and syncs it to players.
Notes
- The server and every player must have this mod (version-checked on connect).
- It replaces Valheim's death skill loss, so don't combine it with other skill-loss mods (for example CustomSkillLoss).
- Skills from mods built on the common SkillManager library (for example Ranching) use this mod's
[Modded Skills]value; their own "Skill loss" setting is ignored, so the skill isn't lowered twice. - If something goes wrong while applying the loss, it logs an error and falls back to vanilla.
Changelog
- 1.1.0:
[General] LossMode: newTotalXpmode takes the loss from the skill's total XP, keeping progress towards the next level. - 1.0.0: First release.
CHANGELOG
Changelog
1.2.0
- New config layout.
[0 - Toggles]at the top picks, per feature, whether it'sOffor reads theCategorysections ([3 - Categories - Combat], ... Crafting, Modded, Movement, Utility) or theSkillsections ([4 - Skills - Combat - Swords],[4 - Skills - Modded - Ranching (id)], ...). Every category and skill section holds all the options:Loss,MaxLevelsLost,CatchUpPerLevel,CatchUpMax,XpGain.[1 - General]and[2 - Death Causes]sit in between. - New
[1 - General] DebugLogging(local, not synced): logs every skill's level before/after each death, XP gained per skill with the multipliers used, level-ups and stored peaks. - New console commands:
skillloss_skillslists your skills with level, peak, loss and XP multipliers;skillloss_cleardeath(needs devcommands) ends the "No skill drain" period so the next death loses skills again. - Ride moved from the Movement to the Utility category (its section is renamed and its values carried over automatically).
Loss = Offuses vanilla's loss for the world's Death penalty setting (Normal 5%, Hard 7.5%, ...).- The 1.1 config is converted automatically on first load (
UseCategories = truebecomesLoss = Category); the old sections are removed. - New loss cap (
MaxLevelsLost, toggleMaxLevelsLostCap): the most levels a skill can lose in one death, progress bar included. Off by default. - New catch-up XP (
CatchUpPerLevel/CatchUpMax, toggleCatchUpXp): extra XP while a skill is below the highest level the character ever had in it, scaling with how far below it is. Off by default. Peaks are saved in the character file; existing characters start tracking at their current levels. - New XP gain multiplier (
XpGain, toggleXpGain). Off by default. - New
[2 - Death Causes](toggleDeathCauses): a loss multiplier per kind of death (Enemy, PvP, Fall, Drowning, Environment, Accident, Other). Off by default. - With an XP multiplier above 1.00, the extra XP it added is carried over a level-up instead of being thrown away (vanilla discards the overflow).
- Multipliers are written with two decimals (1.00, 0.50); loss values stay percentages.
- Everyone on the server needs 1.2.0 (version check is per minor version).
1.1.0
- New
[General] LossMode(defaultLevel, same as 1.0.0).TotalXptakes the configured % from all XP earned in the skill, then recalculates the level and progress bar from what's left, so progress towards the next level is no longer wiped. - Everyone on the server needs 1.1.0 (version check is per minor version).
1.0.0
- First release.