Space Engineers

Space Engineers

评价数不足
Atmospheric and Fluid Ballistics
   
奖励
收藏
已收藏
取消收藏
Type: Mod
Mod category: Script
标签: ServerScripts
文件大小
发表于
更新日期
217.760 KB
11 月 23 日 下午 3:04
11 月 23 日 下午 3:57
3 项改动说明 ( 查看 )

订阅以下载
Atmospheric and Fluid Ballistics

描述
NOTE: This mod is brand new, so please let me know feedback, suggestions, or any bugs you find (although internal testing looked good!)

What is It
This mod simulates the effect of air and fluids (if you're using Water Mod by Jakaria) on projectile and missile damage.

It creates a multiplier based on air and (if applicable) fluid resistance that will affect the final damage of your projectiles or missiles.

See this graph[www.desmos.com] to determine the air resistance damage multiplier (y) at a given range (x), where a=air density where the shot was fired from and v=muzzle velocity of your ammo. Defaults in graph are set to earth atmosphere at ground level.

See this graph[www.desmos.com] to determine the water resistance damage multiplier (y) at a given range (x), where f = fluid density and v=muzzle velocity of your ammo. Notice that damage drops off EXTREMELY quickly given a dense fluid like water (default in graph) for normal velocity weapons. If damage falls below 0.1, damage will be rounded to 0. If the ammo was a missile, the missile at that point will be deleted to prevent it from exploding (shell never would have made it to the target so shouldn't explode there). If you don't have water mod activated, this part has no effect.

If your shot flies through the air and water, the multiplier is created for each air/fluid flight segment and then combined.

Use this mod to
  • Improve your tank and other planetary battles, with damage falloff at range on planets. Space shooting is entirely unaffected.
  • Stop vanilla (and Vanilla+) weapons from annoyingly being able to shoot deep into water. Swimming players and submarines can now hide from damage, if not targeting. Grid missiles will still work just fine underwater as torpedoes/depth-charges. As a bonus, also basically nullifies hand weapons underwater beyond a few meters.

If you want to see/test the effects, you can use the debug commands available:
/ABDebug.True
will set debug mode on, and you'll get a screen notification each time a shot lands.
/ABDebug.False
will turn debug mode back off.
I have no idea if these commands work on a server.

Important Notes
  • This will almost definitely NOT work with Weaponcore. Any Vanilla or Vanilla+ compatible weapons/ammos should be fine.
  • Velocity from the Ammo definition (muzzle velocity) is used as basically a proxy for aerodynamic/hydrodynamic qualities. I might make this more directly configurable in the future.
  • This mod DOES NOT affect missile explosion damage, which the exception of a missile explosion being canceled if it won't make it to target at all (usually from fluids). Yes, explosion damage has an advantage at long range.
  • This mod DOES NOT affect the actual missile/projectile velocity in flight. I could have only made it work for missiles, it would have broken AI aiming, and likely would have been very performance intensive.
  • This mod DOES NOT affect visuals, beyond missiles modeled as "wouldn't have made it" (usually from fluids) never exploding.
  • Currently accelerating missiles (ex. Missile) are treated the same way as cannon shells (ex. Assault Cannon, Artillery Cannon). This is not correct but haven't decided how to handle them yet, open to feedback and suggestions. Also most of the time it doesn't matter as missiles are almost entirely reliant on their explosive damage which is NOT affected by this mod (unless missile is removed entirely due to not reaching target).
  • Air resistance is calculated only at the point where the projectile/missile was fired. This is a bit rough and ready, but since I'm not modeling the effect of gravity on shots down/up this approximates that effect decently.
  • I have only tested this on single player and local multiplayer so far, but no reason it shouldn't work on a server. Feedback appreciated.

Special Thanks
  • Jakaria for the incredible Water Mod
  • Nerd for the incredible Vanilla+ mod, which inspired me on how to add properties to missiles.
  • CptArthur for Ares at War, which both inspired me to make this for my campaign there and created Agaris which is the backdrop in many of my screenshots

REUPLOAD POLICY
Please do not reupload. If you have any suggested or desired changes to this mod, please let me know in comments!