Description
Please feel free to join my discord if you run into issues or have ideas! https://discord.gg/mKgxyk6qvb
…or you just want to hangout
Overview
Vanilla Hytale only ends the night when every player in the world is in bed. On a busy server that means one player mining in a cave, one admin in Creative mode or one friend who went to make tea keeps everyone else staring at the dark. Lullaby fixes that. Choose a percentage or a fixed number of players, and once that many are asleep the night passes for the whole world.
Lullaby is a server plugin. It works in singleplayer worlds and on dedicated servers alike, players join with an unmodified client, and sleepers still get the real vanilla sleep clock, fade and success sound.
Features
Percent or count
Skip the night when 50% of the players sleep, the default, or pick any share from 0 to 100. Prefer a fixed number? Set a count such as 2 instead. A minimum number of sleepers keeps a lone player on a big server from skipping by themselves unless you allow it.
Fair counting
The threshold is measured against the players who should reasonably be asleep.
- Spectators never count.
- Players in Creative mode are left out by default.
- Players who have not moved, looked around or chatted for five minutes are left out, so an AFK player never holds up the night.
- Any player can opt out with
/lullaby ignore, which is remembered across restarts. - A player in bed always counts.
Vanilla feel
In native mode, the default, Lullaby takes over the two systems the game uses to end a night. Sleepers see the same sleep clock, the same grey fade and hear the same success sound as in vanilla. Players who stay awake simply see the morning arrive. If a future game update changes those systems, Lullaby notices on start, puts vanilla back and switches to its manual mode, which fast forwards the clock to morning instead.
Dynamic nights
Prefer a gentler rule? Turn on AllowDynamic and set the requirement to dynamic. Every sleeper makes the night run faster, up to 20 times as fast when everyone who counts is in bed, and the night ends when the clock reaches morning. Dynamic nights are experimental and stay off until you unlock them.
Progress messages
When the number of sleepers changes the world gets one chat line, such as Lullaby 2 of 5 players sleeping, 1 more needed. Players who are still awake also get it as a toast. After the skip everyone sees Lullaby the night was skipped, 3 players slept, and an optional big "Good morning" title.
Clear mornings
Storms and rain are cleared after a skip, using each area's own forecast, so a desert does not suddenly get forest weather. Weather forced by an admin is left alone.
Per world rules
Turn Lullaby off in a lobby, ask for every player in a hardcore world, or let two players skip the night in survival. Each world can override the requirement, the percentage, the count or switch Lullaby off entirely.
Admin commands
Admin permissions. Admin commands need two generated permission nodes at once,
ryvrook.lullaby.command.lullaby.adminand the node of the sub command, for exampleryvrook.lullaby.command.lullaby.admin.skip. The server console has every permission. Every other Lullaby command is open to all players.
/lullaby admin skipends the night now./lullaby admin set percent 50,set count 2andset dynamicchange the rule on the fly./lullaby admin world lobby enabled falseturns Lullaby off in one world./lullaby admin reloadre-reads the config.
Small touches
- A cooldown after each skip so nights cannot chain.
- Nights skipped are counted per world.
- No
/sleepcommand, so Lullaby never clashes with other mods that use it.
Getting started
- Download
Lullaby-1.0.0.jar. - Put it in your Mods folder, or the
mods/folder of a dedicated server. - Start the server. Lullaby writes
Lullaby.jsontomods/Ryvrook_Lullabywith every option at its default. - Lie down in a bed at night. Once half the players do the same, the night passes.
Commands
| Command | What it does |
|---|---|
/lullaby |
Show who is sleeping in your world and how many more are needed. Alias /sleepers |
/lullaby ignore |
Stop or start counting yourself for the sleep check |
/lullaby admin skip |
End the night now |
/lullaby admin set percent <n> |
Need a percentage of players |
/lullaby admin set count <n> |
Need a fixed number of players |
/lullaby admin set dynamic |
Speed the night up with every sleeper |
/lullaby admin world <name> enabled <true or false> |
Turn Lullaby on or off in one world |
/lullaby admin reload |
Reload the config |
Configuration
| Key | Default | Meaning |
|---|---|---|
Mode |
auto |
auto or native use the vanilla sleep clock with an automatic fallback, manual fast forwards the clock |
Requirement |
percent |
percent, count or dynamic |
Percent |
50 |
Share of players who need to sleep |
Count |
1 |
Number of players who need to sleep with count |
MinimumSleepers |
1 |
Fewest sleepers that can skip a night |
ExcludeCreative |
true |
Leave Creative players out of the count |
AfkSeconds |
300 |
Leave idle players out after this long, 0 turns it off |
SkipSeconds |
4 |
Length of the fast forward in manual mode, up to 60 seconds |
CooldownSeconds |
60 |
Pause after a skip |
ProgressMessages |
true |
Chat line when the number of sleepers changes |
ShowToasts |
true |
Toast for players still awake |
ShowTitle |
false |
Big "Good morning" title after a skip |
ClearStorms |
true |
Clear stormy weather after a skip |
StormWeathers |
Storm, Rain, Snow_Heavy |
Words that mark a weather as stormy |
AllowDynamic |
false |
Unlock the experimental dynamic requirement |
DynamicMaxSpeed |
20 |
Top speed of a dynamic night |
Worlds |
empty | Per world overrides of Enabled, Requirement, Percent and Count |
Compatibility
- Needs the Hytale 0.7.0 release server or newer.
- Works in singleplayer and on dedicated servers. Players need nothing installed.
- Another mod that replaces the vanilla slumber systems clashes with native mode. Set
Modetomanualto run beside it. - No other mods are required.
Changelog
1.0.0
- First release. Percent, count and dynamic requirements, fair counting of spectators, Creative and idle players, native and manual modes with an automatic fallback, per world rules, progress messages, toasts, clear mornings, a cooldown, skipped night counts and admin commands.
Links
- Source code
https://github.com/ryvrook/lullaby.git - Discord
https://discord.gg/mKgxyk6qvb - More mods by ryvrook
https://www.curseforge.com/members/ryvrook/projects
License
MIT. Made by ryvrook.
