Universal Recoil [EA 27]

If you liked this item, please rate it up on Steam Workshop page.

Author: Apsel

Last revision: 30 Aug, 2023 at 19:21 UTC (3)

File size: 1.05 MB

On Steam Workshop

Description:

This mod reworks recoil, making it similar to other FPS games.

Recoil is procedurally generated based on weapon stats and weapon roles, so weapons should feel somewhat unique. Each weapon is given a predictable left / right recoil trend on top of random deviation. All settings can be modified to your tastes in the mutator config menu.

============================================================

This is compatible with the Universal Camera Shake mod found here (By AquaFire):
https://steamcommunity.com/sharedfiles/filedetails/?id=2407513273
Use it for more visceral camera recoil when firing!

============================================================

CONFIG OPTIONS

Recoil / Handling Multipliers:

– Zoom-Based ADS Recoil Reduction Strength
The strength of the zoom – based recoil reduction system. 1 is full effect, 0 is none.

– Recovery
The speed that recoil re-centers itself after firing.

– L/R Trend
Scales the left / right pull of individual weapons.

– Sway
The amount of horizontal recoil. Note that this scales the angle (in degrees) that recoil can be redirected, so setting it too high could cause the weapon to recoil downwards occasionally.

– Base Recoil
Scale of the entire recoil spray.


Stance Multipliers:

– Crouching Recoil
Scale of crouching recoil

– Prone Recoil
Scale of Prone Recoil *

– Use Weapon Prone Stats?
Weather to consider the weapon’s built-in prone stats. If enabled, prone recoil is calculated by WeaponProneRecoil X Prone Recoil. When disabled, only the mutator’s Prone Recoil is considered.

*(The config’s Prone Recoil is higher than Crouching Recoil by default. Most weapons have a prone value of around 0.6, so in-game prone recoil is reduced by 52% when Use Weapon Prone Stats is enabled)


Visual Recoil Settings (These have a negligible effect on actual shot direction):

– Pushback Multiplier
How far back the weapon is pushed when fired.

– Rocking Intensity
How much a weapon will "roll" when fired continuously.

– Vanilla Recoil Strength
How much the vanilla "kickback" and "Snap" values are reduced.


Exclusions:

– Exclude Entire Tags
Remove weapon categories from the mutator.

– Excluded Weapons
Remove individual weapons from the mutator.

List weapon names or weapon categories, separating them by semicolons only. It is not case sensitive. Examples:

This is correct:
AK47;m4a1;ballistic Knife

This is not:
AK47; m4a1; ballistic Knife

============================================================

If you are a modder and you don’t like the recoil that’s been decided by the mutator, you can manually declare the values with a data container (see images).

You can also influence them through ravenscript with the following code:

self.URM = GameObject.find("RecoilPrefab(Clone)")
self.isUsingURM = (self.URM ~= nil)

if (self.isUsingURM) then
self.URM = self.URM.gameObject.GetComponent(ScriptedBehaviour).self
print("Using URM")
else
print("Not using URM")
end

———————————————-

self.URM:SetRecoil(WeaponEntry, newRecoil)

self.URM:SetStability(WeaponEntry, newStability)

self.URM:SetDirection(WeaponEntry, newDirection)

self.URM:SetIgnore(WeaponEntry, newIgnore)

Download
Revisions:

Old revisions of this mod are available below. Click the link to download.