Configuring entity interaction with wind
Object wind sensitivity
Wind sensibility parameter
The wind_sensibility
parameter defines the sensitivity level of scene entities to wind.
It is specified in configuration files using the following syntax:
Syntax:
Parameter values (Х
):
0
— wind disabled (default);1
— low sensitivity (e.g., for trees);3
— high sensitivity (e.g., for grass).
Configuring wind_sensibility parameter
The wind_sensibility
parameter is defined in the following configuration files:
properties/tree.inc — for trees;
properties/bush.inc — for bushes;
properties/grass.inc — for grass;
or in the entity's .def file.
Adding the no_wind
property to the props
block of an entity's .def file turns off the entity's ability to react to wind
Controlling an entity's ability to interact with wind through scripts
The depend_on_wind
command is a script function that enables or disables an entity's ability to interact with wind.
It is used in script files located in the scene\set\interaction_entity folder, which define entity interactions with other scene objects during gameplay.
Syntax:
Parameter values:
0
: disables the entity's ability to interact with wind;1
: enables the entity's ability to interact with wind.
The depend_on_wind
command dynamically manages the wind interaction state of an entity based on gameplay conditions.
For instance, if an entity transitions to a state where it should no longer respond to wind (e.g., after being destroyed or burned), the {depend_on_wind 0}
command can be invoked to disable wind interaction.
Below is an example script demonstrating how to manage an entity's sensitivity to wind during gameplay.
Configuring wind parameters
The wind parameters are configured in the main/scene/set/wind.set
file.
Wind parameter descriptions:
global_wind_speed
Animation speed of wind gust textures, measured in units per frame.
tree_bend_offset
Base angle of tree bending towards the wind direction, excluding gusts, measured in degrees.
tree_bend_range
Maximum angle range of tree bending during gusts, measured in degrees.
grass_bend_gust_start
Minimum wind gust threshold for grass animation, value range [-1..1]
.
grass_bend_gust_end
Maximum wind gust threshold for grass animation, value range [-1..1]
(must be greater than grass_bend_gust_start
).
grass_bend_angle_offset
Base angle of grass bending towards the wind direction, excluding gusts, measured in degrees.
grass_bend_angle_range
Grass bending angle range during gusts, measured in degrees. Avoid values that visually bury grass under the ground.
grass_bend_angle_power
Amplitude of grass oscillations during gusts, measured in degrees.
grass_bend_angle_freq
Frequency of grass oscillations during gusts, measured in arbitrary units.
grass_large_scale_power
Intensity of large-scale grass wave oscillations without gusts, value range [0..1]
.
grass_large_scale_gust_power
Intensity of large-scale grass wave oscillations during maximum gusts, value range [0..1]
.
grass_large_scale_freq
Frequency of large-scale grass wave oscillations, measured in arbitrary units.
grass_small_scale_power
Intensity of small-scale grass wave oscillations without gusts, value range [0..1]
.
grass_small_scale_gust_power
Intensity of small-scale grass wave oscillations during maximum gusts, value range [0..1]
.
grass_small_scale_freq
Frequency of small-scale grass wave oscillations, measured in arbitrary units.
Step-by-step setup of wind parameters
Each wind parameter is tied to a value table, configured according to the Beaufort scale, which maps real-world wind conditions to in-game effects:
0
: no wind (calm);10
: storm-level wind strength.
Set the
global_wind_speed
parameterConfigure tree wind parameters:
tree_bend_offset
,tree_bend_range
Configure grass parameters:
grass_bend_gust_start
,grass_bend_gust_end
;grass_bend_angle_offset
,grass_bend_angle_range
;grass_bend_angle_freq
,grass_bend_angle_power
;grass_large_scale_*
,grass_small_scale_*
.
Below is an example of configuring the grass_small_scale_power
parameter using a value table based on the Beaufort scale. This parameter adjusts the intensity of small-scale grass wave oscillations in response to varying wind conditions.
Configure other parameters similarly to ensure consistent wind responses.
Console commands
For diagnosing and controlling wind effects during gameplay, the following console commands are available:
Reload wind settings from the
wind.set
file:
Display entities' wind sensitivity on screen:
Last updated