BACE setup

Using CBA extended eventhandlers, even though I think the vanilla game supports similar as well (class EventHandlers → class TAG → events..).

Anyhoo, first create a BACE baseclass under CfgWeapons, so you can inherit etc more easily without having to copy/paste the whole thing each time, etc

class NORTH_boltRifle_Base: Rifle_Base_F {
	class NORTH_boltActionCasingEject {
		class casingEject {//leave this class out if casing ejectging is not desired
			casingType = "FXCartridge_762";
			ejectTime = 0.8;
			ejectTimeReload = 1;
			ejectPosOffSet[] = {};
			ejectVelocityRandom[] = {};
			ejectVectorDir[] = {};
			casingEjectSound[] = {{"NORTH_bace_brassting", 5}};
		};
		class boltAction {
			actionName = "NORTH_M39Boltinganim";
			actionDelay = 0;
			actionSound[] = {
				{"NORTH_m39_boltaction_01", 15, 0.25},
				{"NORTH_m39_boltaction_02", 15, 0.25},
				{"NORTH_m39_boltaction_03", 15, 0.25},
				{"NORTH_m39_boltaction_04", 15, 0.25}
			};
			actionSoundPos = "";
			actionSoundDelay = 0;
			actionSoundEmpty[] = {};
			actionSoundEmptyPos = "";
			actionSoundEmptyDelay = 0;
		};
	};
	class EventHandlers {
		class NORTH_bace {
			fired = "\
				if (local (_this # 0)) then {\
					_this call NORTH_bace_fnc_firedMain;\
				};\
			";
			reload = "\
				_this call NORTH_bace_fnc_reloadMagazine;\
			";
			reloaded = "_this call NORTH_bace_fnc_reloadedMagazine";
		};
	};
};

What the config tokens mean:

class casingEject

class boltAction

NORTH_bace_fnc_helper

This is a helper function to define the position for the casing eject, or any other eject position.

Preview with a player and when holding the wanted weapon execute [-0.14, 0.05] NORTH_bace_fnc_helper in the debug console.
It will create a helper object to visualize the position with. The position is the lowest corner of the helper object.

The position is calculated from the player's left hand position (“LeftHand” selection), and it's in model space. Values are in meters.
The values are [y, z], y = position along the weapon's length, z = height.
Default for bolt rifles is [-0.14, 0.05]

When you enter a new value and execute again the helper object moves to the set position.
Once the values are satisfactory copy/paste them into the config ejectPosOffSet[] array.

To exit the helper function add a third parameter true and execute it, as in something like [-0.14, 0.05, true] call NORTH_bace_fnc_helper