Page 1 of 1

[Mod API] LuaSurface::daytime_parameters should have corresponding PlanetPrototype field

Posted: Wed May 27, 2026 3:31 pm
by everything-narrative
TL;DR
Every planet has the same day-night cycle. This can be changed by mods, but only in the Control stage, which seems like an oversight.
What?
I suggest introducing a an optional field on the PlanetPrototype or SurfacePrototype, along the lines of:

Code: Select all

daytime_parameters      (optional) :: dictionary[TimeOfDayID -> double] 
Default: { dusk = 0.25, evening = 0.45, morning = 0.55, dawn = 0.75 }
All four keys must be present

TimeOfDayID :: string
Possible values: "dawn", "dusk", "evening", "morning"
(Or equivalently, separate fields for each individual time of day.) This field is then translated into the corresponding field on the LuaSurface class in the obvious manner.
Why?
This would make life easier for modders creating custom planets, since they will not have to add Control-stage shim to set these values for their custom planets if they want a different kind of day-night cycle on their new planets.

And again, it just seems like an oversight that this wasn't added. It would maybe even be useful for the base game, for instance to make Aquilo have a longer night-time to emphasize its frozen-over nature.

Re: [Mod API] LuaSurface::daytime_parameters should have corresponding PlanetPrototype field

Posted: Sat May 30, 2026 9:34 pm
by BraveCaperCat
Doesn't this already exist in the form of the day-night-cycle surface property?