Page MenuHomeFeedback Tracker

"recoilCoef" parameter in Muzzlecoef doesn't seem to work.
Feedback, NormalPublic

Description

When I was trying to create some custom suppressor and make it the gun recoils less, I encountered this problem.
It seems like the game engine doesn't execute any changes to the recoil of the weapon.
thanks for any help.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Engine
Steps To Reproduce

1.Create any suppressor mod to make the attached gun recoil less/more.
2.write a code like below and load the mod in game, you'll find nothing has affected the gun behaviors.
Here is the part of my "config.cpp" in my weapon mod.

class CfgWeapons
{
	class RifleCore;
	class Rifle: RifleCore
	{
		class WeaponSlotsInfo;
	};
	class ItemCore;
	class InventoryFlashLightItem_Base_F;
	class InventoryMuzzleItem_Base_F;
	class InventoryUnderItem_Base_F;
	class Rifle_Base_F: Rifle
	{
		class WeaponSlotsInfo
		{
			class MuzzleSlot;
			class CowsSlot;
			class PointerSlot;
		};
		class GunParticles;
	};
	class muzzle_snds_H: ItemCore ///!!!!!
	{
		class ItemInfo;
	};
	class otty_acc_pbs1: muzzle_snds_H ///!!!!!
	{
		displayName = "Otty's PBS-1";
		picture = "\366VEPRS\data\acc\PBS1_001.paa";
		model = "\366VEPRS\data\acc\pbs1.p3d";
		author = "Otty";
		class ItemInfo: InventoryMuzzleItem_Base_F
		{
			mass = 12; //seems work
			class MagazineCoef //seems work
			{
				initSpeed = 1.015;
			};
			class AmmoCoef //seems work
			{
				hit = 1.0;
				visibleFire = 0.2;
				audibleFire = 0.4;
				visibleFireTime = 0.5;
				audibleFireTime = 1.0;
				cost = 1.0;
				typicalSpeed = 1;
				airFriction = 1.0;
			};
			class MuzzleCoef //partially works
			{
				dispersionCoef = 0.97; //seems work
				artilleryDispersionCoef = 15.05;
				fireLightCoef = 0.05;
				recoilCoef = 15.05; //doesnt work
				recoilProneCoef = 0.05; //doesn't work
				minRangeCoef = 0.05;
				minRangeProbabCoef = 0.05;
				midRangeCoef = 0.05;
				midRangeProbabCoef = 0.05;
				maxRangeCoef = 0.05;
				maxRangeProbabCoef = 0.05;
			};
			muzzleEnd = "zaslehPoint";
			alternativeFire = "Zasleh2";
			soundTypeIndex = 1;
			inertia = 0.2;
		};
		
	};
Additional Information

I tested out other params in MuzzleCoef and found that at least dispersionCoef works.

Event Timeline

xanaxist created this task.Sep 1 2022, 11:48 AM
xanaxist updated the task description. (Show Details)
xanaxist edited Steps To Reproduce. (Show Details)
xanaxist updated the task description. (Show Details)Sep 1 2022, 11:52 AM
xanaxist edited Additional Information. (Show Details)
xanaxist renamed this task from "recoilcoef" parameter in Muzzlecoef doesn't seem to work. to "recoilCoef" parameter in Muzzlecoef doesn't seem to work..Sep 1 2022, 12:01 PM
xanaxist edited Steps To Reproduce. (Show Details)
xanaxist changed Category from Modding to Engine.Sep 1 2022, 12:33 PM
xanaxist edited Steps To Reproduce. (Show Details)
xanaxist edited Steps To Reproduce. (Show Details)Sep 1 2022, 1:21 PM

I take it this bug still exists as I am getting the same problems where recoilCoef doesnt seem to do anything, along with hit in AmmoCoef

It would be nice to get this fixed cause I do see quite a few mods using some of the fields that dont work thinking they do.

TRAGER added a subscriber: TRAGER.Jan 16 2025, 12:54 PM
namenai added a subscriber: dedmen.Fri, Feb 14, 5:40 AM

Per @dedmen request here is a PBO where once this issue works the suppressor (on MX rifle) should reduce the recoil o 25% of its original value when not prone, or if prone to 5%. Other fields like the hit coef dont appear to work, so if it gets fixed then with this suppressor they should do 10x more damage (Picked an extreme value to test with). I imagine typicalSpeed value also doesnt work, unsure how to test on my end.

as per the original post, the initSpeed works (in this case its 5x and the round flies almost flat for 500m

dedmen changed the task status from New to Feedback.Fri, Feb 14, 5:46 PM

It was ignored for player used weapons, not for AI.

2.20

Ah I didnt think to try out for AI, thank you very much