Environment Variables

XashXT

Environment Variables

The following parameters affect the configuration of sky and water throughout the game for all players (in multiplayer) and stored in savegames if they are changed (in singleplayer). They are console variables that can be modified in game—for example, using the trigger_command entity or a custom-written entity.

Variable Details
sv_wateramp Controls wave height for world water.
sv_skyname Skybox name without a path or extension. Can be modified dynamically in game.
sv_skydir_x, sv_skydir_y, sv_skydir_z Vector that sets the sky rotation axis. Should be normalised and positive.
sv_skyangle Current skybox rotation angle about the rotation axis from the previous parameter.
sv_skyspeed Skybox rotation speed.
sv_wateralpha World water transparency (requires a special type of compiler with support for translucent water).

There are also the following new options for the worldspawn entity:

Variable Range Default Details
gravity 0–800 800 Global gravity factor.
fog 0–255
for each parameter
0
for each parameter
Global, always-enabled, exponential fog throughout the map. Has four integer parameters for the fog field: colour in RGB format followed by fog density (10 is thin, 255 is super dense). The global fog can change its settings temporarily while the player is under water.