[Free][QB] Paradox World Sync - Smooth time and weather sync

ParadoxWorldSync

World syncing and weather system with bucket support and preset dimmesions with QBCore support.

What makes this different than other scripts?

What I am calling “smooth sync”, no longer will you ever (hopefully) see the sky jitter at all. By variaing the time per minute to match near the server time (so if we are behind we speed up time slightly) we can maintain fully synced time (or within a minute) while keeping it optimized with statebags. Basically all you need to know is that you should never see the sky stutter or hitch at all unless a major change is made! This script also supports per-weather buckets allowing you to have unique experiences per world. For instance we have a 666666 world that we used for our Halloween event where we bucketed people to this world which was the “underworld”.

Note!

This script is in BETA and it basically is fully functioning minus some things like making sure the config option for time per minute will replicate correctly so I would not mess with Config.TimeScaler unless you want to toy around with the timer loop on the server side. Its also kinda jank sometimes with the weather systems and I have rewritten it a few times but I haven’t found a flow I like that allows overridding so any PRs are appreciated!

GitHub
Releases
Issues

Commands

Weather

weather <system/weather> - Overrides current weather to this weather system or GTA default weather type

freezeweather - Toggles freezing of weather

skipweather - Trigger a new random weather change

enablesnow <true/false> - Enables/disables snow

Time

time <hours> <minutes> - Set time to specified hour and minute

freezetime <true/false> - Freeze the time

Extras

blackout <true/false> - Enables blackout (does not affect car lights)

Events

Server

ParadoxWorld:server:setBlackout bool BlackoutState - Set blackout from another script

Client

ParadoxWeather:client:snowToggled bool Enabled - Emitted when snow is enabled from client

How to override time/weather for a single client (apartment/housing)

TriggerEvent('ParadoxTime:client:setOverrideData', {hours = 21, minutes = 0, seconds = 0, TimeScaler = 999999999})
TriggerEvent('ParadoxWeather:client:setOverrideData', 'EXTRASUNNY')

Extras

This has a snow plow effect built in. Whenever it snows it will reset the snowplowed variable. If you call this from another script (say a snowplowing script) then it will disable the snow traction (the slippery effect) while keeping snow on the ground.

9 Likes

So can it sync with OS time? Basically 1:1 sync time with the machine that server runs on?

No where does it say that…

This simply keeps normal time there 15 other OS time scripts.

Please do the ESX version.

1 Like

I have no plans on making an ESX version

But they all let the sky flicker…would love this to have OS time

1 Like

I guess this is a replacement for qb-weathersync?
If it is how do you do for DisableSync and EnableSync when entering and leaving apartment / house work with this ?

Yes it is and yes it does here is the code for an example and I will add it to the docs:

TriggerEvent('ParadoxTime:client:setOverrideData', {hours = 21, minutes = 0, seconds = 0, TimeScaler = 999999999})
TriggerEvent('ParadoxWeather:client:setOverrideData', 'EXTRASUNNY')
-- Call without args to reset to global clock
1 Like

Can we get some instructions how to actually install this & how to go about removing qb-weathersync etc

4 Likes

Somehow /weather doesn’t work. You can only set the time.

First of all, sorry for my english

so i tried it out a bit and made an esx version that works well so far i will only publish if jakek gives me permission to do so

I did a esx version of it too but somehow the /weather command doesnt work :melting_face:

Here is my version, maybe it works for you, the command weather always needs a certain time until the new weather is displayed, otherwise everything works except for the notification, which I haven’t managed to do yet

Hi, thanks for this nice qb-core script!
I’ve installed it and restart the server, but after every restart the ingame time starts at 11pm (23:00).
Is there a possability to change it, that the time is on every server restart in sync?

The only changes i’ve done in the config file are:

--- TIME OPTIONS ---
Config.TimeScaler = 60000 -- MS per minute in GTA time (2000ms is normal for a 48 minute day)
Config.StartupTime = {
    hours = 00,  -- default value = 16
    minutes = 00,
    seconds = 00
}

and

Config.WeatherCycleTime = 30 -- default value = 24

I’ve done the changes, bcs I want to have my ingame time like real timecycle.

[Edit #1]
It’s not on every server restart, its on every login. After some time (2-5 minutes) the time syncs to a random time (left time is synced to real time, hone is random).

Thank you for reading and maybe helping :slight_smile: