dannanboi-ModifiersFramework icon

ModifiersFramework

A centralized framework that handles modifiers and buffs through APIs which other mods can use.

Last updated 4 hours ago
Total downloads 76
Total rating 0 
Categories Misc Libraries Tools Server-side Client-side Utility AI Generated Deep North Update
Dependency string dannanboi-ModifiersFramework-1.0.2
Dependants 1 other package depends on this package

README

Description

ModifiersFramework lets other Valheim mods apply temporary skills, gameplay modifiers and custom YAML buffs. Built for multiplayer efficiency and integrity, it keeps effects separate per player and source while calling mods control server authority and synchronize definitions and events.

Overview

Feature Description
Shared API Calling mods supply modifiers and identify their own sources.
Skills and gameplay modifiers Temporary skills, damage/resistances, action costs and refunds, regeneration, movement, carry capacity, adrenaline, stagger and tailwind.
Added elemental damage Fixed values or ranges for fire, frost, lightning, spirit and poison; added fire uses native torch burning.
Wet immunity wetImmune[true] clears and prevents Wet while active.
Trinket effects Parry bonus, armor, swimming speed, attack cost and instant health, stamina or eitr gains.
Food sources Effects follow successful consumption and native food lifetimes.
Conditional and timed sources Effects last until the caller removes them or their supplied duration expires.
Modifier full names Alphabetical names, units and input examples in modifiers.yaml.
Custom buffs YAML definitions combine a name, description, matching PNG icon and complete effectsList.
Native effect display Icons, timers and Wet-style colored tooltips; on/off effects show only their full name.
Live YAML updates Valid edits reload and notify callers without restarting; invalid edits retain the last valid catalog.
Saved effects Captured food effects restore automatically; generic sources can opt into persistence.
Multiplayer efficiency Cached totals and scheduled expiry minimize work; dedicated servers skip PNGs and display. No custom framework RPCs.
Bounded diagnostics Always-on logging uses background writes and overwrites output.log at 1 MiB.

See API.md for caller integration, modifiers.md for supported values and CUSTOM-BUFFS.md for YAML examples.

Configuration and values

The framework generates no .cfg file. First startup creates buffs.yaml, modifiers.yaml, icons/ and output.log under BepInEx/config/ModifiersFramework/. Existing YAML is preserved. Legacy customModifiers.yaml migrates to buffs.yaml when the new file is absent; if both exist, both are preserved and buffs.yaml is used. Caller API controls below are not YAML fields.

Section / option Default Meaning
buffs.yaml VikingExample with five effects Named buffs selected by calling mods using buff[callingName].
modifiers.yaml / Full name Built-in English labels Readable names under modifier keys; callers query GetModifierFullName. Missing rows use defaults.
buffs.yaml / top-level key — Required, case-sensitive callingName without spaces; also determines the PNG filename.
buffs.yaml / buffName — Required title shown in orange in Active effects.
buffs.yaml / buffText — Required white description; its value may be blank.
buffs.yaml / effectsList — Required list of modifiers applied together; [] creates a visual-only buff.
icons / callingName.png Shared fallback icon Supply a PNG matching the buff key, such as icons/VikingExample.png.
Caller API / showBuff true Show the source in the HUD and Active effects; hiding it preserves gameplay.
Caller API / showBuffTimers true Show remaining time and the timed buff's duration row.
Caller API / showModifierDescriptions true Show description and modifier rows.
Caller API / durationSeconds 0 Generic sources are untimed at 0; a positive duration expires automatically.
Caller API / persistOnSave false Enable saved generic sources with registered restoration metadata; food effects save automatically.
Diagnostics / debugging Always enabled Write lifecycle and failure messages to output.log.
Diagnostics / log limit 1 MiB Overwrite the log on rollover; no backup logs accumulate.

Both YAML files reload after 500 ms of quiet and notify subscribed callers. Full-name edits refresh on/off tooltip labels without reloading buffs or icons. Active values remain captured until reapplied; calling mods handle multiplayer synchronization.

Manual Installation

  1. Install BepInEx/plugins/dannanboi_ModifiersFramework.dll on clients and servers. Remove older or duplicate DLL copies before upgrading.
  2. Start the game or server once to generate buffs.yaml, modifiers.yaml, output.log and the icons/ folder under BepInEx/config/ModifiersFramework/.
  3. For multiplayer, edit the server/host's files. Use the calling mod's synchronization or deploy matching YAML and PNGs to clients.

Compatibility

Requires Valheim and BepInEx 5. Use ModifiersFramework 1.0.2 on required clients and servers. Mods replacing the same combat, stat or buff methods may need compatibility patches.

dannanboi Mod Philosophy

My mods aim to be small and modular, stay close to Valheim's vanilla experience, and work well together or independently. Enable all features to make bigger changes, or choose the ones that suit your playstyle. Your run should be yours to customize. Features described as "an added bonus" or "nice to have" should always be optional. In multiplayer, the server controls gameplay settings, while visual settings stay local to each player.

Credits

You, the player. Thanks for using my mod!