Jump to content
Sign in to follow this  
Αplion

I need help with a turret please ...

Recommended Posts

maybe try making a subsidiary class of 40mm weapon from the 20mm one that works, that does exactly what you wanted the other one to do... lol

not satisfactory i know but if it works you can stop burning time for a bit til a solution pops up

i wonder if its the muzzleffect in the 20mm ammo vs the 40mm ? can you paste up the ammo, mag and weapon configs for both?

Share this post


Link to post
Share on other sites
maybe try making a subsidiary class of 40mm weapon from the 20mm one that works, that does exactly what you wanted the other one to do... lol

not satisfactory i know but if it works you can stop burning time for a bit til a solution pops up

i wonder if its the muzzleffect in the 20mm ammo vs the 40mm ? can you paste up the ammo, mag and weapon configs for both?

Weapons

class autocannon_Base_F: CannonCore
{
	scope = 1;
	cursor = "EmptyCursor";
	cursorAim = "cannon";
	nameSound = "cannon";
	sound[] = {"A3\sounds_f\dummysound",2.5118864,1,1800};
	soundContinuous = 0;
	minRange = 5;
	minRangeProbab = 0.7;
	midRange = 1200;
	midRangeProbab = 0.7;
	maxRange = 2500;
	maxRangeProbab = 0.1;
	reloadTime = 0.3;
	aiRateOfFire = 0.6;
	aiRateOfFireDistance = 500;
	magazineReloadTime = 2;
	autoReload = 1;
	ballisticsComputer = 1;
	canLock = 2;
	autoFire = 1;
	modes[] = {"player","close","short","medium","far"};
	shotFromTurret = 1;
	showAimCursorInternal = 0;
	class GunParticles
	{
		class Effect
		{
			effectName = "AutoCannonFired";
			positionName = "Usti hlavne";
			directionName = "Konec hlavne";
		};
		class Shell
		{
			positionName = "shell_eject_pos";
			directionName = "shell_eject_dir";
			effectName = "HeavyGunCartridge1";
		};
	};
	class player: Mode_FullAuto
	{
		sounds[] = {"StandardSound"};
		class StandardSound
		{
			begin1[] = {"A3\Sounds_F\weapons\30mm\30mm_st_02",1.9952624,1,1500};
			soundBegin[] = {"begin1",1};
			weaponSoundEffect = "DefaultRifle";
		};
		soundContinuous = 0;
		reloadTime = 0.3;
		dispersion = 0.00035;
	};
	class close: player
	{
		showToPlayer = 0;
		burst = 5;
		aiRateOfFire = 0.5;
		aiRateOfFireDistance = 50;
		minRange = 0;
		minRangeProbab = 0.05;
		midRange = 500;
		midRangeProbab = 0.7;
		maxRange = 1000;
		maxRangeProbab = 0.2;
		aiDispersionCoefX = 6;
		aiDispersionCoefY = 6;
	};
	class short: close
	{
		burst = 4;
		aiRateOfFire = 1;
		aiRateOfFireDistance = 300;
		minRange = 500;
		minRangeProbab = 0.05;
		midRange = 1000;
		midRangeProbab = 0.7;
		maxRange = 1500;
		maxRangeProbab = 0.2;
	};
	class medium: short
	{
		burst = 3;
		aiRateOfFire = 3;
		aiRateOfFireDistance = 600;
		minRange = 1000;
		minRangeProbab = 0.05;
		midRange = 1500;
		midRangeProbab = 0.7;
		maxRange = 2000;
		maxRangeProbab = 0.1;
	};
	class far: medium
	{
		burst = 3;
		aiRateOfFire = 5;
		aiRateOfFireDistance = 1000;
		minRange = 1500;
		minRangeProbab = 0.05;
		midRange = 2500;
		midRangeProbab = 0.4;
		maxRange = 3000;
		maxRangeProbab = 0.01;
	};
};
class autocannon_40mm_CTWS: autocannon_Base_F
{
	displayName = "$STR_A3_autocannon_40mm_CTWS0";
	muzzles[] = {"HE","AP"};
	class HE: autocannon_Base_F
	{
		displayName = "$STR_A3_autocannon_40mm_CTWS0";
		magazines[] = {"60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_Tracer_Red_shells","60Rnd_40mm_GPR_Tracer_Green_shells","60Rnd_40mm_GPR_Tracer_Yellow_shells"};
		class player: player
		{
			dispersion = 0.00055;
		};
		class close: close
		{
			dispersion = 0.00055;
		};
		class short: short
		{
			dispersion = 0.00055;
		};
		class medium: medium
		{
			dispersion = 0.00055;
		};
		class far: far
		{
			dispersion = 0.00055;
		};
	};
	class AP: autocannon_Base_F
	{
		displayName = "$STR_A3_autocannon_40mm_CTWS0";
		magazines[] = {"40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Green_shells","40Rnd_40mm_APFSDS_Tracer_Yellow_shells"};
	};
};
class autocannon_30mm_CTWS: autocannon_Base_F
{
	displayName = "$STR_A3_GATLING_30MM_CTWS0";
	muzzles[] = {"HE","AP"};
	class HE: autocannon_Base_F
	{
		displayName = "$STR_A3_GATLING_30MM_CTWS0";
		magazines[] = {"140Rnd_30mm_MP_shells","140Rnd_30mm_MP_shells_Tracer_Red","140Rnd_30mm_MP_shells_Tracer_Green","140Rnd_30mm_MP_shells_Tracer_Yellow"};
		class player: player
		{
			dispersion = 0.0006;
		};
		class close: close
		{
			dispersion = 0.0006;
		};
		class short: short
		{
			dispersion = 0.0006;
		};
		class medium: medium
		{
			dispersion = 0.0006;
		};
		class far: far
		{
			dispersion = 0.0006;
		};
	};
	class AP: autocannon_Base_F
	{
		displayName = "$STR_A3_GATLING_30MM_CTWS0";
		magazines[] = {"60Rnd_30mm_APFSDS_shells","60Rnd_30mm_APFSDS_shells_Tracer_Red","60Rnd_30mm_APFSDS_shells_Tracer_Green","60Rnd_30mm_APFSDS_shells_Tracer_Yellow"};
		class player: player
		{
			dispersion = 0.0004;
		};
		class close: close
		{
			dispersion = 0.0004;
		};
		class short: short
		{
			dispersion = 0.0004;
		};
		class medium: medium
		{
			dispersion = 0.0004;
		};
		class far: far
		{
			dispersion = 0.0004;
		};
	};
};
class gatling_20mm: CannonCore
{
	scope = 1;
	displayName = "$STR_A3_GATLING_20MM0";
	nameSound = "cannon";
	cursor = "EmptyCursor";
	cursorAim = "mg";
	magazines[] = {"2000Rnd_20mm_shells","1000Rnd_20mm_shells","300Rnd_20mm_shells"};
	canLock = 1;
	ballisticsComputer = 2;
	modes[] = {"manual","close","short","medium","far"};
	class GunParticles
	{
		class Effect
		{
			effectName = "MachineGun1";
			positionName = "Usti hlavne";
			directionName = "Konec hlavne";
		};
	};
	class manual: CannonCore
	{
		displayName = "$STR_A3_GATLING_20MM0";
		autoFire = 1;
		sounds[] = {"StandardSound"};
		class StandardSound
		{
			begin1[] = {"A3\Sounds_F\weapons\gatling\gatling4",1.1220185,1,1100};
			soundBegin[] = {"begin1",1};
			weaponSoundEffect = "DefaultRifle";
		};
		reloadTime = 0.04;
		dispersion = 0.0022;
		soundContinuous = 0;
		soundBurst = 0;
		showToPlayer = 1;
		burst = 1;
		aiRateOfFire = 0.5;
		aiRateOfFireDistance = 50;
		minRange = 1;
		minRangeProbab = 0.01;
		midRange = 2;
		midRangeProbab = 0.01;
		maxRange = 3;
		maxRangeProbab = 0.01;
		textureType = "fullAuto";
	};
	class close: manual
	{
		showToPlayer = 0;
		burst = 15;
		aiRateOfFire = 0.25;
		aiRateOfFireDistance = 400;
		minRange = 0;
		minRangeProbab = 0.05;
		midRange = 200;
		midRangeProbab = 0.7;
		maxRange = 400;
		maxRangeProbab = 0.2;
	};
	class short: close
	{
		burst = 10;
		aiRateOfFire = 0.5;
		aiRateOfFireDistance = 500;
		minRange = 300;
		minRangeProbab = 0.2;
		midRange = 400;
		midRangeProbab = 0.7;
		maxRange = 500;
		maxRangeProbab = 0.2;
	};
	class medium: close
	{
		burst = 7;
		aiRateOfFire = 1;
		aiRateOfFireDistance = 900;
		minRange = 400;
		minRangeProbab = 0.2;
		midRange = 700;
		midRangeProbab = 0.7;
		maxRange = 900;
		maxRangeProbab = 0.2;
	};
	class far: close
	{
		burst = 4;
		aiRateOfFire = 1.5;
		aiRateOfFireDistance = 1500;
		minRange = 800;
		minRangeProbab = 0.2;
		midRange = 1000;
		midRangeProbab = 0.4;
		maxRange = 1500;
		maxRangeProbab = 0.01;
	};
};

Magazines

class 250Rnd_30mm_HE_shells: VehicleMagazine
{
	scope = 2;
	displayName = "$STR_A3_CfgMagazines_250Rnd_30mm_HE_shells0";
	displayNameShort = "$STR_A3_CfgMagazines_250Rnd_30mm_HE_shells_dns";
	ammo = "B_30mm_HE";
	count = 250;
	initSpeed = 960;
	maxLeadSpeed = 300;
	nameSound = "cannon";
	tracersEvery = 1;
	weight = 126;
};
class 250Rnd_30mm_HE_shells_Tracer_Red: 250Rnd_30mm_HE_shells
{
	scope = 2;
	displayName = "$STR_A3_CfgMagazines_250Rnd_30mm_HE_shells_Tracer_Red0";
	ammo = "B_30mm_HE_Tracer_Red";
	tracersEvery = 1;
	displaynameshort = "$STR_A3_tracer_dns";
};
class 250Rnd_30mm_HE_shells_Tracer_Green: 250Rnd_30mm_HE_shells
{
	scope = 2;
	displayName = "$STR_A3_CFGMAGAZINES_250RND_30MM_HE_SHELLS_TRACER_GREEN0";
	ammo = "B_30mm_HE_Tracer_Green";
	tracersEvery = 1;
	displaynameshort = "$STR_A3_tracer_dns";
};
class 250Rnd_30mm_APDS_shells: 250Rnd_30mm_HE_shells
{
	displayName = "$STR_A3_CfgMagazines_250Rnd_30mm_APDS_shells0";
	displayNameShort = "$STR_A3_CfgMagazines_250Rnd_30mm_APDS_shells_dns";
	ammo = "B_30mm_AP";
	initSpeed = 1120;
};
class 250Rnd_30mm_APDS_shells_Tracer_Red: 250Rnd_30mm_APDS_shells
{
	displayName = "$STR_A3_CfgMagazines_250Rnd_30mm_APDS_shells_Tracer_Red0";
	ammo = "B_30mm_AP_Tracer_Red";
	tracersEvery = 1;
	displaynameshort = "$STR_A3_tracer_dns";
};
class 250Rnd_30mm_APDS_shells_Tracer_Green: 250Rnd_30mm_APDS_shells
{
	displayName = "$STR_A3_CFGMAGAZINES_250RND_30MM_APDS_SHELLS_TRACER_GREEN0";
	ammo = "B_30mm_AP_Tracer_Green";
	tracersEvery = 1;
	displaynameshort = "$STR_A3_tracer_dns";
};
class 250Rnd_30mm_APDS_shells_Tracer_Yellow: 250Rnd_30mm_APDS_shells
{
	displayName = "$STR_A3_CfgMagazines_250Rnd_30mm_APDS_shells_Tracer_Yellow0";
	ammo = "B_30mm_AP_Tracer_Yellow";
	tracersEvery = 1;
	displaynameshort = "$STR_A3_tracer_dns";
};
class 140Rnd_30mm_MP_shells: 250Rnd_30mm_HE_shells
{
	displayName = "$STR_A3_CFGMAGAZINES_140RND_30MM_MP_SHELLS_0";
	displayNameShort = "$STR_A3_CFGMAGAZINES_140RND_30MM_MP_SHELLS_DNS";
	ammo = "B_30mm_MP";
	initSpeed = 1070;
	count = 140;
};
class 140Rnd_30mm_MP_shells_Tracer_Red: 140Rnd_30mm_MP_shells
{
	displayName = "$STR_A3_CfgMagazines_140Rnd_30mm_MP_shells_Tracer_Red0";
	ammo = "B_30mm_MP_Tracer_Red";
	displaynameshort = "$STR_A3_CFGMAGAZINES_140RND_30MM_MP_SHELLS_TRACER_RED_DNS";
	count = 140;
};
class 140Rnd_30mm_MP_shells_Tracer_Green: 140Rnd_30mm_MP_shells_Tracer_Red
{
	ammo = "B_30mm_MP_Tracer_Green";
};
class 140Rnd_30mm_MP_shells_Tracer_Yellow: 140Rnd_30mm_MP_shells_Tracer_Red
{
	ammo = "B_30mm_MP_Tracer_Yellow";
};
class 60Rnd_30mm_APFSDS_shells: 250Rnd_30mm_HE_shells
{
	displayName = "$STR_A3_CFGMAGAZINES_30MM_APFSD";
	displayNameShort = "$STR_A3_CFGMAGAZINES_APFSD0";
	ammo = "B_30mm_APFSDS";
	initSpeed = 1430;
	count = 60;
};
class 60Rnd_30mm_APFSDS_shells_Tracer_Red: 60Rnd_30mm_APFSDS_shells
{
	displayName = "$STR_A3_CFGMAGAZINES_30MMAPDSFT";
	displaynameshort = "$STR_A3_CFGMAGAZINES_APFSD_T0";
	ammo = "B_30mm_APFSDS_Tracer_Red";
	tracersEvery = 1;
};
class 60Rnd_30mm_APFSDS_shells_Tracer_Green: 60Rnd_30mm_APFSDS_shells
{
	displayName = "$STR_A3_CFGMAGAZINES_30MM_APFSD";
	displaynameshort = "$STR_A3_CFGMAGAZINES_APFSD_T0";
	ammo = "B_30mm_APFSDS_Tracer_Green";
	tracersEvery = 1;
};
class 60Rnd_30mm_APFSDS_shells_Tracer_Yellow: 60Rnd_30mm_APFSDS_shells
{
	displayName = "$STR_A3_CFGMAGAZINES_30MMAPDSFT";
	displaynameshort = "$STR_A3_CFGMAGAZINES_APFSD_T0";
	ammo = "B_30mm_APFSDS_Tracer_Yellow";
	tracersEvery = 1;
};
class 60Rnd_40mm_GPR_shells: VehicleMagazine
{
	scope = 2;
	displayName = "$STR_A3_CFGMAGAZINES_40MMGPR";
	displayNameShort = "$STR_A3_CFGMAGAZINES_GPR";
	ammo = "B_40mm_GPR";
	count = 60;
	initSpeed = 1035;
	maxLeadSpeed = 100;
	nameSound = "cannon";
	tracersEvery = 1;
};
class 60Rnd_40mm_GPR_Tracer_Red_shells: 60Rnd_40mm_GPR_shells
{
	displayName = "$STR_A3_CFGMAGAZINES_40MMGPRT";
	displayNameShort = "$STR_A3_CFGMAGAZINES_GPRT";
	ammo = "B_40mm_GPR_Tracer_Red";
};
class 60Rnd_40mm_GPR_Tracer_Green_shells: 60Rnd_40mm_GPR_shells
{
	displayName = "$STR_A3_CFGMAGAZINES_40MMGPRT";
	displayNameShort = "$STR_A3_CFGMAGAZINES_GPRT";
	ammo = "B_40mm_GPR_Tracer_Green";
};
class 60Rnd_40mm_GPR_Tracer_Yellow_shells: 60Rnd_40mm_GPR_shells
{
	displayName = "$STR_A3_CFGMAGAZINES_40MMGPRT";
	displayNameShort = "$STR_A3_CFGMAGAZINES_GPRT";
	ammo = "B_40mm_GPR_Tracer_Yellow";
};
class 40Rnd_40mm_APFSDS_shells: 60Rnd_40mm_GPR_shells
{
	displayName = "$STR_A3_CFGMAGAZINES_40MM_APFSD";
	displayNameShort = "$STR_A3_CFGMAGAZINES_APFSD0";
	ammo = "B_40mm_APFSDS";
	initSpeed = 1600;
	count = 40;
};
class 40Rnd_40mm_APFSDS_Tracer_Red_shells: 40Rnd_40mm_APFSDS_shells
{
	displayName = "$STR_A3_CfgMagazines_40Rnd_40mm_APFSDS_Tracer_Red_shells0";
	displayNameShort = "$STR_A3_CFGMAGAZINES_APFSD_T0";
	ammo = "B_40mm_APFSDS_Tracer_Red";
	count = 40;
};
class 40Rnd_40mm_APFSDS_Tracer_Green_shells: 40Rnd_40mm_APFSDS_Tracer_Red_shells
{
	ammo = "B_40mm_APFSDS_Tracer_Green";
};
class 40Rnd_40mm_APFSDS_Tracer_Yellow_shells: 40Rnd_40mm_APFSDS_Tracer_Red_shells
{
	ammo = "B_40mm_APFSDS_Tracer_Yellow";
};


class 300Rnd_20mm_shells: VehicleMagazine
{
	scope = 2;
	displayName = "$STR_A3_CfgMagazines_300Rnd_20mm_shells0";
	displayNameShort = "$STR_A3_CfgMagazines_300Rnd_20mm_shells_dns";
	ammo = "B_20mm";
	count = 300;
	initSpeed = 1030;
	maxLeadSpeed = 300;
	tracersEvery = 5;
	nameSound = "cannon";
};
class 1000Rnd_20mm_shells: 300Rnd_20mm_shells
{
	displayName = "$STR_A3_CfgMagazines_1000Rnd_20mm_shells0";
	count = 1000;
	ammo = "B_20mm_Tracer_Red";
	weight = 126;
};
class 2000Rnd_20mm_shells: 300Rnd_20mm_shells
{
	displayName = "$STR_A3_CfgMagazines_2000Rnd_20mm_shells0";
	count = 2000;
};

Ammo

class B_30mm_AP: BulletBase
{
	hit = 80;
	indirectHit = 8;
	indirectHitRange = 0.2;
	caliber = 4.2;
	visibleFire = 32;
	audibleFire = 32;
	visibleFireTime = 3;
	cost = 50;
	model = "\A3\Weapons_f\Data\bullettracer\tracer_white";
	tracerScale = 2.5;
	tracerStartTime = 0.1;
	tracerEndTime = 2;
	airFriction = -0.00042;
	muzzleEffect = "";
	deflecting = 10;
	typicalSpeed = 1120;
	class CamShakeExplode
	{
		power = "(25*0.2)";
		duration = "((round (25^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = "((2 + 25^0.5)*8)";
	};
	class CamShakeHit
	{
		power = 50;
		duration = "((round (50^0.25))*0.2 max 0.2)";
		frequency = 20;
		distance = 1;
	};
	class CamShakeFire
	{
		power = "(25^0.25)";
		duration = "((round (25^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = "((25^0.5)*8)";
	};
	class CamShakePlayerFire
	{
		power = 0.01;
		duration = 0.1;
		frequency = 20;
		distance = 1;
	};
};
class B_30mm_AP_Tracer_Red: B_30mm_AP
{
	model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
};
class B_30mm_AP_Tracer_Green: B_30mm_AP
{
	model = "\A3\Weapons_f\Data\bullettracer\tracer_green";
};
class B_30mm_AP_Tracer_Yellow: B_30mm_AP
{
	model = "\A3\Weapons_f\Data\bullettracer\tracer_yellow";
};
class B_30mm_APFSDS: B_30mm_AP
{
	hit = 120;
	indirectHit = 8;
	indirectHitRange = 0.2;
	caliber = 6;
	airFriction = -0.0001;
	typicalSpeed = 1320;
	cost = 75;
	tracerEndTime = 1.5;
	irLock = 1;
	class HitEffects
	{
		hitMetal = "ImpactMetalSabotSmall";
		hitMetalPlate = "ImpactMetalSabotSmall";
		hitBuilding = "ImpactConcreteSabotSmall";
		hitConcrete = "ImpactConcreteSabotSmall";
		hitGroundSoft = "ImpactEffectsGroundSabot";
		hitGroundHard = "ImpactEffectsGroundSabot";
		Hit_Foliage_green = "ImpactLeavesGreen";
		Hit_Foliage_Dead = "ImpactLeavesDead";
		Hit_Foliage_Green_big = "ImpactLeavesGreenBig";
		Hit_Foliage_Palm = "ImpactLeavesPalm";
		Hit_Foliage_Pine = "ImpactLeavesPine";
		hitFoliage = "ImpactLeaves";
		hitGlass = "ImpactGlass";
		hitGlassArmored = "ImpactGlassThin";
		hitWood = "ImpactWood";
		hitPlastic = "ImpactPlastic";
		hitRubber = "ImpactRubber";
		hitMan = "ImpactEffectsBlood";
		hitWater = "ImpactEffectsWater";
		default_mat = "ImpactEffectsGroundSabot";
	};
	class CamShakeExplode
	{
		power = "(45^0.5)";
		duration = "((round (45^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = "((45^0.5)*3)";
	};
	class CamShakeHit
	{
		power = 45;
		duration = "((round (45^0.25))*0.2 max 0.2)";
		frequency = 20;
		distance = 1;
	};
	class CamShakeFire
	{
		power = "(30^0.25)";
		duration = "((round (30^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = "((30^0.5)*8)";
	};
	class CamShakePlayerFire
	{
		power = 0.01;
		duration = 0.1;
		frequency = 20;
		distance = 1;
	};
};
class B_30mm_APFSDS_Tracer_Red: B_30mm_APFSDS
{
	model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
};
class B_30mm_APFSDS_Tracer_Green: B_30mm_APFSDS
{
	model = "\A3\Weapons_f\Data\bullettracer\tracer_green";
};
class B_30mm_APFSDS_Tracer_Yellow: B_30mm_APFSDS
{
	model = "\A3\Weapons_f\Data\bullettracer\tracer_yellow";
};
class B_40mm_APFSDS: B_30mm_APFSDS
{
	hit = 150;
	indirectHit = 8;
	indirectHitRange = 0.2;
	typicalSpeed = 1140;
	caliber = 8;
	airFriction = -0.00012;
	cost = 100;
	class CamShakeExplode
	{
		power = "(60^0.5)";
		duration = "((round (60^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = "((60^0.5)*3)";
	};
	class CamShakeHit
	{
		power = 60;
		duration = "((round (60^0.25))*0.2 max 0.2)";
		frequency = 20;
		distance = 1;
	};
	class CamShakeFire
	{
		power = "(40^0.25)";
		duration = "((round (40^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = "((40^0.5)*8)";
	};
	class CamShakePlayerFire
	{
		power = 0.01;
		duration = 0.1;
		frequency = 20;
		distance = 1;
	};
};
class B_40mm_APFSDS_Tracer_Red: B_40mm_APFSDS
{
	model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
};
class B_40mm_APFSDS_Tracer_Green: B_40mm_APFSDS
{
	model = "\A3\Weapons_f\Data\bullettracer\tracer_green";
};
class B_40mm_APFSDS_Tracer_Yellow: B_40mm_APFSDS
{
	model = "\A3\Weapons_f\Data\bullettracer\tracer_yellow";
};


class B_20mm: BulletBase
{
	hit = 60;
	indirectHit = 6;
	indirectHitRange = 0.4;
	explosive = 0.4;
	caliber = 3.4;
	cost = 30;
	model = "\A3\Weapons_f\Data\bullettracer\tracer_white";
	tracerScale = 1;
	tracerStartTime = 0.05;
	tracerEndTime = 1;
	nvgOnly = 0;
	typicalSpeed = 1030;
	visibleFire = 32;
	audibleFire = 32;
	visibleFireTime = 4;
	soundHit[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_3",3.1622777,1,1300};
	explosionSoundEffect = "DefaultExplosion";
	airLock = 1;
	CraterEffects = "ExploAmmoCrater";
	explosionEffects = "ExploAmmoExplosion";
	airFriction = -0.00078;
	muzzleEffect = "";
	class CamShakeExplode
	{
		power = "(20*0.2)";
		duration = "((round (20^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = "((1 + 20^0.5)*8)";
	};
	class CamShakeHit
	{
		power = 20;
		duration = "((round (20^0.25))*0.2 max 0.2)";
		frequency = 20;
		distance = 1;
	};
	class CamShakeFire
	{
		power = "(20^0.25)";
		duration = "((round (20^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = "((20^0.5)*8)";
	};
	class CamShakePlayerFire
	{
		power = 0.01;
		duration = 0.1;
		frequency = 20;
		distance = 1;
	};
};
class B_20mm_Tracer_Red: B_20mm
{
	model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
};

Edited by Aplion

Share this post


Link to post
Share on other sites

yep as i suspected!

the 20mm cannon inherits directly from cannoncore BUT the 40mm inherits this

shotFromTurret = 1;

from autocannon_base_F

this parameter modifies the weapon to not fire from the memory points defined by gun_beg and gun_end but by another memory point series...

outer end of barrel

usti hlavne

and inner end of barrel

konec hlavne

add these to your barrel and remove the gunbeg and end stuff from your 40mm turret

take a look at the bradley memory lod in A2 models for example

Share this post


Link to post
Share on other sites
yep as i suspected!

the 20mm cannon inherits directly from cannoncore BUT the 40mm inherits this

shotFromTurret = 1;

from autocannon_base_F

this parameter modifies the weapon to not fire from the memory points defined by gun_beg and gun_end but by another memory point series...

outer end of barrel

usti hlavne

and inner end of barrel

konec hlavne

add these to your barrel and remove the gunbeg and end stuff from your 40mm turret

take a look at the bradley memory lod in A2 models for example

I'll try it right now but still I can't get it why using the same memory points and names the same gun is firing to my other addon ... anyway I'll give it a try and I'll report back.

---------- Post added at 14:56 ---------- Previous post was at 14:44 ----------

ok I did try it .. I've renamed the "gun_start" and "gun_end" to "usti hlavne" and "konec hlavne" in memory lod ... I've also changed the values into config.cpp ... nothing change ... still not firing.

Share this post


Link to post
Share on other sites

well one thing i also noticed is that when you patch stuff you can lose inheritances, try adding this to your config and see if it works:

ok so dupe your gun mem points so you have gun_beg and gun_end as before AS WELL AS usti hlavne and konec_hlavne

in your vec config don't define the latter, just assume they are defined in default

cfgweapons

class Mode_FullAuto;   //NOTE
class cfgweapons:
{
   class CannonCore;
   class autocannon_Base_F;
   class mycannon_base: autocannon_Base_F
   {
       scope = 2;   //NOTE
       cursor = "EmptyCursor";
       cursorAim = "cannon";
       nameSound = "cannon";
       sound[] = {"A3\sounds_f\dummysound",2.5118864,1,1800};
       soundContinuous = 0;
       minRange = 5;
       minRangeProbab = 0.7;
       midRange = 1200;
       midRangeProbab = 0.7;
       maxRange = 2500;
       maxRangeProbab = 0.1;
       reloadTime = 0.3;
       aiRateOfFire = 0.6;
       aiRateOfFireDistance = 500;
       magazineReloadTime = 2;
       autoReload = 1;
       ballisticsComputer = 1;
       canLock = 2;
       autoFire = 1;
        showAimCursorInternal = 0;
      class GunParticles
       {
           class Effect
           {
               effectName = "AutoCannonFired";
               positionName = "Usti hlavne";
               directionName = "Konec hlavne";
           };
           class Shell
           {
               positionName = "shell_eject_pos";
               directionName = "shell_eject_dir";
               effectName = "HeavyGunCartridge1";
           };
       };
//        shotFromTurret = 1;    //NOTE try and add this back later - it controls firing point from gun_beg to usti hlavne, latter does not use zasleh, but uses muzzleeffect in ammo to make flash
       modes[] = {"player","close","short","medium","far"};    //NOTE
       class player: Mode_FullAuto
       {
//NOTE
            showToPlayer = 1;
           sounds[] = {"StandardSound"};
           class StandardSound
           {
               begin1[] = {"A3\Sounds_F\weapons\30mm\30mm_st_02",1.9952624,1,1500};
               soundBegin[] = {"begin1",1};
               weaponSoundEffect = "DefaultRifle";
           };
           soundContinuous = 0;
           reloadTime = 0.3;
           dispersion = 0.00035;
       };
       class close: player
       {
           showToPlayer = 0;
           burst = 5;
           aiRateOfFire = 0.5;
           aiRateOfFireDistance = 50;
           minRange = 0;
           minRangeProbab = 0.05;
           midRange = 500;
           midRangeProbab = 0.7;
           maxRange = 1000;
           maxRangeProbab = 0.2;
           aiDispersionCoefX = 6;
           aiDispersionCoefY = 6;
       };
       class short: close
       {
           burst = 4;
           aiRateOfFire = 1;
           aiRateOfFireDistance = 300;
           minRange = 500;
           minRangeProbab = 0.05;
           midRange = 1000;
           midRangeProbab = 0.7;
           maxRange = 1500;
           maxRangeProbab = 0.2;
       };
       class medium: short
       {
           burst = 3;
           aiRateOfFire = 3;
           aiRateOfFireDistance = 600;
           minRange = 1000;
           minRangeProbab = 0.05;
           midRange = 1500;
           midRangeProbab = 0.7;
           maxRange = 2000;
           maxRangeProbab = 0.1;
       };
       class far: medium
       {
           burst = 3;
           aiRateOfFire = 5;
           aiRateOfFireDistance = 1000;
           minRange = 1500;
           minRangeProbab = 0.05;
           midRange = 2500;
           midRangeProbab = 0.4;
           maxRange = 3000;
           maxRangeProbab = 0.01;
       };
   };
   class my_autocannon_40mm_CTWS: mycannon_base    //NOTE
   {
       displayName = "$STR_A3_autocannon_40mm_CTWS0";
       muzzles[] = {"HE","AP"};
       class HE: mycannon_base    //NOTE
       {
           displayName = "$STR_A3_autocannon_40mm_CTWS0";
           magazines[] = {"60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_Tracer_Red_shells","60Rnd_40mm_GPR_Tracer_Green_shells","60Rnd_40mm_GPR_Tracer_Yellow_shells"};
//NOTE THIS ENTRY
       modes[] = {"player","close","short","medium","far"};    //NOTE
           class player: player
           {
               dispersion = 0.00055;
           };
           class close: close
           {
               dispersion = 0.00055;
           };
           class short: short
           {
               dispersion = 0.00055;
           };
           class medium: medium
           {
               dispersion = 0.00055;
           };
           class far: far
           {
               dispersion = 0.00055;
           };
       };
       class AP: mycannon_base    //NOTE
       {
           displayName = "$STR_A3_autocannon_40mm_CTWS0";
           magazines[] = {"40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Green_shells","40Rnd_40mm_APFSDS_Tracer_Yellow_shells"};
//NOTE THIS ENTRY
       modes[] = {"player","close","short","medium","far"};    //NOTE
      };
   };

then add my_autocannon_40mm_CTWS plus the mags to your turret

i think this is important - the modes are not properly defined in the weapon causing problems and so are failing to work when you enter the turret

Edited by eggbeast

Share this post


Link to post
Share on other sites
well one thing i also noticed is that when you patch stuff you can lose inheritances, try adding this to your config and see if it works:

ok so dupe your gun mem points so you have gun_beg and gun_end as before AS WELL AS usti hlavne and konec_hlavne

in your vec config don't define the latter, just assume they are defined in default

cfgweapons

class Mode_FullAuto;   //NOTE
class cfgweapons:
{
   class CannonCore;
   class autocannon_Base_F;
   class mycannon_base: autocannon_Base_F
   {
       scope = 2;   //NOTE
       cursor = "EmptyCursor";
       cursorAim = "cannon";
       nameSound = "cannon";
       sound[] = {"A3\sounds_f\dummysound",2.5118864,1,1800};
       soundContinuous = 0;
       minRange = 5;
       minRangeProbab = 0.7;
       midRange = 1200;
       midRangeProbab = 0.7;
       maxRange = 2500;
       maxRangeProbab = 0.1;
       reloadTime = 0.3;
       aiRateOfFire = 0.6;
       aiRateOfFireDistance = 500;
       magazineReloadTime = 2;
       autoReload = 1;
       ballisticsComputer = 1;
       canLock = 2;
       autoFire = 1;
        showAimCursorInternal = 0;
      class GunParticles
       {
           class Effect
           {
               effectName = "AutoCannonFired";
               positionName = "Usti hlavne";
               directionName = "Konec hlavne";
           };
           class Shell
           {
               positionName = "shell_eject_pos";
               directionName = "shell_eject_dir";
               effectName = "HeavyGunCartridge1";
           };
       };
//        shotFromTurret = 1;    //NOTE try and add this back later - it controls firing point from gun_beg to usti hlavne, latter does not use zasleh, but uses muzzleeffect in ammo to make flash
       modes[] = {"player","close","short","medium","far"};    //NOTE
       class player: Mode_FullAuto
       {
//NOTE
            showToPlayer = 1;
           sounds[] = {"StandardSound"};
           class StandardSound
           {
               begin1[] = {"A3\Sounds_F\weapons\30mm\30mm_st_02",1.9952624,1,1500};
               soundBegin[] = {"begin1",1};
               weaponSoundEffect = "DefaultRifle";
           };
           soundContinuous = 0;
           reloadTime = 0.3;
           dispersion = 0.00035;
       };
       class close: player
       {
           showToPlayer = 0;
           burst = 5;
           aiRateOfFire = 0.5;
           aiRateOfFireDistance = 50;
           minRange = 0;
           minRangeProbab = 0.05;
           midRange = 500;
           midRangeProbab = 0.7;
           maxRange = 1000;
           maxRangeProbab = 0.2;
           aiDispersionCoefX = 6;
           aiDispersionCoefY = 6;
       };
       class short: close
       {
           burst = 4;
           aiRateOfFire = 1;
           aiRateOfFireDistance = 300;
           minRange = 500;
           minRangeProbab = 0.05;
           midRange = 1000;
           midRangeProbab = 0.7;
           maxRange = 1500;
           maxRangeProbab = 0.2;
       };
       class medium: short
       {
           burst = 3;
           aiRateOfFire = 3;
           aiRateOfFireDistance = 600;
           minRange = 1000;
           minRangeProbab = 0.05;
           midRange = 1500;
           midRangeProbab = 0.7;
           maxRange = 2000;
           maxRangeProbab = 0.1;
       };
       class far: medium
       {
           burst = 3;
           aiRateOfFire = 5;
           aiRateOfFireDistance = 1000;
           minRange = 1500;
           minRangeProbab = 0.05;
           midRange = 2500;
           midRangeProbab = 0.4;
           maxRange = 3000;
           maxRangeProbab = 0.01;
       };
   };
   class my_autocannon_40mm_CTWS: mycannon_base    //NOTE
   {
       displayName = "$STR_A3_autocannon_40mm_CTWS0";
       muzzles[] = {"HE","AP"};
       class HE: mycannon_base    //NOTE
       {
           displayName = "$STR_A3_autocannon_40mm_CTWS0";
           magazines[] = {"60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_Tracer_Red_shells","60Rnd_40mm_GPR_Tracer_Green_shells","60Rnd_40mm_GPR_Tracer_Yellow_shells"};
//NOTE THIS ENTRY
       modes[] = {"player","close","short","medium","far"};    //NOTE
           class player: player
           {
               dispersion = 0.00055;
           };
           class close: close
           {
               dispersion = 0.00055;
           };
           class short: short
           {
               dispersion = 0.00055;
           };
           class medium: medium
           {
               dispersion = 0.00055;
           };
           class far: far
           {
               dispersion = 0.00055;
           };
       };
       class AP: mycannon_base    //NOTE
       {
           displayName = "$STR_A3_autocannon_40mm_CTWS0";
           magazines[] = {"40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Green_shells","40Rnd_40mm_APFSDS_Tracer_Yellow_shells"};
//NOTE THIS ENTRY
       modes[] = {"player","close","short","medium","far"};    //NOTE
      };
   };

then add my_autocannon_40mm_CTWS plus the mags to your turret

i think this is important - the modes are not properly defined in the weapon causing problems and so are failing to work when you enter the turret

I've tried that (or something similar I guess - I'll have a better look one more time) with no success mate ... but ... I made this ...

class CfgWeapons
{
class Default;
class CannonCore;
class autocannon_Base_F;
class autocannon_40mm_CTWS;

	class cannon_40mm_CTWS: CannonCore
{
	scope = 1;
	displayName = "Cannon 40mm CTWS";
	nameSound = "cannon";
	cursor = "EmptyCursor";
	cursorAim = "cannon";
	magazines[] = {"60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_Tracer_Red_shells","60Rnd_40mm_GPR_Tracer_Green_shells","60Rnd_40mm_GPR_Tracer_Yellow_shells",
					"40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Green_shells","40Rnd_40mm_APFSDS_Tracer_Yellow_shells"};
	canLock = 1;
	ballisticsComputer = 1;
	modes[] = {"manual","close","short","medium","far"};
	class GunParticles
	{
		class Effect
		{
			effectName = "AutoCannonFired";
			positionName = "Usti hlavne";
			directionName = "Konec hlavne";
		};
		class Shell
		{
			positionName = "shell_eject_pos";
			directionName = "shell_eject_dir";
			effectName = "HeavyGunCartridge1";
		};
	};
	class manual: CannonCore
	{
		displayName = "Cannon 40mm CTWS";
		autoFire = 1;
		sounds[] = {"StandardSound"};
		class StandardSound
		{
			begin1[] = {"A3\Sounds_F\weapons\30mm\30mm_st_02",1.9952624,1,1500};
			soundBegin[] = {"begin1",1};
			weaponSoundEffect = "DefaultRifle";
		};
		reloadTime = 0.3;
		dispersion = 0.00035;
		soundContinuous = 0;
	};
	class close: manual
	{
		showToPlayer = 0;
		burst = 5;
		aiRateOfFire = 0.5;
		aiRateOfFireDistance = 50;
		minRange = 0;
		minRangeProbab = 0.05;
		midRange = 500;
		midRangeProbab = 0.7;
		maxRange = 1000;
		maxRangeProbab = 0.2;
		aiDispersionCoefX = 6;
		aiDispersionCoefY = 6;
	};
	class short: close
	{
		burst = 4;
		aiRateOfFire = 1;
		aiRateOfFireDistance = 300;
		minRange = 500;
		minRangeProbab = 0.2;
		midRange = 1000;
		midRangeProbab = 0.7;
		maxRange = 1500;
		maxRangeProbab = 0.2;
	};
	class medium: close
	{
		burst = 3;
		aiRateOfFire = 3;
		aiRateOfFireDistance = 600;
		minRange = 1000;
		minRangeProbab = 0.2;
		midRange = 1500;
		midRangeProbab = 0.7;
		maxRange = 2000;
		maxRangeProbab = 0.2;
	};
	class far: close
	{
		burst = 3;
		aiRateOfFire = 5;
		aiRateOfFireDistance = 1000;
		minRange = 1500;
		minRangeProbab = 0.2;
		midRange = 2500;
		midRangeProbab = 0.4;
		maxRange = 3000;
		maxRangeProbab = 0.01;
	};
};
};

... which is a mix of 40mm and 20mm values ... and this is working fine ... now I have to figure out how I'll split the HE and AP ammo types :)

---------- Post added at 17:33 ---------- Previous post was at 17:25 ----------

EDIT : I also tried exactly the cfgweapons you gave me above ... the gun isn't firing with that configuration.

---------- Post added at 17:53 ---------- Previous post was at 17:33 ----------

ok I've got it working now ... :)

class CfgWeapons
{
class Default;
class CannonCore;
class autocannon_Base_F;
class autocannon_40mm_CTWS;

	class cannon_40mm_base: CannonCore
{
	scope = 1;
	cursor = "EmptyCursor";
	cursorAim = "cannon";
	nameSound = "cannon";
	sound[] = {"A3\sounds_f\dummysound",2.5118864,1,1800};
	soundContinuous = 0;
	minRange = 5;
	minRangeProbab = 0.7;
	midRange = 1200;
	midRangeProbab = 0.7;
	maxRange = 2500;
	maxRangeProbab = 0.1;
	reloadTime = 0.3;
	aiRateOfFire = 0.6;
	aiRateOfFireDistance = 500;
	magazineReloadTime = 2;
	autoReload = 1;
	ballisticsComputer = 1;
	canLock = 2;
	autoFire = 1;
	//shotFromTurret = 1;
	//showAimCursorInternal = 0;
	modes[] = {"manual","close","short","medium","far"};
	class GunParticles
	{
		class Effect
		{
			effectName = "AutoCannonFired";
			positionName = "Usti hlavne";
			directionName = "Konec hlavne";
		};
		class Shell
		{
			positionName = "shell_eject_pos";
			directionName = "shell_eject_dir";
			effectName = "HeavyGunCartridge1";
		};
	};
	class manual: CannonCore
	{
		displayName = "Cannon 40mm base";
		autoFire = 1;
		sounds[] = {"StandardSound"};
		class StandardSound
		{
			begin1[] = {"A3\Sounds_F\weapons\30mm\30mm_st_02",1.9952624,1,1500};
			soundBegin[] = {"begin1",1};
			weaponSoundEffect = "DefaultRifle";
		};
		reloadTime = 0.3;
		dispersion = 0.00035;
		soundContinuous = 0;
	};
	class close: manual
	{
		showToPlayer = 0;
		burst = 5;
		aiRateOfFire = 0.5;
		aiRateOfFireDistance = 50;
		minRange = 0;
		minRangeProbab = 0.05;
		midRange = 500;
		midRangeProbab = 0.7;
		maxRange = 1000;
		maxRangeProbab = 0.2;
		aiDispersionCoefX = 6;
		aiDispersionCoefY = 6;
	};
	class short: close
	{
		burst = 4;
		aiRateOfFire = 1;
		aiRateOfFireDistance = 300;
		minRange = 500;
		minRangeProbab = 0.2;
		midRange = 1000;
		midRangeProbab = 0.7;
		maxRange = 1500;
		maxRangeProbab = 0.2;
	};
	class medium: close
	{
		burst = 3;
		aiRateOfFire = 3;
		aiRateOfFireDistance = 600;
		minRange = 1000;
		minRangeProbab = 0.2;
		midRange = 1500;
		midRangeProbab = 0.7;
		maxRange = 2000;
		maxRangeProbab = 0.2;
	};
	class far: close
	{
		burst = 3;
		aiRateOfFire = 5;
		aiRateOfFireDistance = 1000;
		minRange = 1500;
		minRangeProbab = 0.2;
		midRange = 2500;
		midRangeProbab = 0.4;
		maxRange = 3000;
		maxRangeProbab = 0.01;
	};
};
class cannon_40mm_CTWS: cannon_40mm_base
{
	displayName = "cannon 40mm CTWS";
	muzzles[] = {"HE","AP"};
	class HE: cannon_40mm_base
	{
		displayName = "cannon 40mm CTWS";
		magazines[] = {"60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_Tracer_Red_shells","60Rnd_40mm_GPR_Tracer_Green_shells","60Rnd_40mm_GPR_Tracer_Yellow_shells"};
		class manual: manual
		{
			dispersion = 0.00055;
		};
		class close: close
		{
			dispersion = 0.00055;
		};
		class short: short
		{
			dispersion = 0.00055;
		};
		class medium: medium
		{
			dispersion = 0.00055;
		};
		class far: far
		{
			dispersion = 0.00055;
		};
	};
	class AP: cannon_40mm_base
	{
		displayName = "cannon 40mm CTWS";
		magazines[] = {"40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Green_shells","40Rnd_40mm_APFSDS_Tracer_Yellow_shells"};
	};
};
};

Special thanks to Eggbeast for his patience and all help provided ... :)

Share this post


Link to post
Share on other sites

good stuff, and well done for persisting - you know how it is with this stuff, one missing ; and you're in the poop lol

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  

×