Page 1 of 1

[0,16.20] Missing support for daytime change in brightness

Posted: Mon Jan 29, 2018 6:17 pm
by Dupl3xxx
The patch-notes for 0.16.0 listed this:
Added support to change daytime length and brightness on a per-surface basis.
The LUA API does not list any way of achieving this. However, this can be somewhat simulated by setting surface.dusk to values above 1.0 and surface.dawn to values below 0.0. This feels like a hack that shouldn't be used, even if it works. The following values will create the brightest 'eternal night' without freezing time, and allowing the solar-panels to generate power while the lights never go off:

/c game.player.surface.dusk = -1.1667
/c game.player.surface.evening = 0.5
/c game.player.surface.morning = 0.5001
/c game.player.surface.dawn = 2.1667

http://lua-api.factorio.com/0.16.20/Classes.html Contains all other settings related to the day-night cycle, except setting the brighness/darkness of the day/night.

Re: [0,16.20] Missing support for daytime change in brightness

Posted: Mon Jan 29, 2018 6:28 pm
by Rseding91
Thanks for the report. Brightness is calculated based off the dusk, dawn, evening and morning properties. There is no direct property to set.

Re: [0,16.20] Missing support for daytime change in brightness

Posted: Mon Jan 29, 2018 6:29 pm
by Dupl3xxx
Then what does the line in the patchnotes mean?
Added support to change daytime [...] brightness on a per-surface basis.

Re: [0,16.20] Missing support for daytime change in brightness

Posted: Mon Jan 29, 2018 7:22 pm
by posila
I removed it from the changelog for 0.16.21