Tile - YTime - Day Duration – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Ylands editor navbox}}" to "{{Navbox/Ylands}}")
m (YlandsClassyBot moved page Ylands Tile - Day duration to Ylands:Tile - YTime - Day Duration: New Structure)
(No difference)

Revision as of 07:08, 8 July 2021

Ylands Tile - Day duration.png

  • Allows to get / set length of one in-game day.

Notes

  • Day duration means how many seconds takes one in-game day-night cycle.
  • It's inverse function of Time Scale
    • Length of real day is 86400 seconds (60x60x24)
    • Time Scale = 86400 / Day duration, meaning that day duration of 86400 seconds represents 1:1 ratio.

Advanced

Even though the returned number of Day Duration is whole, it often happens, that the value is actually decimal and it was just rounded for easier use. For example, if returned value of Day Duration is 3500 (meaning the in-game day duration is 3500 seconds), the exact value the computer is counting with might be something like 3499,99999. This is caused by small imperfections of calculating with numbers with infinite decimal places. So if you compare the 3500 value returned by Get Day Duration with number 3500, comparison will return false. It might not be safe to use values returned by Get Day Duration for other calculations when you are expecting whole numbers.