FearlessStudios

getForecast

Server export to read forecast data

getForecast

Read the same forecast data the HUD uses. Calling this does not remove anything from the queue.

While weather is frozen, current conditions remain available, entries is empty, nextChangeMs is 0, and patternMode is false in this payload. Use isPatternMode() to inspect the underlying sequence mode.

Usage

server.lua
local forecast = exports["FS-Weather"]:getForecast()
for _, entry in ipairs(forecast.entries) do
  print(entry.weather, entry.durationMinutes)
end

Returns

Prop

Type