Wiki Navigation

Configuration File
XML Format

cfgenvironment.xml Configuration

Configure animal territories, zombie spawn zones, and ambient wildlife behavior across your DayZ server map.

Overview

The cfgenvironment.xml file defines territories for wildlife and infected spawns. It controls animal herd territories (wolves, bears, deer, cattle), ambient wildlife (chickens, rabbits, birds), and zombie spawn zones. The file references external territory definition files that contain the actual spawn coordinates and zone boundaries.

File Structure

The file contains <file> references and <territory> definitions with spawn agents.

<env>
    <territories>
        <file path="env/wolf_territories.xml" />
        <file path="env/bear_territories.xml" />
        <file path="env/zombie_territories.xml" />

        <territory type="Herd" name="Wolf" behavior="DZWolfGroupBeh">
            <file usable="wolf_territories" />
        </territory>

        <territory type="Ambient" name="AmbientHen" behavior="DZAmbientLifeGroupBeh">
            <file usable="hen_territories" />
            <agent type="Male" chance="1">
                <spawn configName="Animal_GallusGallusDomesticus" chance="1" />
            </agent>
            <item name="globalCountMax" val="50" />
            <item name="zoneCountMin" val="1" />
            <item name="zoneCountMax" val="3" />
        </territory>
    </territories>
</env>

Territory Files

External files that define spawn zone coordinates and boundaries. Located in the env/ folder.

cattle_territories.xml

Cow spawn zones (farms, fields)

sheep_goat_territories.xml

Sheep and goat spawn zones

red_deer_territories.xml

Deer spawn zones (forests)

wolf_territories.xml

Wolf pack spawn zones

bear_territories.xml

Bear spawn zones (wilderness)

zombie_territories.xml

Infected spawn zones

Herd Territory Parameters

type string

Territory type identifier. Use "Herd" for pack animals like wolves and bears that travel in groups with coordinated AI behavior.

name string

Unique identifier for this territory definition. Used to reference the territory in other configurations and for debugging purposes.

behavior string

AI behavior class that controls how animals act. Examples: "DZWolfGroupBeh" for wolves, "BlissBearGroupBeh" for bears, "DZAmbientLifeGroupBeh" for passive wildlife.

Ambient Territory Parameters

globalCountMax integer

Maximum number of this animal type that can exist across the entire server at once. Higher values increase wildlife density but impact performance.

zoneCountMin integer

Minimum number of animals to spawn in each active zone. Ensures zones always have some wildlife when players are nearby.

zoneCountMax integer

Maximum number of animals per zone. The actual count is randomized between min and max values for natural variation.

Best Practices

Recommended

  • Balance animal populations for realistic ecosystem simulation
  • Place predator territories away from common player spawn areas
  • Test spawn rates to ensure proper distribution across the map
  • Adjust zombie territories based on location type (cities vs rural)

Avoid

  • Setting globalCountMax too high (causes server performance issues)
  • Overlapping predator territories with high-traffic areas
  • Using incorrect behavior class names (animals won't spawn)
  • Referencing territory files that don't exist

Pro Tips

Wildlife spawns are tied to player proximity - animals only spawn when players enter their territory zones. For hunting-focused servers, increase deer and boar populations while keeping predator counts low. For hardcore survival, boost wolf and bear numbers in wilderness areas. Monitor server performance when adjusting globalCountMax values, as too many AI entities can cause lag spikes during combat encounters.