LessSleep

v1.0.0·Updated 2026-09-21

Sleep voting for dedicated servers: skip the night before everyone is in bed, if a configurable percentage of players agree. Works with vanilla clients.

About this mod Author’s original text

LessSleep

Sleep voting for Valheim dedicated servers: skip the night before every single player is

in bed, if enough people agree.

  • Server-driven: the server decides when to ask and when the night skips.
  • No client is required: on a server where nobody runs the mod, it silently behaves like

auto-skip (see How it works).

  • Clients get a prompt: awake LessSleep clients see a message and can vote with Y / N

or by typing yes / no in chat.

How it works

  • When at least PercentInBedToStartVote (default 50%) of online players are in bed

(and at least MinimumPlayersInBed), the server opens a vote.

  • Sleeping players are treated as a yes (they are the ones asking - it's their night too).
  • Awake players running LessSleep are asked to accept or decline.

If no awake player runs LessSleep, the vote passes immediately (auto-skip).

  • The vote passes when at least VotePercentOfAwakeToPass of awake modded players accepted,

and fails on timeout or when everyone voted no.

  • On a pass the server skips to morning exactly like vanilla sleeping does.

Installation

Server

Install BepInExPack_Valheim and drop LessSleep.dll into BepInEx/plugins on the server.

Clients (optional, but recommended)

Same thing: install BepInExPack_Valheim, drop LessSleep.dll into BepInEx/plugins.

Clients without the mod still see the vote messages and the night still skips for them,

they just cannot cast a vote.

Configuration

Server config (BepInEx/config/LessCx.LessSleep.cfg):

| Setting | Default | Description |

| --- | --- | --- |

| PercentInBedToStartVote | 50 | Percentage of online players that must be in bed to start a vote. |

| MinimumPlayersInBed | 1 | Minimum number of players in bed before a vote can start. |

| VotePercentOfAwakeToPass | 50 | Percentage of awake LessSleep clients that must accept. |

| VoteTimeoutSeconds | 30 | How long a vote stays open. |

| VoteCooldownSeconds | 60 | Wait after a failed vote before a new one can start. |

Client config:

| Setting | Default | Description |

| --- | --- | --- |

| EnableVotePrompt | true | Allow voting with the Y and N keys. |

| AllowChatYesNo | true | While a vote is open, typing yes or no in chat casts your vote. |

Notes

  • The server never needs to know which clients run the mod to skip; the modded-client list

is only used to decide who gets asked.

  • Voting is intentionally simple: one vote per player, last vote wins, votes are only accepted

from connected players that announced themselves.

Building

dotnet build src/LessSleep.csproj -c Release./scripts/pack.sh # produces dist/LessCx-LessSleep-.zip

Reference paths default to the macOS Steam install and can be overridden:

dotnet build src/LessSleep.csproj -c Release \

-p:ValheimManagedDir=".../Steam/steamapps/common/Valheim/valheim.app/Contents/Resources/Data/Managed" \

-p:BepInExCoreDir=".../Steam/steamapps/common/Valheim/BepInEx/core"

CI / releasing

| Workflow | Trigger | What it does |

| --- | --- | --- |

| build | push to main, pull requests | compiles and uploads the package as a build artifact |

| publish | tag vX.Y.Z or manual dispatch | stamps the version, builds, publishes with tcli, creates a GitHub release |

CI has no game install, so.github/actions/prepare-refs downloads the Valheim dedicated

server with SteamCMD (anonymous) and the BepInEx core into a cached.refs/ directory. Game DLLs are never committed to this repository. When Valheim updates,

bump the cache key in.github/actions/prepare-refs/action.yml so CI picks up fresh

reference assemblies.

One-time setup: create a service account for the LessCx team

(Settings > Teams > LessCx > Service Accounts) and store its token as a repository secret:

gh secret set TCLI_AUTH_TOKEN --repo LovelessCodes/LessSleep

Release: bump version_number in manifest.json (and CHANGELOG.md), commit, then:

git tag v1.0.1 && git push origin v1.0.1

The publish workflow stamps that version everywhere, so the tag is the source of

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. 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.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. 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.

Dependencies

Install these first, or the mod will not work:

denikson-BepInExPack_Valheim

File & checksum

Filename
LessSleep-1.0.0.zip
File size
11.5 KiB
SHA-256
987137e970c547d3e43bdfec159284d1b60ec70da70f289979af65d404f46111
Stored at
2026-10-10 18:43