Lifetime: the main despawn timer
Each item's lifetime in types.xml is how many seconds it lasts in the world without anyone touching it. When the timer runs out, the item is removed and the economy can spawn a replacement somewhere else. Interacting with an item, such as picking it up or opening a container, starts its timer again.
That's why an untouched tent eventually disappears, while one that's opened regularly lasts as long as its owners keep visiting.
Vanilla lifetimes for common items
Values from Bohemia's vanilla Chernarus types.xml:
- Food such as baked beans: 14400 seconds (4 hours)
- Rags and bandages: 14400 seconds (4 hours)
- Military rifles such as the AKM and M4A1: 7200 seconds (2 hours)
- Tents, wooden crates and barrels: 3888000 seconds (45 days)
- Fences and watchtowers: 3888000 seconds (45 days)
- Territory flag: 604800 seconds (7 days)
Bodies, ruined items and dropped gear
Some things use cleanup timers in globals.xml instead. In vanilla, a dead player's body and gear lasts 3600 seconds (one hour), infected bodies 330 seconds, animal carcasses 1200 seconds and ruined items 330 seconds. Nothing is cleaned up within 100 metres of a player (CleanupAvoidance), so items don't vanish in front of anyone.
If players complain their body disappeared before they got back, raise CleanupLifetimeDeadPlayer. See globals.xml explained.
Why stashes and bases last longer
Storage items such as tents, barrels and crates have long lifetimes so players can leave gear while they're offline. Base parts built inside a raised territory flag's area are kept alive by the flag, so a looked-after base doesn't decay. See why bases disappear.
Buried stashes behave like other storage: their timer restarts when someone opens them, so a stash nobody visits will eventually go.
Change despawn times safely
A few rules of thumb:
- Short lifetimes keep the map tidy and help performance on busy servers
- Long lifetimes for common items fill the map and stop the economy respawning them
- Longer storage lifetimes suit casual servers where people take breaks
- Change by category, not item by item, so the economy stays balanced
Lifetime and respawning work together
Lifetime controls how long untouched items stay. Restock and min control how quickly replacements come. If loot feels stale, the fix is usually shorter lifetimes on common items so the economy can refresh. If loot feels empty, it's usually min and restock. See how loot respawns.
Suggested lifetimes by server style
Starting points, applied by category in types.xml:
- Hardcore or vanilla: leave Bohemia's values alone
- Busy PvP: shorter lifetimes for common loot (an hour or two) so the map refreshes quickly
- Casual or PvE: longer storage lifetimes (60 days or more) so stashes survive holidays
- High loot: keep common items short-lived so boosted loot doesn't pile up
Reading lifetimes in types.xml
Each item's type block holds its lifetime in seconds, next to nominal, min and restock. A few conversions help: 3600 is an hour, 86400 is a day, 604800 is a week and 3888000 is 45 days. When you change a value, think about how long a player would realistically leave that item before coming back for it.
Changing a lifetime only affects items from the next time their timer starts. Items already on the map carry on with the timer they had, so give it a while before judging the result.
Things that don't despawn by timer
Working vehicles don't time out just for being parked. Cars usually disappear because they were ruined, such as by an engine fire, a crash or water, after which they're cleaned up and the economy spawns a new one elsewhere. See why cars disappear.