CfgPatches is the most important class you can have in your addon. It may well be the only class in your config.cpp, but it must be there.
It outweighs the relative trivia of configuring your tank, machine gun or car.
All config.cpp's must contain this class so that your addon (pbo) can be identified by the game engine.
class CfgPatches
{
class MyGreatAddon // identifies **this** addon to the engine. The name of your pbo has no meaning at all.
{
units[]={...}; // identifies cfgVehicles classes that can be used in the editor. (scope=2)
weapons[]={...}; // identifies cfgWeapons classes that can be used in the editor.
requiredAddons[]={...};
};
//optional
class OldAddonName // used when you change your mind what your addon is called but need to maintain compatibility with what you've
{ // already published and which existing mission.sqm's will look for.
...
};
};
The dll will automatically fill in units and weapons for you.
This array is possibly the least understood and overlooked element of addon construction. It has two, equally important, but fundamentally different uses.