DayZ Guide

How do I make a config.cpp in DayZ?

A config.cpp tells DayZ what your mod contains, what it depends on and which game classes you are creating or changing. It is one of the first files you need when building or repairing a DayZ mod.

Basic structure

Most DayZ mods start with CfgPatches. This declares your package name, dependencies and the classes your package exposes.

class CfgPatches
{
  class CDS_ExampleMod
  {
    units[] = {};
    weapons[] = {};
    requiredVersion = 0.1;
    requiredAddons[] = {"DZ_Data"};
  };
};

Common config.cpp mistakes

  • Missing or wrong requiredAddons[].
  • Trying to inherit from a class that is not loaded yet.
  • Class names duplicated between mods.
  • Incorrect folder structure before packing the PBO.
  • Syntax issues such as missing semicolons or braces.

When to get help

If your mod packs but will not load, crashes a server, gives dependency errors or has broken inheritance, CustomDayZServices can review the config, repair the structure and explain what changed.

Request config.cpp help
How do I make a config.cpp in DayZ? | CustomDayZServices