Messages.xml
How do you send automatic server messages in DayZ? Learn how Messages.xml schedules welcome text, repeating notices and shutdown countdowns.
Looking for DayZ console bot setup guides?
See our feature pages for DayZ auto ban, and DayZ economy bot.
Messages.xml
messages.xml is the simple server-message file. It is loaded from the mission's db folder and contains one <message> block for each message you want players to see.
You can build and download this file with the Messages.xml Generator instead of hand-editing the XML.
A repeating server notice
<messages>
<message>
<repeat>15</repeat>
<text>Welcome to #name. Please check the rules before building.</text>
</message>
</messages>repeat is measured in minutes. The message is shown repeatedly to players. The supplied vanilla files also document delay for the first display and onconnect for a message that should be shown when a player connects.
A welcome message
<message>
<delay>2</delay>
<onconnect>1</onconnect>
<text>Welcome to #name. Enjoy your stay.</text>
</message>This waits two minutes, then displays once after the player connects. Keep onconnect as 1 for this behaviour.
A shutdown countdown
<message>
<deadline>600</deadline>
<shutdown>1</shutdown>
<text>#name will shut down in #tmin minutes.</text>
</message>The supplied vanilla comments use a deadline of 600 and the #tmin placeholder for the remaining minutes. shutdown marks the message as a shutdown countdown rather than a normal notice.
Placeholders and safe editing
The vanilla example uses #name for the server name and #tmin for the countdown minutes. Keep the <messages> root and put each <message> directly beneath it. XML comments are not required for the file to work, so remove the long example comment if you want a cleaner mission file.
Source basis: the supplied DayZ 1.30 dayzOffline.* /db/messages.xml files. The Nasdara, Chernarus and Livonia vanilla files are structurally empty but contain the same official examples in their comments.
Useful server-owner patterns
Use separate message blocks for separate jobs. A welcome block should not also carry a repeat interval, and a shutdown block should keep shutdown and deadline together so the countdown has the information it expects. If a message is meant to appear only on connection, keep onconnect set to 1 and do not rely on a repeating notice to do the same job.
If a message contains XML characters, the generator escapes them for you. When editing by hand, remember that &, < and > are XML characters and must be escaped inside <text>. Do not paste a second <messages> root around an existing file; add another <message> inside the one root.
Troubleshooting a message that does not appear
- Check the file is under the mission's db folder and is named messages.xml in the form expected by the host.
- Check the root is <messages> and every message is closed.
- A repeat value is a schedule, not an instant “show now” command. Use a small test interval while checking it, then set the production interval.
- Check that the message is not using only onconnect while testing with an already-connected player.