You are viewing a potentially older version of this package. View all versions.
Glasir-ClockDaddy-0.1.2 icon

ClockDaddy

Game clock that nags you to bed at 5 PM game time (chime, blink, End to silence) plus a next-weather icon. Everything set live from F1. I'm not your daddy.

Date uploaded 2 weeks ago
Version 0.1.2
Download link Glasir-ClockDaddy-0.1.2.zip
Downloads 9
Dependency string Glasir-ClockDaddy-0.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

ClockDaddy

A Valheim clock that tells you when to go to bed.

Someone on our server needed reminders to sleep. Someone else said "I'm not your daddy." So now there's a mod for it.

What it does

  • Clock on screen. Shows game time and day number. Put it anywhere, any size, any color.
  • Heads-up at 4 PM game time. One ping and "Head for bed soon." Once, no blinking.
  • Bedtime ping at 5 PM game time. Plays a chime and pops up "Time for bed." If you're still up, it pings again every couple of minutes (you choose how often and how many times).
  • Blinking clock. From bedtime until you're in bed, the clock flashes and adds a "BEDTIME" line.
  • Next-weather icon. A small icon of the weather that's coming next, with "Rain in 3m 20s" beside it. Turn it on or off and move it anywhere from F1.
  • Silence it for the night. Press End and it shuts up until tomorrow night. Press End again to undo.
  • Turn the alarm off entirely. Ctrl+End switches the whole alarm off or back on, and it stays that way.
  • Set everything from F1. Every setting is in the Configuration Manager window (F1) and takes effect immediately while you play. No config file editing needed.

It stops by itself when you get in bed, and resets every evening. The mod only runs on your own game: install it yourself for your own reminders. The server doesn't need it.

Settings (F1)

Section What's there
1 - Clock Show/hide, clock text template, time format, minute rounding, hide on map/menus/HUD
2 - Clock Look Position X/Y (%), alignment, font size, scale with resolution, bold text, colors, outline
3 - Bedtime Reminder On/off; Heads-Up Time (4:00 PM), Bedtime (5:00 PM) and Give Up At (6:00 AM), each picked from a drop-down of game times in 15-minute steps; heads-up and bedtime messages, message text and where it shows, sound (Chime / Bell / Beeps / None), volume, repeat interval, max repeats, Test Ping button
4 - Blink Blink on/off, blink color, blink speed, the extra "BEDTIME" clock line
5 - Weather Icon On/off, position X/Y (%), icon size, label text and size
6 - Hotkeys Silence Tonight (default End), Toggle Alarm on/off (default Ctrl+End), Toggle Clock (default Home)

The defaults are the AzuClock setup our server already used: "Game Time / Current Day / Real Time" in gold, green and pink across the top, 12-hour time, Home to hide it.

Clock text tokens

{gametime} {day} {tod} (Morning/Afternoon/Evening/Night) {realtime} {bedtime} {bedtimein} (game time left until the reminder) {biome} {weather} {nextweather} {weatherin} (real time until the weather changes) {silencekey}. AzuClock's {0} {1} {2} {3} also work, so an AzuClock clock string can be pasted straight in.

Type \n for a new line. Unity rich text works: <b>, <i>, <color=#ffcc00>, <size=18>.

Example: <b>{gametime}</b> Day {day}\n<size=16>bed in {bedtimein}</size>

Weather icons

The forecast re-runs the game's own weather roll for the next period, so it is exact as long as you're still in the same biome when the weather changes. There's no icon in places where the weather is fixed (crypts, caves, raids, boss fog).

Ten icons: clear_day clear_night mist light_rain rain storm snow snowstorm ash_rain dark. To use your own, put same-named PNGs (square, transparent) in BepInEx/plugins/ClockDaddy/icons/. They replace the built-in ones, no rebuild needed.

Install

Use r2modman / Thunderstore Mod Manager, or drop ClockDaddy.dll into BepInEx/plugins/ClockDaddy/. The F1 window comes from a Configuration Manager mod. Any of them works (shudnal's ConfigurationManager, Azumatt's Official BepInEx ConfigurationManager); it is not a hard dependency so you don't end up with two. Without it the settings are still in BepInEx/config/com.n8daniels.clockdaddy.cfg.

Building

  1. Copy Environment.props.example to Environment.props and set your Valheim path.
  2. dotnet build ClockDaddy.sln -c Release
  3. powershell -ExecutionPolicy Bypass -File tools\Build-Package.ps1 builds artifacts\ClockDaddy.zip.

Testing

An in-game harness loads a throwaway local character and world, winds the clock to bedtime and checks everything, then quits. See docs/TESTING.md.

Releasing

Bump the version in package/manifest.json, ClockDaddyPlugin.cs and CHANGELOG.md, build the package, then:

gh release create vX.Y.Z artifacts\ClockDaddy.zip --notes-file CHANGELOG.md

The GitHub Action uploads that zip to Thunderstore as Glasir-ClockDaddy (needs the THUNDERSTORE_TOKEN repo secret).

Inspired by Azumatt's AzuClock. Written from scratch.

CHANGELOG

Changelog

0.2.0

  • Snooze: Page Down hushes the bedtime reminder for a few minutes (Snooze Length, default 3 real minutes), then it pings again and the repeats start over. Also a Snooze button in F1.
  • Six new ping sounds: Cuckoo, Music Box, Marimba, Wind Chimes, Triangle, Gong.
  • Custom ping sound: pick Custom and drop a WAV at plugins/ClockDaddy/sounds/custom.wav.
  • New {snoozekey} token. The default BEDTIME clock line now mentions it (existing configs keep their own line).

0.1.4

  • Settings file renamed to com.laoch.clockdaddy.cfg. Your old settings are moved over automatically the first time you start the game with this version.
  • Mod page no longer shows the developer sections (building, testing), whose links were broken.

0.1.3

  • Mod page text tidy-up. No changes to the mod.

0.1.2

  • Fixed: typing in the F1 settings no longer triggers game keys (typing "m" opened the map). Works for every mod's text fields in F1, not just ClockDaddy's.
  • Fixed: waking up after sleeping could say "Time for bed." Going to bed now counts for the whole night: no more pings after you get up, until the next evening.
  • Fixed: a rare extra ping right after a big time jump.

0.1.1

  • New mod icon.

0.1.0

  • On-screen game clock with tokens, positioned and styled from F1. Defaults match the AzuClock setup our server already used, and AzuClock's {0}-{3} tokens work.
  • Heads-up ping at 4 PM game time ("Head for bed soon."), once per night.
  • Bedtime reminder at 5 PM game time: chime + "Time for bed.", repeat pings until you're in bed.
  • Clock blinks at bedtime; End silences it for the night; Ctrl+End turns the alarm off/on; Home hides the clock.
  • Next-weather icon with a countdown, toggle and position in F1. Icons can be replaced by dropping PNGs into plugins/ClockDaddy/icons/.