Home   Help Search Login Register  

Author Topic: Re:Help plz! Where do Config.cpp files go ??!  (Read 1215 times)

0 Members and 1 Guest are viewing this topic.

CptBravo

  • Guest
Re:Help plz! Where do Config.cpp files go ??!
« on: 29 Sep 2002, 17:43:02 »
Hi,
I'm reposting this (I hope in the right forum this time) :)
Thx for those who replied earlier.

I downloaded a couple of units which had the pbo file and a config.cpp file. I know the pbo goes in the add on. But how about the config.cpp ? According to the read  me txt file, the .cpp is supposed to change some  of things about unit (camo level, weapons) I will post the file contennents here, maybe someone can tell me where it should go (I hope)

The other question is, I downloaded a few units with same name "config.cpp" file. DO they all go into same place??

Thanks in advance

// some basic defines
#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 true 1
#define false 0

// type scope
#define private 0
#define protected 1
#define public 2

#define WeaponNoSlot      0// dummy weapons
#define WeaponSlotPrimary   1// primary weapons
#define WeaponSlotSecondary   16// secondary weapons
#define WeaponSlotItem      256// items
#define WeaponSlotBinocular   4096// binocular
#define WeaponHardMounted   65536


class CfgPatches
{
   class SPDgs
   {   
   units[] = {SPDghilliesniperM21,SPDGhilliesniperM21S,SPDghillieobserver};
   weapons[] = {SPDGhillieM21,SPDGhillieM21supressed,SPDsnipergl};
   requiredVersion = 1.30;
   };
};

//ammo
class CfgAmmo
{
   class default {};
      class BulletSingle: default {};
   class BulletSniper: BulletSingle {};
   
   class SPDBulletSniperSilenced: BulletSniper
   {
      hit=9;
      indirectHit=1;
      indirectHitRange=0.100000;
      visibleFire=0.025000;
      audibleFire=0.025000;
      visibleFireTime=2;
      minRange=1;
      minRangeProbab=0.100000;
      midRange=180;
      midRangeProbab=0.700000;
      maxRange=700;
      maxRangeProbab=0.045000;
      cost=2;
      tracerColor[]={0,0,0,0.000000};
      tracerColorR[]={0,0,0,0.000000};
   };              
};

//weapons
class CfgWeapons
{
   class Default {};
   class MGun: Default {};
   class Riffle: Mgun {};
   class SniperRiffle: Riffle{};   
   class M21: SniperRiffle{};
   class M16: Riffle {};
   class GrenadeLauncher: Default {};
   
//rifles   
   class SPDGhillieM21: M21
   {
      scopeWeapon=2;
      model="\SPDgs\SPDGhillieM21";
      count=20;
      ammo="BulletSniperW";
      picture="\SPDgs\Icons\SPDGhillieM21.paa";
      magazines[]={"M21"};
   };
   
   class SPDGhillieM21supressed: M21
   {
      scopeWeapon=2;
      model="\SPDgs\SPDGhillieSM21.p3d";
      picture="\SPDgs\Icons\SPDGhillieSilenced.paa";
      sound[]={\SPDgs\Audio\SPDsilentm21.wav,1,1};
      ammo="SPDBulletSniperSilenced";
      count=18;
      magazines[]={"SPDM21supressedMag"};   
   };

   class SPDsnipergl
   {
      scopeWeapon=2;
      scopeMagazine=0;
      weaponType=1;
      displayName="M16/203";
      model="\SPDgs\sniper_GL\SPDsniperGL.p3d";
      picture="\SPDgs\Icons\SPDsnipergl.paa";
      muzzles[]={"M16Muzzle","M203Muzzle"};
      class M16Muzzle: M16
      {
         magazines[]={"M16"};
      };
      class M203Muzzle: GrenadeLauncher
      {
         displayName="$STR_DN_M203";
         sound[]={"weapons\M16GrenadeLaunch",0.000316,1};
         magazines[]={"GrenadeLauncher","Flare","FlareGreen","FlareRed","FlareYellow"};
      };
      canDrop=1;
   };

   //magazines
   class SPDm21supressedMag:SPDGhillieM21supressed
   {   
      scopeMagazine=2;
      displayNameMagazine = "M21 Supressed Magazine";
      shortNameMagazine = "M21*S";
      picture="M21";
   }
};

//units
class CfgVehicles
{
   class All{};
   class AllVehicles:All{};
   class Land:AllVehicles{};
   class Man:Land{};
   class Soldier:Man{};
   class SoldierWB:Soldier{};
   class SoldierWSniper: SoldierWB{};

   
   class SPDGhilliesniperM21:SoldierWSniper
   {
      scope=2;
      displayName="SPD Ghillie Sniper (M21)";
      model="\SPDgs\SPDsniperw.p3d";
      picture="\SPDgs\Icons\sfgSNIPER.paa";

      sensitivity=2.5;
      weaponSlots="1 +    16 + 2 *    4096 + 10 *          256";
      weapons[]={SPDGhillieM21,NVGoggles,Throw,Put};
      magazines[]={m21,m21,m21,m21,m21,handgrenade,handgrenade,handgrenade,smokeshell,smokeshell};
      camouflage=0.950000;
      accuracy=4.500000;
      wounds[]=
         {"\SPDgs\_hrud_p","\SPDgs\xhrud_p",
         "\SPDgs\_nohy_p","\SPDgs\xnohy_p",
         "\SPDgs\_nohy_z","\SPDgs\xnohy_z",
         "\SPDgs\_helma_side2","\SPDgs\xhelma_side2",
         "\SPDgs\_zadaruce_z","\SPDgs\xzadaruce_z",
         "\SPDgs\_vojak_nohy_bok_l","\SPDgs\xvojak_nohy_bok_l",
         "\SPDgs\_vojak_ruka_bok_l","\SPDgs\xvojak_ruka_bok_l",
         "\SPDgs\_vojak_hrud_bok_p","\SPDgs\xvojak_hrud_bok_p",
         "\SPDgs\_helma_front","\SPDgs\xhelma_front"};
   };

   class SPDGhilliesniperM21S:SPDGhilliesniperM21
   {
      scope=2;
      displayName="SPD Ghillie Sniper (M21 supressed)";
      model="\SPDgs\SPDsniperwS.p3d";
      weapons[]={SPDGhillieM21supressed,NVGoggles,Throw,Put};
      magazines[]={SPDm21supressedMag,SPDm21supressedMag,SPDm21supressedMag,SPDm21supressedMag,SPDm21supressedMag,handgrenade,handgrenade,handgrenade,smokeshell,smokeshell};
   };

   class SPDghillieobserver:SPDghilliesniperM21
   {
      scope=2;
      displayName="SPD Ghillie Observer";
      model="\SPDgs\SPDobserverw.p3d";
   
      sensitivity=3;      
      weapons[]={SPDsnipergl,Throw,Put,NVGoggles,Binocular};
      magazines[]={M16,M16,M16,M16,GrenadeLauncher,GrenadeLauncher,smokeshell,smokeshell};
   };
};


class CfgNonAIVehicles
{
   class ProxyWeapon{};
   class ProxySPDGhillieM21: ProxyWeapon {};
   class ProxySPDGhillieM21supressed: ProxyWeapon {};
   class ProxySPDsnipergl: ProxyWeapon{};
   class ProxySPDGhilliesniperM21: ProxyWeapon{};
   class ProxySPDGhilliesniperM21S: ProxyWeapon{};
   class ProxySPDghillieobserver: ProxyWeapon{};
};

class CfgGroups
{
   class West {
   name="West";
      class Infantry
      {
      name="Infantry";
         class SPDSniperTeam
         {
         name="SPD Sniper team";
            class Unit0
            {
            name="1";
            side=1;
            vehicle="SPDghillieobserver";
            rank="Lieutnant";
            position[]={0,5,0};
            };
            class Unit1
            {
            name="2";
            side=1;
            vehicle="SPDghilliesniperM21";
            rank="Sergeant";
            position[]={-5,0,0};      
            };
         };
      };
   };
};

« Last Edit: 29 Sep 2002, 18:02:54 by CptBravo »

Lucknow

  • Guest
Re:Help plz! Where do Config.cpp files go ??!
« Reply #1 on: 29 Sep 2002, 18:03:31 »
The config.cpp files you mention are probably already in the PBO file (where they belong and are required for the addon to work).

I'm thinking the addon maker simply placed a copy of the config file in the zip file so that other addon makers could quickly look into it for any info they might need.

In other words simply place the PBO in the OFP addons folder, disregard the config file, and off you go!
« Last Edit: 29 Sep 2002, 18:04:42 by Lucknow »

CptBravo

  • Guest
Re:Help plz! Where do Config.cpp files go ??!
« Reply #2 on: 29 Sep 2002, 18:09:13 »
Thank you very much! :)

I wish authors of add ons would not assume every one is guru! :)