Personally speaking, it would probably just use the addweapon, addmagazine, etc. commands in the editor, rather than creating a new class. It'll save you a lot of hassle!
That said, making a new infantry class that's just got different weapons is really easy. You'll want a config.cpp file that looks sort of like this: (lines that start with // are comments, and aren't read by the engine)
CODE
//Basic Definitions
#define true 1
#define false 0
#define VSoft 0
#define VArmor 1
#define VAir 2
#define private 0
#define protected 1
#define public 2
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
#define ReadAndWrite 0
#define ReadAndCreate 1
#define ReadOnly 2
#define ReadOnlyVerified 3
#define DefaultManWeapons Throw,Put
//All that stuff up there just tells the engine what these terms mean, so your config is easier for you to read.
//Your config MUST start with class CfgPatches. It's recommended you keep the classname (currently MyPBOName) the same as your .PBO file
class CfgPatches
{
class MyPBOName
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"CAweapons"};
};
};
//You should add the cfgpatches class of the addons your inheiriting from in the requiredaddons fields, it's not too important
//but if you don't it's possible to crash the engine by having it look for stuff that doesn't exist. Of course, if you do fill it in
//and the stuff doesn't exist, the engine will just refuse to start to begin with. So it's kind of a loose-loose situation.
//Adding a new Vehicle Classes definition will let us keep our new stuff separate from existing stuff, so it's easier to find in the editor.
//It's good practice to put a tag in front of your classnames, as all classes ingame have to have an unique name, otherwise they'll conflict.
//For this tutorial, I'll use "My_", but it's best to make up your own. OFPEC has a database of all the ones currently in use, so you can ensure
//you're not using someone else's.
class CfgVehicleClasses
{
class My_Addon_Class
{
displayName = "My Custom Units";
};
};
class CfgVehicles
{
//External class references
class TheClassImInheiritingFrom;
//Obviously, replace that with the classname of the unit you want to inherit from.
class My_NewSoldier1: TheClassImInheiritingFrom
{
displayName = "My Super-duper new soldier";
//The name the class appears in the editor.
vehicleClass = "My_Addon_Class";
//The vehicleclass we defined earlier.
weapons[] = {" AKS_74_U","ItemGPS","NVGoggles","Binocular","Throw","Put","ItemMap","ItemCompass","ItemWatch","ItemRadio"};
magazines[] = {"30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","HandGrenade_East","HandGrenade_East","PipeBomb","PipeBomb"};
respawnWeapons[] = {" AKS_74_U ","ItemGPS","NVGoggles","Binocular","Throw","Put","ItemMap","ItemCompass","ItemWatch","ItemRadio"};
respawnMagazines[] = {"30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","HandGrenade_East","PipeBomb"};
//Obviously, replace those classes with the weapon and magazine classes you want.
};
//And that's it! If you want to do more soldiers, just add more cfgvehicles classes.
};
Once you're happy with your config, just pack it up using your favourite PBO editor, and you're good to go.