Event type: on_surface_day_begins
Posted: Thu Aug 20, 2026 9:02 pm
This event would fire whenever the daytime value of a surface rolls back to 0, indicating the beginning of a new day. This event would make it possible to do dynamic weather events that persist on a day-to-day basis. Currently, the only way to do this is to run on_tick events, which can create an unreasonable performance load when running every tick to check if a surface has begun a new day.
A typical type of dynamic weather this event would enable could include daily changes to the following LuaSurface fields:
dusk,dawn,evening,morning,ticks_per_day,solar_power_multiplier,min_brightness.
Changes to local_effect to particular LuaEntities on the surface, both during on_surface_day_begins and on placing the entity, could also be dynamically changed based on the current weather. Chemical plants could run more slowly or consume more energy when the daily temperature drops, for instance.
This event would also benefit from a SurfaceID event filter, allowing on_surface_day_begins events on a mod to only fire for a particular surface, typically their mod's planet.
The mod "Tougher Lightning Storms" would benefit from this mod. Currently, the mod runs an on_nth_tick event every 300 ticks and checks if a new day has begun on Fulgora before adjusting Fulgora's day length by a random amount. It's an imprecise process that would benefit from an event that tells the mod when a new day has begun.
A typical type of dynamic weather this event would enable could include daily changes to the following LuaSurface fields:
dusk,dawn,evening,morning,ticks_per_day,solar_power_multiplier,min_brightness.
Changes to local_effect to particular LuaEntities on the surface, both during on_surface_day_begins and on placing the entity, could also be dynamically changed based on the current weather. Chemical plants could run more slowly or consume more energy when the daily temperature drops, for instance.
This event would also benefit from a SurfaceID event filter, allowing on_surface_day_begins events on a mod to only fire for a particular surface, typically their mod's planet.
The mod "Tougher Lightning Storms" would benefit from this mod. Currently, the mod runs an on_nth_tick event every 300 ticks and checks if a new day has begun on Fulgora before adjusting Fulgora's day length by a random amount. It's an imprecise process that would benefit from an event that tells the mod when a new day has begun.