Mods / Day and Night Cycles

Category: #Cosmetics #Graphics #Other #Tweak #Utility
Author: BillyGalbreath
Side: Server
Created: Oct 27th 2023 at 10:42 PM
Last modified: Jul 3rd at 1:24 AM
Downloads: 1494
Follow Unfollow 49

Latest file for Various v1.19.x:
DayNightCycles-1.0.2.zip 1-click install


Control how long days and nights last, separately, in real-life minutes. I made this so I could set long days and short nights on my server.

Default config is set to 24 minutes for both days and nights, which is equivalent to the default vanilla 48 minute day and night cycle.

daynightcycles.yml:

Speed:
    # Number of IRL minutes should days last.
    # Vanilla default is 24 minutes.
    Day: 24
    # Number of IRL minutes should nights last.
    # Vanilla default is 24 minutes.
    Night: 24


This mod will automatically override both the calendarSpeedMul (default 0.5) and timeSpeedModifier (default 60) and make adjustments to get your the desired length of day/night that you set in the config.

Unfortunately, the mod is not smart enough to know seasons or latitude differences. Time is a global thing, so it has to tick equally for everyone everywhere all the time. Because of this, I made it simple and set daytime from 06:00-18:00 and night time 18:00-06:00.


-------------------------------------------------------------------------------------------------------------

Remember, I build these mods for myself and my family. Not you. I owe you nothing. I just like sharing what I've built with others for free. You will receive minimal to no support when using any of my mods.

-------------------------------------------------------------------------------------------------------------

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v1.0.2 488 Jul 3rd at 1:24 AM Show DayNightCycles-1.0.2.zip Install now
v1.0.1 515 Jan 28th at 1:33 AM Show DayNightCycles-1.0.1.zip Install now
v1.0.0 491 Oct 27th 2023 at 10:50 PM Show DayNightCycles-1.0.0.zip Install now

14 Comments (oldest first | newest first)

💬 Mrozak, Jun 25th at 12:37 PM

BillyGalbreath You were right. I don't know what was the problem before, but i gave it another try and it works. Thank you.

💬 BillyGalbreathAuthor, Jun 21st at 2:30 AM

This mod works perfectly fine in 1.19.8 Mrozak. Check your logs for issues on startup. Most likely there is not a ModConfig directory being created automatically. All errors that are being spammed are caused by whatever error happened first.

The warning your game gives you is because the lowest version this mod supports is 1.18.8, which the game errornously thinks is the recommended version instead of the lowest supported. If i raise the number to 1.19.x, then all the 1.18 users can no longer use this mod. Nothing I can do about that.

💬 Mrozak, Jun 21st at 12:41 AM

The download page says "Latest file for Various v1.19.x", but the game shows a warning about the mod requiring game 1.18.8.
And, perhaps unsuprisingly, the mod doesn't work in current game version (1.19.8) - within a minute the game generates 1.7 GB logfile filled with the following error repeated all over:


[Error] Exception: Object reference not set to an instance of an object.
at DayNightCycles.DayNightCyclesMod.OnGameTick(Single obj) in C:\Users\Billy\RiderProjects\DayNightCycles\src\DayNightCyclesMod.cs:line 43
at Vintagestory.Common.GameTickListener.OnTriggered(Int64 ellapsedMilliseconds) in VintagestoryLib\Common\Model\GameTickListener.cs:line 27
at Vintagestory.Common.EventManager.TriggerGameTick(Int64 ellapsedMilliseconds, IWorldAccessor world) in VintagestoryLib\Common\EventManager.cs:line 57
at Vintagestory.Server.CoreServerEventManager.TriggerGameTick(Int64 ellapsedMilliseconds, IWorldAccessor world) in VintagestoryLib\Server\ServerEventManager.cs:line 123
at Vintagestory.Server.ServerMain.Process() in VintagestoryLib\Server\ServerMain.cs:line 886

💬 Dhon, Jun 11th at 6:40 PM

Hello there, mod looks great, but how compatible is it with other game mechanics and mods? Does it impact things like crop growth, pit kilns, cooking time etc.?

💬 BillyGalbreathAuthor, Mar 18th at 11:27 PM

The_True_Goo, I can assure you the config file is there. But to answer your question, you can copy the text from the description above (all 7 lines of it) and put it into a file named "daynightcycles.yml" and place that file in "VintagestoryData/ModConfig/" directory.

💬 The_True_Goo, Mar 18th at 7:51 PM

Hi there. I downloaded this both for my client and server. It doesn't seem to give me any config. is there anyway that I can get a config file for it manually?

 

💬 BillyGalbreathAuthor, Jan 20th at 11:36 PM

CrusadingPriest

They all already are. Only one of them needed to be updated (Sharable Waypoints). All the others work just fine as-is ;)

💬 CrusadingPriest, Jan 20th at 10:50 PM

Hello, I was wondering if you would be updating your mods for 1.19.0 Stable? I love just about all of your mods so I hope you will. 

💬 Atari2600, Jan 16th at 5:23 PM

Thanks!

💬 z16_m0v3r, Jan 13th at 12:04 PM

Atari2600 The daynightcycles.yml is located in \AppData\Roaming\VintagestoryData\ModConfig That's where you can make changes.

💬 Atari2600, Jan 5th at 12:00 PM

Hey, might need more coffee, but can you explain how to get to the config? When opening the .zip I can't find, and don't see any keys ingame. I went through the .json file and can't see where to tweak the cycles. Are we supposed to add via copy/paste the daynightcycles.yml above? Thanks.  

💬 Chumber, Oct 28th 2023 at 3:29 PM

Thanks for the clarification. I also did some testing and it works perfectly and mostly preserves the natural day lengths during the height of summer and winter. In summer, it can still kick into "night mode" while the sun is still up on the horizon, and conversely kicks in a little while after night has fully set in during the winter. Overall still does exactly what I want, which is to have shorter nights and longer days-- and set to meaningful values, the discrepancy during those last hours of the day won't be noticed.

Fantastic mod. I think this will be a great middleground for those in my server that don't really appreciate the full cycle being twice as long.

💬 BillyGalbreathAuthor, Oct 28th 2023 at 2:48 PM

Chumber

This mod overrides both calendarSpeedMul (this gets adjusted depending on day/night and what you have set in the config) and timeSpeedModifier (forces 60 to make equations easier on calculating calendarSpeedMul)

It's not smart enough to know seasons or latitude differences. Time is a global thing, so it has to tick equally for everyone everywhere all the time. Because of this, I made it simple and set daytime from 06:00-18:00 and night time 18:00-06:00.

I updated the decsription with this information since it was unclear ^_^

💬 Chumber, Oct 28th 2023 at 10:44 AM

Billy lives in my brain and makes the mods that I can't.

Does this conflict with calendarspeedMul, or override it? I have that set on my server so that 2 IRL hours = 24 hours in-game, so if this allows me to tune that while keeping vanilla speedMul, that'd be absolutely perfect.

Also curious how this works in the late seasons, when the night cycle naturually gets longer. Does it override that as well? So many questions. Time to do some testing I suppose.

(edit comment delete)