Skip to content

WeatherTable ​

Inherits: DatabaseResource < Resource

A table of weathers for a place that has a weather of its own, not the same all the time: the lines are weathers (or a clear sky) with a weight and how long they last. When the table is in force (the world has it as its default, or the zone the party is in) a line is picked by weight, lasts its time, and then another is picked (it may be the same). A zone with a table of its own uses it instead of the world's. The table is made in World Configs > Weather Tables. See docs: World > Weather tables.

Properties ​

Array[WeatherTableEntry]entries[]

Methods ​

WeatherTableEntrypick( rng: RandomNumberGenerator )
floatchance_of( entry: WeatherTableEntry )
PackedStringArrayvalidate()

Property descriptions ​

Array[WeatherTableEntry] entries = [] ​

The lines of the table

Method descriptions ​

WeatherTableEntry pick( rng: RandomNumberGenerator ) ​

Picks a line by weight (null when the table has no line that can come up)

float chance_of( entry: WeatherTableEntry ) ​

The share of the table a line has (0 to 1)

PackedStringArray validate() ​

The warnings of this table (shown by the editor)