MontyVCB 0 Posted December 15, 2008 Hi there, I've bitten the bullet and decided to have a go at writing my own replacement config for ArmA, Replacing the QG mercs with the MGS4 style mercs. Simple enough or so I've been told. But I seem to get an error when I start up ArmA with this file. Quote[/b] ]file mgs4pmcs_replacements\config.cpp, line 25: /Cfgvehicles.soldierMG: Undefined base class 'soldierWB' I have very little idea on what I'm doing here so I'll post the config up here, any help would be wonderful. Quote[/b] ]class CfgPatches { class MGS4PMCs_Replacements { units[] = {}; weapons[] = {}; requiredVersion = 0.5; requiredAddons[] = {"CAData","CACharacters","CAWeapons", "mgs4pmc" }; }; }; class CfgVehicles { class CAManBase; class SoldierMTeamLeader: CAManBase { model = "\MGS4PMC\mgs4pmc3"; weapons[] = {"AMP_M4A1CQBE_D", "NVGoggles","Throw", "Put", "M9"}; magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "HandGrenadeTimed", "HandGrenadeTimed", "HandGrenadeTimed", "HandGrenadeTimed", "15Rnd_9x19_M9", "15Rnd_9x19_M9", "15Rnd_9x19_M9"}; Â Â Â Â }; class SoldierMG: SoldierWB { model = "\MGS4PMC\mgs4pmc2"; weapons[] = {"AMP_M4A1GL_AG_D", "NVGoggles", "Throw", "Put", "M9"}; magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "1Rnd_HE_M203", "15Rnd_9x19_M9", "15Rnd_9x19_M9", "15Rnd_9x19_M9"}; Â Â Â Â }; class SoldierMD: SoldierWB { model = "\MGS4PMC\mgs4pmc2"; weapons[] = {"SIX_SCAR_H_rifle_EOTech_EGLM.p3d", "NVGoggles", "Throw", "Put"}; magazines[] = {"20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "PipeBomb", "PipeBomb", "PipeBomb"}; Â Â Â Â }; Â Â Â Â class SoldierMS: SoldierWB { model = "\MGS4PMC\mgs4pmc3"; Â Â Â Â Â Â Â Â weapons[] = {"PKW_M21A", "NVGoggles","Throw", "Put", "M9"}; magazines[] = {"20Rnd_762x51_PKW_M21", "20Rnd_762x51_PKW_M21", "20Rnd_762x51_PKW_M21", "20Rnd_762x51_PKW_M21", "20Rnd_762x51_PKW_M21", "20Rnd_762x51_PKW_M21", "20Rnd_762x51_PKW_M21", "20Rnd_762x51_PKW_M21", "HandGrenadeTimed", "HandGrenadeTimed", "15Rnd_9x19_M9", "15Rnd_9x19_M9", "15Rnd_9x19_M9"}; Â Â Â Â }; Â Â Â Â Â Â Â Â Â Â Â class SoldierMR: SoldierWB { Â Â Â Â Â Â Â model = "\MGS4PMC\mgs4pmc5"; Â Â Â Â Â Â Â weapons[] = {"SIX_SCAR_H_rifle_ACOG.p3d", "NVGoggles","Throw", "Put", "M9"}; Â Â Â magazines[] = {"20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "20Rnd_762x51_B_SCAR", "HandGrenadeTimed", "HandGrenadeTimed", "HandGrenadeTimed", "HandGrenadeTimed", "HandGrenadeTimed", "15Rnd_9x19_M9", "15Rnd_9x19_M9", "15Rnd_9x19_M9"}; Â Â Â Â Â Â Â Â }; class SoldierMMG: SoldierWB { model = "\MGS4PMC\mgs4pmc1"; Â Â Â Â Â Â Â Â weapons[] = {"PKW_M249_PARA", "NVGoggles","Throw", "Put", "M9"}; Â Â Â Â magazines[] = {"100rnd_556x45_PKW_M249", "100rnd_556x45_PKW_M249", "100rnd_556x45_PKW_M249", "100rnd_556x45_PKW_M249", "100rnd_556x45_PKW_M249", "100rnd_556x45_PKW_M249", "15Rnd_9x19_M9", "15Rnd_9x19_M9"}; Â Â Â Â Â Â Â Â }; Â Â Â Â }; Share this post Link to post Share on other sites
Jackal326 1182 Posted December 15, 2008 Change: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgVehicles { class CAManBase; To: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgVehicles { class CAManBase; class SoldierWB; That way, you're defining SoldierWB. As the config stands now, its looking to inherit from SoldierWB for each of the classes, and being unable to find the SoldierWB define. Adding it as above, tells the game to look else where for the define. Share this post Link to post Share on other sites
YO 0 Posted December 15, 2008 yep, just declare all units you inherit properties from, just like you did with CAManBase, it woud look like: (...) class CfgVehicles { class CAManBase; class SoldierWB; //and then the units Share this post Link to post Share on other sites
modemmaik 53 Posted December 15, 2008 Same here  lately, i have set up a replacement config for a clan, including the infantry. I have uploaded the main parts to pastebin You may notice that soldierWB is derived from CAManBase. Some are derived from other classes, but the code should cover most of the infantry classes. You only need to include the items that differ from the BI standard class. Weapon replacements may get a bit tricky. I use to replace the standard weapons with their comunity counterparts. E.g.: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class Mode_SemiAuto; //Extended class Mode_Burst; //Extended class Mode_FullAuto; //Extended class CfgWeapons { class GrenadeLauncher; class Rifle; class M4: Rifle { model = "theOtherModel"; }; You may find the needed info about the weapon class inheritance in custom soundmods, because they need the correct classes to replace the sounds of the weapons. BR, mike p.s.: Woops... two more posts while writing this post Share this post Link to post Share on other sites
MontyVCB 0 Posted December 16, 2008 Thanks guys for your help, Jahve has also given me a few pointers, works great now. Share this post Link to post Share on other sites