How it fits with events.xml
Each event in events.xml, such as VehicleCivilianSedan or StaticHeliCrash, has a matching block in cfgeventspawns.xml with the same name. That block lists positions. When the economy spawns the event, it picks one of the free positions.
So the real limit on cars or crashes is the smaller of two numbers: the event's nominal in events.xml and the positions in this file. Raising nominal past the positions does nothing. See events.xml explained.
What a position looks like
Each position is a pos line with an x and a z coordinate, and often an a for the angle the object faces in degrees. x runs west to east and z runs south to north across the map, in metres from the bottom left corner. Height isn't given because DayZ places the object on the ground.
The vanilla Chernarus file has 35 event blocks, from cars, boats and the bus to helicopter crashes, trains, convoys, infected and animal events.
Add a new spawn position
To add a spot where a car can appear:
- Find the coordinates using an interactive DayZ map that shows x and z when you hover
- Pick flat, open ground, such as a road side or a car park, so the car doesn't spawn into a wall
- Add a pos line inside the right event block with x, z and an angle
- Raise that event's nominal in
events.xmlif you want more at once - Restart, then check the spot in game
Choose good positions
A bad position is worse than none. Cars placed on slopes, in trees or inside buildings get stuck or explode on spawn. Crash sites in towns spawn on roofs. Keep positions spread across the map so events aren't all in one area, and keep them away from your own spawn and trader areas unless that's intended.
Static events and loot piles
Static events such as helicopter crashes, police wrecks, trains and military convoys use the same file. Their loot is set in events.xml as children of the event. Adding positions to StaticHeliCrash gives crashes more places to appear, which makes them harder to camp. See heli crash settings.
Changes and restarts
Positions are read when the server starts. Events already on the map stay where they are until they're destroyed or despawn, so new positions are used gradually as events respawn. If you need a clean slate for events, a loot reset clears them. See how to reset loot.
Planning a car-heavy server
Car servers are popular, especially on PvE and roleplay servers. A good set-up uses both files together. Add positions where players will actually find cars, such as car parks, petrol stations, farms and village roads, then raise nominal in events.xml to match. Keep min below nominal so cars come back over time after they're wrecked, and make sure cars spawn with enough parts to drive (see cfgspawnabletypes.xml explained).
More cars also means more for the server to track, and cars left in odd places can clutter the map. Watch performance for a few days before adding more.
Common mistakes
Most broken event files come down to one of these.
- An event name that doesn't exactly match
events.xml, so the positions are never used - A missing closing tag, which can stop the economy loading events at all
- Copying another map's positions, which puts cars in the sea or mid-air
- Hundreds of positions in one small area, which crowds the map