SWATsqad-GenerallyLitServerMod icon

GenerallyLitServerMod

Day and night length, stack size, item weight and a smoother network send rate. Independent day/night, server-authoritative, no restart to change.

Last updated 2 weeks ago
Total downloads 280
Total rating 0 
Categories Mods Server-side Client-side
Dependency string SWATsqad-GenerallyLitServerMod-1.1.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 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.2350

README

Generally Lit Server Mod

A handful of numbers. No content, no new items, no UI, no external calls.

Setting Default What it does
Day length in seconds 840 How long daylight lasts
Night length in seconds 360 How long night lasts
Stack size multiplier 1 Multiplies max stack of things that already stack
Item weight multiplier 1 Multiplies the weight of every item
Updates sent per second 30 How often a player's game sends what it controls

At 840/360, x1, x1 and 0 sends it changes nothing.

Generally Lit server runs: 7200s day, 300s night, 10x stacks, 0.8x weight, 30 sends per second.

Independent day and night

Vanilla keeps one cycle length and splits it 70/30 in EnvMan.RescaleDayFraction (raw 0.15-0.85 of the cycle is daylight). That split is hard-coded, which is why mods exposing only "day length" can never give a long day and a short night.

This rebuilds the same curve from your two values, so a two hour day with a five minute night works.

Smoother ships and players

Whatever a player's game controls (their character, a ship they steer, creatures near them) reaches everyone else only when that game sends it to the server. Vanilla aims for 20 sends a second on a fixed timer, and each send waits for the next frame, so in practice it is about 14. On a ship the whole deck visibly steps.

With this mod a player's game sends 30 times a second, in the same frame the timer fires. Everyone on the server sees that player, and anything they control, move more smoothly. It costs a little upload per player. Only player games are changed; the server's own sending is left alone.

Every player needs the mod for their own sends to be faster. Players without it still see everyone else's smoother movement.

Server-authoritative

The server sends its values to every client on join. Clients use them while connected, are told in the log when they differ, and get their own back on leaving. Editing your config while on a server does nothing and says so, rather than looking like a broken mod.

Stack size and weight come from the server's item database and the cycle runs off server time, so those work for clients without the mod. Installing it everywhere keeps tooltips and lighting consistent and gives everyone the faster sends.

Config changes need no restart

The config file's timestamp is checked every 2 seconds. Edit it and the values apply and are pushed to everyone connected. Nobody gets disconnected for a number change.

One warning worth reading

Lowering the stack multiplier destroys items. Anything stacked above the new maximum is cut down the next time the world loads - not when you change the setting. On a dedicated server that is the next restart, often minutes after the last player leaves, so it looks fine for hours and then is not.

The mod remembers the highest multiplier it has run with and prints a loud warning when you lower it. Back up the world first, or spread over-sized stacks out before changing it. Raising is always safe.

Install

r2modman: install from Thunderstore, or Settings -> Import local mod -> pick the zip. Manual: drop GenerallyLitServerMod.dll into BepInEx/plugins/.