Overrides - Solomonk-Solo/DayZ-modding-How-To GitHub Wiki

What is an override?

It is modifying classes that already exist, you'll need to name it your own class and make the original class a required addon.

As example, let say you want to modify some vanilla ammo damage.

  1. You'll need to find the config.cpp on DZ from your P drive. (in that case, P:\DZ\weapons\projectiles).

override_class_addons

  1. Here, "DZ_Weapons_Projectiles" is the class we modify. Change that class name with something else, I like to keep same name but just add a word before/after, here I add Wiki. My class is "Wiki_DZ_Weapons_Projectiles". Add the orginal class as required addon "DZ_Weapons_Projectiles".

overrides_addons_requiredd

  1. Search the ammo you are looking for (ctrl+f), select the whole class and copy/paste it in your config between {}, under class CfgAmmo. (most of overrides are on "class CfgVehicles", just do it as the original config.cpp).

override_variables

  1. Add the class after ":" over the class you modidy. Just like the picture, I add "class Bullet_Base;" over "class Bullet_762x54: Bullet_Base". Than, modify what you need, on this case i modify 762x54 ammo to do 1 healt/blood/shock damage.

override_variables_modif

Thats it! Thats how you override classes on config.cpp. Just use same method for any class you wish to modify. Same process with mods addons. I'll make few samples.

There is the zip from my example.

Wiki_mod_files_one.zip