init.c Mission Script
Mission startup script used for server initialization, player loadouts, and custom mission-side behavior.
Overview
init.c is the mission startup script. It runs mission-side initialization logic, commonly including player starting loadouts, weather setup, economy startup hooks, and custom scripted behavior.
Treat this as code, not simple configuration. Small syntax mistakes can stop the mission from loading correctly.
Quick Facts
| File | init.c |
|---|---|
| Language | Enforce Script |
| Best for | Starting gear, mission initialization, and custom scripted startup behavior |
Common Responsibilities
Player Loadouts
Set default clothes, tools, food, or custom spawn gear.
Mission Startup
Initialize economy, weather, or custom scripts required by the mission.
Server Identity
Support custom mission behavior that belongs in script rather than XML.
Mod Hooks
Some mods require mission-side initialization or helper calls.
Editing Rules
Keep backups and use careful indentation. A missing brace or semicolon can break startup, and the error may only appear in RPT logs.
Do not hard-code secrets. init.c is often shared in mod packs, support requests, and public repositories.
Troubleshooting
| Symptom | Check |
|---|---|
| Server hangs during mission load | RPT syntax errors, missing braces, or bad mod function calls. |
| Players spawn with wrong gear | Loadout branch conditions and classname spelling. |
| Weather is not applying | Weather script order and conflicting cfgweather.xml settings. |
| Custom scripts do nothing | Mod load order and whether required server mods are loaded. |