cfgenvironment.xml
Controls environmental settings, lighting, and world parameters. Used for customizing the look and feel of the game world including ambient effects.
Overview
The cfgenvironment.xml file controls the environmental simulation of the DayZ world. It defines territory zones for ambient sound, animal spawning regions, and environmental parameters that shape the atmosphere of the map.
This file is located in the mission folder and is read at server startup. It works alongside cfgweather.xml to create the overall environmental experience.
XML Structure
The root element contains territory definitions and environment parameter blocks.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<env>
<territories>
<territory type="Coast" x="2500" z="2000" width="12000" height="800">
<file usable="ambient_coast" />
</territory>
<territory type="Forest" x="3000" z="5000" width="8000" height="6000">
<file usable="ambient_forest" />
</territory>
<territory type="City" x="3700" z="2500" width="600" height="600">
<file usable="ambient_city" />
</territory>
</territories>
</env>
Environment Territories
Territories define rectangular regions on the map that are associated with specific ambient sound sets and environmental behaviors.
| Attribute | Type | Description |
|---|---|---|
| type | String | Territory classification (e.g., Coast, Forest, City, Field, Military). |
| x | Integer | X-coordinate of the territory's origin point on the map. |
| z | Integer | Z-coordinate of the territory's origin point on the map. |
| width | Integer | Width of the territory rectangle in meters (X-axis). |
| height | Integer | Height of the territory rectangle in meters (Z-axis). |
| file usable | String | Reference to the ambient sound set used within this territory. |
Ambient Settings
Each territory type maps to a set of ambient sounds that play when a player is within the zone. Common ambient sets include:
ambient_coast
Ocean waves, seagulls, and coastal wind sounds.
ambient_forest
Bird calls, rustling leaves, and woodland creature sounds.
ambient_city
Urban ambience with distant sounds and structural creaking.
ambient_field
Open field sounds with wind and insect ambience.
ambient_military
Eerie, tense ambience for military installations.
Lighting Parameters
Environment lighting is primarily controlled through the engine's internal systems, but cfgenvironment.xml territories influence how lighting transitions between zones. Dense forest territories may have darker ambient lighting compared to open coastal areas.
For direct weather and lighting control, see cfgweather.xml. The environment file works in tandem with weather settings to produce the final visual result.
Example Configurations
Full Chernarus Environment
A comprehensive territory setup covering the major biomes of Chernarus.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<env>
<territories>
<!-- Southern coastline -->
<territory type="Coast" x="2000" z="0" width="12000" height="1000">
<file usable="ambient_coast" />
</territory>
<!-- Central forests -->
<territory type="Forest" x="3000" z="4000" width="8000" height="5000">
<file usable="ambient_forest" />
</territory>
<!-- Chernogorsk -->
<territory type="City" x="6500" z="2500" width="800" height="600">
<file usable="ambient_city" />
</territory>
<!-- Elektrozavodsk -->
<territory type="City" x="10000" z="2000" width="700" height="500">
<file usable="ambient_city" />
</territory>
<!-- NWAF -->
<territory type="Military" x="4000" z="10000" width="1500" height="800">
<file usable="ambient_military" />
</territory>
<!-- Northern fields -->
<territory type="Field" x="2000" z="8000" width="10000" height="3000">
<file usable="ambient_field" />
</territory>
</territories>
</env>
Custom Map with Minimal Territories
A simple setup for a smaller custom map with just two zones.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<env>
<territories>
<territory type="Forest" x="0" z="0" width="5000" height="5000">
<file usable="ambient_forest" />
</territory>
<territory type="City" x="2000" z="2000" width="1000" height="1000">
<file usable="ambient_city" />
</territory>
</territories>
</env>