OFPEC Forum

Addons & Mods Depot => Arma2 - Configs & Scripting => Topic started by: Hooves on 18 Aug 2010, 00:02:27

Title: Reducing Ammo on vehicles
Post by: Hooves on 18 Aug 2010, 00:02:27
I have been trying to re-config the A10 and AH64 and matching Taki equipment to be less of a devastating effect on the battlefield.  But Im not making any headway on reducing the number of cannon rounds in the A10 (the only one I have tried) 

if anyone can help it would be appreciated.
here is what I have so far with the help of DREN

http://pastebin.com/YuC2a9sH
Title: Re: Reducing Ammo on vehicles
Post by: ViperMaul on 18 Aug 2010, 01:57:31
Welcome to OFPEC!
What errors or incorrect behavior are you getting?
Title: Re: Reducing Ammo on vehicles
Post by: Hooves on 18 Aug 2010, 04:40:10
no errors I just have no 30MM ammo.
Title: Re: Reducing Ammo on vehicles
Post by: ViperMaul on 18 Aug 2010, 05:21:55
First problem I see is Line 29
Units[] = {"A10ATOWED", };

That comma should be removed.

Units[] = {"A10ATOWED"};

Second issue I see I don't see anything defined as Class defined as "A10ATOWED"

Vehicle configs are not my area of expertise. These are the first things I see.
My success is achieved when I take a working mod for a vehicle and try to mirror mine.

If other devs do not have some wisdom here that would be my recommendation for you.
Grab a new vehicle mod from Armaholic and use that as a reference to learn from. You will soon spot the differences that needs to be corrected.

The other thing I will add especially if there are no errors is confirm you have the correct RequiredAddons. It is possible that some addon is being loaded *after* yours and undoing your work.
Title: Re: Reducing Ammo on vehicles
Post by: kju on 18 Aug 2010, 07:11:55
Code: [Select]
class cfgPatches
{
class ATOW_ACE_A10
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"ace_c_vehicle"};
};
};
class cfgMagazines
{
class ACE_1350Rnd_30mmAP_A10;
class ATOW_ACE_500Rnd_30mmAP_A10: ACE_1350Rnd_30mmAP_A10
{
count = 500;
};
};
class cfgVehicles
{
class ACE_A10;
class ATOW_ACE_A10: ACE_A10
{
magazines[] = {"ATOW_ACE_500Rnd_30mmAP_A10","2Rnd_Sidewinder_AH1Z","4Rnd_GBU12","120Rnd_CMFlare_Chaff_Magazine"};
};
};

+ Fix class names of ACE. I was only guessing.
Title: Re: Reducing Ammo on vehicles
Post by: Dren on 18 Aug 2010, 14:26:40
This seemly could have talked over on our forums also  :D
(btw, VM that config is from our old addon, so having something extra aint my fault  >:( )

The only problem actually is the ammo. i might be blind but i dont see any difference in

Code: [Select]
class CfgMagazines {
        class ACE_1350Rnd_30mmAP_A10; // External class reference
        class dren_500Rnd_30mmAP_A10: ACE_1350Rnd_30mmAP_A10  {
                ammo = "ACE_B_30mmA10_AP";
                count = 500;
        };
};
vs
 the kjus CfgMagazines. But still i might be blind  :blink:
Title: Re: Reducing Ammo on vehicles
Post by: ViperMaul on 18 Aug 2010, 14:56:40
Our forum limits the help from other great minds in the Arma Development Community.
Since it doesn't work simply try Kju's config above and report back. Thanks.
Title: Re: Reducing Ammo on vehicles
Post by: Dren on 18 Aug 2010, 17:52:41
Do it Hooves :)
i dont have ACE, just snatched, edited and gived to hooves earlyer
Title: Re: Reducing Ammo on vehicles
Post by: Hooves on 18 Aug 2010, 23:02:51
Rgr Ill try that.  


I also need to limit the 4 GBU's to 2 GBU's will I need to make a base class for that aswell?



EDIT:

  OK I have fixed teh A10 and the SU25
Im now having issues with the AH46 and Cobra

I got the load out I wanted but it is attached the pilot intead of the gunner, becasue basically they both right now have cannon and hellfires.
Title: Re: Reducing Ammo on vehicles
Post by: ViperMaul on 20 Aug 2010, 05:35:22
For anyone researching this thread, I finally found a little time to refresh my memory on this.
I ask other more learned than I am in the area of vehicle weapon configs please correct anything wrong that I say.

Assuming class syntax is correct, remember these principles in vehicle weapon configs.

Vehicles -> Launcher -> Ammo
Vehicles classes defines what weapons and launchers are on the vehicles.
Lanchers/Weapons classes defines what Ammo it is allowed to launch or fire.

Ammo is always placed in some container, launcher or weapon.

Thus if you want to define a new Ammo Class as opposed to changing an existing Ammo class then you have more work to do. You need to either redefine the Launcher to allow that ammo or define a new Launcher that allows the newly defined Ammo.

In both cases the Hoove's post and Kju's post it is missing the Launcher redefine to use the newly defined ammo class.

In Hoove's case specifically it wasn't easily known that it is the ACE_GAU8 launcher that is intended to use the newly defined ammo dren_500Rnd_30mmAP_A10.  ACE_GAU8 needs to be redefined because it currently does not know about the new ammo dren_500Rnd_30mmAP_A10.

Hooves Please post the fix for the A10 so that others who wants to may learn. Thanks
Title: Re: Reducing Ammo on vehicles
Post by: Hooves on 21 Aug 2010, 04:47:20
Ok I got the pilots weapons removed but the Gunners still not having the ammo I want him to have.

also I get a Turrets:scope missing error even though I defined it as public.


http://pastebin.jonasscholz.de/963


take a look there and tell me where I screwed the pooch
Title: Re: Reducing Ammo on vehicles
Post by: Gnat on 21 Aug 2010, 15:20:16
arh, two locations.
See bis thread
Title: Re: Reducing Ammo on vehicles
Post by: ViperMaul on 24 Aug 2010, 22:28:05
Thank Gnat. To make it easy...
Here is the http://forums.bistudio.com/showthread.php?p=1721875#post1721875 (http://forums.bistudio.com/showthread.php?p=1721875#post1721875)