Jump to content
Sign in to follow this  
[aps]gnat

Config forces addon into all Missions

Recommended Posts

OK, this is weird, but then again I'm no expert on putting together configs. crazy_o.gif

Found a BUG in my own addon, the Frigates. Whenever I add a AH64 or a V80 to a mission the "GNTFRIGATES" is forced into the SQM file as "addOns[]="

But it doesn't happen if I use the older original choppers from BIS.

Its possibly because in my config I use a variation of a helicopter in my model.

Is it because of these lines?

Quote[/b] ]

class CfgModels

{

..........

..........

class Air: Default {};

class Helicopter: Air

{

sectionsInherit="Vehicle";

sections[]=

{

"velka vrtule staticka",

"velka vrtule blur",

"mala vrtule staticka",

"mala vrtule blur"

};

};

class Phalanx: Helicopter {};

Full Config HERE

Share this post


Link to post
Share on other sites

ok note sure if its the source of the problem, but a few suggestions:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches

{

       class PBONAME

       {

                 units[] = {classunit1,classunit2,classunit3,...};

                 weapons[] = {};

                 requiredVersion = 1.96;

                 requiredAddons[]=

                 {

                          "cfgpatches_class_1",

                          "cfgpatches_class_2"

                 };

        };

};

~ only one class in cfgPatches

~ all new unit classes in units[]={};

~ requiredVersion should be 1.96 these days

~ missing requireAddons Array

~ class PBONAME must not be "pboname" necessarily, but it makes sense

about class CfgModels:

~ DONT overwrite BIS's "Helicopter" class - instead:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class GNTHelicopter  Helicopter

{

sectionsInherit="Vehicle";

sections[]=

{

"velka vrtule staticka",

"velka vrtule blur",

"mala vrtule staticka",

"mala vrtule blur"

};

};

class Phalanx: GNTHelicopter {};

and so on.

~ not certain on this one: yet drop all parts between "class All {};" and "class 9M317Tur : M113 ...", so its looks like

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class All {};

class Vehicle: Default {};

class Tank: Vehicle {};

class 9M317Tur:Tank

{

...

or

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class All {};

class Weapon: Default {};

class 9M317Tur:Weapon

{

...

overall note - please add your tag (GNT) prior to the class for EVERY new class you create. (like cfgAmmo, cfgWeapons)

hope it help mate  smile_o.gif

Share this post


Link to post
Share on other sites

That's because your config references classes that are defined in either the BIS Apache addon (Apac.pbo) or O.pbo where the "V-80" (Kamov Ka-50) is introduced. That in itself is fine, as long as one has a a proper and complete requiredAddons declaration in the one and only one CfgPatches class encompassing the whole addon. Yours doesn't. Let's work our way down the config, shall we?

CfgPatches

Problems

<ul>[*]No less than four CfgPatches classes which in itself is a recipe for trouble.

[*] Missing requiredAddons declaration

Solution: make that one CfgPatches class with a proper and complete requiredAddons[] list.

CfgModels

Here, you re-write the BIS class Helicopter. Don't do that. Just have

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Helicopter {};in there.

CfgAmmo

This has a reference to "HellfireApach", something that is introduced in the BIS Apache addon (Apac.pbo/ "AH64"). That's one of the things that cause your problem, btw.

CfgVehicles

<ul>[*] CfgVehicles has "AH64" and "Kamov" (the latter adds dependency on O.PBO/ "BIS_Resistance")

[*] Several more classes from O.PBO: T72Res, T80Res, Kamov, Civilian6

[*] SoldierESaboteurBizon is from Bizon.pbo / "Bizon"

Solution: Since you don't need these, clean out your config of class references you won't be using.

Summary:

By cleaning up your config and removing all things unneccessary, you can fix the problems. Use your "GNT" tag on *all vehicles and weapons*.

Consolidate the CfgPatches part to one class only:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches

{

class GNTFrigates

{

// TODO: Make sure all vehicles and units are listed in here. They are of course all properly tagged with "GNT"

units[] =

{

GNTKrivak, GNTOHP

GNTPhalanx, GNTKashtan,

GNT9M317Tur, GNTRGM84Tur,

GNTZodo1, GNTZodo2

};

// TODO: This needs filling out with the new weapons classes

// that are introducted in this addon

weapons[] = {};

requiredVersion = 1.91;

// TODO: Remove dependencies on other addons or fill this out

requiredAddons[]={};

};

};

Share this post


Link to post
Share on other sites

Very sorry Q, Killswitch, I missed your replys until now sad_o.gif (stupid "new posts" shortcut)

But much appreciated because I used all the tips and now just using BIS choppers doesn't cause the Frigates addon to be a required addon biggrin_o.gif

Oh, and all the bits of the Frigates seem to still work as original smile_o.gif

Obviously just a VERY untidy config whistle.gif

Again, thanks guys. Great info.

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  

×