Jump to content

Recommended Posts

Dear all,

 

I have followed BI Wiki on recoil but it didn't work.

 

I don't want to use scripts and editor either so, setUnitRecoilCoefficient 3 is not an option for me.

 

Their link is here:

https://community.bistudio.com/wiki/cfgRecoils

 

In order to play a bit with the numbers I have created the following config:

class cfgRecoils
{
	class recoil_default;
	class recoil_dgr_rifle : recoil_default
	{
		muzzleOuter[] = {0,0,0,0};		
		muzzleInner[] = {0,0,0,0};
		kickBack[] = {0,0};			
  		permanent = 0;				
		temporary = 0;
	};
};

class CfgWeapons
{
	class arifle_MXC_F;
	class dgr_Rifle: arifle_MXC_F
	{
		baseWeapon = "dgr_Rifle";
		_generalMacro = "dgr_Rifle";

		recoil = "recoil_dgr_rifle";
		recoilProne = "recoil_dgr_rifle";
		maxRecoilSway = 0;
		swayDecaySpeed = 0;
	};
};

I was expecting no recoil at all but, the rifle still has the original recoil.

 

What is going on?

 

 

 

Share this post


Link to post
Share on other sites

Yeah i did, that's the link on the first post. It doesn't work.

Share this post


Link to post
Share on other sites

Look again my friend, the link .kju provided is different to the link in your OP,  you need to include CfgPatches in your config/addon.

 

Quote

If the config doesn't contain CfgPatches, it is ignored when the game is loading addons on startup.

 

Share this post


Link to post
Share on other sites

Well, actually I have omited the CfgPatches, but here you are a more complete version.

 

All BI recoils are up and to the right. As an exercise, I want to make a recoil down and to the left.

 

My final goal is to shoot full auto and hit all shots on a target 100m away. I don't want recoil zero, I don't want recoil_empty. I don't want all shots up and right.

 

I want one shot to the right, one shot to the left, one shot up, one shot down, etc. I want a perfect circular dispersion around my point of aim.

 

Only after I achieve that, I will make full auto shots go up by using positive values to the CfgRecoils variable named "permanent":

 

permanent = 0.1;

 

If I manage to do that, then I can say I know how to edit recoil and I will be able to edit recoils my own way.

 

This is my current config. There are other weapons which I have omited.

//#include "basicdefines_A3.hpp"

class CfgPatches
{
	class a3_dgr_weapons
	{
		name = "Dagger Weapons & Ballistics";
		author = "Dagger";
		dlc = "a3_dgr";
		requiredAddons[]={"A3_Weapons_F","A3_Weapons_F_Mark","ace_ballistics","A3_Data_F","A3_Sounds_F","asdg_jointrails","a3_dgr_magazines","a3_dgr_scopes","a3_dgr_attachments","A3_Sounds_F_Mark","A3_CargoPoses_F"};
		units[] = {};
		weapons[]={"dgr_6_Semi_Rifle"};
		requiredVersion=0.1;
		authors[] = {"Dagger"};
		authorUrl = "https://forums.bistudio.com/forums/topic/209137-dagger-scopes-weapons-ammunition-and-gear/";
		url = "https://forums.bistudio.com/topic/187196-dagger-weapons-for-arma-3-and-ace-3/";
		version = "4";
		versionStr = "4";
		versionAr[] = {4};
	};
};

class Mode_SemiAuto;
class Mode_Burst;
class Mode_FullAuto;
class CowsSlot;
class MuzzleSlot;
class SlotInfo;
class WeaponSlotsInfo;
class asdg_SlotInfo;
class asdg_OpticRail;
class asdg_OpticRail1913;
class asdg_MuzzleSlot;
class PointerSlot;
class asdg_FrontSideRail;
class asdg_UnderSlot;
class asdg_MuzzleSlot_556;
class asdg_MuzzleSlot_762;
class dgr_underSlot;

#define Xcoef (0.0001)
#define Ycoef (0.0001)
#define LynxXcoef (0.0001)
#define LynxYcoef (0.0001)

class cfgRecoils
{
	#include "cfgRecoilsLegacy.hpp"
	class Default;
	class recoil_dgr_rifle : Default
	{
		muzzleOuter[] = {-0.0001,-0.0001,-0.0001,-0.0001};		
		muzzleInner[] = {-0.0001,-0.0001,-0.0001,-0.0001};
		kickBack[] = {-0.0001,0.0001};			
  		permanent = -0.0001;				
		temporary = -0.0001;
	};
	access = 0;
	empty[] = {};
	impulse[] = {0,0,0,0,0,0,0,0,0,0,0,0};
	recoil_empty[] = {0,0,0};
	recoil_dgr[] = {-0.0001,0.0001,-0.0001,0.0001,-0.0001,0.0001,-0.0001,0.0001,-0.0001,0.0001,-0.0001,0.0001};		
};

class CfgWeapons
{
	class ItemCore;
	class InventoryFlashLightItem_Base_F;
	class InventoryOpticsItem_Base_F;
	class arifle_MXC_F;
	class dgr_6_Semi_Rifle: arifle_MXC_F
	{
		baseWeapon = "dgr_6_Semi_Rifle";
		_generalMacro = "dgr_6_Semi_Rifle";
		reloadAction = "GestureReloadSPAR_01";
		descriptionShort = "0.31MIL dispersion, 20.32cm R twist, 10in barrel";			
		ace_barrelTwist = 203.2;		// 1:8"
		ace_barrelLength = 254;			// 10"
		ace_twistDirection = 1;			// direction of twist (-1 = left, 0 = no rifling, 1 = right)
		author = "Dagger"; 
		displayname = "DGR .243 WM (6mm) Semi-Auto Rifle"; 
		dlc = "a3_dgr";
		scope = 2;
		magazines[] = {"DGR_243_30Rnd"};

		recoil = "recoil_dgr_rifle";
		recoilProne = "recoil_dgr_rifle";
		maxRecoilSway = 0.001;
        swayDecaySpeed = 1;
		inertia = 0.001;

		class Single: Mode_SemiAuto
		{
			recoil = "recoil_dgr";
			recoilProne = "recoil_dgr";

			dispersion = 0.00031;
			sounds[] = {"StandardSound","SilencedSound"};		
			class BaseSoundModeType
			{
				weaponSoundEffect = "DefaultRifle";
				closure1[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_05_Cyrus\DMR_05_Closure_01",0.3,0.3,30};	
				closure2[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_05_Cyrus\DMR_05_Closure_02",0.3,0.3,30};
				soundClosure[] = {"closure1",0.5,"closure2",0.5};
			};
			class StandardSound: BaseSoundModeType
			{
				soundSetShot[] = {"DMR05_Shot_SoundSet","DMR05_tail_SoundSet","DMR05_InteriorTail_SoundSet"};
				begin1[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_05_Cyrus\DMR_05_short_01",0.3,0.3,1200};
				begin2[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_05_Cyrus\DMR_05_short_02",0.3,0.3,1200};
				begin3[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_05_Cyrus\DMR_05_short_03",0.3,0.3,1200};
				soundBegin[] = {"begin1",0.33,"begin2",0.33,"begin3",0.34};
			};
			class SilencedSound: BaseSoundModeType
			{
				SoundSetShot[] = {"MMG02_silencerShot_SoundSet","MMG02_silencerTail_SoundSet","MMG02_silencerInteriorTail_SoundSet"};
				begin1[] = {"A3\Sounds_F_Mark\arsenal\weapons\Machineguns\MMG_02_SPGM\silencer_MMG_02_short_01",1,1,300};
				begin2[] = {"A3\Sounds_F_Mark\arsenal\weapons\Machineguns\MMG_02_SPGM\silencer_MMG_02_short_02",1,1,300};
				begin3[] = {"A3\Sounds_F_Mark\arsenal\weapons\Machineguns\MMG_02_SPGM\silencer_MMG_02_short_03",1,1,300};
				soundBegin[] = {"begin1",0.33,"begin2",0.33,"begin3",0.34};
			};
		};

		class FullAuto : Mode_FullAuto
		{
			recoil = "recoil_dgr";
			recoilProne = "recoil_dgr";
			reloadTime = 0.075;

			dispersion = 0.00031;
			sounds[] = {"StandardSound","SilencedSound"};		
			class BaseSoundModeType
			{
				weaponSoundEffect = "DefaultRifle";
				closure1[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_05_Cyrus\DMR_05_Closure_01",0.3,0.3,30};		
				closure2[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_05_Cyrus\DMR_05_Closure_02",0.3,0.3,30};
				soundClosure[] = {"closure1",0.5,"closure2",0.5};
			};
			class StandardSound: BaseSoundModeType
			{
				soundSetShot[] = {"DMR05_Shot_SoundSet","DMR05_tail_SoundSet","DMR05_InteriorTail_SoundSet"};
				begin1[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_05_Cyrus\DMR_05_short_01",0.3,0.3,1200};
				begin2[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_05_Cyrus\DMR_05_short_02",0.3,0.3,1200};
				begin3[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_05_Cyrus\DMR_05_short_03",0.3,0.3,1200};
				soundBegin[] = {"begin1",0.33,"begin2",0.33,"begin3",0.34};
			};
			class SilencedSound: BaseSoundModeType
			{
				SoundSetShot[] = {"MMG02_silencerShot_SoundSet","MMG02_silencerTail_SoundSet","MMG02_silencerInteriorTail_SoundSet"};
				begin1[] = {"A3\Sounds_F_Mark\arsenal\weapons\Machineguns\MMG_02_SPGM\silencer_MMG_02_short_01",1,1,300};
				begin2[] = {"A3\Sounds_F_Mark\arsenal\weapons\Machineguns\MMG_02_SPGM\silencer_MMG_02_short_02",1,1,300};
				begin3[] = {"A3\Sounds_F_Mark\arsenal\weapons\Machineguns\MMG_02_SPGM\silencer_MMG_02_short_03",1,1,300};
				soundBegin[] = {"begin1",0.33,"begin2",0.33,"begin3",0.34};
			};
		};

		class WeaponSlotsInfo: WeaponSlotsInfo
		{
			class PointerSlot: asdg_FrontSideRail
			{
				linkProxy = "\A3\data_f\proxies\weapon_slots\SIDE";
			};
			mass = 40;
			allowedslots[] = {901};
		};
		drySound[] = {"A3\sounds_f\weapons\Other\dry_1",2,2,10};
		reloadMagazineSound[] = {"A3\Sounds_F_Exp\arsenal\weapons\Rifles\SPAR01\SPAR01_reload",1,1,10};
		changeFiremodeSound[] = {"A3\Sounds_F_Exp\arsenal\weapons\Rifles\SPAR01\SPAR01_firemode",2,2,5};
	};
};

 

Share this post


Link to post
Share on other sites

Remember, one to the right, one to the left, une up, one down, dispersion must be a circle around the aiming point.

 

I don't know why all second shots always go up and right on full auto. First shot hits where it aims but, second shot always top right.

Share this post


Link to post
Share on other sites

The reason why I am concerned about recoil is because, if you can not make the recoil be the way you want then, you have no control over it. If you can not control then, you can not predict it. If you can not predict it, then you can not configure realistic shooting behavior. If you can not establish realistic recoil then, the game will be less attractive to realism enthusiasts, like this guy here (I don't know him):

 

I believe the community can help itself by letting recoil config be very clear.

 

In order to do so, I propose a config challenge:

 

1) In the virtual arsenal, the player must empty a full magazine, in full auto, hitting all shots on the soldier at 100m, with no mouse movement to compensate for recoil, standing still, recoil config must not be zero, it can be low but not zero. You are allowed to config all recoil parameters you want and camera shake but, you are not allowed to use scripts and you are not allowed to change weapon dispersion.

 

Please, try your code before sharing. You can try my code too. You will see that, even using very small numbers, like 0.001, recoil is still the same as the original.

Share this post


Link to post
Share on other sites

1. did you verify via config browser or config dump your changes are active?

2. remove

access = 0; empty[] = {}; impulse[] = {0,0,0,0,0,0,0,0,0,0,0,0}; recoil_empty[] = {0,0,0};

  • Like 1

Share this post


Link to post
Share on other sites

All sounds like your edits are not actually every arriving in the config. Did you check via the ingame config viewer that your changes are properly applied?

 

Also "muzzleInner" is not documented on biki. I guess the biki page is probably quite dated. I'll see if I can get some info if there are other config parameters.

Also muzzleOuter the a/b values are magnitudes. A negative magnitude looks incorrect.

 

 

EDIT: I just checked. "muzzleInner" doesn't exist. It's only muzzleOuter/kickBack/temporary/permanent

 

Don't know where you got that muzzleInner from.

  • Like 1

Share this post


Link to post
Share on other sites

All right guys, thank you for the nice tips.

 

I have deleted those lines .kju said, and I have also opened the in game config.

 

I've found that, my recoils are active at the single and full auto modes but they are not active at the ACE_burst_far, FullAuto_medium, Single_medium_optics1, Single_medium_optics2 and Single_far_optics2.

 

I understand it didn't work on the last ones because I have not configured them in my config. So, I have added them to a new config, even knowing that they are showToPlayer = 0; and tested again. 

 

Same results, same original recoil and my recoil config is recognized by the ingame config viewer.

Share this post


Link to post
Share on other sites

I wonder if final perceived ingame recoil might have something to do with a soldier parameter or something...

Share this post


Link to post
Share on other sites

OK, I have found the solution.

 

You must just remove many required addons and leave it like described below.

 

requiredAddons[]={"A3_Weapons_F","A3_Weapons_F_Mark"};

 

From my understanding, for some reason, one of the previous required addons was restoring the original recoil values so, my changes never took effect.

 

Curious part is that the ingame config viewer told me my recoils were active.

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

×