Jump to content
Sign in to follow this  
MontyVCB

Help required on a replacement config

Recommended Posts

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.

smile_o.gif

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

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

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

Same here  smile_o.gif

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 biggrin_o.gif

Share this post


Link to post
Share on other sites

Thanks guys for your help, Jahve has also given me a few pointers, works great now. biggrin_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×