Home   Help Search Login Register  

Author Topic: Something wrong with config file  (Read 1273 times)

0 Members and 1 Guest are viewing this topic.

moondogy

  • Guest
Something wrong with config file
« on: 03 Aug 2004, 18:09:08 »
Well, i wanna make another config for m60 just too test something, but it doesnt work. I watched usmg config and made that cpp, but something is wrong (game says that something with model is  wrong)

here is the config
Code: [Select]
class CfgPatches
{
   class moon60
   {
      units[]={"moon60sol"};
      weapons[]={"moon60"};
      requiredVersion=1.750000;
   };
};
class CfgModels
{
   class Default {};
   class Weapon: Default {};
   class moon60: Weapon {};
   
};
class CfgRecoils
{
   mgunBurst3[]={0.050000,0.020000,"0.04*1.35",0.050000,0.010000,"0.01*1.35",0.050000,0.030000,"0.04*1.35",0.050000,0.020000,"0.02*1.35",0.050000,0.040000,"0.04*1.35",0.010000,0,0};
};
class CfgAmmo
{
   class Default {};
   class BulletSingle: Default {};
   class moon60Ammo: BulletSingle
   {
      hit=15
      indirectHit=2
      indirectHitRange=0.100000;
      minRange=1
      minRangeProbab=0.100000;
      midRange=200
      midRangeProbab=0.800000;
      maxRange=900
      maxRangeProbab=0.050000;
      cost=2
      tracerColor[]={0.800000,0.500000,0.100000,0.010000};
      tracerColorR[]={0,0,0,0.005000};
   };
   
};
class CfgWeapons
{
   class default {};
   class MGun: Default {};
   class MachineGun7_6: MGun {};
   class MachineGun7_6Manual: MachineGun7_6 {};
   class moon60Mag: MachineGun7_6Manual
   {
   model="\data3d\m60.p3d";
      scopeWeapon=0
      scopeMagazine=2
      displayNameMagazine="Moon60 mag";
      shortNameMagazine="moon60";
      picture="\USMG\m_m60.paa";
      
      count=200
      modes[]={"Single","Brust"};
      class Single
      {
         multiplier=1
         burst=1
         ammo="moon60Ammo";
         displayName="auto 5";
         reloadMagazineSound[]={"\USMG\reload.wav","db-40",1};
         drySound[]={"weapons\M16dry",0.010000,1};
         sound[]={"\USMG\t74.wav",1,1};
         soundContinuous=1
         reloadTime=0.200000;
         dispersion=0.000300;
         aiDispersionCoefX=3.000000;
         aiDispersionCoefY=2.000000;
         initSpeed=1000
         maxLeadSpeed=300
         ffCount=6
         ffMagnitude=0.500000;
         ffFrequency=11
         recoil="mgunBurst3";
         autoFire="true";
         aiRateOfFire=0.075000;
         aiRateOfFireDistance=100
         useAction=0
         useActionTitle="";
      };
      class Brust
      {
         multiplier=1
         burst=1
         ammo="moon60Ammo";
         displayName="auto 9";
         reloadMagazineSound[]={"\USMG\reload.wav","db-40",1};
         drySound[]={"weapons\M16dry",0.010000,1};
         sound[]={"\USMG\t74.wav",1,1};
         soundContinuous=1
         reloadTime=0.140000;
         dispersion=0.000300;
         aiDispersionCoefX=3.000000;
         aiDispersionCoefY=2.000000;
         initSpeed=1000
         maxLeadSpeed=300
         ffCount=6
         ffMagnitude=0.500000;
         ffFrequency=11
         recoil="mgunBurst3";
         autoFire="true";
         aiRateOfFire=0.075000;
         aiRateOfFireDistance=100
         useAction=0
      };
   };
};
class CfgVehicles
{
   class All {};
   class AllVehicles: All {};
   class Land: AllVehicles {};
   class Man: Land {};
   class Soldier: Man {};
   class SoldierWB: Soldier {};
   class SoldierWMG: SoldierWB {};
   class moon60Soldier: SoldierWMG
   {
      displayName="moon60sol";
      weapons[]={"moon60","NVGoggles","Throw","Put","Beretta"};
      magazines[]={"moon60Mag","moon60Mag","moon60Mag","moon60Mag","HandGrenade","HandGrenade","Berettamag","Berettamag","Berettamag","Berettamag"};
   };
};
class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class Proxyotwmoon60: ProxyWeapon {};
   
};

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Something wrong with config file
« Reply #1 on: 03 Aug 2004, 19:17:16 »
A bit wrong board, but what the heck...

You don't need the CfgModels part as you are using the BIS M60 model...
And, if you use the CfgModels you need to use the model name instead of the class name when configging the models...

So in your case it should read class m60: Weapon {};
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

moondogy

  • Guest
Re:Something wrong with config file
« Reply #2 on: 03 Aug 2004, 20:09:13 »
should be sth like that?
};
class CfgModels
{
   class Default {};
   class Weapon: Default {};
   class m60: Weapon {};
   class moon60: m60 {};
   
};

it doesnt work. when i run the game, i get an error in game menu: no entery `config.cpp/cfgWeapons.moon60.`

Offline oyman

  • Members
  • *
  • king of pings
Re:Something wrong with config file
« Reply #3 on: 04 Aug 2004, 04:30:09 »
uhh try removing a }; from here
Code: [Select]
class CfgWeapons
{
   class default {};
   class MGun: Default {};
   class MachineGun7_6: MGun {};
   class MachineGun7_6Manual: MachineGun7_6 {};
   class moon60Mag: MachineGun7_6Manual
   {
   model="\data3d\m60.p3d";
      scopeWeapon=0
      scopeMagazine=2
      displayNameMagazine="Moon60 mag";
      shortNameMagazine="moon60";
      picture="\USMG\m_m60.paa";
     
      count=200
      modes[]={"Single","Brust"};
      class Single
      {
         multiplier=1
         burst=1
         ammo="moon60Ammo";
         displayName="auto 5";
         reloadMagazineSound[]={"\USMG\reload.wav","db-40",1};
         drySound[]={"weapons\M16dry",0.010000,1};
         sound[]={"\USMG\t74.wav",1,1};
         soundContinuous=1
         reloadTime=0.200000;
         dispersion=0.000300;
         aiDispersionCoefX=3.000000;
         aiDispersionCoefY=2.000000;
         initSpeed=1000
         maxLeadSpeed=300
         ffCount=6
         ffMagnitude=0.500000;
         ffFrequency=11
         recoil="mgunBurst3";
         autoFire="true";
         aiRateOfFire=0.075000;
         aiRateOfFireDistance=100
         useAction=0
         useActionTitle="";
      };
      class Brust
      {
         multiplier=1
         burst=1
         ammo="moon60Ammo";
         displayName="auto 9";
         reloadMagazineSound[]={"\USMG\reload.wav","db-40",1};
         drySound[]={"weapons\M16dry",0.010000,1};
         sound[]={"\USMG\t74.wav",1,1};
         soundContinuous=1
         reloadTime=0.140000;
         dispersion=0.000300;
         aiDispersionCoefX=3.000000;
         aiDispersionCoefY=2.000000;
         initSpeed=1000
         maxLeadSpeed=300
         ffCount=6
         ffMagnitude=0.500000;
         ffFrequency=11
         recoil="mgunBurst3";
         autoFire="true";
         aiRateOfFire=0.075000;
         aiRateOfFireDistance=100
         useAction=0
      };
   };
};                         <------ remove this