You are viewing a potentially older version of this package. View all versions.
sighsorry-BossRules-1.1.2 icon

BossRules

Forsaken powers overhaul, despawn abandoned bosses with offering refunds, hover an altar to see the offering and boss, rotate Forsaken Powers remotely, block duplicate summons, personalize boss stones, and pressure tames near bosses.

Date uploaded 2 days ago
Version 1.1.2
Download link sighsorry-BossRules-1.1.2.zip
Downloads 561
Dependency string sighsorry-BossRules-1.1.2

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2351 icon
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.2351

README

BossRules

Forsaken powers overhaul, despawn abandoned bosses with offering refunds, hover an altar to see the offering and boss.
Rotate Forsaken Powers remotely, block duplicate summons, personalize boss stones, and pressure tames near bosses.


You can change the boss despawn range and delay in the config.


Getting away from the boss with also count for despawn.


If you get back in time, despawn would be canceled. If the boss does despawn offerings would be refunded.

Highlights

  • Edit boss altars without rebuilding locations by hand.
  • Block duplicate boss summons from both altars and CreatureSpawner.
  • Despawn abandoned bosses and optionally refund real altar offerings.
  • Pressure tamed creatures near bosses so boss arenas stay dangerous.
  • Give each player their own boss stone unlock state.
  • Let players rotate unlocked Forsaken Powers remotely.
  • Rebalance Forsaken Power duration, cooldown, costs, regen, damage, armor, movement, skills, and tooltips.
  • Sync server YAML to clients through ServerSync.
  • Reload YAML while the game is running.

Why Use BossRules

BossRules focuses on the awkward parts of boss management that usually live across several systems:

  • Altars can be edited by prefab name with generated reference data.
  • Boss duplicate protection keeps respawn timers honest instead of letting cooldowns finish in the background.
  • Altar refunds are tied to actual altar-summoned bosses, not nearby world spawns.
  • Boss stones and Forsaken Powers can be customized without turning the mod into a general status-effect editor.
  • Dedicated servers remain the source of truth for synced rule files.

Generated Files

BossRules creates its files under:

BepInEx/config/BossRules/

Files:

  • BossRules.altar.yml: boss altar and boss item stand overrides.
  • BossRules.altar.reference.yml: generated reference for loaded boss altar and boss stone prefabs.
  • BossRules.yml: boss despawn and boss tamed pressure rules.
  • BossRules.forsakenPowers.yml: Forsaken Power stat edits in a DataForge-compatible row format.
  • sighsorry.BossRules.cfg: synced BepInEx feature toggles.

Server admins should edit the YAML on the server or host. Synced YAML is pushed to clients automatically. Optional BossRules.<Language>.yml or .json message translations are discovered recursively under BepInEx. The release package includes BossRules.English.yml as an editable translation template.

Boss Altars

BossRules.altar.yml supports compact altar entries:

  • prefab
  • enabled
  • offeringBowl
  • itemStands

Use the generated BossRules.altar.reference.yml to find real prefab names, item stand paths, and current altar values. Copy only the rows you want to override into BossRules.altar.yml.

When a location contains multiple OfferingBowl components, the generated reference writes one row per bowl with an offeringBowl.path. Single-bowl locations keep the compact pathless format. Existing pathless overrides remain compatible and select the first bowl, while an explicit missing path skips that row.

BossRules intentionally does not own general location editing, object drops, runestone pins, or vegvisir rewards.

Personal first-victory summons (optional YouAreNotWorthy integration)

With BossRules 1.1.2+ and YouAreNotWorthy 1.0.8+ installed on the host/server and clients, the synced Personal Progression Summons option (default On) enables these inner altars:

Altar Free summon condition
Queen (offeraltar_queen, inside DG_DvergrBoss) Personal defeated_queen is missing
Frozen King (offeraltar_FrozenKing_bossroom) Personal LastBossGate_Open is present and defeated_frozenking_p3 is missing

Use the displayed Use interaction (normally E); no offering item in the inventory is required. Using the matching offering item also requests a free summon when eligible. YNW's item progression requirements still apply. The Frozen King final phase key is used, not the first phase's defeated_frozenking. After personal completion, the normal offering and configured amount apply. The exterior Frozen King gate keeps its normal cost and key-grant behavior.

These are free attempts until completion, not a one-use voucher or a location reset. An eligible player can summon for their group. Free summons have no offering refunds, including after despawn, save/reload, or a later setting change. Native spawn delay/effects and existing enabled duplicate/cooldown rules remain. Bowls changed to use item stands, grant a key, spawn an item, or summon a different boss are excluded from this integration.

The server checks YNW's authenticated character snapshot and item requirement; temporarily unavailable data does not authorize a free summon or silently charge the local request. The native object owner resolves the actual dungeon bowl and its configured item, because a dedicated server may have only its ZDO loaded. Only that owner may consume the short-lived server approval. Ownership changes or expiry cancel the request; press Use again. Once native delayed spawning has begun, its usual lifecycle applies. This follows Valheim's object-owner trust model and YNW's client-owned progression snapshots; it is not an anti-cheat ledger.

YNW without the new item-use API, or no YNW, leaves normal paid summons in place. No existing altar YAML or personal-key save format needs migration.

Boss Rules

BossRules.yml controls runtime boss behavior:

  • despawn: default range/delay plus compact rows in prefab, despawnRange, despawnDelay, refunds format.
  • bossTamedPressure: a global rule for tamed creatures near bosses.

BossRules.forsakenPowers.yml controls selected Forsaken Power stat edits. Its top-level list is intentionally compatible with DataForge effects.yml rows.

Despawn rows use despawn.defaults when range or delay is omitted. Set despawnRange to 0 to disable despawn for one boss prefab.

despawn:
  defaults: 64, 90
  rules:
  - Eikthyr
  - Bonemass, 96, 120
  - Dragon, , 180
  - GoblinKing, 0
  - Fader, 128, 180, false

Refund values:

  • omit the fourth value for true
  • true: refund the actual altar offering when the boss was marked as altar-summoned
  • false: no refund

Refunds drop at the original OfferingBowl position when possible. Bosses from CreatureSpawner, SpawnSystem, or other world sources do not receive altar refunds just because they died near an altar.

Newly generated initial Queens in the Queen boss room and initial Frozen Kings in DN_Bossroom are protected from default automatic despawn until a living player approaches within the configured XZ despawn range and a height difference of at most 32m. Approach is checked once per second by the boss's network owner. It does not require opening the door, entering the room, line of sight, or combat: a nearby player outside a wall at the same height can release protection. After that first approach, the existing XZ-only range and countdown apply, without altar refunds. An explicit row for the boss in despawn.rules takes precedence, including before the first approach.

Initial provenance and first approach are saved on each boss ZDO, so they survive normal saves, reloads, and ownership changes. This applies to new Full/Ghost location or room generation, including resets; existing bosses with unknown provenance are not reclassified, and already missing bosses are not restored. Altar resummons keep their existing despawn and refund behavior. The approach checks must also be installed on clients that can own the boss.

Localization

BossRules includes English and Korean message translations. Add overrides in BossRules.<Language>.yml or .json; the file name uses Valheim's language name, for example BossRules.Korean.yml.

bossrules_message_despawn_start: "{name} will despawn in {seconds}s unless someone returns."
bossrules_message_despawn_reminder: "{name} will despawn in {seconds}s."
bossrules_message_despawn_canceled: "{name} despawn canceled."
bossrules_message_boss_tamed_pressure: "Tamed creatures near a boss are weakened."
bossrules_message_forsaken_power_rotate: "Rotate"

Embedded English is the fallback for missing message keys. Despawn names are resolved on the receiving client in this order: the client's current localized character name, its English localized name, then the prefab name.

The former localization: section in BossRules.yml is deprecated and ignored so older files still load; new default files no longer contain it.

Forsaken Powers

BossRules can rebalance selected SE_Stats fields for Forsaken Powers:

  • duration and cooldown
  • guardian power activation adrenaline gain through the synced config
  • stamina costs
  • block stamina flat cost and timed block bonus
  • outgoing damage
  • incoming damage modifiers
  • health, stamina, and eitr regen
  • carry weight
  • flat and percent armor
  • movement speed and jump height
  • skill levels
  • adrenaline and stagger gauge
  • vanilla status attributes such as SailingPower

BossRules.forsakenPowers.yml uses the same compact style as DataForge status effects:

- effect: GP_Eikthyr
  time: 31, 120
  staminaDrainModifier:
    run: -0.5
    jump: -0.5

- effect: GP_Moder
  time: 31, 120
  attributes: SailingPower
  stats:
    speedModifier: 0.1
    jumpModifier: 0, 0.2, 0

Modifier values use Valheim/DataForge-style factors. For example, -0.5 means 50% lower cost, 0.1 means +10%, and regenMultiplier: 2, 1, 1 means health regen x2 while stamina and eitr stay unchanged.

Vanilla vs BossRules Forsaken Powers

The table below compares vanilla GP_ effect rows from DataForge effects.reference.yml with the BossRules preset in BossRules.forsakenPowers.yml.

All seven default powers use time: 31, 120: 31 seconds of duration and a 120-second cooldown. Existing YAML files are preserved; edit their time entries to adopt these defaults.

Effect Vanilla effect BossRules effect
GP_Eikthyr time: 300, 1200
Stamina drain: run/jump/swim -0.6
time: 31, 120
Pickaxe damage 0.5
Stamina drain: run/dodge -0.5
Speed 0.1
Blunt: SlightlyResistant
GP_TheElder time: 300, 1200
Regen 1.3, 1, 1
Chop/pickaxe damage 0.6
time: 31, 120
Chop damage 0.5
Stamina drain: swim/sneak -0.5
Regen 2, 1, 1
Poison: SlightlyResistant
GP_Bonemass time: 300, 1200
Block 0, -5
Block stamina drain -1
Blunt/slash/pierce: SlightlyResistant
time: 31, 120
Block stamina drain -0.5
Block 0, -5
Armor 20, 0.2
Frost: SlightlyResistant
GP_Moder time: 300, 1200
SailingPower
Speed 0.1
Carry weight 300
Frost: Resistant
time: 31, 120
SailingPower
Stamina drain: jump -0.5
Carry weight 300
Jump 0, 0.2, 0
Farming/Fishing skill 25
Fire: SlightlyResistant
GP_Yagluth time: 300, 1200
Farming skill 25
Lightning: Resistant
Blunt/slash/pierce/chop/pickaxe/fire/frost/lightning/poison/spirit damage 0.1
time: 31, 120
Fire/poison/frost/lightning/spirit damage 0.1
Regen 1, 1, 2
Pierce: SlightlyResistant
GP_Queen time: 300, 1200
Regen 1, 1, 2
Sneak stamina drain -1
Poison: Resistant
time: 31, 120
Pierce/blunt/slash damage 0.1
Attack stamina drain -0.1
Slash: SlightlyResistant
GP_Fader time: 300, 1200
Adrenaline 1
Stagger -0.5
Attack damage None, 0
Fire: Resistant
time: 31, 120
Adrenaline 1
Stagger -0.5
Lightning: SlightlyResistant

Boss Stones

BossRules owns personalized boss stones and remote Forsaken Power selection.

  • Personalized Boss Stones: each player keeps their own unlocked boss stone powers.
  • Remote Forsaken Power Selection: players can rotate through unlocked powers without returning to the Start Temple.
  • Rotate Forsaken Power Shortcut: client-only shortcut for remote rotation.

Console commands:

  • bossrules:inspect bossstone
  • bossrules:bossstone reset <exactPlayerName>

Compatibility

BossRules is designed to sit beside DropNSpawn:

  • Use BossRules for boss altars, boss stones, Forsaken Powers, boss despawn, and boss tame pressure.
  • Use DropNSpawn for creature drops, object loot, spawners, and world spawn tables.
  • Use UsefulRunestones for pinless RuneStone global pins and Vegvisir rewards.

If another mod owns the same boss system, disable the overlapping BossRules feature in the BepInEx config.

GitHub

https://github.com/sighsorry1029/BossRules

CHANGELOG

1.1.3

  • Preserve the original paid offering and altar position across configured boss phases, so later phases can refund that offering when removed by the existing despawn rules. Support direct death-effect transitions and a single persistent Ragdoll bridge, including Frozen King and MonsterLabZ's Ash Huldra Queen. Phase kills and the final kill do not directly refund items.
  • Track configured non-boss phases only for altar-summoned instances unless an explicit despawn rule applies. Preserve free-summon records, per-phase despawn overrides and duplicate-transfer protection; natural/initial spawns receive no offering refund record. Previously spawned later phases without a record cannot be refunded retroactively.
  • Update BossRules on the host/server and all clients. MonsterLabZ remains optional.

To configure phase chains explicitly, manually add the following top-level section to BepInEx/config/BossRules/BossRules.yml on the server (or your local game for single-player). If bossPhases already exists, edit that section instead of adding a duplicate:

bossPhases:
  - [FrozenKing, FrozenKing_p2, FrozenKing_p3]
  - [ML_AshHuldraQueen1, ML_AshHuldraQueen2, ML_AshHuldraQueen3]

Use only the character prefab names in transition order. The intermediate ML_AshHuldraQueen2_Transform Ragdoll is detected automatically and must not be listed. Other chains can be added when they use the supported transition paths; custom script/RPC transitions and branching spawns are not inferred.

Existing YAML files are preserved. These two chains also apply by default when bossPhases is omitted or null, so manual addition is optional. An explicit list replaces the defaults; keep both rows when adding another chain if you want to retain them. Use bossPhases: [] to disable inheritance. Uninstalled prefabs remain inactive. Changes use the existing live reload and server synchronization.

Previous releases

Version Update Notes
1.1.2 - Add optional personal first-victory summons with YouAreNotWorthy 1.0.8 or later: summon the Queen for free until personal defeated_queen, and the inner Frozen King with personal LastBossGate_Open until final defeated_frozenking_p3. The exterior gate keeps its normal cost.
- Eligible players can use the altar's Use interaction without carrying offerings; matching item use also requests a free summon. Keep YNW item progression requirements and normal offering costs after completion.
- Validate free requests through the server and current altar owner, rejecting duplicate, expired, or invalid approvals. Free summons never produce offering refunds. Add English/Korean prompts and isolated protocol, API, refund, and game-Mono checks. Update both mods on the host/server and clients.
1.1.1 - Spread initial discovery of saved bosses and configured despawn targets across server Updates, while continuing live observations and existing countdowns. Restart discovery when configuration or world state changes; preserve initial-boss protection and offering-refund rules.
- Remove the Client Debug Log option and its diagnostic-only processing.
- Set all seven generated Forsaken Power time defaults to a 31-second duration and 120-second cooldown; existing YAML files are preserved.
- Hide vfx_LastBossGate_destroyed from altar hover summon text while retaining offering information and gate activation behavior.
1.1.0 - Protect newly generated initial Queens and Frozen Kings from default automatic despawn until a living player approaches within the configured XZ range and a height difference of at most 32m. First approach is recorded on the boss ZDO; after that, the existing XZ-only countdown applies.
- Preserve explicit despawn-rule priority and altar resummon refunds. Existing bosses with unknown provenance are not reclassified, and missing bosses are not restored. Clients that can own the boss also need this update.
- Add isolated initial-boss regression checks and update the BepInEx package dependency to 5.4.2351.
1.0.10 - Prevent remote clients from generating altar reference data during connection by requiring the actual runtime-server role in addition to ServerSync authority; single-player, listen-host, and dedicated-server generation remains enabled.
- Rebuild against the current Valheim 1.0.12 original client assemblies after checking the relevant Harmony, direct API, reflection, and dedicated-server compile contracts.
1.0.9 - Support locations with multiple OfferingBowl components through optional offeringBowl.path values; generated references include paths only for multi-bowl locations, while existing pathless overrides keep selecting the first bowl.
- Centralize YAML load/publish handling, localization key normalization, and Guardian Power state restoration without changing their external behavior.
- Remove an unused legacy assembly binding configuration.
1.0.8 - Add Valheim 1.0.7 compatibility using original game assemblies and the fixed ServerSync valheim-1.0.7-r1, resolving the startup ZRoutedRpc.Everybody failure.
- Update Harmony targets, sector-coordinate and simulation-distance calls, boss-stone visuals, and altar refund attachment lookup for the new game APIs while preserving authority, retry, and exact-once refund behavior.
- Replace direct private game-member access with public APIs or cached Harmony accessors, and make partial-startup cleanup safe.
1.0.7 - Prevent repeated boss-stone reset requests from clearing newly unlocked powers again; retain bounded completion results across retries and handle out-of-order delivery within the retained request window.
- Restore the temporary Guardian Power adrenaline value when activation throws, while preserving later patches' changes after normal restoration.
- Fix despawn lookup readiness checks for negative game-data signatures.
- Reduce redundant boss tamed pressure state and disabled altar hover logging allocations.
- Group altar refund and boss-stone reset code by responsibility, move altar context resolution out of hover formatting, and remove redundant altar path checks.
1.0.6 - Version-only release rebuilt from 1.0.5; functional behavior is unchanged.
1.0.5 - Resolve personalized boss-stone sacrifices from the live ItemStand ZDO plus its guardian-power identity, avoiding cloned-location hierarchy rediscovery and shared-ZNetView ambiguity.
- Recognize Expand World Data colon aliases for supported boss-stone location clones.
- Retry briefly while a receiving client's cloned boss-stone instance is still loading, while preserving the player's position at sacrifice receipt so late arrivals do not gain the visual.
- Removed negative boss-stone handle caching and added bounded sender/retry tracking plus expanded inspection diagnostics.
1.0.4 - Reload only the BossRules YAML file that changed, including delete and rename events, while preserving main-thread debounce and source-of-truth authority.
- Hardened Forsaken Power reapplication across ObjectDB/HUD recreation and made optional DataForge ownership subscriptions recover cleanly from reconnect and reflection failures.
- Simplified altar, despawn, boss-pressure, boss-stone, and duplicate-spawner runtime ownership by removing redundant state and forwarding layers while preserving configured behavior.
1.0.3 - Localized despawn names on the receiving client with current-language, English, then prefab fallback; moved BossRules messages to embedded/external language files and included BossRules.English.yml as an editable package template.
- Removed message localization from the active BossRules.yml schema while retaining parse-only compatibility for older files.
- Added dedicated Mistlands_DvergrBossEntrance1 dungeon altar reference/configuration support.
- Grouped altar references by Valheim/mod ownership and fixed legacy vanilla location classification.
1.0.2 - Removed unused range, runtime, and write-only state paths and simplified rules/Forsaken configuration ownership and server player proximity queries.
- Removed idle per-frame Forsaken Power signature allocations and moved YAML watcher authority/debounce work onto the Unity main thread.
- Added explicit cleanup for altar, despawn, Forsaken, location, hover, and HUD runtime state across shutdowns and world changes.
- Reduced repeated loose-altar reconciliation with configuration/context generation caching while preserving exact Expand World Data cloned-location resolution.
- Hardened personalized boss-stone sacrifice and reset RPC validation, including server-admin reset authorization and target acknowledgement checks.
1.0.1 - Added separate synced BossRules.forsakenPowers.yml support with DataForge-compatible Forsaken Power rows and DataForge ownership handoff.
- Added despawn.defaults so boss despawn range and delay can be shared by compact despawn rules.
- Improved altar reference/location resolution for Expand World Data cloned locations and refreshed altar hover caching.
- Optimized boss tamed pressure and runtime rule matching to reduce repeated scene work.
1.0.0 - Initial Release