Where it is
init.c sits in the root of your mission folder, next to cfggameplay.json and the db folder. Each map has its own. On Nitrado you'll find it in the File Browser under mpmissions and your map's mission folder. See where DayZ server files live.
Starting the economy
The main function first creates the Hive and starts the Central Economy. This line is what makes loot, cars and infected exist. Never remove it, or you'll have an empty map.
The date reset (why it's always autumn)
The vanilla script then checks the date. If it falls outside a window starting on 20 September, it sets the date back to 20 September. That keeps official-style servers in early autumn, with the weather and daylight that suits.
If you've wondered why your server never reaches winter, this is why. Change reset_month and reset_day to move the window, or remove the date block to let the date run, combined with serverTime and serverTimePersistent in serverDZ.cfg. Monthly temperatures are set in cfggameplay.json.
Starting gear in StartingEquipSetup
The CustomMission class holds StartingEquipSetup, which runs for every fresh spawn. Vanilla gives a bandage, a random coloured chemlight and an apple, pear or plum, sets them on the quickbar, and gives clothing and items a random condition between 45% and 65% with SetRandomHealth.
Owners often add items here with CreateInInventory and the item's class name. It works, but every line is code, so a typo or missing semicolon can stop the server from starting.
Use spawn gear presets instead
DayZ now supports spawn gear presets: JSON files listed in cfggameplay.json that set what new players wear and carry, with random picks. They're settings, not code, they work the same on PlayStation, Xbox and PC, and a mistake is far less likely to take the server down. For most starter kits, that's the better choice. See starter kits.
Other things init.c can do
Because it's a script, init.c can do far more on PC with mods, from custom loadouts by player to spawning objects. On vanilla console servers, stick to small, well-tested changes. For buildings and objects, object spawner files are the safer route.
Changing the season properly
To run a winter server, three things need to agree. In init.c, change or remove the date reset so the date can sit in winter. In serverDZ.cfg, set serverTime to a winter date and turn on serverTimePersistent so it doesn't jump back. In cfggameplay.json, check environmentMinTemps and environmentMaxTemps for the winter months, which set how cold it actually feels.
Weather such as snow and fog lives in cfgweather.xml. See how to change the weather and use the Weather Editor to set it up.
Vanilla starting condition
SetRandomHealth is why fresh spawns' clothes and items always look worn. It picks a value between 0.45 and 0.65 of full health for each item. Raise both numbers for nicer starting clothes, or remove the calls so items spawn in full condition. It's a small change that new players notice straight away, but keep it modest: a fresh spawn with pristine gear changes the feel of the early game.
Edit it safely
Treat every init.c change like code:
- Download the original before you change anything
- Make one change at a time and restart to test
- Check every line ends with a semicolon and every bracket closes
- Use exact class names: a misspelt item silently doesn't appear
- If the server won't start, put the original back first, then find the error