Valheim
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
Downloads
258
Size
70KB
ADDatHost Valheim hosting
30% off

TitlesMod

Work in progress: this mod is still in development and testing, so expect bugs and balance changes. Titles, names and bonuses may still change between versions. The code was generated with AI assistance.

Earn titles as you play Valheim and build your own full title from them, like Dragonslayer's Adept Runner of the Mistlands or Unbroken Jack of All Trades, Lumberjack. All equipped titles give their bonuses.

Building your title

A full title has five parts: prefix - word - main title - word - suffix.

  • Main title (middle): skill thresholds like Adept Runner, and Jack of All Trades.
  • Epithets (prefix or suffix, your choice): every other title, like Dragonslayer, Lumberjack, Mistlands, Unbroken. One epithet can't be in both places at once, and tiers of the same ladder (like Dead and Lich) don't stack: equipping one removes the other.
  • Connecting words between them, picked from a list: the, of, of the, from, and, or, 's, :, ,, - or none. Server owners can change the list in the config.

Examples: Dragonslayer's Adept Runner of the Mistlands, Lumberjack and Master Miner the Unbroken, Bronzesmith: Novice Cook.

How to earn titles

Type Example
Discover a biome Mistlands: enter the Mistlands (+5 Dodge)
Discover an item Bronzesmith: discover bronze (+5 Crafting)
Learn a recipe Fisher: learn to craft a fishing rod (+5 Fishing)
Craft ammo Fletcher: craft 1000 arrows (+10 Bows). Boltwright: craft 1000 bolts (+10 Crossbows)
Gather resources Lumberjack: gather 500 wood (+5 Wood Cutting)
Build DIY (10), Handyman/Handywoman (100), Builder (1000), Designer (5000), Architect (10000): +5% chance per tier that a wood or stone piece costs no materials (Architect 25%)
Repair Fixer (100 hammer repairs): damaged buildings within 2 m repair themselves. Mender (1000): within 10 m
Get a specific drop Serpent Hunter: obtain a serpent trophy (+5 Spears)
Defeat a boss Dragonslayer: defeat Moder (+5 Swords)
Combat Monster Hunter: defeat 500 creatures (+5 Blocking)
Die Dead (1), Undead (10), Death (50), Lich (100), Eternal (1000): -10% skill loss on death per tier (Eternal -50%)
Progression (main) Jack of All Trades: get 5 skills above level 20 (+100% skill experience = double XP)
Progression Unbroken: get 10 skills to level 10 (every skill is kept at its highest threshold on death)
Skill threshold (main) Adept Runner: reach Run level 50 (Run never drops below 50 on death, -9% run stamina)

With PaladinMod installed there is also Paladin (main title): craft your first consecrated shield (+10% armor).

Plus a few rewards for finishing a whole set, like Worldwalker (every biome) and a hidden title for every boss.

Unbroken

While Unbroken is equipped, dying never lowers any skill (modded skills too) below the highest threshold (10, 25, 50, 75, 90, 100) it has reached. A skill at 62 stays at 50 or more, one at 31 stays at 25 or more. Skills below 10 lose levels as usual.

Skill threshold titles

Every vanilla skill has six threshold titles: Novice (10), Apprentice (25), Adept (50), Veteran (75), Master (90) and Legendary (100). While one is equipped, dying never lowers that skill below its level. Other skills still lose levels as usual. Threshold titles never add levels to the skill itself.

Each skill also gives a fitting perk that grows with the tier (Legendary = 6x Novice):

Skill Perk per tier Skill Perk per tier
Swords +2% stamina regen Run -3% run stamina
Knives -2% attack stamina Jump -3% jump stamina, -5% fall damage
Clubs +1 armor Sneak -4% sneak stamina
Polearms +3 max health Swim -4% swim stamina
Spears +3 max stamina Dodge -3% dodge stamina
Axes +1 armor Ride +2 max stamina
Bows +2% stamina regen Fishing +2% stamina regen
Crossbows +2 max health Cooking +3% health regen
Unarmed +3 max health Farming +2 max health
Blocking -3% block stamina Crafting +10 carry weight
Elemental Magic +3% Eitr regen Pickaxes +4% mining damage
Blood Magic 0.5% lifesteal, +2 max Eitr Wood Cutting +4% chop damage

The titles window shows the tiers you earned plus only the next one for each skill.

  • Press Shift+F9 to open the titles window. Main titles have an Equip button, epithets have Prefix and Suffix buttons. The two buttons at the top pick the connecting words, and the Type button filters the list.
  • Other players see your full title under your name.
  • Progress is saved on your character, so it follows you to every world and server.
  • Gathering counts items you pick up from the world. Picking up items that someone dropped, or that fell out of a broken chest, does not count.
  • A kill counts if you hit the creature within 60 seconds before it died, so everyone who helps with a boss gets credit.

Console commands (F5)

  • titles: list all titles and their ids
  • title <id> [prefix|suffix]: equip a title you earned. title none removes all, title none prefix (or main, suffix) empties one place.
  • title_word <prefix|suffix> <word>: the connecting word after the prefix / before the suffix, e.g. title_word suffix of the. none removes it.
  • titles_unlock <id|all>: (needs devcommands) unlock titles for testing
  • titles_reset: (needs devcommands) remove all titles and progress from this character

Config

BepInEx/config/com.yourname.titlesmod.cfg: menu shortcut, a multiplier for all skill and stat bonuses (0 = no bonuses, death protection still works), the kill credit time, whether to show titles on name tags, the list of connecting words, and the option to turn off the built-in titles.

Feedback

This mod is still being tested. Bug reports and balance feedback are very welcome!

For mod authors

Any mod can add its own titles, or add bonuses for its own skills to existing titles.

  1. Reference TitlesMod.dll in your project (the XML docs ship next to it).
  2. Add [BepInDependency("com.yourname.titlesmod")] to your plugin class.
  3. Call the API from your plugin's Awake():
using TitlesMod;

// A new title with your own requirement and a bonus for your own skill.
// Skills are named by their vanilla name ("Swords", "Run", "All")
// or by the Jotunn skill identifier you registered.
TitleAPI.RegisterTitle(
    new TitleDefinition("mymod_master_chef", "Master Chef", "Cook 200 meals.")
        .Require(TitleRequirement.Counter("mymod:meals_cooked", 200, "Cook meals"))
        .Bonus("Cooking", 5)
        .Bonus("com.me.mymod.baking", 10));

// Raise your counter whenever it happens in your mod.
TitleAPI.IncrementCounter("mymod:meals_cooked");

// Add a bonus for your skill to a title from this mod (or any other mod).
// This works even if that title is registered after your mod loads.
TitleAPI.AddSkillBonus("boss_eikthyr", "com.me.mymod.baking", 5);
TitleAPI.AddSkillBonus("gather_wood", mySkillType, 5);   // or the SkillType Jotunn gave you

// Skill threshold title for your own skill: unlocked at level 50, and while equipped
// the skill never drops below 50 on death.
TitleAPI.RegisterTitle(TitleDefinition.SkillMilestone("mymod_baker_50", "Master Baker", "com.me.mymod.baking", 50, "Baking"));

// Or protect your skill on an existing title.
TitleAPI.AddSkillFloor("boss_eikthyr", "com.me.mymod.baking", 25);

// Stat bonuses while equipped (keys in TitleStats: HealthRegen, StaminaRegen, EitrRegen, MaxHealth,
// MaxStamina, MaxEitr, Armor, ArmorPercent, Lifesteal, ChopDamage, MiningDamage, CarryWeight, RunStamina, JumpStamina,
// SwimStamina, SneakStamina, DodgeStamina, AttackStamina, BlockStamina, FallDamage, SkillGain, DeathSkillLoss, FreeBuildChance, RepairAura).
TitleAPI.AddStatBonus("mymod_baker_50", TitleStats.HealthRegen, 10);

// Your own stat: give it a label, then apply it yourself in your mod.
TitleStats.RegisterLabel("mymod:BakingSpeed", "+{0}% baking speed");
TitleAPI.AddStatBonus("mymod_baker_50", "mymod:BakingSpeed", 15);
float bakingBonus = TitleAPI.GetStatBonus("mymod:BakingSpeed");

// Titles are main titles by default. Epithets go in front or after, the player decides,
// so give them a plain noun name that reads well on both sides ("Breadmaker").
TitleAPI.RegisterTitle(new TitleDefinition("mymod_bread", "Breadmaker", "Bake 50 breads.")
    .AsEpithet()
    .Require(TitleRequirement.Counter("mymod:bread", 50, "Bake bread")));
TitleDefinition prefix = TitleAPI.GetEquippedTitle(TitleSlot.Prefix);
string full = TitleAPI.GetFullTitle();   // "Breadmaker's Master Baker of the Mistlands"
TitleAPI.AddConnector("for");             // one more connecting word players can pick

// Keep every skill at the highest of these levels it has reached when dying.
new TitleDefinition("mymod_safe", "Steadfast", "...").ProtectAllSkillsAtTiers(20, 40, 60, 80);

// A tier ladder: give titles the same group and register them lowest first.
// The titles window then shows only the earned tiers plus the next one.
TitleAPI.RegisterTitle(TitleDefinition.SkillMilestone("mymod_baker_75", "Grand Baker", "com.me.mymod.baking", 75, "Baking"));

SkillMilestone already puts titles of the same skill in one group ("skill:<name>"). For other ladders use .SetGroup("mymod:fish").

Requirement helpers (prefab names are the same as for the spawn command):

Helper Meaning
DiscoverBiome(Heightmap.Biome.Plains) enter a biome
DiscoverItem("Silver") have ever held the item
KnowRecipe("FishingRod") know the crafting recipe
Gather("Wood", 500) pick up this many from the world
Obtain("TrophyWolf") pick up a specific drop once
Build("piece_workbench", 1) or Build("*", 100) place pieces
Kill("Eikthyr") or Kill("*", 500) help kill creatures
Counter(key, amount, label) your own counter (TitleAPI.IncrementCounter)
SkillLevel("Run", 50) reach a skill level (real level, without bonuses or buffs)
SkillsAbove(5, 20) have this many skills (any, including modded) above a level
SkillsAtLeast(10, 10) same, but the level itself counts too (level 10 or higher)
Craft("ArrowFire", 200) craft this many items (20 per arrow craft; Valheim's own statistic, so older crafts count)
CraftAmmo(AmmoArrows, 1000, "Craft arrows") craft any ammo of one type (AmmoArrows, AmmoBolts, or a modded ammo type)
Die(10) die this many times (Valheim's own death count, so older deaths count)
HasTitle("boss_eikthyr") another title is already earned
Custom(player => ..., label) any check you write

You can also subclass TitleRequirement, grant a title directly with TitleAPI.Unlock(id), and listen to TitleAPI.OnTitleUnlocked / TitleAPI.OnTitleEquipped / TitleAPI.OnSlotChanged. TitleAPI.GetSkillBonus(skill) and TitleAPI.GetSkillFloor(skill) return what the equipped titles currently give. TitleAPI.GetEquippedTitle() without a slot returns the main title.

The bonus is applied in Skills.GetSkillLevel, the same method every skill check uses, so your skill gets the bonus without any extra patch on your side.

Optional dependency

If your mod should also work without TitlesMod, use [BepInDependency("com.yourname.titlesmod", BepInDependency.DependencyFlags.SoftDependency)] and keep every TitlesMod call in a separate class, called only when Chainloader.PluginInfos.ContainsKey("com.yourname.titlesmod") is true. That way your mod never loads TitlesMod types when it is missing.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.