Sundial
Longer days and shorter nights inside Valheim's own day/night cycle. Pick the daylight share (vanilla 70%, default 80%); sleep, spawns and the day counter stay consistent. Server-synced and version-lo
About this mod Author’s original text
Sundial
Longer days and shorter nights for Valheim, inside the game's own day/night cycle. One DLL,
installed on the server and on every client.
What it does
Valheim is already 70 % day and 30 % night. It stretches the middle 70 % of each cycle over the
sun's path from dawn to dusk and fits the night into the rest. Sundial moves that split and changes
nothing else.
A full cycle is 30 minutes (the game's m_dayLengthSec is 1800 s):
| DaylightPercent | Day | Night |
|---|---|---|
| 50 | 15 min | 15 min |
| 70 (vanilla) | 21 min | 9 min |
| 80 (default) | 24 min | 6 min |
| 90 | 27 min | 3 min |
- The cycle length and the day counter do not change.
- Sleeping wakes you at the new dawn: not in the dark, and never a day later than vanilla would.
- Everything that asks the game whether it is day follows: the sun and light, spawns, sleeping,
bees, fishing, and any clock that reads the game's time of day. At the default, night-only spawns
get less time.
- Nothing is written per frame and nothing is stored in the world. Remove the mod and the world is
exactly vanilla again.
Setup
- Install on the server and on every client (BepInEx 5).
- Config: BepInEx/config/helix.sundial.cfg. Edits are picked up within 5 s, no restart. On a
server, the new values are pushed to everyone connected.
| Section | Setting | Default | Range | |
|---|---|---|---|---|
| 01 General | Enabled | true | | false = vanilla day/night. Synced from the server. |
| 01 General | DaylightPercent | 80 | 10 to 95 | Share of each cycle that is daylight. Vanilla is 70. Synced from the server. |
| 01 General | ConfigReloadSeconds | 5 | 0 to 300 | How often the cfg file is checked for edits. 0 = off. Local. |
| 02 Diagnostics | LogIntervalSeconds | 0 | 0 to 3600 | Seconds between [state] log lines. 0 = off. Local. |
Multiplayer
- The server's Enabled and DaylightPercent apply to everyone connected. A client cannot change
them.
- Every machine must run the same Sundial version, and the check works both ways:
- A client without Sundial, or with a different version, cannot join a server that runs it.
- A client with Sundial cannot join a server without it.
- Single player works as usual.
- Settings travel only when a player connects and when they change. Nothing is sent while you play.
Compatibility
- Sundial refuses to start next to another mod that changes the day/night cycle: any plugin whose
GUID or name contains longerdays, daynight, extendeddaytime, controltime, dagrnott,
customdaycycle, timecontrol, seasons or valheimplus. The match ignores case, spaces,
dots, dashes and underscores, so Valheim Plus and Day Night count.
- It checks the game's code before patching, and it checks that no other mod patches the same
three methods. If either check fails (after a game update, or with another mod), it logs one error
and that machine runs vanilla day/night.
- Keep every machine on the same mods and the same game build. Each machine runs these checks
on its own. If they fail on only one machine, that machine runs vanilla while the others run your
split.
- A conflicting mod installed on only one side does this.
- So does a game update that changes the day/night code and reaches the clients before the server
restarts: Valheim lets different game builds connect as long as the network version matches.
- It shows around dawn, dusk and waking up. The sun, the bed prompt and night spawns can disagree
for about a minute and a half each time. Restarting the server on the same build puts everyone
back in step.
- Mods that read the time of day follow the new split automatically.
Uninstalling
Delete the DLL on the server and on every client. Sundial stores nothing in the world and never
changes the cycle length or the day counter, so the world carries on in vanilla day/night from
where it was. Enabled = false does the same live, without a restart.
Performance
Sundial replaces one small function that the game calls once per frame to turn the cycle position
into t
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: