Hi,
I''m not sure if this is the right place to ask, but as the server can run scripts, could someone provide me with one that doubles the day/night cycle speed during the night, but revert to default speed during the day? Shorter nights is the key.
Custom Script - Day/Night Cycle?
-
- Posts: 256
- Joined: 19 Jul 2016, 01:02
Re: Custom Script - Day/Night Cycle?
Find this line in serverCore.lua:
https://github.com/TES3MP/CoreScripts/b ... e.lua#L169
Add something like this to that spot, to make the timescale higher during the night:
Edit: You've inspired me to add this functionality to the default server scripts.
https://github.com/TES3MP/CoreScripts/b ... e.lua#L169
Add something like this to that spot, to make the timescale higher during the night:
Code: Select all
-- Pass time faster if it's night
if hourFloor >= 20 or hourFloor <= 6 then
WorldInstance.data.time.timeScale = 60
else
WorldInstance.data.time.timeScale = 30
end
frametimeMultiplier = WorldInstance.data.time.timeScale / WorldInstance.defaultTimeScale
Re: Custom Script - Day/Night Cycle?
Seems to be working well, thanks David! I set the scale to 240 for the desired result. Those nights were just tedious and I kept finding myself outdoors at almost only those times.
- silentthief
- Posts: 456
- Joined: 18 Apr 2013, 01:20
- Location: Currently traversing the Ascadian Isles
Re: Custom Script - Day/Night Cycle?
That's awesome - this allows for seasonal daylight/night lengths, or recreating the night lengths in Alaska (where you may only see 2 hours of sunlight a day for example). Even doing a mod for something like "from dusk til dawn"davidcernat wrote: ↑30 Apr 2019, 18:47 Find this line in serverCore.lua:
https://github.com/TES3MP/CoreScripts/b ... e.lua#L169
Add something like this to that spot, to make the timescale higher during the night:
Edit: You've inspired me to add this functionality to the default server scripts.Code: Select all
-- Pass time faster if it's night if hourFloor >= 20 or hourFloor <= 6 then WorldInstance.data.time.timeScale = 60 else WorldInstance.data.time.timeScale = 30 end frametimeMultiplier = WorldInstance.data.time.timeScale / WorldInstance.defaultTimeScale
ST
-
- Posts: 256
- Joined: 19 Jul 2016, 01:02
Re: Custom Script - Day/Night Cycle?
Ideally, seasonal day and night lengths would be implemented by making it possible to change the starting hours for days and nights on clients, so that the hour you see in your resting window makes sense. My solution from above just makes time pass faster during night hours.silentthief wrote: ↑01 May 2019, 14:48 That's awesome - this allows for seasonal daylight/night lengths, or recreating the night lengths in Alaska (where you may only see 2 hours of sunlight a day for example). Even doing a mod for something like "from dusk til dawn"
ST