zPaulinBRz-DayNightCycle icon

DayNightCycle

Continuous day and night cycle for How to Fish. Sun, fog and ambient light follow the time of day, co-op works fine.

Last updated 2 hours ago
Total downloads 103
Total rating 0 
Categories Mods
Dependency string zPaulinBRz-DayNightCycle-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2305

README

Day/Night Cycle

Adds a continuous day and night cycle to How to Fish. The sun moves across the sky, and fog, ambient light and sun color follow the time of day — dawn, day, dusk, night, and back around.

The clock is derived from the FishNet server tick, so everyone in a co-op lobby sees the same time without a single extra network message.

Install

With a mod manager (r2modman / Thunderstore Mod Manager): click Install. Nothing else to do.

Manually:

  1. Install BepInEx 5.4.23+ (win x64 Mono build) into the game folder, next to How to Fish.exe.
  2. Launch the game once and close it, to generate BepInEx/plugins and BepInEx/config.
  3. Copy the BepInEx folder from this zip over the one in the game folder.
  4. Launch the game.

Features

  • Continuous cycle. Sun rotation, fog color and density, ambient intensity and reflection intensity all interpolate through dawn, day, dusk and night.
  • Synced in co-op. Time comes from the FishNet server tick, so it cannot drift between players, and someone joining mid-session lands on the correct time on their first frame.
  • Zero network cost. No broadcasts, no serializers, no handshake.
  • A night that actually looks like night. The game's skybox ships with an unauthored night gradient (a burnt-orange horizon that reads as a permanent sunset). The mod replaces those two colors, and keeps the real sunrise/sunset band where it belongs.
  • Configurable. Cycle length, starting time, night sun intensity, moonlight color, night fog color and density.
  • Underwater fog untouched. Diving still looks the way the game intended.
  • Works offline. Falls back to a local clock in single player or when no server is running.
  • Open to other mods. Exposes a public DayNightAPI with TimeOfDay, DaylightFactor and NightFell / DayBroke events.

Config

Written to BepInEx/config/com.zpaulin.howtofish.daynight.cfg on the first run.

Key Default What it does
Enabled true Off returns the game to its original lighting
DayLengthSeconds 1200 Length of one full cycle, in real seconds
StartTimeOfDay 0.30 0 = midnight, 0.25 = dawn, 0.5 = noon, 0.75 = dusk
SyncToNetworkTick true Derive the clock from the FishNet server tick
FreezeTime false Hold the clock at the current time
SunYawSweep 60 Degrees of azimuth the sun sweeps, which rotates shadows
NightSunIntensity 0.08 Moonlight strength, as a fraction of the daytime value
MoonlightColorHex #5C7BB8 Directional light color at night
DriveSky true Retune the skybox night colors
SkyNightTopColorHex #070C1A Zenith the skybox blends toward at night
SkyNightBottomColorHex #111A2E Horizon the skybox blends toward at night
SunsetBandStrength 1 How much of the authored sunrise/sunset band to keep
MoonBrightness 1 Multiplier on the skybox moon
DriveFog true Let the mod drive fog color and density
NightFogColorHex #0B1220 Fog color at deepest night
NightFogDensityMultiplier 1.8 Night fog density relative to the game default
NightAmbientIntensity 0.15 Ambient intensity at deepest night
NightReflectionIntensity 0.2 Reflection intensity at deepest night

Commands

Typed into the game's own debug console. Output goes to the BepInEx console.

/dn                 status
/dn on | off
/dn day | night | dawn | dusk
/dn time 0.75       or  /dn time 18:30
/dn length 600
/dn freeze
/dn resync

Time commands shift only your own client, on purpose, for testing. Use /dn resync to return to the lobby clock.

Co-op notes

Every player needs the mod, with matching DayLengthSeconds and StartTimeOfDay. The defaults match, so this only matters if you edit the config — mismatched values mean players see different skies.

For mod authors

[BepInPlugin("com.example.mymod", "My Mod", "1.0.0")]
[BepInDependency("com.zpaulin.howtofish.daynight")]
public class MyPlugin : BaseUnityPlugin
{
    private void Awake()
    {
        DayNightAPI.NightFell += day => SpawnWave(day);
        DayNightAPI.DayBroke  += day => EndWave();
    }
}

Surface: TimeOfDay, Phase, DayNumber, DaylightFactor, IsNight, IsRunning, IsNetworkSynced, Clock(), SetTimeOfDay(), and the PhaseChanged / NightFell / DayBroke events. Use DaylightFactor (0..1, continuous, twilight included) to scale difficulty smoothly instead of flipping at a threshold.

Credits

Thanks to the BepInEx and HarmonyX teams for the tooling, and to the How to Fish devs for leaving the code readable and unobfuscated.