Skip to content

WeatherConfig ​

Inherits: DatabaseResource < Resource

A weather of the world: what falls (a particle scene), how the wind blows and what the weather does to the ground (wet and darker, tinted, covered by snow, sand, ash or anything else).

Description ​

A world has a default weather (World editor > Weather) and an event changes it with Set Weather. Rain, snow, a sandstorm, a rain of embers and a magic fog are all the same class with other numbers: what makes snow different from sand is the colour of the cover, how much of it lies on the ground and where it sticks. See docs: World > Weather.

Properties ​

Stringweather_vfx_name""
floatintensity1.0
floatfade_seconds10.0
booluses_own_windfalse
Vector3wind_directionVector3(1.0, 0.0, 0.0):
floatwind_intensity0.5
floatground_wetness0.0
Colorwet_tintColor(0.6, 0.65, 0.75)
floatwet_tint_amount0.0
floatcover_amount0.0
Colorcover_colorColor(0.92, 0.94, 0.97)
CoverSticksOncover_sticks_onCoverSticksOn.FLAT_GROUND
floatcover_roughness0.6
floatmore_clouds0.0
floatsky_darken0.0
floatsky_tint_amount0.0
Colorsky_tintColor(0.45, 0.47, 0.5)
floatsun_brightness1.0
floatambient_brightness1.0
floatfog_thicker1.0
floatfog_added0.0
floatfog_color_amount0.0
Colorfog_colorColor(0.6, 0.62, 0.66)
Colorscreen_tintColor(0.55, 0.6, 0.7, 0.0)
floatscreen_vignette0.0
Colorscreen_vignette_colorColor(0.0, 0.0, 0.0, 1.0)
floatscreen_blur0.0
floatscreen_desaturate0.0
floatscreen_aberration0.0
floatscreen_grain0.0
Stringsound_kinds""
SoundSourcemusic_source
SoundSourceambience_source
Array[WeatherEffectEntry]exposed_effects[]

Methods ​

PackedStringArrayget_sound_kinds()
boolhas_sound_layer()
SoundSourceget_music_source()
SoundSourceget_ambience_source()
boolhas_screen_look()
ScreenLookmake_screen_look( intensity: float = 1.0, shelter: float = 0.0 )
floatget_cover_stick()
VFXSelectionWeatherto_selection()
PackedStringArrayvalidate()
WeatherConfigfrom_selection( selection: VFXSelectionWeather ) static

Enumerations ​

enum CoverSticksOn ​

Where the cover of the weather sticks.

  • FLAT_GROUND = 0 - Only on ground that does not lean (snow)
  • MOST_GROUND = 1 - On gentle slopes as well (sand, ash)
  • EVERYWHERE = 2 - On steep ground too (a thick dust, a magic frost)

Property descriptions ​

Look

String weather_vfx_name = "" ​

The weather particles that fall around the camera: the name of a Weather VFX of the project (Rain, Snow ...). Empty = nothing falls (a weather that only changes the ground, or the wind)

float intensity = 1.0 ​

How strong the weather is (0 to 1): a drizzle is a Rain at 0.3, a downpour at 1. It scales everything the weather does: how many particles fall (each layer of the effect comes in over its own part of the range, so the murk of a storm only shows when it is heavy), how wet and covered the ground gets, the changes to the sky, fog and sun, and the wind. An event can also change it while the weather lasts

float fade_seconds = 10.0 ​

How many seconds the sky, the fog, the light and the wind take to change into this weather (and back to the look of the world when it ends)

Wind

bool uses_own_wind = false ​

Does this weather blow a wind of its own? Off = the wind of the world goes on (a clear weather, a fog)

Vector3 wind_direction = Vector3(1.0, 0.0, 0.0): ​

The direction the wind blows in (x, z on the ground)

float wind_intensity = 0.5 ​

How strong the wind is: the plants of the world bend by it (0 still, 1 a gale)

Ground Wetness

float ground_wetness = 0.0 ​

How wet this weather makes the ground in the end (0 dry, 1 soaked). The ground gets there over time, at the rates of the world

Color wet_tint = Color(0.6, 0.65, 0.75) ​

The colour a wet ground gets (multiplied with the textures): a blue-grey for rain, a dark red for a rain of blood, a green glow for acid

float wet_tint_amount = 0.0 ​

How much of the wet tint shows when the ground is soaked (0 = none: the ground only gets darker and shinier as the textures say)

Ground Cover

float cover_amount = 0.0 ​

How much of the ground this weather covers in the end (0 none, 1 covered). The cover is snow, sand, ash, mud, moss ... the colour below says which. The ground gets there over time, at the rates of the world

Color cover_color = Color(0.92, 0.94, 0.97) ​

The colour of the cover (white for snow, tan for sand, grey for ash)

CoverSticksOn cover_sticks_on = CoverSticksOn.FLAT_GROUND ​

Where the cover sticks: snow only on flat ground, sand on most, a thick dust everywhere. Each ground texture also says how much cover it takes (Terrain textures > Cover)

float cover_roughness = 0.6 ​

How shiny the cover is (0 a mirror, 1 matte): wet snow and ice are shinier than dust

Sky and Light

float more_clouds = 0.0 ​

More clouds: the clouds of the sky come this far towards a full overcast (0 = the sky as it is, 1 = overcast). The stars and the glow of the sun are hidden by it too. Only for a sky that has clouds of its own (the stylized sky)

float sky_darken = 0.0 ​

How much darker the sky is (0 = as it is, 1 = black): a storm sky

float sky_tint_amount = 0.0 ​

How much of the sky colour is replaced by the colour below (a green sky of acid rain, a yellow sky of a sandstorm)

Color sky_tint = Color(0.45, 0.47, 0.5) ​

The colour the sky moves towards (when the amount above is more than 0)

float sun_brightness = 1.0 ​

How bright the sun is while this weather lasts (1 = as it is, 0 = no sunlight: the shadows go with it)

float ambient_brightness = 1.0 ​

How bright the ambient light is (1 = as it is): a dark day, or a magic glow above 1

Fog

float fog_thicker = 1.0 ​

The fog of the look is this many times as thick (1 = as it is, 4 = a thick fog)

float fog_added = 0.0 ​

Fog that this weather adds, even where the look has none (a mist over a clear valley): 0.01 is a light mist, 0.05 a thick one

float fog_color_amount = 0.0 ​

How much of the colour of the fog is replaced by the colour below

Color fog_color = Color(0.6, 0.62, 0.66) ​

The colour the fog moves towards (when the amount above is more than 0)

Screen

Color screen_tint = Color(0.55, 0.6, 0.7, 0.0) ​

The colour laid over the picture; its alpha is how strong (0 = no tint): a grey-blue for a storm, a yellow for a sandstorm

float screen_vignette = 0.0 ​

How dark the corners of the screen are (0 to 1)

Color screen_vignette_color = Color(0.0, 0.0, 0.0, 1.0) ​

The colour of the dark corners

float screen_blur = 0.0 ​

How blurred the whole picture is (0 to 1): a blizzard, a thick fog

float screen_desaturate = 0.0 ​

How much of the colour goes (0 = as it is, 1 = black and white): a grey day

float screen_aberration = 0.0 ​

Colour fringes towards the edges (0 to 1): a magical storm

float screen_grain = 0.0 ​

Film grain (0 to 1)

Sound

String sound_kinds = "" ​

The kinds of sound this weather makes, in order, separated by commas (rain; or sleet: rain, snow; or wind, sand). A shelter has a track for a kind of weather (the rain on its roof): it plays the track of the first kind it has one for. A kind the shelter has no track for does nothing

SoundSource music_source ​

The music this weather plays while it is on: a track with its options or a Music Album. Empty = it leaves the music to the zone and the world. A shelter and events can play over it

SoundSource ambience_source ​

The ambient sound of this weather (rain, wind): one track with its options. Empty = it leaves the ambient sound to the zone and the world. It is quieter in a light weather (the volume follows the intensity)

Exposed Effects

Array[WeatherEffectEntry] exposed_effects = [] ​

The effects the weather gives to those who stand in it (a burn in a rain of embers, a Wet debuff in the rain). Edited as a list in the Weather tab. The weather system gives them every half second to whoever is out in the weather (see WeatherExposure)

Method descriptions ​

PackedStringArray get_sound_kinds() ​

The kinds of sound of this weather, in order (empty names left out)

bool has_sound_layer() ​

Does this weather play music or an ambient sound of its own?

SoundSource get_music_source() ​

The music of this weather as a source: the music source, else the first track of the old list (a weather made before sources)

SoundSource get_ambience_source() ​

The ambient sound of this weather as a source (the same way)

bool has_screen_look() ​

Does this weather change the look of the screen?

ScreenLook make_screen_look( intensity: float = 1.0, shelter: float = 0.0 ) ​

The look of the screen of this weather as the camera look takes it. intensity (0 to 1) takes every number that far from nothing; shelter (0 to 1) is how much a shelter keeps the weather off the screen (0 = in the open, 1 = nothing of it shows)

float get_cover_stick() ​

How far down a slope the cover goes, as the number the terrain shader reads (0 flat ground only, 1 everywhere)

VFXSelectionWeather to_selection() ​

The weather particles and wind as the spawner of the weather VFX wants them (a selection built from this weather; the ground is not in it)

PackedStringArray validate() ​

The warnings of this weather (shown by the editor)

WeatherConfig from_selection( selection: VFXSelectionWeather ) ​

A weather made from the old weather selection of a world (weather name rules become the starting values: rain wets, snow covers). Not saved: the editor saves the converted one