weather

weather

namespace

Runtime weather control

Vanilla presets

Names vanilla registers, and so the names weather.set and weather.snap accept. Which of them a biome shows in each severity band is set per biome family, and a mod that registers its own StaticWeather adds to this list.

  • Clear
  • SlightlyCloudy
  • PartlyCloudy
  • Overcast
  • LightRain
  • Rain
  • Storm
  • Foggy
  • ExtremeFoggy
  • DenseLowFog
  • LightLowFog
  • Snowfall
  • Blizzard
  • DustHaze
  • SandStorm

Functions

weather.set(name)

Transition naturally to a StaticWeather preset by name

name string StaticWeather prototype name

returns boolean

weather.snap(name)

Immediately snap to a StaticWeather preset by name

name string StaticWeather prototype name

returns boolean

weather.clear()

Clear the explicit preset and the wind override, and immediately restore biome-driven weather

returns boolean

weather.wind(speed)

Hold the wind speed at a fixed value, clamped to the planet maximum of 20

speed number Wind speed in meters per second

returns boolean

weather.wind_clear()

Release the wind override and let the surface environment drive the wind again

returns boolean