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

Details

Date Uploaded
2 weeks ago
Downloads
450
Size
106KB
ADDatHost Valheim hosting
30% off

Trinket Modifiers

Current version: 0.32.1

This is a standalone configurable passive-effect engine for the 13 Better Trinkets prefabs plus the Deep North Neckstabber and Witch Crown trinkets. It scans every inventory position, so a dedicated trinket-slot mod is optional.

Do not run the original BetterTrinkets DLL alongside this plugin. This project is intended to replace its passive-effect handling.

How it works

Each equipped trinket receives one native Valheim SE_Stats status effect. The effect is added through the normal SEMan pipeline, so Valheim calculates the bonuses like an armor-set effect and displays the native status-effect icon and tooltip.

The plugin does not patch outgoing HitData, write player maximum-resource fields, call Heal/AddStamina/AddEitr, or mutate shared equipment templates. It does add a display-only item-hover tooltip patch so the configured values are visible before equipping.

Configuration

Every trinket has two sections:

  • [Trinket Name] contains passive values.
  • [Trinket Name.Doubled] contains values used while adrenaline doubling is active, plus Duration in seconds.

The initial supported defaults mirror the original Better Trinkets configuration. The original one-time health, stamina, and eitr entries are not included because this project intentionally uses persistent native SE_Stats effects only.

Available native fields in each section are:

  • HealthRegenMultiplier, StaminaRegenMultiplier, EitrRegenMultiplier
  • Armor, Speed, SwimSpeed, Jump, FallDamageMultiplier
  • NoiseMultiplier, StealthMultiplier, MaxCarryWeight, TimedBlockBonus, StaggerMultiplier
  • DamageModifier, plus BluntDamage, SlashDamage, PierceDamage, ChopDamage, PickaxeDamage, FireDamage, FrostDamage, LightningDamage, PoisonDamage, and SpiritDamage
  • RunStaminaUseMultiplier, JumpStaminaUseMultiplier, AttackStaminaUseMultiplier, BlockStaminaUseMultiplier, DodgeStaminaUseMultiplier, SwimStaminaUseMultiplier, HomeItemStaminaUseMultiplier, and SneakStaminaUseMultiplier
  • Resistance
  • Skill1/Skill1Bonus, Skill2/Skill2Bonus, and RaiseSkill/RaiseSkillBonus

Skill1 and Skill2 use Valheim's native flat-skill slots. RaiseSkill uses the native skill-gain slot; its neutral multiplier is 1.0.

The stamina-use settings are config multipliers: 1.0 is unchanged, 0.75 means 25% less cost, and 1.25 means 25% more cost. The plugin converts these to Valheim's native additive fields, where 0.0 is neutral.

NoiseMultiplier, StealthMultiplier, and StaggerMultiplier use the same config convention: 1.0 is unchanged, while values below or above 1.0 reduce or increase the corresponding effect.

Global settings are in [General]:

  • Enabled
  • DebugLogging
  • DoublingOnAdrenaline
  • AdrenalineGainMultiplier — global, not per trinket; 0.0 disables adrenaline gain, 1.0 is unchanged, and 2.0 doubles adrenaline gain.

Maximum health, stamina, and eitr and one-time resource bonuses are deliberately not included. Valheim does not expose those as persistent SE_Stats modifiers, and the previous player-field workaround caused the resource fluctuation and save-risk problems seen in testing.

Build on Windows

From the project directory:

dotnet build .\TrinketModifiers.csproj --configuration Release `
  -p:GameDir="C:\Program Files (x86)\Steam\steamapps\common\Valheim" `
  -p:BepInExDir="$env:APPDATA\com.kesomannen.gale\valheim\profiles\valheim\BepInEx"

The DLL is written to:

%APPDATA%\com.kesomannen.gale\valheim\profiles\valheim\BepInEx\plugins\TrinketModifiers\TrinketModifiers.dll

The config is:

%APPDATA%\com.kesomannen.gale\valheim\profiles\valheim\BepInEx\config\com.gdall.trinketmodifiers.cfg

The project uses the normal Valheim and BepInEx DLLs. The Assembly Publicizer is useful for inspecting Valheim's private members, but the compiled plugin uses guarded reflection and does not require a publicized DLL at runtime.

Testing

  1. Disable the original BetterTrinkets DLL.
  2. Build 0.32.1 into the Gale valheim profile.
  3. Restart Valheim so the new assembly is loaded.
  4. Confirm the log says Trinket Modifiers v0.32.1 loaded.
  5. Equip one trinket and inspect the native status-effect icon and Crow tooltip.
  6. Change one config value, restart the profile, and test that field.

If an older config remains, the removed keys are ignored. The new native keys are created when the plugin loads.

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