Page MenuHomeFeedback Tracker

[Feature Request] Muzzle attachments to effect submunitionConeAngle
Feedback, NormalPublic

Description

Like how muzzle attachments can change ammo speed, weapon recoil and weapon dispersion, have the ability to create muzzle attachments that can change the submunitionConeAngle (and maybe other submunition properties that make sense). The idea for this is that so a choke attachment can be added to a shotgun that would decrease (or increase) the spread of a pellet ammo.

Or in other words making MagazineCoef, AmmoCoef and MuzzleCoef classes effect submunition projectiles.

If possible also have the weapon effect these as well. So two shotguns for example can shoot the same mag but lets say the longer barrel one causes the pellets to spread at a tighter angle, or do the opposite for a sawed off shotgun.

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General

Event Timeline

namenai created this task.Jan 25 2023, 3:50 AM
namenai updated the task description. (Show Details)Jan 25 2023, 11:37 AM
namenai updated the task description. (Show Details)
namenai updated the task description. (Show Details)Jan 26 2023, 5:28 AM
namenai changed Category from Config to General.Mar 1 2023, 2:48 AM
namenai updated the task description. (Show Details)Mar 1 2023, 4:40 AM
dedmen set Ref Ticket to AIII-55595.Mar 16 2023, 10:35 AM
dedmen added a subscriber: dedmen.Mar 21 2023, 2:42 PM

submunitionConeAngle is only used to precalculate directions when the ammo's config is first loaded, if we want attachments to have multiplier on it, we would need to recalculate these on every shot.
That would be quite annoying.

We could simplify it by
submunitionDIrection = lerp(VZero, submunitionDirection, coneAngleFactor)
so the lower coneAngleFactor, the closer to straight ahead the submunition will be spawned, effectively shrinking the cone.. Would that work for you?

We could simplify it by
submunitionDIrection = lerp(VZero, submunitionDirection, coneAngleFactor)
so the lower coneAngleFactor, the closer to straight ahead the submunition will be spawned, effectively shrinking the cone.. Would that work for you?

Where would coneAngleFactor be able to be defined? If in the weapon and muzzle attachment configs, I should think this would not only be a good way of going about things but also fulfill the request.

Yeah I think this would be fine, even if it had to just be on weapons for the precalculation reason

dedmen added a comment.EditedMar 24 2023, 1:59 PM

factor gonna be
0 == original
1 == straight forward for 100% of shots
-1 == Double the original angle
-2 == 3x original angle

so you can also use it to increase spread

Or in other words making MagazineCoef, AmmoCoef and MuzzleCoef classes effect submunition projectiles.

I would say no to that, but instead offer you SubmunitionCoef class, that only affects later spawned submunitions, and seems like only parameter will be the spread/cone coef.
The only other possible parameter I see is speed of the created submunition.

And likely only for normal projectiles (Like shotgun), not for missiles and flares and such.

Also the coef will travel along, if the submunition spawns more submunitions, these will also receive the coef

dedmen changed the task status from New to Feedback.Mar 24 2023, 4:12 PM

Next dev branch, should work like this

class muzzle_snds_B: muzzle_snds_H
	{
		author="$STR_A3_Bohemia_Interactive";
		_generalMacro="muzzle_snds_B";
		displayName="$STR_A3_cfgWeapons_muzzle_snds_B0";
		picture="\a3\Weapons_F\acc\Data\UI\icon_muzzle_snds_B_ca.paa";
		model="\A3\weapons_f\acc\acca_snds_h_F";
		class ItemInfo: ItemInfo
		{
			mass=12;
			class MagazineCoef {};
			class AmmoCoef {};
			soundTypeIndex=1;
			muzzleEnd="zaslehPoint";
			alternativeFire="Zasleh2";
			class MuzzleCoef {};
class SubmunitionCoef {
	coneAngleCoef = 1.f; // Shoot straight ahead
};
		};
		inertia=0.2;
	};

Please tell me if it doesn't work like desired

Okay I will try that once its out. And one other thing, is it possible that this could be added to the weapon itself? Using the shotguns from contact DLC as example, the short barrel could be something like:

class sgun_HunterShotgun_01_sawedoff_F: sgun_HunterShotgun_01_sawedoff_base_F
{
    class SubmunitionCoef {
	coneAngleCoef = -0.5; // 50% more of original angle
    };
}
dedmen added a comment.EditedMar 28 2023, 1:50 PM

Combining muzzle coef (Its gonna be on the weapons muzle) with attachment coef would be very annoying to get right though.
Just :crossing_fingers: to get that right

Muzzle config entry submunitionConeCoef

I guess that can be something for the future then, I will take a look when dev branch gets updated then

dedmen added a comment.Apr 4 2023, 2:14 PM

It landed on dev branch last week

Sorry for the late reply, but I finally got around to trying this out. I tried these values.

25.0f = spread very wide
0.25f = narrow spread
1.0f = all go straight

ill try more later, but so far looks like it works well.

Very cool to see in patch 2.14. The notes mention doing this for muzzle / weapon configuration, would the config look like what I have quoted?

Okay I will try that once its out. And one other thing, is it possible that this could be added to the weapon itself? Using the shotguns from contact DLC as example, the short barrel could be something like:

class sgun_HunterShotgun_01_sawedoff_F: sgun_HunterShotgun_01_sawedoff_base_F
{
    class SubmunitionCoef {
	coneAngleCoef = -0.5; // 50% more of original angle
    };
}

No the way it works is:

class sgun_HunterShotgun_01_sawedoff_F: sgun_HunterShotgun_01_sawedoff_base_F
{
    submunitionConeCoef = -0.5;
};