Jump to content
Sign in to follow this  
PurpleDrain

Problem with animations for ported M32

Recommended Posts

Hello everyone!

I've recently started to work on porting a couple of weapons for the group I'm playing with, and it has gone pretty well with everything that's not related to grenade launchers!

Whenever I try to use the rtm of any weapon that is either a grenade launcher or has a grenade launcher attachment, it completetly breaks the arms:

930600D80C99946CF07D90C42586ADCDA9271B58

Now if would be of great help if anyone could help me resolve this matter.

Here are the configs related to the weapon:

Config.cpp

class CfgPatches
{
class CAWeapons_E_GrenadeLauncher
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 1.02;
	requiredAddons[] = {"A3_Weapons_F"};
};
};
class CfgWeapons
{
class Rifle_Base_F;
class UGL_F;

class ACW_M32: Rifle_Base_F
{
//	magazines[] = {1Rnd_HE_M203,FlareWhite_M203,FlareGreen_M203,FlareRed_M203,FlareYellow_M203,1Rnd_Smoke_M203,1Rnd_SmokeRed_M203,1Rnd_SmokeGreen_M203,1Rnd_SmokeYellow_M203};
//	begin1[]={"ca\sounds_e\weapons_e\grenade_launcher\gr_launcher_1", db0, 1,200};
//	soundBegin[]={begin1,1};
//	reloadMagazineSound[]={"ca\sounds_e\weapons_e\grenade_launcher\gr_launcher_reload",db0,1,30};
//	drySound[]={"ca\sounds_e\weapons_e\grenade_launcher\gr_launcher_dry",db1,1,40};
	drysound[] = {"A3\sounds_f\Weapons\other\sfx5", 1, 1, 30};
	magazineReloadTime=3;
	reloadTime=1;
	optics = true;
	modelOptics="-";
	cameraDir="GL look";
	memoryPointCamera="GL eye";
	burst = 1;
	candrop = 1;
	canlock = 0;
	canshootinwater = 0;

	opticsZoomMin=0.3;
	opticsZoomMax=1.0;
	opticsZoomInit=0.5;

	//copy of class GrenadeLauncher: Default from weapons\config.cpp
	cursor = GLCursor;
	cursorAim = \ACW_Weapons\MK32\data\clear_empty;
	cursorSize = 4;
	value = 3;

//		reloadTime=1;
//		sound[]={\ca\Weapons\Data\Sound\grenadelauncher_1,db-60,1,400}; //grenade_launch1
//		reloadMagazineSound[]={\ca\Weapons\Data\Sound\z_sinus,db-90,1,1};
	reloadmagazinesound[] = {"A3\sounds_f\Weapons\grenades\ugl_reload", 0.501187, 1, 20};
	sound[] = {"A3\sounds_f\Weapons\grenades\ugl_shot_4", 1.12202, 1, 200};

	reloadAction = "ManActReloadMagazine";
//		magazineReloadTime=1;
	magazines[] = {};
	muzzles[] = {M32_GL};

	initSpeed=75;	//60
	selectionfireanim = "zasleh";

	autoReload = false;
	autoAimEnabled=false;

	ffMagnitude=0.1;
	ffFrequency=1;
	ffCount=1;
	recoil = "M240Recoil";

	dispersion=0.007;
	aiDispersionCoefY=6; //2.0 ... dispersion used to simulate distance est. error

	maxLeadSpeed = 15;
//		optics = false;

	modes[] = {"this"};
	muzzlePos="usti granatometu";
	muzzleEnd="konec granatometu";
	cartridgePos="";
	cartridgeVel="";
	minRange=30;minRangeProbab=0.10;
	midRange=200;midRangeProbab=0.7;
	maxRange=400;maxRangeProbab=0.05;

	htMin = 1;
	htMax = 600;
	afMax = 0;
	mfMax = 0;
	mFact = 1;
	tBody = 100;

	class M32_GL : UGL_F {
		displayName = "M32";
		descriptionShort = "";
		useModelOptics = 0;
		useExternalOptic = 0;
		magazines[] = {"1Rnd_HE_Grenade_shell", "UGL_FlareWhite_F", "UGL_FlareGreen_F", "UGL_FlareRed_F", "UGL_FlareYellow_F", "UGL_FlareCIR_F", "1Rnd_Smoke_Grenade_shell", "1Rnd_SmokeRed_Grenade_shell", "1Rnd_SmokeGreen_Grenade_shell", "1Rnd_SmokeYellow_Grenade_shell", "1Rnd_SmokePurple_Grenade_shell", "1Rnd_SmokeBlue_Grenade_shell", "1Rnd_SmokeOrange_Grenade_shell", "3Rnd_HE_Grenade_shell", "3Rnd_UGL_FlareWhite_F", "3Rnd_UGL_FlareGreen_F", "3Rnd_UGL_FlareRed_F", "3Rnd_UGL_FlareYellow_F", "3Rnd_UGL_FlareCIR_F", "3Rnd_Smoke_Grenade_shell", "3Rnd_SmokeRed_Grenade_shell", "3Rnd_SmokeGreen_Grenade_shell", "3Rnd_SmokeYellow_Grenade_shell", "3Rnd_SmokePurple_Grenade_shell", "3Rnd_SmokeBlue_Grenade_shell", "3Rnd_SmokeOrange_Grenade_shell"};
		cameraDir="GL look";
		memoryPointCamera="GL eye";
		discreteDistance[] = {100, 200, 300, 400};
		discreteDistanceCameraPoint[] = {"OP_eye", "OP_eye2", "OP_eye3", "OP_eye4"};
		discreteDistanceInitIndex = 1;
	};

	scope = 2;
	model = "\ACW_Weapons\MK32\M32.p3d";
	handAnim[]={"OFP2_ManSkeleton","\ACW_Weapons\MK32\data\anim\M32.rtm"};
//	picture="\ca\weapons_E\Data\icons\m32_CA.paa";
	displayName= "M32";
//	UiPicture="\CA\weapons\data\Ico\i_regular_CA.paa";
};
};

model.cfg

class CfgSkeletons
{
class Default {};
class exp_M32: Default
{
	isDiscrete = 1;
	skeletonInherit = "";
	skeletonBones[] = 
	{
		"trigger","",
		"reload","",
		"drum","reload",
		"grenade1","drum",
		"grenade2","drum",
		"grenade3","drum",
		"grenade4","drum",
		"grenade5","drum",
		"grenade6","drum",
		"safety_catch",""
	};
};	
class exp_Mk13: Default
{
	isDiscrete = 1;
	skeletonInherit = "";
	skeletonBones[] = 
	{
		"trigger","",
		"grenade","barrel",
		"barrel","",
		"grip","barrel",
		"release",""
	};
};	
class exp_M79: Default
{
	isDiscrete = 1;
	skeletonInherit = "";
	skeletonBones[] = 
	{
		"trigger","",
		"barrel","",
		"grenade","barrel",
		"bolt","",
		"safety",""
	};
};
};

class CfgModels
{
class Default
{
	sectionsInherit = "";
	sections[] = {};
	skeletonName = "";
};
class M32: Default
{
	skeletonName = "exp_M32";
	sections[] = {"zasleh"};
	sectionsInherit = "";

	class Animations
	{
   // Rotate drum after each shot  
		class trigger
		{
			type = "rotation";
			source="reload";
			selection = "trigger";
			axis = "trigger_axis";
			minValue = "0";
			maxValue = ".5";
			angle0 = 0;
			angle1 = "rad 40";
		};
		class rev
		{
			type = "rotation";
			source="revolving";
			selection = "drum";
			axis = "drum_axis";
			minValue = "0";
			maxValue = "1";
			sourceadress="loop";
			angle0 = 0;
			angle1 = "rad 360";
		};
		// hide grenades when reloading
		class reload_hide1
		{
			type="hide";
			source="reloadMagazine";
			selection="grenade1";
			minValue=0;
			maxValue=.5;
			sourceAddress="mirror";
			hideValue=".2+random .8";
		};
		class reload_hide2: reload_hide1
		{
			selection="grenade2";
		//	hideValue=.33;
		};
		class reload_hide3: reload_hide2
		{
			selection="grenade3";
		};
		class reload_hide4: reload_hide2
		{
			selection="grenade4";
		};
		class reload_hide5: reload_hide2
		{
			selection="grenade5";
		};
		class reload_hide6: reload_hide2
		{
			selection="grenade6";
		};
		// flip outwards when reloading
		class reload_open : rev
		{
			source = "reloadMagazine";
			selection = "reload";
			axis = "reload_axis";
			sourceadress="clamp";
			angle0 = "0";
			angle1 = "-2.5";
			minValue="0";
			maxValue=".10";
		};
		class reload_close : reload_open
		{
			angle0 = "0";
			angle1 = "2.5";
			minValue=".9";
			maxValue="1";
		};
		class drum_wobble1:rev
		{
			type = "rotation";
			source="reloadMagazine";
			sourceadress="loop";
			minValue="0";
			maxValue=".15";
			angle0 = "0";
			angle1 = "((round(random 2))*(rad (360/6)))";
		};
		class drum_wobble2:drum_wobble1
		{
			maxValue=".3";
		};
		class drum_wobble3:drum_wobble1
		{
			maxValue=".45";
		};
		class drum_wobble4:drum_wobble1
		{
			maxValue=".6";
		};
		class drum_wobble5:drum_wobble1
		{
			maxValue=".75";
		};
		class drum_wobble6:drum_wobble1
		{
			maxValue=".9";
			angle1 = "(rad (360/6))";
		};
		/*
		class drum_wobble7:drum_wobble1
		{
			maxValue=".7";
		};
		class drum_wobble8:drum_wobble1
		{
			maxValue=".8";
		};
		class drum_wobble9:drum_wobble1
		{
			maxValue=".9";
		};
		class drum_wobble10:drum_wobble1
		{
			maxValue="1";
		};
		*/
	#define k (rad 4)
	#define wobbleAngle k
	#define wobbleAngle2 (-k)
		class reload_wobble1:reload_open
		{
			type = "rotation";
			source="reloadMagazine";
			//sourceadress="clamp";
			minValue="0";
			maxValue=".1";
			angle0 = "0";
			angle1 = wobbleAngle;
		};
		class reload_wobble2:reload_wobble1
		{
			maxValue=".2";
		};
		class reload_wobble3:reload_wobble1
		{
			maxValue=".3";
		};
		class reload_wobble4:reload_wobble1
		{
			maxValue=".4";
		};
		class reload_wobble5:reload_wobble1
		{
			maxValue=".5";
		};
		class reload_wobble6:reload_wobble1
		{
			minValue=".5";
			angle0 = "0";
			angle1 = wobbleAngle2;
			maxValue=".6";
		};
		class reload_wobble7:reload_wobble6
		{
			maxValue=".7";
		};
		class reload_wobble8:reload_wobble6
		{
			maxValue=".8";
		};
		class reload_wobble9:reload_wobble6
		{
			maxValue=".9";
		};
		class reload_wobble10:reload_wobble6
		{
			maxValue="1";
		};

		class safety
		{
			type = "rotation";
			source="revolve";
			selection = "safety_catch";
			axis = "safety_catch_axis";
			minValue = "0.95";
			maxValue = "1";
			sourceadress="loop";
			angle0 = 0;
			angle1 = "rad 110";
		};		
	};
};
class Mk13: Default
{
	skeletonName = "exp_Mk13";
	sections[] = {"zasleh"};
	sectionsInherit = "";
	class Animations
	{
	class reload_hide
		{
			type="hide";
			source="reloadMagazine";
			selection="grenade";
			minValue=0;
			maxValue=.5;
			sourceAddress="mirror";
			hideValue=".45+random .3";
		};
		class trigger
		{
			type = "translation";
			source="reload";
			selection = "trigger";
			axis = "trigger_axis";
			minValue = "0";
			maxValue = ".01";
			Offset0 = "0";
			Offset1 = "1";
		};
		class grip
		{
			type = "translation";
			source="ReloadMagazine";
			selection = "grip";
			axis = "grip_axis";
			minValue = "0";
			maxValue = ".05";
			Offset0 = "0";
			Offset1 = "1";
		};
		class barrel_slide
		{
			type = "translation";
			source="ReloadMagazine";
			selection = "barrel";
			axis = "grip_axis";
			minValue = ".05";
			maxValue = ".2";
			Offset0 = "0";
			Offset1 = "4";
		};
		class barrel_rotate
		{
			type = "rotation";
			source="ReloadMagazine";
			selection = "barrel";
			axis = "barrel_axis";
			minValue="0.2";
			maxValue="0.22+ random 0.05";
			angle0="0.0";
			angle1="(rad -25)";
		};

		class barrel_rotate_b:barrel_rotate
		{
			minValue="0.79+ random 0.05";
			maxValue="0.87";
			angle1="(rad 25)";
		};
		class barrel_slide_b:barrel_slide
		{
			minValue = ".87";
			maxValue = ".9+random 0.1";
			Offset1 = "-4";
		};
		class grip_b:grip
		{
			minValue = "0.87+ random 0.1";
			maxValue = "1";
			Offset1 = "-1";
		};
	};
};
class M79: Default
{
	skeletonName = "exp_M79";
	sections[] = {"zasleh"};
	sectionsInherit = "";
	class Animations
	{
		class reload_hide
		{
			type="hide";
			source="reloadMagazine";
			selection="grenade";
			minValue=0;
			maxValue=.5;
			sourceAddress="mirror";
			hideValue=".45+random .3";
		};
		// flip downwards when reloading
		class reload_open
		{
			type = "rotation";
			source = "reloadMagazine";
			selection = "barrel";
			axis = "barrel_axis";
			sourceadress="clamp";
			angle0 = "0";
			angle1 = "-1";
			minValue=".05";
			maxValue=".1+random .05";
		};
		class reload_close : reload_open
		{
			angle0 = "0";
			angle1 = "1";
			minValue=".85-random .2";
			maxValue=".95- random .02";
		};
//	#define k (rad 4)
//	#define wobbleAngle k
//	#define wobbleAngle2 (-k)
		class reload_wobble1:reload_open
		{
			type = "rotation";
			source="reloadMagazine";
			minValue="0.05";
			maxValue=".1";
			angle0 = "0";
			angle1 = wobbleAngle;
		};
		class reload_wobble2:reload_wobble1
		{
			maxValue=".2";
		};
		class reload_wobble3:reload_wobble1
		{
			maxValue=".3";
		};
		class reload_wobble4:reload_wobble1
		{
			maxValue=".4";
		};
		class reload_wobble5:reload_wobble1
		{
			maxValue=".5";
		};
		class reload_wobble6:reload_wobble1
		{
			minValue=".5";
			angle0 = "0";
			angle1 = wobbleAngle2;
			maxValue=".8";
		};
		class reload_wobble7:reload_wobble6
		{
			minValue=".55";
		};
		class reload_wobble8:reload_wobble6
		{
			minValue=".6";
		};
		class reload_wobble9:reload_wobble6
		{
			minValue=".65";
		};
		class reload_wobble10:reload_wobble6
		{
			minValue=".7";
		};

		class bolt_open
		{
			type = "rotation";
			source="ReloadMagazine";
			selection = "bolt";
			axis = "bolt_axis";
			minValue = "0";
			maxValue = "0.01+random 0.04";
			angle0 = "0";
			angle1 = "rad 50";
		};
		class bolt_close:bolt_open
		{
			minValue = "0.95";
			maxValue = "1";
			angle1 = "rad -50";
		};
		class safety
		{
			type = "translation";
			source="revolve";
			selection = "safety";
			axis = "safety_axis";
			minValue = "0";
			maxValue = "0.001";
			Offset0 = "1";
			Offset1 = "0";
		};
		class trigger
		{
			type = "rotation";
			source="reload";
			selection = "trigger";
			axis = "trigger_axis";
			minValue = "0";
			maxValue = ".1";
			angle0 = 0;
			angle1 = "rad -15";
		};		
	};
};
};

Any kind of help is appreciated, thank you!

Share this post


Link to post
Share on other sites

I've tried without binarizing the PBO but it yields the same result, I even have the same problem with custom animations from Blender.

Could it be related to the weapons with an incorrect model.cfg or something?

Share this post


Link to post
Share on other sites

Normally I only see this when I forget to put a model.cfg of the model into my anims or forget to put the anim folder inside my data folder

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  

×