Home   Help Search Login Register  

Author Topic: Help with Config.ccp  (Read 1855 times)

0 Members and 1 Guest are viewing this topic.

BrAinOfJ

  • Guest
Help with Config.ccp
« on: 29 Aug 2006, 19:01:47 »
Hey Guys,

Anyone know of a good tutorial on creating/editing config.ccp files. I simply want to make custom ammo for an addon that currently share's its ammo settings with another addon.

  class ctiobjects02_gunfort: t55g
  {
    displayName="Gun Fort";
    vehicleClass=CLASSNAME;
    maxSpeed=1;
    model="\ctiobjects02\gunfort";
    fuelCapacity=0;
    hasDriver = false;
    hasGunner = true;
    hasCommander = false;
    forceHideGunner = true;
    forceHideDriver = true;
    forceHideCommander = true;
    transportSolider = 0;
    gunnerCanSee = CanSeeAllButRadar;
    commanderCanSee = CanSeeAllButRadar;
    armor=1000;

Thats the main gutz of the addon in this config file. But i cant see where it actually points to for its weapon settings. So i wanna make a completely new set of setting. I know the settings i need (through looking at other addons config.ccp files) I just dont now how to start/ how to define the new ammo and make this item look for this new information.

Thanks :)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Help with Config.ccp
« Reply #1 on: 29 Aug 2006, 20:39:15 »
Quote
class ctiobjects02_gunfort: t55g

As stated above it inherits from the tank t55g.

So whatever weapons are configured for the t55g in the game config will be the weapons that this object is using also.

Looking at the t55g part of the config the weapons and magazines used are:

weapons[]={"Gun105","MachineGun7_6"};
magazines[]={"Heat105","Shell105","MachineGun7_6"};


Planck
I know a little about a lot, and a lot about a little.

BrAinOfJ

  • Guest
Re: Help with Config.ccp
« Reply #2 on: 30 Aug 2006, 04:48:23 »
Thank mate.

I took away the inherit bit and created my own weapon and ammo class but now im getting a "missing scope" error when it loads :(

the only info i can find in other addons about a scope is as follows

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


But adding that does nothing, any ideas ?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Help with Config.ccp
« Reply #3 on: 30 Aug 2006, 12:28:45 »
You need to keep the inherit bit.

Put back:
Code: [Select]
class ctiobjects02_gunfort: t55g


Then in the class definition add:
Code: [Select]
weapons[]={"WeaponClassName1","WeaponClassName2"};
magazines[]={"MagazineName1","MagazineName2","MagazineName3"};

WeaponClassNAme1 would be the classname of the first weapon your object is using.
WeaponClassNAme2 would be the classname of the second weapon your object is using.

If you are only using one weapon then obviously leave out the second one.

The same idea goes for the MagazineClassNames.

So, going by your earlier example you would have:

Code: [Select]
class ctiobjects02_gunfort: t55g
  {
    displayName="Gun Fort";
    vehicleClass=CLASSNAME;
    maxSpeed=1;
    model="\ctiobjects02\gunfort";
    fuelCapacity=0;
    hasDriver = false;
    hasGunner = true;
    hasCommander = false;
    forceHideGunner = true;
    forceHideDriver = true;
    forceHideCommander = true;
    transportSolider = 0;
    weapons[]={"WeaponClassName1","WeaponClassName2"};
    magazines[]={"MagazineName1","MagazineName2","MagazineName3"};
    gunnerCanSee = CanSeeAllButRadar;
    commanderCanSee = CanSeeAllButRadar;
    armor=1000;

This means your object inherits all values from t55g EXCEPT the ones you have stated yourself, these will override the values stated in the config for the t55g.


Planck
I know a little about a lot, and a lot about a little.