Jump to content
Sign in to follow this  
AlexVestin

M82A2 (The forgotten shoulder-cannon)

Recommended Posts

I took this BIS sample model:

m107.jpg

Now it's this:

m82a22.jpg

Some info regarding the m82a2: http://thefucklub.wordpress.com/2010/12/09/barrett-m82a2/

Long story short. It is a cancelled bullpup configuration designed for use against helicopters and fast moving targets.

Some might even remember it from the movie Jurassic Park III

I think the rifle requires the DEV build of ARMA3 to work to its fullest atm. (Would still work without it.)

Download version 1.0 right here:

https://dl.dropboxusercontent.com/u/103898625/%40M82A2.zip

Pictures of it ingame!

http://imageshack.us/a/img4/9814/14861274.jpg

http://imageshack.us/a/img713/8079/57644008.jpg

http://imageshack.us/a/img15/660/26930806.jpg

Classnames would be:

m82a2
m82a2_Hamr
m82a2_Hamr_point
m82a2_SOS	
m82a2_SOS_point_snds
m82a2_Holo	
m82a2_Holo_flash

m82a2_10rnd_127x99_mag

My todo list is currently this:

1. Accessory proxy rotated.

2. Bolt mechanism not moving when firing.

3. Bolt mechanism not clamping to the rear when out of ammo or reloading. (Does not do irl? Scrapping this function)

4. Bolt mechanism moves backward when reloading, but very slowly.

5. . Wrong suppressor. No fitting suppressor available. (Might not need a suppressor anyway)

6. Uses 127x99cal 100rounds vehicle ammobox since there's no 10round 127x99cal magazines in A3.

7. No custom hand position animation yet. I get the spazzy-arms-everywhere result.

8. Magazine does not hide when reloading.

9. Custom firing sounds.

If it's still on the list above, the problem remains or I am testing stuff and might still need help. I update the list the moment I fix stuff.

Edited by AlexVestin

Share this post


Link to post
Share on other sites

Comments? Comments?! That's hilarious! I also notice that you may desire some optics on it like in the images. Now, how on earth would one model reloading the magazine?

Share this post


Link to post
Share on other sites

Hilarious you say? Boomsticks are serious business! And this one is one of the finest. Gonna try finding some A3 weapon tutorials now.

I'll stick with the standard A3 optics that are available. I am so lost already just trying to port this to A3 and working with oxygen on my own.

Not gonna make things too complicated at the start :)

..oh and about reloading it. I have no idea how I'll make that look pretty, lol. Atleast not yet.

Progress:

http://cloud-2.steampowered.com/ugc/559850022896674874/CD811F29B32DE059B9A9BA7F21E07E458D46B0AF/

http://cloud-2.steampowered.com/ugc/559850022896676174/D3E65C873DF82C2ADB528FD7E770A1ADE9D04027/

lol. I'll learn animating later, I think.

Current status:

http://cloud-2.steampowered.com/ugc/559850022897431551/4848471A20F3B73C66885C369D7FE7E036BFE69B/

http://cloud-2.steampowered.com/ugc/559850022897234074/7172D759CF660418FE6D23970723A4D1EC1E95EE/

http://cloud-2.steampowered.com/ugc/559850022897433339/025788CA206F722DB3518984F4C5EC4B572B8A4A/

Animations are on hold. They shall be fixed later.

Gonna make it go boom first. Oh, and make optics work.

Edited by AlexVestin

Share this post


Link to post
Share on other sites

Looks like a pain in the ass to reload, lol.

"Yea and to reload this thing, you just need to shred up your arm and form an arch."

Share this post


Link to post
Share on other sites

Current status:

2013052800008.jpg

Still haven't tried correcting hand positions. It's a must do before this is complete. I found a perfect reload animation, though. It wont be as hard as I thought it would. It's the animations for the lynx sniper-rifle that BIS added in DEV build. That rifle and this one works exactly the same way when reloading.

Optics are working.

Side attachments are working, altough rotated badly.

Is that normal if the proxy was just created?

Muzzle attachments needs fixing. I'll make a suppressor if someone could tell me how to hide a part of the rifle when a muzzle attachment is currently on. I'd like to hide the attached muzzlebreaker if a suppressor is attached. If that can't be done, I'll make the muzzlebreaker an attachment on its own.

Oh, and it can take down a helcopter pretty fast.

Edited by AlexVestin

Share this post


Link to post
Share on other sites

class muzzle_hide

{

type="hide";

source="hasSuppressor";

selection="SELECTION-NAME";

minValue = 0.0;

maxvalue = 0.25;

hideValue = 0.01;

};

class carryhandle_hide

{

type = "hide";

source = "hasOptics";

selection = "SELECTION-NAME";

minValue = 0.000000;

maxValue = 1.00000;

};

class railcover_hide

{

type = "hide";

source = "hasAccessory";

selection = "SELECTION-NAME";

minValue = 0.000000;

maxValue = 1.00000;

};

They're examples of code to be used in your model.cfg. Just change the 'SELECTION-NAME' to whatever named selection you wish to hide, and don't forget to define it in the skeleton else it wont hide.

Share this post


Link to post
Share on other sites

That worked like a charm. The standard muzzle breaker hides when attaching a suppressor.

Thank you, Jackal. I'm still learning.

My list of bugs are currently this:

1. Accessory proxy rotated.

2. Bolt mechanism not moving when firing.

3. Bolt mechanism not clamping to the rear when out of ammmo or reloading.

4. Bolt mechanism moves backward when reloading, but very slowly.

5. No large enough and fitting suppressor.

6. Uses 127x99cal 100rounds vehicle ammobox since there's no 10round 127x99cal magazines in A3.

7. No custom hand position animation yet.

8. Magazine does not hide when reloading.

Most things are animation related.

Here's the model.cfg as of now.

class CfgSkeletons
{
class Default
{
	isDiscrete=1;
	skeletonInherit="";
	skeletonBones[]={};
};
class tb_arifle_m16a4_base: Default
{
	skeletonBones[]=
	{
		"magazine",
		"",
		"bolt",
		"",
		"muzzlebreaker",
		""
	};
};
};
class CfgModels
{
class Default
{
	sectionsInherit="";
	sections[]={};
	skeletonName="";
};

class m82a2_base: Default
{
	sections[]=
	{
		"magazine",
		"bolt",
		"muzzlebreaker"
	};
	skeletonName="tb_arifle_m16a4_base";
	class Animations {};
};

/////////////////////////////////////////////////////////////////////////////

class m82a2: m82a2_base
{
	class Animations
	{
		class magazine_reload_move_1
		{
			type="translation";
			source="reloadMagazine";
			selection="magazine";
			axis="magazine_axis";
			minValue=0.145;
			maxValue=0.2;
			offset0=0;
			offset1=0.40000001;
		};
		class magazine_hide
		{
			type="hide";
			source="reloadMagazine";
			selection="magazine";
			minValue= 0;
			maxValue=1;
			minPhase= 0;
			maxPhase=1;
			hideValue=1;
			sourceAddress="mirror";
		};
		class bolt_empty
		{
			type="translation";
			source="isempty";
			selection="bolt";
			memory=1;
			sourceAddress="clamp";
			minValue=0;
			maxValue=1;
			begin="bolt_start";
			end="bolt_end";
			offset0=0;
			offset1=1;
		};
		class bolt_empty_1
		{
			type="translation";
			source="reloadMagazine";
			selection="bolt";
			memory=1;
			sourceAddress="clamp";
			minValue=0;
			maxValue=1;
			begin="bolt_start";
			end="bolt_end";
			offset0=0;
			offset1=1;
		};
		class muzzle_hide
		{
			type="hide";
			source="hasSuppressor";
			selection="muzzlebreaker";
			minValue=0;
			maxValue=0.25; 
			hideValue=0.01;
		};
	};
};
};

I'm still working on it, so stuff might be horribly wrong. Any help correcting errors would be appreciated.

Edited by AlexVestin

Share this post


Link to post
Share on other sites

1. Rotate the proxy to correctly align with the model (take screenshots ingame and use those for reference for repositioning, or if you're using a custom made optic, repath the proxy to the new scope model and position it that way, but be advised if the new scope model is incorrectly positioned any BIS optics you put on it might not align correctly).

2, 3, 4 & 8. Might be the selections are not named correctly in your model, check by clicking on their names in the 'Named Selections' tab and ensure the correct vertices are selected with each one.

5. You can always make one ;)

6. You can also define new magazines, here some sample code that may need some tweaking:

class CfgMagazines
{
class Default;
class CA_Magazine;
class 100Rnd_127x99_mag;

class YOURTAG_10Rnd_127x99_mag: 100Rnd_127x99_mag
{
	scope = 2;
	displayName = "10 Round 12.7x99mm Magazine";
	count = 10; //defines the number of rounds in the mag
	picture = "\PATH_TO_INVENTORY_IMAGE\IMAGE_ca.paa";
};
};

As for point 7, this may help: http://forums.bistudio.com/showthread.php?139652-Tutorial-Creating-Custom-Weapon-Animations&highlight=HandAnim

Share this post


Link to post
Share on other sites

Most helpful! I've already fixed the magazines now with your help. Will check the selections again, altough I've checked them several times over. If I select the selection named "magazine", the magazine turns selected in the 3d view. Same with the bolt and such. Could try re-creating the selection.

Edited by AlexVestin

Share this post


Link to post
Share on other sites

Somewhere I can find a model.cfg with animations set up with all kinds of stuff? I have no idea on how to make the bolt move between shots etc.

My selections in O2 needed for the things I want to do is "bolt and "magazine" .

I'm trying to make it so when I reload

1. The bolt goes back after 1sec, then forward again after 0.5 sec.

2. The magazine starts sliding down before getting hidden a few seconds, then un-hide and slide back in.

3. Have the bolt go back once more and forward again before it's ready to fire.

Edited by AlexVestin

Share this post


Link to post
Share on other sites
I have no idea on how to make the bolt move between shots etc.

You need an animation using the 'reload' source to do that, e.g:

		class bolt
		{
			type="translation";
			source="reload";
			selection="bolt";
			axis="bolt_axis";
			begin="bolt_start";
			end="bolt_end";
			minValue=0;
			maxValue="1";
			offset0="0";
			offset1="-1";
		};

As for making more complex reload animations, you need to use the same 'reloadmagazine' source for all animations but have them triggered at different phases using the minphase/maxphase values. The time in seconds that the phases begin and end at depends on your magazineReloadTime setting in the config.cpp. If your example your magazineReloadTime = 8, the interval between phase 0 and phase 1 of the 'reloadmagazine' source will be 8 seconds. So then you have to write a series of sequential animation classes that are triggered at intervals between phase 0 and phase 1 of the animation by calculating appropriate minphase/maxphase values for each part of the animation.

If you want an animation to start 1 second into the reloadmagazine source then you would set minphase = 0.125 ([1/magazineReloadTime] * [time in seconds you want the event to occur] = 1/8 * 1 = 0.125), and if you wanted that animation to take exactly 0.1 seconds you would give it maxphase = 0.1375 (1/8 * 1.1 = 0.1375). Then to start another sequence in the animation 0.5 seconds later (1.6 seconds into the reload sequence) you would write another class animation using the 'reloadmagazine' source but this time have the animation start with minphase = 0.2 (1/8 * 1.6 = 0.2) and so on.

Currently I don't think you can do the proper Arma 3 method of unhiding the magazine during the reload sequence because it requires a new version of BinPBO, instead you have to 'fake' the hide animation by moving the magazine under the ground then move it back up. Might be worth waiting for the new tools before stressing about that.

There are some pretty good model.cfg examples dotted around Alwarren's FHQ M4 thread.

Share this post


Link to post
Share on other sites

That does help me. Bolt now moves correctly when firing. Thank you! I'll go deeper into more advanced reload animations later.

If I could just get the hand animations to work without spazzing out, I'd release a working version of this rifle.

I've followed the tutorials there are step by step a few times over now. I heard the spazzing is caused by the addon not being pbo'd correctly, but I don't really know.

Edited by AlexVestin

Share this post


Link to post
Share on other sites

What kind of damage will this do?

Share this post


Link to post
Share on other sites
What kind of damage will this do?

Enough, atleast that's what I'm thinking :D

Share this post


Link to post
Share on other sites
I heard the spazzing is caused by the addon not being pbo'd correctly, but I don't really know.

I've seen in the past that it can be caused by several things, like not including the correct model.cfg in the folder next to the .rtm (the one with OFP2ManSkeleton), or placing the hand bones too close to the torso or too far from the 'weapon' bone when making the .rtm, or things not binarizing correctly when using BinPBO (personally I make sure *.rtm is in the "list of files to copy directly" in BinPBO's options, and don't attempt to binarise the .rtms).

Share this post


Link to post
Share on other sites
What kind of damage will this do?

Place a enemy Hunter/Ifrit in the editor.

Get shot by one round of it's .50cal

There's your answer :)

This rifle uses BI values for the .50cal vehicle rounds.

I've seen in the past that it can be caused by several things, like not including the correct model.cfg in the folder next to the .rtm (the one with OFP2ManSkeleton), or placing the hand bones too close to the torso or too far from the 'weapon' bone when making the .rtm, or things not binarizing correctly when using BinPBO (personally I make sure *.rtm is in the "list of files to copy directly" in BinPBO's options, and don't attempt to binarise the .rtms).

I've tried placing the hands and the weapon furhter away from the body.

My model.cfg contains this and is in the same folder as the rtm:

class CfgSkeletons
{
class Default
{
	isDiscrete = 1;
	skeletonInherit = "";
	skeletonBones[] = {};
};
class OFP2_ManSkeleton
{
	isDiscrete = 0;
	skeletonInherit = "";
	skeletonBones[] =
	{
		"Pelvis","",
		"Spine","Pelvis",
		"Spine1","Spine",
		"Spine2","Spine1",
		"Spine3","Spine2",
		"Camera","Pelvis",
		"weapon","Spine1",
		"launcher","Spine1",
	//Head skeleton in hierarchy
		"neck","Spine3",
		"neck1","neck",
		"head","neck1",
	//New facial features
		"Face_Hub","head",
			"Face_Jawbone","Face_Hub",
				"Face_Jowl","Face_Jawbone",
				"Face_chopRight","Face_Jawbone",
				"Face_chopLeft","Face_Jawbone",
				"Face_LipLowerMiddle","Face_Jawbone",
				"Face_LipLowerLeft","Face_Jawbone",
				"Face_LipLowerRight","Face_Jawbone",
				"Face_Chin","Face_Jawbone",
				"Face_Tongue","Face_Jawbone",
			"Face_CornerRight","Face_Hub",
				"Face_CheekSideRight","Face_CornerRight",
			"Face_CornerLeft","Face_Hub",
				"Face_CheekSideLeft","Face_CornerLeft",
			"Face_CheekFrontRight","Face_Hub",
			"Face_CheekFrontLeft","Face_Hub",
			"Face_CheekUpperRight","Face_Hub",
			"Face_CheekUpperLeft","Face_Hub",
			"Face_LipUpperMiddle","Face_Hub",
			"Face_LipUpperRight","Face_Hub",
			"Face_LipUpperLeft","Face_Hub",
			"Face_NostrilRight","Face_Hub",
			"Face_NostrilLeft","Face_Hub",
			"Face_Forehead","Face_Hub",
				"Face_BrowFrontRight","Face_Forehead",
				"Face_BrowFrontLeft","Face_Forehead",
				"Face_BrowMiddle","Face_Forehead",
				"Face_BrowSideRight","Face_Forehead",
				"Face_BrowSideLeft","Face_Forehead",
			"Face_Eyelids","Face_Hub",
			"Face_EyelidUpperRight","Face_Hub",
			"Face_EyelidUpperLeft","Face_Hub",
			"Face_EyelidLowerRight","Face_Hub",
			"Face_EyelidLowerLeft","Face_Hub",
			"EyeLeft","Face_Hub",
			"EyeRight","Face_Hub",			
	//Left upper side
		"LeftShoulder","Spine3",
		"LeftArm","LeftShoulder",
		"LeftArmRoll","LeftArm",
		"LeftForeArm","LeftArmRoll",
		"LeftForeArmRoll","LeftForeArm",
		"LeftHand","LeftForeArmRoll",
		"LeftHandRing","LeftHand",
		"LeftHandRing1","LeftHandRing",
		"LeftHandRing2","LeftHandRing1",
		"LeftHandRing3","LeftHandRing2",
		"LeftHandPinky1","LeftHandRing",
		"LeftHandPinky2","LeftHandPinky1",
		"LeftHandPinky3","LeftHandPinky2",
		"LeftHandMiddle1","LeftHand",
		"LeftHandMiddle2","LeftHandMiddle1",
		"LeftHandMiddle3","LeftHandMiddle2",
		"LeftHandIndex1","LeftHand",
		"LeftHandIndex2","LeftHandIndex1",
		"LeftHandIndex3","LeftHandIndex2",
		"LeftHandThumb1","LeftHand",
		"LeftHandThumb2","LeftHandThumb1",
		"LeftHandThumb3","LeftHandThumb2",
	//Right upper side
		"RightShoulder","Spine3",
		"RightArm","RightShoulder",
		"RightArmRoll","RightArm",
		"RightForeArm","RightArmRoll",
		"RightForeArmRoll","RightForeArm",
		"RightHand","RightForeArmRoll",
		"RightHandRing","RightHand",
		"RightHandRing1","RightHandRing",
		"RightHandRing2","RightHandRing1",
		"RightHandRing3","RightHandRing2",
		"RightHandPinky1","RightHandRing",
		"RightHandPinky2","RightHandPinky1",
		"RightHandPinky3","RightHandPinky2",
		"RightHandMiddle1","RightHand",
		"RightHandMiddle2","RightHandMiddle1",
		"RightHandMiddle3","RightHandMiddle2",
		"RightHandIndex1","RightHand",
		"RightHandIndex2","RightHandIndex1",
		"RightHandIndex3","RightHandIndex2",
		"RightHandThumb1","RightHand",
		"RightHandThumb2","RightHandThumb1",
		"RightHandThumb3","RightHandThumb2",
	//Left lower side
		"LeftUpLeg","Pelvis",
		"LeftUpLegRoll","LeftUpLeg",
		"LeftLeg","LeftUpLegRoll",
		"LeftLegRoll","LeftLeg",
		"LeftFoot","LeftLegRoll",
		"LeftToeBase","LeftFoot",
	//Right lower side
		"RightUpLeg","Pelvis",
		"RightUpLegRoll","RightUpLeg",
		"RightLeg","RightUpLegRoll",
		"RightLegRoll","RightLeg",
		"RightFoot","RightLegRoll",
		"RightToeBase","RightFoot"
	};
	// location of pivot points (local axes) for hierarchical animation
	pivotsModel="A3\anims_f\data\skeleton\SkeletonPivots.p3d";
 	};
};

class CfgModels
{
class Default
{
	sectionsInherit="";
	sections[] = {};
	skeletonName = "";
};
class ArmaMan : Default
{
	htMin = 60;          // Minimum half-cooling time (in seconds)
	htMax = 1800;        // Maximum half-cooling time (in seconds)
	afMax = 30;          // 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 = 37;  // Metabolism temperature of the model (in celsius)

	sections[] =
	{
		"osobnost","Head_Injury","Body_Injury","l_leg_injury","l_arm_injury","r_arm_injury","r_leg_injury","injury_body", "injury_legs", "injury_hands",
		"clan","clan_sign","Camo","CamoB","Camo1","Camo2","personality","hl", "injury_head"
	};
	skeletonName = "OFP2_ManSkeleton";
};
};

I'm unsure of what it is that I use to pack my pbo's. I right click on the folder > create PBO.

I don't remember if it's BinPBO that does this since I do not remember if there are alternative ways.

Edited by AlexVestin

Share this post


Link to post
Share on other sites

Sounds more like cpbo by Kegetys, which doesn't Binarize the pbo as far as I am aware. Might be the cause?

Share this post


Link to post
Share on other sites

That was the only problem. I will use BinPBO instead from now on.

14861274.jpg

57644008.jpg

26930806.jpg

Share this post


Link to post
Share on other sites

Last update was in may 2013, meanwhile there were big update to Arma that changed something with sounds and broke all older mods.

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  

×