#Change day night cycle duration with qb-weathersync

1 messages · Page 1 of 1 (latest)

marble socket
#

Hi, so I am trying to extend the duration of the day&night cycle with weathersync but I cant seem to get it perfectly right. I was able to extend the time somewhat but it is kinda unpredictable, because I edited the baseTime formula in server.lua to be divided by 9.6 instead of 2 for roughly 2.5 irl hours for one ingame day night cycle. However the sun still jitters when moving in the sky it just does so less frequently. Thanks in advance!

#

Also i am running the latest qb-framework.

oak laurel
#

Sharing the code you edited would be helpful in supporting you.

remote pine
#

When asking for support help; help us help you!

Provide full context.

  • Expected Result
  • Current Result
  • Method to Replicate Error

Provide Error

  • Screenshots of both Client and Server sided Errors

Provide Source Code

  • ** Screenshot of corresponding source code related to the error**
marble socket
#

Hi this is the change in question that I've made. Config is untouched.\

marble socket
oak laurel
#

Okay, revert the change you made in the server. That's not going to work.

#

Try changing client/client.lua:80 to local timeIncrement = Config.RealTimeSync and 0.05 or 0.5

#

then same file, line 88: replace with if tick - (Config.RealTimeSync and 5000 or 100) > tick then

#

So the first change should reduce the cycle, making day/night twice as long.

#

The second change makes updates happen less frequently.

marble socket
marble socket
oak laurel
marble socket
#

Alright. Thanks. So if I understand right lowwer values means longer days?

oak laurel
#

For the 'jittering', that'd be the tick value.

#

Yeah, so the default timeIncrement of 1 means the game time progresses by 1 minute every tick.

#

So 0.5 would half that.

#

If my maths is right 😉

marble socket
#

Amazing thank you so much!