---------------------------------------------------
-- Lazy DayZ config generator 1.0.0 - By Kerkkoh --
-- Prerequisites: - Python >3.0 --
-- License: MIT License --
-- Use at your own discretion! --
---------------------------------------------------
USAGE:
py config_generator.py [FLAGS] [OPTIONS] [pdrive] [folder]
FLAGS:
-d, --debug Activate debug mode
-o, --override Override existing config.cpp if any present
if this flag isn't present the config is saved as config.gen.cpp recursively with
more and more .gen in the name if previous generated files exist.
-r, --recursive Run for each subfolder and produce a config at EACH subfolder's root (i.e. MANY configs)
-s, --single Generate a SINGLE config file at the root containing entries from all SUBFOLDERS
-h, --help Prints this lovely message...
-p, --purge Removes any config.gen.cpp and config.gen.cpp and so on...
OPTIONS:
+c, ++className=<value> Classname used in the cfgPatches entry, defaults to generated_<addonName>
+p, ++prefix=<value> Prefix in cfgVehicles entries, underscore is applied to the end automatically, defaults to Land
+b, ++baseClass=<value> Class that all objects will inherit, defaults to HouseNoDestruct
+r, ++requiredAddons=<requiredAddons> List in format "Addon1","Addon2",...,"AddonX" that is input as requiredAddons, defaults to "DZ_Data"
ARGS:
<pdrive> The prefix of the <folder> path, i.e. the P-drive, which get cut out of the <folder> path to form
a path for the model in the class e.g. P:\\mod\\model.p3d gets turned to mod\\model.p3d -- defaults to P:\\
<folder> Folder to process
$ py config_generator.py P:\\ P:\\DZ\\structures\\roads\\Tunnels
Outputs:
//////////////////////////////////////////////////////////////
// DayZ Config Generator: \DZ\structures\roads\Tunnels
// Produced from Kerkkoh's DayZ Config Generator version 1.0.0
// https://github.com/kerkkoh/dayzconfiggen
// 'now' is 02/08/2021, 22:04:22
//////////////////////////////////////////////////////////////
class CfgPatches
{
class generated_Tunnels
{
units[] = { "Land_Tunnel_Biathlon_Left", "Land_Tunnel_Biathlon_Left_anthoxanthum", "Land_Tunnel_Biathlon_Left_elytrigia", "Land_Tunnel_Biathlon_Right", "Land_Tunnel_Biathlon_Right_anthoxanthum", "Land_Tunnel_Biathlon_Right_elytrigia" };
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = { "DZ_Data" };
};
};
class CfgVehicles
{
class HouseNoDestruct;
class Land_Tunnel_Biathlon_Left: HouseNoDestruct
{
scope = 2;
displayName = "Land_Tunnel_Biathlon_Left";
descriptionShort = "Autogenerated class Land_Tunnel_Biathlon_Left";
model = "DZ\structures\roads\Tunnels\Tunnel_Biathlon_Left.p3d";
};
class Land_Tunnel_Biathlon_Left_anthoxanthum: HouseNoDestruct
{
scope = 2;
displayName = "Land_Tunnel_Biathlon_Left_anthoxanthum";
descriptionShort = "Autogenerated class Land_Tunnel_Biathlon_Left_anthoxanthum";
model = "DZ\structures\roads\Tunnels\Tunnel_Biathlon_Left_anthoxanthum.p3d";
};
class Land_Tunnel_Biathlon_Left_elytrigia: HouseNoDestruct
{
scope = 2;
displayName = "Land_Tunnel_Biathlon_Left_elytrigia";
descriptionShort = "Autogenerated class Land_Tunnel_Biathlon_Left_elytrigia";
model = "DZ\structures\roads\Tunnels\Tunnel_Biathlon_Left_elytrigia.p3d";
};
class Land_Tunnel_Biathlon_Right: HouseNoDestruct
{
scope = 2;
displayName = "Land_Tunnel_Biathlon_Right";
descriptionShort = "Autogenerated class Land_Tunnel_Biathlon_Right";
model = "DZ\structures\roads\Tunnels\Tunnel_Biathlon_Right.p3d";
};
class Land_Tunnel_Biathlon_Right_anthoxanthum: HouseNoDestruct
{
scope = 2;
displayName = "Land_Tunnel_Biathlon_Right_anthoxanthum";
descriptionShort = "Autogenerated class Land_Tunnel_Biathlon_Right_anthoxanthum";
model = "DZ\structures\roads\Tunnels\Tunnel_Biathlon_Right_anthoxanthum.p3d";
};
class Land_Tunnel_Biathlon_Right_elytrigia: HouseNoDestruct
{
scope = 2;
displayName = "Land_Tunnel_Biathlon_Right_elytrigia";
descriptionShort = "Autogenerated class Land_Tunnel_Biathlon_Right_elytrigia";
model = "DZ\structures\roads\Tunnels\Tunnel_Biathlon_Right_elytrigia.p3d";
};
};Python filesystem might not recognize the P-drive as an actual drive, so the workaround is to use your P-drive location in the paths instead. So if your P-drive is mounted to C:\dayzstuff, instead of
$ py config_generator.py P:\ P:\DZ\structures\roads\Tunnels
you should run
$ py config_generator.py C:\dayzstuff C:\dayzstuff\DZ\structures\roads\Tunnels
And yes, you can technically generate a config for all of the DayZ p3ds. It's not what I use it for. This is particularly interesting and useful if you make terrains and mass import assets without much regard for configs.