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

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
everything-narrative
Burner Inserter
Burner Inserter
Posts: 17
Joined: Fri Aug 16, 2019 5:31 pm
Contact:

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

Post 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.
User avatar
BraveCaperCat
Filter Inserter
Filter Inserter
Posts: 494
Joined: Mon Jan 15, 2024 10:10 pm
Contact:

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

Post by BraveCaperCat »

Doesn't this already exist in the form of the day-night-cycle surface property?
If you want to see the mods I've made, press one. If you need me to update a mod to 2.0, press two. If you're looking for QA, press three. If you've been waiting over 1 and a half years for Digital Age, bad luck.
Post Reply

Return to “Modding interface requests”