How to Shift Day/night cycle?

Have some feedback for Life is Feudal? Post it here!
User avatar
TyrelionPrime
Devoted Believer
 
Posts: 27
Joined: 25 Sep 2014, 12:40

How to Shift Day/night cycle?

Post by TyrelionPrime » 10 Mar 2017, 00:13

Greetings,


I have been looking for a way to shift the Day/Night cycle of my server.
At the moment it gets dark when most players are online on the server.
I would like to shift the day cycle so it will be light during those hours so the players can actually enjoy the sun shining on their bald heads instead of having them stumble through the dark.

So far I have tried using the GM commands setGameDaytime() as a GM ingame, yet that only seems to have an effect on my client, not the server... and that command does not work in the server console.

I have also tried to shut down the server for an hour, yet it stayed the same.

And changing the day/night cycle time itself in an attempt to have a day fly by fast and then restoring the normal cycle length... only hurled me into the far future.

So it would seem that the whole day/night cycle is calculated from a fix RL date and time, probably the exact time the server came online. So far I have been unable to locate this line of code in any of the configuration files.

Does anyone know where this is stored and a way to change it?

User avatar
Dansk_viking
 
Posts: 31
Joined: 31 Dec 2015, 11:41

Re: How to Shift Day/night cycle?

Post by Dansk_viking » 10 Mar 2017, 11:47

As far as I'm aware, the only way to change the in-game time is by adjusting the <dayCycle>#</dayCycle>. The in-game time is locked entirely to this, no matter when you start the server or whether you leave it down, it'll always be tied to the same schedule.
Image

User avatar
TyrelionPrime
Devoted Believer
 
Posts: 27
Joined: 25 Sep 2014, 12:40

Re: How to Shift Day/night cycle?

Post by TyrelionPrime » 10 Mar 2017, 19:34

I believe that only changes the duration of a daycycle, which I do not want to change as I said.
What I want is to have the day in-game start at a different hour IRL...
So instead of having the in-game day start at 6pm IRL, have it start at 8pm IRL in the 6 hour daycycle it is already on.

I have played on servers where this is the case so I doubt it is always the same regardless of when you start the server.


Alanirwin
 
Posts: 1
Joined: 11 Jul 2017, 21:46

Re: How to Shift Day/night cycle?

Post by Alanirwin » 11 Jul 2017, 21:57

I did some calculations, and for my system there are the following reference dates/times:

The elapsed time reference point is July 1, 2014, and the date reference is July 1, 1014. That means the game date is calculated by dividing the elapsed time (in hours) from July 1, 2014 to the current time by the length of day setting (the day/night cycle time in hours). That number of game days is then added to July 1, 1014 to calculate the current game date. It doesn't matter whether the server has been running or not. That's how the current day is calculated.

I've not checked this on any other machine, but it should be a pretty straight forward check to see if it's universal on all machines.

And I haven't checked to see if this is adjustable in the config files.

User avatar
Nyuton
Mod Developer
 
Posts: 51
Joined: 01 Feb 2017, 10:51
Location: Berlin

Re: How to Shift Day/night cycle?

Post by Nyuton » 13 Jul 2017, 09:25

Reference is unix timestamp 1404216000, which equals 01-07-2014 12:00:00 UTC. It cannot be changed in any config.
Only ways to alter game time is edit dayCycle or change the Windows clock on the host machine.
My Blog | Custom Maps & Tools for LiF:YO server owners on FeudalTools

Return to Feedback Section