[MOD 0.13] DayNightExtender - longer day/night cycles

Topics and discussion about specific mods
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

[MOD 0.13] DayNightExtender - longer day/night cycles

Post by binbinhfr »

Infos
  • Type: Mod
  • Name: DayNightExtender
  • Description: Increase the length of day and night cycle. Vanilla length is around 7 mins. The extender multiplies this by x4 to 28 mins. This multiplier is customizable in config.lua.
  • Tested-With-Factorio-Version: 0.13.0
  • Multiplayer compatible: not tested
  • Locale: none
  • Tags: Time, clock, day length, slowtime.
  • License: MIT.
  • Authors : Dark, Vizzy, Mikenlott, BinbinHfr
  • Portal download : https://mods.factorio.com/mods/binbinhf ... htExtender
To Use
Limitations
Last edited by binbinhfr on Fri Aug 05, 2016 5:31 pm, edited 3 times in total.
My mods on the Factorio Mod Portal :geek:
User avatar
DenFromEarth
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Mar 27, 2016 6:09 pm
Contact:

Re: [MOD 0.13.X] DayNightExtender - longer day/night cycles

Post by DenFromEarth »

FYI - I found the clock looping back after I increased the speed to X2 or greater with a MULTIPLIER of 5 for both day and night.
Don't tell me you never wanted to do an orbital drop in a '59 convertible Corvette...
https://youtu.be/yKkt_g9Tc7M
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] DayNightExtender - longer day/night cycles

Post by binbinhfr »

I tested

Code: Select all

local DAY_LENGTH_MULTIPLIER = 5 -- (integer) Controls how long daytime will be. Set to 1 for default, vanilla length (3.5 minutes).
local NIGHT_LENGTH_MULTIPLIER  = 5 -- (integer) Same as above but for the night.
and everything works here.
With timetools too.
By "loop back", you mean reversing ?
Is it immediate ? or should I wait a while to trigger this bug ?
Don't you have other mod that could play with time ?
My mods on the Factorio Mod Portal :geek:
User avatar
DenFromEarth
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Mar 27, 2016 6:09 pm
Contact:

Re: [MOD 0.13.X] DayNightExtender - longer day/night cycles

Post by DenFromEarth »

Yes, by loop I mean the clock would tick 5 minutes and then fall back about 5 minutes and repeat, but I noticed it did not happen the first time I fired up the game after installing TimeTools. It wasn't until after I restarted Factorio when the loop came back.

This is my current mod list. I'm guessing the hi-lighted mods may have something to do with time, but I really don't know.


air-filtering
alien-artifact-loot
Bergius_Process
BetterFluidColors
BigWoodenPowerPole
Big_Brother
combat-robot-lifeline
DayNightExtender
EMP Biters
Enhanced_Map_Colors
EvoGUI
Flow Control
HardCrafting
Honk
InitialScan
KillKrogsBlueprints
KS_Power
Landfill
Laser_Beam_Turrets
lifehack (belt extender)
Longer_Underground_Pipes
Natural_Evolution_Expansion
Orbital Ion Cannon
RailTanker
RSO Mod
TimeTools
tree_collision
Warehousing


-DFE
Don't tell me you never wanted to do an orbital drop in a '59 convertible Corvette...
https://youtu.be/yKkt_g9Tc7M
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] DayNightExtender - longer day/night cycles

Post by binbinhfr »

i checked some mods for clock interaction
combat-robot-lifeline - no
EvoGUI - no - read the time but not change it
Natural_Evolution_Expansion - no - does not play with clock
RSO Mod - no

I don't understand where your problem is coming from.
I'll check further, but I suspect that the game does not like this hispeed freezing/unfreezing clock...
Did you try with the very last version of DayExtender where I relaxed the frequency a litlle bit ?

Question : as time depends on the player surface, is it possible that you are using a mod that change surface (underground or anything like that ?). I am not familiar with all your mods...

To test this, I extend the mod to all surfaces. But then there is no different multiplier for day and night, just one, because daytime can be different per surface, so it would be hard to manage day/night switch per surfaces.
Please test this, and tell me if it's better :
DayNightExtender_1.1.5.zip
(1.35 KiB) Downloaded 268 times
My mods on the Factorio Mod Portal :geek:
User avatar
DenFromEarth
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Mar 27, 2016 6:09 pm
Contact:

Re: [MOD 0.13.X] DayNightExtender - longer day/night cycles

Post by DenFromEarth »

I found it. The mod called InitialScan causes the loop when it's doing the extended scan at the start. After that the clock works fine, at normal speed or modified. I tested this with your 1.1.3 and 1.1.5 version.
Don't tell me you never wanted to do an orbital drop in a '59 convertible Corvette...
https://youtu.be/yKkt_g9Tc7M
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] DayNightExtender - longer day/night cycles

Post by binbinhfr »

DenFromEarth wrote:I found it. The mod called InitialScan causes the loop when it's doing the extended scan at the start. After that the clock works fine, at normal speed or modified. I tested this with your 1.1.3 and 1.1.5 version.
You are right ! I checked the code. Wrote by Klonan, one nice guy of the factorio team !
But for a reason I don't understand, he is changing the clock several times during his scan phase...
I made a request here :
viewtopic.php?f=92&t=15434&p=184020#p184020

By the way, do you think that night/day differenciation is important ?
Because if I want to keep track of the time on different surfaces, it would be really easier and less cpu-consuming to unify the multipliers, as I did in 1.1.5
My mods on the Factorio Mod Portal :geek:
User avatar
DenFromEarth
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Mar 27, 2016 6:09 pm
Contact:

Re: [MOD 0.13.X] DayNightExtender - longer day/night cycles

Post by DenFromEarth »

binbinhfr wrote:By the way, do you think that night/day differenciation is important ?
Because if I want to keep track of the time on different surfaces, it would be really easier and less cpu-consuming to unify the multipliers, as I did in 1.1.5
Not to me. I just want a longer 24 hour day in my game and I'm happy with a 50/50 split. I'm using your 1.1.5 version now.

Thanks for all of your time and work.
Don't tell me you never wanted to do an orbital drop in a '59 convertible Corvette...
https://youtu.be/yKkt_g9Tc7M
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] DayNightExtender - longer day/night cycles

Post by binbinhfr »

klonan made an answer on the clock reset here :
viewtopic.php?f=92&t=15434&p=184070#p184070

So if you are annoyed by the clock reset at the beginning, just delete the line

Code: Select all

s.daytime = 0.9
in his code, it will change nothing to it.

So I publish the new 1.0.6 version, with a few more optimisations and a multiplier editable in config.lua file.
I made the default multiplier to x4, which gives a full cycle daylength close to 28 mins which seems a round number wuth 2 cycles per hour of game.
My mods on the Factorio Mod Portal :geek:
RaviorMetal
Inserter
Inserter
Posts: 31
Joined: Sat Aug 09, 2014 9:05 pm
Contact:

Re: [MOD 0.13.X] DayNightExtender - longer day/night cycles

Post by RaviorMetal »

binbinhfr wrote:I tested

Code: Select all

local DAY_LENGTH_MULTIPLIER = 5 -- (integer) Controls how long daytime will be. Set to 1 for default, vanilla length (3.5 minutes).
local NIGHT_LENGTH_MULTIPLIER  = 5 -- (integer) Same as above but for the night.
and everything works here.
With timetools too.
By "loop back", you mean reversing ?
Is it immediate ? or should I wait a while to trigger this bug ?
Don't you have other mod that could play with time ?
Can I use these lines in this mods config file or how do I use them?
I would like to have the night be twice as long and the day stay the way it is.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] DayNightExtender - longer day/night cycles

Post by binbinhfr »

RaviorMetal wrote:Can I use these lines in this mods config file or how do I use them?
I would like to have the night be twice as long and the day stay the way it is.
Hi,

since factorio 0.13 night/day cycle is now dependant of the surface. The result is that night/day shift are not synchronized anymore on different surfaces : you can have different noon on different surfaces.
So, to simplify, I just slow down time with a global factor, losing the day/night distinction which was apparently not used by players.

Now config.lua is like this :

Code: Select all

day_length_multiplier = 4 

-- (integer) Controls how long daytime will be. 
-- Set to 1 for default vanilla length (7 minutes full day/night cycle).
-- With 4, it gives a 28 mins cycle.
with 1 single multiplier.
So you cannot separate day and night slowdown anymore.
My mods on the Factorio Mod Portal :geek:
Yehn
Fast Inserter
Fast Inserter
Posts: 111
Joined: Tue Jul 12, 2016 3:45 am
Contact:

Re: [MOD 0.13] DayNightExtender - longer day/night cycles

Post by Yehn »

Hi..

Would it be possible to have this mod also increase accumulator capacity in proportion to the lengthening of the day/night cycle? (ie if it's 4 times longer, give accumulators 4x capacity).

Basically I want to use this mod but don't want to have to build tens of thousands more accumulators...

Thanks
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] DayNightExtender - longer day/night cycles

Post by binbinhfr »

Hi,

Higher tiers of accus already exists in mods like :
https://mods.factorio.com/mods/Neomore/ ... d-Electric
or bobs : https://mods.factorio.com/mods/Bobingabout/bobpower

But ok, I added this feature in next version and multiply all accu buffer size by day_length_multiplier parameter in config.lua.
My mods on the Factorio Mod Portal :geek:
Yehn
Fast Inserter
Fast Inserter
Posts: 111
Joined: Tue Jul 12, 2016 3:45 am
Contact:

Re: [MOD 0.13] DayNightExtender - longer day/night cycles

Post by Yehn »

I'll look forward to it. Thank you!
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] DayNightExtender - longer day/night cycles

Post by binbinhfr »

Yehn wrote:I'll look forward to it. Thank you!
Yes, but anyway, you can update DayNightExtender : accumulator extension is now implemented and will affect all your existing accus.
My mods on the Factorio Mod Portal :geek:
User avatar
Xinef
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Oct 11, 2016 7:34 pm
Contact:

Re: [MOD 0.13] DayNightExtender - longer day/night cycles

Post by Xinef »

I've encountered some issues when using DayNightExtender and Black Market together with MoWeather.

- when weather is cloudy, player's torchlight flickers on and off several times per second (according to EvoGUI light level oscillates around 69-70%)
- black market trades are not happening when expected, and sometimes happen during thunder storms, when a lightning strikes even if it's not a full hour

I'm taking a wild guess that it has to do with the fact that MoWeather manipulates time to simulate weather effects. For now I just removed MoWeather from my game and the issues are no longer present.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] DayNightExtender - longer day/night cycles

Post by binbinhfr »

Xinef wrote:I've encountered some issues when using DayNightExtender and Black Market together with MoWeather.
Yes, your assumption is right : moweather manipulates the time in an extreme way. BlackMarket is waiting for some hour changes and so on to trigger some sales/purchases, so it is not compatible with such a mod. :-)
My mods on the Factorio Mod Portal :geek:
User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: [MOD 0.13] DayNightExtender - longer day/night cycles

Post by thereaverofdarkness »

Night seems to be significantly shorter than day, in particular full darkness is very brief. This makes solar panels generate too much electricity--they generate well over 50% average output across the day/night cycle. Someone told me this is just part of vanilla day and night cycle, but I want to change it to make day and night have equal length, and make twilight a lot shorter. Is there a way Day Night Extender can do this?
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] DayNightExtender - longer day/night cycles

Post by binbinhfr »

thereaverofdarkness wrote:Night seems to be significantly shorter than day, in particular full darkness is very brief. This makes solar panels generate too much electricity--they generate well over 50% average output across the day/night cycle. Someone told me this is just part of vanilla day and night cycle, but I want to change it to make day and night have equal length, and make twilight a lot shorter. Is there a way Day Night Extender can do this?
since factorio 0.13 night/day cycle is now dependant of the surface. The result is that night/day shift are not synchronized anymore on different surfaces : you can have different noon on different surfaces. As I can only slow down time globally, I cannot implement a difference between nights and days that would work on every surfaces... Sorry.
My mods on the Factorio Mod Portal :geek:
User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: [MOD 0.13] DayNightExtender - longer day/night cycles

Post by thereaverofdarkness »

binbinhfr wrote:since factorio 0.13 night/day cycle is now dependant of the surface.
What do you mean by surface? Surely it is not dependent on biome? Are you saying it can vary based on my location within my map? If so, wouldn't it eventually de-sync to the point that I could be in mid-day and have it switch to night when I rush across the landscape on my train?
Post Reply

Return to “Mods”