Page 1 of 2

[MOD 0.13] DayNightExtender - longer day/night cycles

Posted: Mon Jul 11, 2016 11:58 pm
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

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

Posted: Tue Jul 12, 2016 12:40 am
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.

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

Posted: Tue Jul 12, 2016 7:56 am
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 ?

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

Posted: Tue Jul 12, 2016 10:51 pm
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

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

Posted: Wed Jul 13, 2016 8:42 am
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 223 times

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

Posted: Wed Jul 13, 2016 11:36 pm
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.

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

Posted: Wed Jul 13, 2016 11:55 pm
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

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

Posted: Thu Jul 14, 2016 12:18 am
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.

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

Posted: Thu Jul 14, 2016 7:59 am
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.

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

Posted: Tue Aug 30, 2016 8:56 pm
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.

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

Posted: Wed Aug 31, 2016 6:54 am
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.

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

Posted: Sun Sep 18, 2016 8:55 am
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

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

Posted: Sun Sep 18, 2016 9:10 am
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.

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

Posted: Sun Sep 18, 2016 10:46 am
by Yehn
I'll look forward to it. Thank you!

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

Posted: Sun Sep 18, 2016 11:27 am
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.

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

Posted: Sat Oct 15, 2016 11:53 am
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.

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

Posted: Sat Oct 15, 2016 1:33 pm
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. :-)

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

Posted: Wed Feb 01, 2017 3:19 am
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?

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

Posted: Wed Feb 01, 2017 8:54 am
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.

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

Posted: Thu Feb 02, 2017 1:35 am
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?