Space Engineers

Space Engineers

45 ratings
Projectile Ricochet Feature Guide
By Whiplash141 and 1 collaborators
This guide describes the mechanics of the projectile ricochet feature added in the 1.202 automation update.
4
   
Award
Favorite
Favorited
Unfavorite
Introduction
This is not a mod, but an in-game feature!
Howdy Space Engineers!

As of update 1.202, the projectile ricochet feature has been added to the game! Any missile based ammo type can be configured to ricochet under certain conditions. This is designed to enrich the combat experience and add a cool new layer of gameplay to the vanilla weapon system.



Note: Missile based projectiles in Space Engineers include Artillery Shells, Assault Cannon Shells, Railgun Sabots, and of course Rockets.

Note: Due to limitations and performance considerations, projectile based weapons (Gatlings, Auto Cannons, Interior Turrets) can not currently ricochet.
Mechanics
A basic ricochet model was was chosen to keep the behavior simple, intuitive, and easily configurable. Ricochet can occur when a projectile impacts a grid; they will not occur when impacting voxels.

There are 3 configurable properties of the ricochet behavior for each missile-based ammo type:
  • MissileRicochetAngle: The minimum angle (in degrees) between the projectile velocity vector and the surface normal required for a ricochet to occur. Shots with impact angles larger than this threshold have MissileRicochetProbability chance of ricochet; shots with impact angles less than this threshold will penetrate like usual. Ricochet is disabled by default unless you set this value to something greater than or equal to 0. A value of 0 degrees would always cause ricochets and a value of 90 degrees would pretty much never cause ricochets.
  • MissileRicochetProbability: A value from 0 to 1 indicating the probability of a ricochet occurring if the impact angle is greater than the MissileRicochetAngle threshold. (1 indicates always ricochet if the impact angle is greater than the ricochet angle threshold, 0 means never ricochet).
  • MissileRicochetDamage: The amount of damage that is expended each ricochet. This means that for every ricochet, the projectile's health pool will be decreased by this amount. A ricochet will damage (and possibly destroy) only the block that it bounces off of; it will not penetrate any further because it ricochets away.



Characterization of the Ricochet Exit Angle
The exit angle of ricocheting projectiles is normally-distributed, random number that ranges between being perfectly tangent with the impacted surface and a perfect reflection about the normal. This means that the average exit angle will be shallower than the entry angle. This is an approximation to encompass the general variability in ricochets without needing an overly complex model that would hurt simspeed.
Configuration
Currently, only the Artillery and Assault Cannon Shell ammo types are configured to ricochet. The railgun sabots do not ricochet to differentiate them from the cannon rounds and to better match with how sabots perform in reality.

Below is a table of all vanilla missile ammo types and their ricochet properties.

Ammo Name
MissileRicochetAngle (deg)
MissileRicochetProbability (0 to 1)
MissileRicochetDamage
Notes
Artillery Shell
70
0.5
7000
You can get 2 ricochets at most before the damage pool is expended.
Assault Cannon Shell
65
0.5
2000
You can get 2 ricochets at most before the damage pool is expended.
Large Railgun Sabot
0
0
N/A
Ricochet is disabled
Small Railgun Sabot
0
0
N/A
Ricochet is disabled
Rocket
0
0
N/A
Ricochet is disabled

Note: The following projectile types can not ricochet: Gatling Ammo, Autocannon Ammo, and Rifle Ammo


For Modders
These SBC tags can be found in the Ammos.sbc file which is generally located at:

C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Content\Data\Ammos.sbc

If the SBC tags are not provided for a missile ammo type, ricochet will default to disabled.
Afterword
Thanks to my friends for helping proofread this guide, and thanks to Aragath and the members of CTG for helping sculpt the desired behavior of this feature! Also, thanks to Keen for accepting this feature!

This is not a mod, but an in-game feature!
11 Comments
Cthulhu Jun 12, 2023 @ 9:45pm 
didnt know was you to propose that feature! excellent!
Chance May 1, 2023 @ 12:34am 
It happens on both
Whiplash141  [author] Apr 30, 2023 @ 3:11pm 
Are you impacting a flat surface or a sloped block surface? If it is the latter, there is a bug that causes premature penetration that is known about.
Chance Apr 30, 2023 @ 2:20pm 
Is the MissileRicochetDamage working properly?
I've set it to 1 and other parameters to always cause a ricochet on my weapon and projecticle with 100 health wouldn't bounce even once.
If I set the projecticle health to 10000 it will bounce a couple times but also destroy blocks causing it to die prematurely. It appears as if there was a minimum amount of damage the projectile has to deal.
Am I missing something important?
joe lasagna Apr 26, 2023 @ 5:05am 
Damn, well I guess we’ll see how this turns out in WC tank battles
Whiplash141  [author] Apr 25, 2023 @ 10:00pm 
Nope
joe lasagna Apr 25, 2023 @ 7:53pm 
Does this also automatically apply to weaponcore weapons?
!a3oYzmN4fGhm7rA4ob Apr 20, 2023 @ 8:55am 
amazing. keen making railguns even more overpowered and arty weaker
how wonderful
andersenman Apr 20, 2023 @ 12:01am 
"That one bounced!"
Dwarf-Lord Pangolin Apr 19, 2023 @ 9:52pm 
This is extremely useful information! Thanks man!