/tg/ Station 13 - Modules - TypesVar Details - Proc Details

weather

Causes weather to occur on a z level in certain area types

The effects of weather occur across an entire z-level. For instance, lavaland has periodic ash storms that scorch most unprotected creatures. Weather always occurs on different z levels at different times, regardless of weather type. Can have custom durations, targets, and can automatically protect indoor areas.

Vars

aestheticIf the weather has no purpose other than looks
area_typeTypes of area to affect
barometer_predictableWhether a barometer can predict when the weather will happen
descdescription of weather
end_durationIn deciseconds, how long the "wind-down" graphic will appear before vanishing entirely
end_messageDisplayed once the weather is over
end_overlayArea overlay while weather is ending
end_soundSound that plays while weather is ending
immunity_typeUsed by mobs (or movables containing mobs, such as enviro bags) to prevent them from being affected by the weather.
impacted_areasAreas to be affected by the weather, calculated when the weather begins
impacted_z_levelsThe list of z-levels that this weather is actively affecting
namename of weather
next_hit_timeFor barometers to know when the next storm will hit
overlay_cacheList of all overlays to apply to our turfs
overlay_layerSince it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.
overlay_planePlane for the overlay
perpetualThis causes the weather to only end if forced to
probabilityWeight amongst other eligible weather. If zero, will never happen randomly.
protect_indoorsTRUE value protects areas with outdoors marked as false, regardless of area type
protected_areasAreas that are protected and excluded from the affected areas.
stageThe stage of the weather, from 1-4
target_traitThe z-level trait to affect when run randomly or when not overridden.
telegraph_durationIn deciseconds, how long from the beginning of the telegraph until the weather begins
telegraph_messageThe message displayed in chat to foreshadow the weather's beginning
telegraph_overlayThe overlay applied to all tiles on the z-level
telegraph_soundThe sound file played to everyone on an affected z-level
use_glowIf this bit of weather should also draw an overlay that's uneffected by lighting onto the area Taken from weather_glow.dmi
weather_colorColor to apply to the area while weather is occuring
weather_durationIn deciseconds, how long the weather lasts once it begins
weather_duration_lowerSee above - this is the lowest possible duration
weather_duration_upperSee above - this is the highest possible duration
weather_messageDisplayed in chat once the weather begins in earnest
weather_overlayArea overlay while the weather is occuring
weather_soundLooping sound while weather is occuring

Procs

can_weather_actReturns TRUE if the living mob can be affected by the weather
endFully ends the weather
generate_overlay_cacheReturns a list of visual offset -> overlays to use
startStarts the actual weather and effects from it
telegraphTelegraphs the beginning of the weather on the impacted z levels
update_areasUpdates the overlays on impacted areas
weather_actAffects the mob with whatever the weather does
wind_downWeather enters the winding down phase, stops effects

Var Details

aesthetic

If the weather has no purpose other than looks

area_type

Types of area to affect

barometer_predictable

Whether a barometer can predict when the weather will happen

desc

description of weather

end_duration

In deciseconds, how long the "wind-down" graphic will appear before vanishing entirely

end_message

Displayed once the weather is over

end_overlay

Area overlay while weather is ending

end_sound

Sound that plays while weather is ending

immunity_type

Used by mobs (or movables containing mobs, such as enviro bags) to prevent them from being affected by the weather.

impacted_areas

Areas to be affected by the weather, calculated when the weather begins

impacted_z_levels

The list of z-levels that this weather is actively affecting

name

name of weather

next_hit_time

For barometers to know when the next storm will hit

overlay_cache

List of all overlays to apply to our turfs

overlay_layer

Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.

overlay_plane

Plane for the overlay

perpetual

This causes the weather to only end if forced to

probability

Weight amongst other eligible weather. If zero, will never happen randomly.

protect_indoors

TRUE value protects areas with outdoors marked as false, regardless of area type

protected_areas

Areas that are protected and excluded from the affected areas.

stage

The stage of the weather, from 1-4

target_trait

The z-level trait to affect when run randomly or when not overridden.

telegraph_duration

In deciseconds, how long from the beginning of the telegraph until the weather begins

telegraph_message

The message displayed in chat to foreshadow the weather's beginning

telegraph_overlay

The overlay applied to all tiles on the z-level

telegraph_sound

The sound file played to everyone on an affected z-level

use_glow

If this bit of weather should also draw an overlay that's uneffected by lighting onto the area Taken from weather_glow.dmi

weather_color

Color to apply to the area while weather is occuring

weather_duration

In deciseconds, how long the weather lasts once it begins

weather_duration_lower

See above - this is the lowest possible duration

weather_duration_upper

See above - this is the highest possible duration

weather_message

Displayed in chat once the weather begins in earnest

weather_overlay

Area overlay while the weather is occuring

weather_sound

Looping sound while weather is occuring

Proc Details

can_weather_act

Returns TRUE if the living mob can be affected by the weather

end

Fully ends the weather

Effects no longer occur and area overlays are removed Removes weather from processing completely

generate_overlay_cache

Returns a list of visual offset -> overlays to use

start

Starts the actual weather and effects from it

Updates area overlays and sends sounds and messages to mobs to notify them Begins dealing effects from weather to mobs in the area

telegraph

Telegraphs the beginning of the weather on the impacted z levels

Sends sounds and details to mobs in the area Calculates duration and hit areas, and makes a callback for the actual weather to start

update_areas

Updates the overlays on impacted areas

weather_act

Affects the mob with whatever the weather does

wind_down

Weather enters the winding down phase, stops effects

Updates areas to be in the winding down phase Sends sounds and messages to mobs to notify them