Dayz add server

From DayZ-n-Chill/Agentic-Z · View interactive version

Dayz add server is an AI agent skill from the GitHub repository DayZ-n-Chill/Agentic-Z. Sets up an isolated DayZ test server instance under .server/<instance>/ with its own mission copy, serverDZ.cfg and profiles. Use when you need a new test instance before /dayz-launch-test (for example chernarus or chernarus-hardcore), or to refresh the mission after a DayZ update.

How to use this skill

Skill file

<!-- skill-dir-note -->

Path note: <skill-dir> in commands below is the absolute path of this skill's folder. When the agent loads this skill the harness exposes the skill's base directory; substitute it before running. Sibling skills are reached via <skill-dir>\..\dayz-X\.

/dayz-add-server

Set up a self-contained test server instance for local DayZ mod testing. Each instance lives under .server/<instance>/ and owns its mission copy, server config, and server logs. Client diag logs are shared across instances at .server/!ClientDiagLogs/. Run as many instances as you want, including multiple variants of the same map.

This is the setup half of the test loop. /dayz-launch-test is the run half, and refuses to run for an instance you haven't added yet.

Follow skills/_shared/dayz-conventions.md.

How to run

python "<skill-dir>\add_server.py" <instance> [--map <name>] [--refresh-mission]

| Argument | Required? | Notes |

|---|---|---|

| <instance> | yes | Free-form instance name. Becomes the folder name under .server/, so it must be a single folder name (no /, \, :, .., or any of the characters Windows forbids in file names, such as *, ? and "). It must contain at least one letter or digit, because the server's six character shardId is built from them. Examples: chernarus, chernarus-hardcore, loot-test, livonia-pvp. |

| --map | no | Map alias (chernarus, livonia, sakhal, nasdara) or full mission template folder name (e.g. dayzOffline.namalsk). It must be a single folder name, with the same rules as <instance>, because it is joined into the DayZ Server mpmissions path and the junction path under .server/<instance>/. When omitted, <instance> is used as the map alias if it matches a known one; otherwise the skill fails and asks for --map. |

| --refresh-mission | no | Re-copy the mission folder from the DayZ Server install. The new copy is made first; only once it succeeds is the current mission/ renamed to mission.bak-<YYYYMMDD-HHMMSS>/, so your edits stay recoverable. Use after a DayZ update brings new mission content. Without this flag, an existing mission folder is left alone. |

What it does

  1. Project check: reads the cached project folder; halts if none is cached (run /dayz-init).
  2. Preflight gate: runs /dayz-preflight; halts on non-zero.
  3. Old-layout gate: refuses if workspace/_server/ still exists. Delete the folder manually; that layout is no longer supported.
  4. Resolve map and mission template: turns the instance name and --map flag into the canonical mission folder name via the alias table. If the instance already has a serverDZ.cfg whose active template = "..." line names a different template, the skill refuses before copying anything (see Refuses to run if).
  5. Mission copy: if .server/<instance>/mission/ doesn't exist or is empty (or --refresh-mission was passed), copies it from <DayZServer>/mpmissions/<template>/. An empty folder is removed and reported as Copied. The copy goes into a temporary mission.tmp-<timestamp>/ folder first and is moved to mission/ only once it is complete, so a failed or interrupted copy (including Ctrl+C) never leaves a partial mission behind. A mission.tmp-* folder left by a crashed older run is reported with a [WARN] line naming it; delete it by hand. With --refresh-mission, the existing mission folder is renamed to mission.bak-<timestamp>/ only after the new copy succeeded; nothing is deleted. The copy is always named mission/, and it holds a small .agentic-z-template file recording which template it was copied from (a backup keeps its own). When mission/ is already present and --refresh-mission was not passed, the skill checks that it came from this run's template, using that file, or for a mission copied before the file existed, the <template>/ junction pointing at it. A mission with neither (filled in by hand) is accepted as it is.
  6. Instance directory: ensures .server/<instance>/ exists with:
  1. Shared client log dir: ensures .server/!ClientDiagLogs/ exists; this is the client-side -profiles= dir, shared across all instances.

Refuses to run if

Output

DayZ preflight
... (preflight output)
Preflight complete.

[OK]    Project: C:\Projects\MyDayZProject
[OK]    Instance: chernarus-hardcore  (map: chernarus, mission: dayzOffline.chernarusplus)
[OK]    Copied .server\chernarus-hardcore\mission  (from DayZ Server install)
[OK]    Wrote default .server\chernarus-hardcore\serverDZ.cfg
[OK]    Junction dayzOffline.chernarusplus/ -> mission/ (template handshake)
[OK]    .server\chernarus-hardcore\Profiles ready
[OK]    .server\!ClientDiagLogs ready

Instance 'chernarus-hardcore' is ready. Next:
  /dayz-build-pbo <ModName>
  /dayz-launch-test <ModName> --server chernarus-hardcore

On a rerun with everything already set up, the changed lines read:

[OK]    Mission already present: .server\chernarus-hardcore\mission
[OK]    .server\chernarus-hardcore\serverDZ.cfg unchanged (already configured)
[OK]    Junction dayzOffline.chernarusplus/ -> mission/ already present

Editing what this skill creates

Do not

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.