Jump to content
Sign in to follow this  
falcao

Weird issues with new weapon config (MuzzleFLash and Optics)

Recommended Posts

Hey guys. I created a weapon mod, made the model, the configs and etc. But I'm having two issues that intrigued me:

1) When I shoot with my weapon the muzzleflash appear a little bit beneath the correct place of the muzzle. (So as the gases)

2)When I attach an optic it goes a little bit beneath the right place also.

This is a problem often being discussed here in the forums, but I created this thread because all these issues just disappear if I put down that first weapon and get a new one from the box, you know? It's like the first time I get the weapon it has all these issues but if I just get another one all the problems go away. I'm not like the master of config, pretty newbie by the way, but I just can't understand why those issues are there in the first place and them they disappear.

I'll put a picture and samples of the config files:

arma3_2014_03_16_16_14_23_52.jpg

This is the model.cfg:

class CfgSkeletons
{
class Default
{
	isDiscrete=1;
	skeletonInherit="";
	skeletonBones[]={};
};
class BRAF_Imbel_IA2_556_Carbine_base: Default
{
	skeletonBones[]=
	{
		"magazine",
		"muzzleFlash",
		"bolt",
		"trigger",
	};
};

};
class CfgModels
{
class Default
{
	sectionsInherit="";
	sections[]={};
	skeletonName="";
};

class BRAF_Imbel_IA2_556_Carbine_base: Default
{
	skeletonName="BRAF_Imbel_IA2_556_Carbine_base";
	sections[]=
	{
		"zasleh","magazine","bolt"
	};

	htMin = 1;		// Minimum half-cooling time (in seconds)
	htMax = 600;	// Maximum half-cooling time (in seconds)
	afMax = 0;		// Maximum temperature in case the model is alive (in celsius)
	mfMax = 0;		// Maximum temperature when the model is moving (in celsius)
	mFact = 1;		// Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)).
	tBody = 100;	 // Metabolism temperature of the model (in celsius)

	class Animations
	{
		class reload_magazine_hide
		{
			type="hide";
			source="reloadMagazine";
			selection="magazine";
			minValue=-0.40000001;
			maxValue=0.40000001;
			minPhase=-0.40000001;
			maxPhase=0.40000001;
			hideValue=0.75;
			sourceAddress="mirror";
		};
		class bolt
		{
			type="translation";
			source="reload";
			selection="bolt";
			axis="bolt_axis";
			memory = 1;
			minValue=0;
			maxValue="1";
			offset0="0";
			offset1="1";
		};

		class unloaded_magazine_hide 
		{
			type = "hide";
			source = "hasMagazine";
			selection = "magazine";
			hideValue = 0.1;

		};

		class MuzzleFlashROT
			{
				type="rotationX";
				source="ammoRandom";            //use ammo count as phase for animation
				sourceAddress="loop";     //loop when phase out of bounds
				selection="zasleh";       //selection we want to rotate
				axis="";                  //no own axis - center of rotation is computed from selection
				centerFirstVertex=true;   //use first vertex of selection as center of rotation
				minValue=0;
				maxValue=4;               //rotation angle will be 360/4 = 90 degrees
				angle0="rad 0";
				angle1="rad 360";
			};
	};
};
class BRAF_Imbel_IA2_556_Carbine : BRAF_Imbel_IA2_556_Carbine_base
{
	class Animations: Animations
	{
	};
};
};

And this one is the CfgWeapons.hpp:

class CfgWeapons {
class BRAF_Imbel_IA2_556_Carbine_base {
	access = 3;
	afmax = 0;
	aidispersioncoefx = 8;
	aidispersioncoefy = 10;
	airateoffire = 0.5;
	airateoffiredistance = 500;
	ammo = "";
	artillerycharge = 1;
	artillerydispersion = 1;
	autofire = 1;
	autoreload = 0;
	backgroundreload = 0;
	ballisticscomputer = 0;
	bullet1[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_01.wav", 0.1, 1, 15};
	bullet10[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_02.wav", 0.01, 1, 15};
	bullet11[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_03.wav", 0.01, 1, 15};
	bullet12[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_04.wav", 0.01, 1, 15};
	bullet2[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_02.wav", 0.1, 1, 15};
	bullet3[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_03.wav", 0.177828, 1, 15};
	bullet4[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_04.wav", 0.177828, 1, 15};
	bullet5[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_01.wav", 0.1, 1, 15};
	bullet6[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_02.wav", 0.1, 1, 15};
	bullet7[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_03.wav", 0.1, 1, 15};
	bullet8[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_04.wav", 0.1, 1, 15};
	bullet9[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_01.wav", 0.01, 1, 15};
	candrop = 1;
	canlock = 0;
	canshootinwater = 0;
	cartridgepos = "nabojnicestart";
	cartridgevel = "nabojniceend";
	cmimmunity = 1;
	count = 0;
	cursor = "arifle";
	cursoraim = "CursorAim";
	cursoraimon = "";
	cursorsize = 1;
	changeFiremodeSound[] = {};
	descriptionshort = "Assault Rifle<br />Caliber: 5.56x45 mm";
	detectrange = 0;
	dexterity = 1.64;
	discretedistance[] = {100, 300, 400, 600, 800};
	discretedistanceinitindex = 1;
	dispersion = 0.0001;
	displayname = "IA2 C 5.56mm";
	disposableweapon = 0;
	distancezoommax = 300;
	distancezoommin = 300;
	drysound[] = {"A3\sounds_f\weapons\other\dry7.wav", 0.01, 1};
	emptysound[] = {"", 1, 1};
	enableattack = 1;
	ffcount = 3;
	fffrequency = 11;
	ffmagnitude = 0.5;
	fireanims[] = {};
   	firelightambient[] = {0, 0, 0};
    	firelightdiffuse[] = {0.937, 0.631, 0.259};
    		firelightduration = 0.05;
    	firelightintensity = 0.2;
	firespreadangle = "3.0f";
	flash = "gunfire";
	flashsize = 0.5;
	forceoptics = 0;
	handAnim[] = {"OFP2_ManSkeleton", "BRAF_Imbel_IA2\data\Anim\Handanim_IA2_556_Carbine.rtm"};
	hiddenselections[] = {};
	hiddenselectionstextures[] = {};
	hiddenunderwaterselections[] = {};
	hiddenunderwaterselectionstextures[] = {};
	htmax = 600;
	htmin = 1;
	initspeed = 0;
	irdistance = 0;
	irdotintensity = 0.001;
	irlaserend = "laser dir";
	irlaserpos = "laser pos";
	laser = 0;
	lockacquire = 1;
	lockedtargetsound[] = {"\A3\sounds_f\dummysound", 0.000316228, 6};
	lockingtargetsound[] = {"\A3\sounds_f\dummysound", 0.000316228, 2};
	magazinereloadtime = 0;
	magazines[] = {"30Rnd_556x45_Stanag","30Rnd_556x45_Stanag_Tracer_Red","30Rnd_556x45_Stanag_Tracer_Yellow","30Rnd_556x45_Stanag_Tracer_Green"};
	maxleadspeed = 23;
	maxrange = 500;
	maxrangeprobab = 0.04;
	maxrecoilsway = 0.008;
	memorypointcamera = "eye";
	mfact = 1;
	mfmax = 0;
	midrange = 150;
	midrangeprobab = 0.58;
	minrange = 1;
	minrangeprobab = 0.3;
	model = "BRAF_Imbel_IA2\BRAF_Imbel_IA2_556_Carbine.p3d";
	modelmagazine = "";
	modeloptics = "-";
	modelspecial = "";
	modes[] = {"Single", "FullAuto"};
	multiplier = 1;
	muzzleend = "konec hlavne";
	muzzlepos = "usti hlavne";
	muzzles[] = {"this"};
	namesound = "rifle";
	optics = 0;
	opticsdisableperipherialvision = 0.67;
	opticsflare = 0;
	opticsid = 0;
	opticsppeffects[] = {};
	opticszoominit = 0.75;
	opticszoommax = 1.1;
	opticszoommin = 0.375;
	picture = "\BRAF_Imbel_IA2\data\UI\gear_imbel_566_x_ca.paa";
	primary = 10;
	recoil = "assaultRifleBase";
	recoilprone = "assaultRifleBase";
	reloadaction = "GestureReloadEBR";
	reloadMagazineSound[] = {"A3\sounds_f\weapons\sdar\sdar_reload_2",0.398107,1,15};
	reloadsound[] = {"", 1, 1};
	reloadtime = 0.15;
	scope = public;
	selectionfireanim = "zasleh";
	showaimcursorinternal = 1;
	showempty = 1;
	shownunderwaterselections[] = {};
	showswitchaction = 0;
	showtoplayer = 1;
	simulation = "Weapon";
	sound[] = {};
	soundbegin[] = {"sound", 1};
	soundbeginwater[] = {"sound", 1};
	soundbullet[] = {"bullet1", 0.083, "bullet2", 0.083, "bullet3", 0.083, "bullet4", 0.083, "bullet5", 0.083, "bullet6", 0.083, "bullet7", 0.083, "bullet8", 0.083, "bullet9", 0.083, "bullet10", 0.083, "bullet11", 0.083, "bullet12", 0.083};
	soundburst = 0;
	soundclosure[] = {"sound", 1};
	soundcontinuous = 0;
	soundend[] = {"sound", 1};
	soundloop[] = {"sound", 1};
	swaydecayspeed = 2;
	tbody = 100;
	texturetype = "default";
	type = 1;
	uipicture = "\A3\weapons_f\data\UI\icon_regular_CA.paa";
	useaction = 0;
	useactiontitle = "";
	useasbinocular = 0;
	usemodeloptics = 1;
	value = 4;
	weaponinfotype = "RscWeaponZeroing";
	weaponlockdelay = 0;
	weaponlocksystem = 0;
	weaponpoolavailable = 1;
	weaponsoundeffect = "";
	weight = 0;
	class Library {
		libtextdesc = "The assault rifle,IA2, manufactured and designed in the Brazil by the company IMBEL to be the replacement of the FAL, it will be used by Army, Navy and Air Force of Brazil.";
	};
	class GunFire {
		access = 0;
		cloudletaccy = 0;
		cloudletalpha = 1;
		cloudletanimperiod = 1;
		cloudletcolor[] = {1, 1, 1, 0};
		cloudletdensitycoef = -1;
		cloudletduration = 0.2;
		cloudletfadein = 0.01;
		cloudletfadeout = 0.5;
		cloudletgrowup = 0.2;
		cloudletmaxyspeed = 100;
		cloudletminyspeed = -100;
		cloudletshape = "cloudletFire";
		cloudletsize = 1;
		deltat = -3000;
		initt = 4500;
		interval = -0.01;
		size = 3;
		sourcesize = 0.5;
		timetolive = 0;
		class Table {
			class T0 {
				color[] = {0.82, 0.95, 0.93, 0};
				maxt = 0;
			};
			class T1 {
				color[] = {0.75, 0.77, 0.9, 0};
				maxt = 200;
			};
			class T2 {
				color[] = {0.56, 0.62, 0.67, 0};
				maxt = 400;
			};
			class T3 {
				color[] = {0.39, 0.46, 0.47, 0};
				maxt = 600;
			};
			class T4 {
				color[] = {0.24, 0.31, 0.31, 0};
				maxt = 800;
			};
			class T5 {
				color[] = {0.23, 0.31, 0.29, 0};
				maxt = 1000;
			};
			class T6 {
				color[] = {0.21, 0.29, 0.27, 0};
				maxt = 1500;
			};
			class T7 {
				color[] = {0.19, 0.23, 0.21, 0};
				maxt = 2000;
			};
			class T8 {
				color[] = {0.22, 0.19, 0.1, 0};
				maxt = 2300;
			};
			class T9 {
				color[] = {0.35, 0.2, 0.02, 0};
				maxt = 2500;
			};
			class T10 {
				color[] = {0.62, 0.29, 0.03, 0};
				maxt = 2600;
			};
			class T11 {
				color[] = {0.59, 0.35, 0.05, 0};
				maxt = 2650;
			};
			class T12 {
				color[] = {0.75, 0.37, 0.03, 0};
				maxt = 2700;
			};
			class T13 {
				color[] = {0.88, 0.34, 0.03, 0};
				maxt = 2750;
			};
			class T14 {
				color[] = {0.91, 0.5, 0.17, 0};
				maxt = 2800;
			};
			class T15 {
				color[] = {1, 0.6, 0.2, 0};
				maxt = 2850;
			};
			class T16 {
				color[] = {1, 0.71, 0.3, 0};
				maxt = 2900;
			};
			class T17 {
				color[] = {0.98, 0.83, 0.41, 0};
				maxt = 2950;
			};
			class T18 {
				color[] = {0.98, 0.91, 0.54, 0};
				maxt = 3000;
			};
			class T19 {
				color[] = {0.98, 0.99, 0.6, 0};
				maxt = 3100;
			};
			class T20 {
				color[] = {0.96, 0.99, 0.72, 0};
				maxt = 3300;
			};
			class T21 {
				color[] = {1, 0.98, 0.91, 0};
				maxt = 3600;
			};
			class T22 {
				color[] = {1, 1, 1, 0};
				maxt = 4200;
			};
		};
	};
	class GunClouds {
		access = 0;
		cloudletaccy = 0;
		cloudletalpha = 0.3;
		cloudletanimperiod = 1;
		cloudletcolor[] = {1, 1, 1, 0};
		cloudletduration = 0.05;
		cloudletfadein = 0;
		cloudletfadeout = 0.1;
		cloudletgrowup = 0.05;
		cloudletmaxyspeed = 100;
		cloudletminyspeed = -100;
		cloudletshape = "cloudletClouds";
		cloudletsize = 1;
		deltat = 0;
		initt = 0;
		interval = -0.02;
		size = 0.3;
		sourcesize = 0.02;
		timetolive = 0;
		class Table {
			class T0 {
				color[] = {1, 1, 1, 0};
				maxt = 0;
			};
		};
	};
	class WeaponSlotsInfo {
		allowedslots[] = {901};
		mass = 4;
		class MuzzleSlot {
		access = 1;
		compatibleitems[] = {"muzzle_snds_M"};	
		displayname = "Muzzle Slot";
		linkproxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
		scope = 0;
		};
		class CowsSlot {
			access = 1;
			compatibleitems[] = {"optic_Arco", "optic_aco", "optic_ACO_grn", "optic_hamr","optic_NVS","optic_Holosight","optic_MRCO"};
			displayname = "Optics Slot";
			linkproxy = "\A3\data_f\proxies\weapon_slots\TOP";
			scope = 0;
		};
		class PointerSlot {
			access = 1;
			compatibleitems[] = {"acc_flashlight", "acc_pointer_IR"};
			displayname = "Pointer Slot";
			linkproxy = "\A3\data_f\proxies\weapon_slots\SIDE";
			scope = 0;
		};
	};	
	class GunParticles {
		class FirstEffect {
			directionname = "Konec hlavne";
			effectname = "RifleAssaultCloud";
			positionname = "Usti hlavne";
		};
	};
	class Single: Mode_SemiAuto {
		aidispersioncoefx = 1.4;
		aidispersioncoefy = 1.7;
		airateoffire = 2;
		airateoffiredistance = 500;
		artillerycharge = 1;
		artillerydispersion = 1;
		autofire = 0;
		begin1[] = {"braf_imbel_ia2\data\sound\Imbel_IA2_556_Shot.wav",1.12202,1,900};
		begin2[] = {"braf_imbel_ia2\data\sound\Imbel_IA2_556_Shot.wav",1.12202,1,900};
		begin3[] = {"braf_imbel_ia2\data\sound\Imbel_IA2_556_Shot.wav",1.12202,1,900};
		burst = 1;
		canshootinwater = 0;
		closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_6",1.12202,1,30};
		closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_7",1.12202,1,30};
		dispersion = 0.00093;
		displayname = "Semi";
		ffcount = 1;
		fffrequency = 11;
		ffmagnitude = 0.5;
		flash = "gunfire";
		flashsize = 0.1;
		maxrange = 500;
		maxrangeprobab = 0.2;
		midrange = 250;
		midrangeprobab = 0.7;
		minrange = 2;
		minrangeprobab = 0.3;
		multiplier = 1;
		recoil = "recoil_single_trg";
		recoilprone = "recoil_single_prone_trg";
		reloadtime = 0.065;
		requiredoptictype = -1;
		showtoplayer = 1;
		sound[] = {"", 10, 1};
		soundbegin[] = {"begin1", 0.333, "begin2", 0.333, "begin3", 0.333};
		soundbeginwater[] = {"sound", 1};
		soundburst = 0;
		soundclosure[] = {"closure1", 0.5, "closure2", 0.5};
		soundcontinuous = 0;
		soundend[] = {};
		soundloop[] = {};
		texturetype = "semi";
		useaction = 0;
		useactiontitle = "";
		weaponsoundeffect = "DefaultRifle";
	};
	class FullAuto: Mode_FullAuto {
		aidispersioncoefx = 2;
		aidispersioncoefy = 3;
		airateoffire = "1e-006";
		airateoffiredistance = 500;
		artillerycharge = 1;
		artillerydispersion = 1;
		autofire = 1;
		begin1[] = {"braf_imbel_ia2\data\sound\Imbel_IA2_556_Shot.wav",1,1,900};
		begin2[] = {"braf_imbel_ia2\data\sound\Imbel_IA2_556_Shot.wav",1,1,900};
		begin3[] = {"braf_imbel_ia2\data\sound\Imbel_IA2_556_Shot.wav",1,1,900};
		canshootinwater = 0;
		closure1[] = {"A3\sounds_f\weapons\closure\closure_rifle_2.wav", 3.16228, 1, 500};
		closure2[] = {"A3\sounds_f\weapons\closure\closure_rifle_3.wav", 3.16228, 1, 500};
		dispersion = 0.00093;
		displayname = "Full Auto";
		ffcount = 1;
		fffrequency = 11;
		ffmagnitude = 0.5;
		flash = "gunfire";
		flashsize = 0.1;
		maxrange = 30;
		maxrangeprobab = 0.05;
		midrange = 15;
		midrangeprobab = 0.7;
		minrange = 0;
		minrangeprobab = 0.9;
		multiplier = 1;
		recoil = "recoil_auto_trg";
		recoilprone = "recoil_auto_prone_trg";
		reloadtime = 0.07;
		requiredoptictype = -1;
		showtoplayer = 1;
		sound[] = {"", 10, 1};
		soundbegin[] = {"begin1", 0.333, "begin2", 0.333, "begin3", 0.333};
		soundbeginwater[] = {"sound", 1};
		soundburst = 0;
		soundclosure[] = {"closure1", 0.5, "closure2", 0.5};
		soundcontinuous = 0;
		soundend[] = {"sound", 1};
		soundloop[] = {};
		textureType = "fullAuto";
		useaction = 0;
		useactiontitle = "";
		weaponsoundeffect = "DefaultRifle";
	};

};
class BRAF_Imbel_IA2_556_Carbine: BRAF_Imbel_IA2_556_Carbine_base {
	scope = 2;
};
class BRAF_Imbel_IA2_556_Carbine_OPS : BRAF_Imbel_IA2_556_Carbine {
	scope = 2;
	class LinkedItems {
		class LinkedItemsOptic {
			item = "optic_Hamr";
			slot = "CowsSlot";
		};
	};
};
};

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  

×