Does anyone have experience modifying lighting? I'm trying to make day and night more interesting, but I'm unsure if any of this is possible. I've spent an hour searching the API documentation and files with no success.
I'd like to reinstate gradual light toggling at dawn and dusk. The sudden switch in v16 is jarring. In addition, I'd like to heighten the transition between day and night by increasing daylight. I'm disappointed the immersive day/night cycle nearly disappears after early game. I want nightvision to remain at the same brightness level, but make daytime 30% brighter than it is now. I figured out how to modify nightvision, but can't find where to modify day...vision.
Lighting transitions
-
- Burner Inserter
- Posts: 10
- Joined: Fri Apr 29, 2016 11:03 am
- Contact:
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Lighting transitions
Starting with 0.16.0 darkness is supposedly controllable on a per-surface basis independently of daytime. From what i can see in the LuaSurface Documentation there are at least the following parameters:
.daytime .darkness .dusk .dawn .evening .morning .ticks_per_day .
.daytime .darkness .dusk .dawn .evening .morning .ticks_per_day .
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Burner Inserter
- Posts: 10
- Joined: Fri Apr 29, 2016 11:03 am
- Contact:
Re: Lighting transitions
I discovered the same values. The "darkness" field is read-only, and I don't think I can use the others to increase the difference in light levels between day and night.
Re: Lighting transitions
game.player.surface.always_day=true
...
game.player.surface.always_day=false
...
game.player.surface.always_day=false
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Lighting transitions
Are you sure this is not just a documentation error? The 0.16.0 changelog clearly states:Thalassicus wrote:I discovered the same values. The "darkness" field is read-only, and I don't think I can use the others to increase the difference in light levels between day and night.
Code: Select all
Added support to change daytime length and brightness on a per-surface basis.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Burner Inserter
- Posts: 10
- Joined: Fri Apr 29, 2016 11:03 am
- Contact:
Re: Lighting transitions
I'll give it a try, thank you.