DvergrAstrolabe
Strictly server-side Valheim 1.0 mod - no client install ever. Set how many real minutes daylight and night each last; the server paces the world clock and every client follows.Changelog
0.3.1
Package-only update: README clean-up. No functional change, the plugin DLL is identical to 0.3.0.
0.3.0
Fixed
- Sunrise and sunset were hardcoded at vanilla's raw day-fractions 0.15 and 0.85. With a mod that moves them
(Gamma of Night Lights' day/night cycle sets the night as a percentage of the day) Astrolabe paced the wrong
stretch: at Gamma's
3600 / 75the real daylight band is 900 game-seconds, but Astrolabe fitted 1260 intoDayMinutes, so every rate was off by 1260/900 and the segment it treated as the long one was the short one. Found on ProximaMaxi.
Added
- The daylight band is read from the running game. Astrolabe samples
EnvMan.RescaleDayFraction(the patched version, whoever patched it) to find where the game's day begins and ends, and paces that band; the day length was already read live. Re-read every 5 seconds, at every sunrise and sunset and after a config edit, so a synced change on the other mod is picked up within seconds. Gamma sets the size and the split of the day, Astrolabe sets how long it takes in real minutes, and when both segments land on the same multiplier there is no fast-day, slow-night contrast at all: Gamma3600 / 75+ Astrolabe15 / 45runs a flat 1x with a 45-minute night,7200 / 75+15 / 45a flat 2x. See Pairing with Gamma of Night Lights in the README. Detection that fails falls back to the vanilla knees and logs an error; an unmodded game detects exactly 0.15 / 0.85 and behaves as 0.2.1 did. [5 - Compatibility]:BandDetection=Auto(default) orVanilla(force the vanilla knees, the escape hatch), andBandProbeSteps(1000) for how finely the band is sampled.- Logging. The schedule line reports the daylight band (
daylight band 900 of 3600 game-s (25%, sunrise and sunset moved by another mod)), aday cycleline is printed when the world loads and whenever the band or the day length changes, andVerboseLoggingadds the two detected fractions. A warning names the setting and the number whenever a schedule implies a nominal rate at or under 0.2x (progress drift on client-owned fires, beehives and sap collectors) or fast enough that one clock push moves the sun more than a degree (about 11x at the default 0.5 s push interval). When another mod has moved the band, one note reminds you that it must be on the clients too.
0.2.1
Fixed
- Rebuilt against Valheim 1.0.16 and re-verified (static reference check on client and dedicated server, headless 1.0.16 dedicated-server boot).
0.2.0
Fixed
- Boats took water-impact damage under sail while the schedule was active (60-150 hull damage a minute on
a Karve at a 40-minute day, with constant bobbing). Every clock push moved an unmodded client's physics
water surface in a single step, and vanilla's
Ship.UpdateWaterForcecounts a jump like that as a slam: 10 blunt per hit, up to thirty hits a minute, whenever someone is aboard. The sun and the rendered water are smoothed; the surface boats float on is not, whatever the push interval. Found on the live server through Wonderland's boat-upkeep log.
Added
[4 - Boats]. The whole server's clock runs at vanilla speed while any player is withinPauseRadius(64 m) of a boat under way orMooredRadius(24 m) of one at rest, where pushes change nothing; the switch is seamless.PauseFor=Ships(default),Water(also anyone over water) orOff;UnderWaySpeedandCheckIntervaltune the detection. A boat docked beside a base only pauses it for someone on or beside the deck. The README's Boats section explains exactly how time behaves around boats.HoldSchedule(default on) andCatchUpLimit(default 4) in[2 - Day And Night]. Every sunrise and sunset is now held to its scheduled time: after a pause near boats, a server hitch or a mid-day config edit, the rest of the segment runs faster or slower (within the limit) to land the boundary on time. A 40-minute day absorbs about 18 minutes of boating, a 5-minute night about 4. Off = fixed rates, as 0.1.0 behaved.- Self-verifying sunrise and sunset lines. With
VerboseLoggingon, each line now reports how long the segment that just ended really ran, what was scheduled, and how much of it was spent at vanilla speed near boats; every pause and resume is logged with who and which boat. - Boat guard self-test at startup ("boat guard ready: sector query OK ..."). If the lookup ever throws, the mod logs an error and keeps the clock at vanilla speed until restart rather than risk hulls.
0.1.0
Added
- Day and night length in real minutes.
DayMinutes(sunrise to sunset, vanilla 21) andNightMinutes(sunset to sunrise, vanilla 9) in[2 - Day And Night]. The server paces its authoritative world clock (ZNet.UpdateNetTime) at a different rate inside and outside the daylight band, so every connected client sees the new lengths with nothing installed. The clock itself, the day counter, sleeping and the world save are untouched: a day is still 1800 game-seconds, it just takes as long as you say in wall time. - Smoother sun at rates far from 1x.
ClockPushIntervalin[3 - Client Sync](default0.5s) pushes the clock to clients more often than vanilla's 2 s, shrinking the correction each push applies. Set2to add no extra traffic. - Live config reload. Edit the cfg on a running server; the new schedule is picked up within 5 seconds and logged.
