In other languages: Deutsch Français Русский 简体中文

Game-day: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 20: Line 20:
   |----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
   |----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|


During sunset, the light level decreases linearly from fully light to fully dark. During sunrise, it increases linearly from dark to light. This linear slope does not necessarily apply to the values returned by [https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.darkness LuaSurface.darkness]. During night time, [[player]]s will passively activate their flashlights (or headlights if in a [[vehicle]]), and placed lamps will turn on automatically if powered.
During sunset, the light level decreases linearly from fully light to fully dark. During sunrise, it increases linearly from dark to light. This linear slope does not necessarily apply to the values returned by [https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.darkness LuaSurface.darkness]. During night time, [[player]]s will passively activate their flashlights (or headlights if in a [[vehicle]]), and placed [[lamp]]s will turn on automatically if powered.


Note: The actual time between phases can vary +/- a tick due to rounding errors.
Note: The actual time between phases can vary +/- a tick due to rounding errors.

Revision as of 04:35, 11 March 2019

A day lasts 25000 Game-ticks or 416.66~ Game-seconds.

The light varies throughout the day in a cycle consisting of 4 phases:

Phase Name Internal name Behaviour Time of day at start Time of day at end Duration (in ticks) Duration (in seconds)
day dawn fully light 0.75 0.25 12500 208.33~
sunset dusk darkening 0.25 0.45 5000 83.33~
night evening fully dark 0.45 0.55 2500 41.66~
sunrise morning lightening 0.55 0.75 5000 83.33~
  ------------- day -------><----- sunset ----->< night -><----- sunrise ----><-------- day ------------
  
% 0    5    10   15   20   25   30   35   40   45   50   55   60   65   70   75   80   85   90   95  100
  |----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|

During sunset, the light level decreases linearly from fully light to fully dark. During sunrise, it increases linearly from dark to light. This linear slope does not necessarily apply to the values returned by LuaSurface.darkness. During night time, players will passively activate their flashlights (or headlights if in a vehicle), and placed lamps will turn on automatically if powered.

Note: The actual time between phases can vary +/- a tick due to rounding errors.

Gallery

See also