Jump to content
ruthberg

Advanced Ballistics (WIP)

Recommended Posts

arma3_2014_08_15_21_07vxjl.pngarma3_2014_08_15_21_08zzvu.pngarma3_2014_08_15_21_1i6lyo.pngarma3_2014_08_15_21_0gia65.png

--- Description ---

This addon introduces advanced external and internal ballistics to the game. It is entirely client-side and only affects small arms fire from human players.

It makes long range shooting much more challenging and enjoyable.

--- Features ---

* Drag resistance based on ambient air density (air pressure, temperature, humidity)

* Wind drift (Wind speed varies with the height above ground and obstacles like buildings or certain terrain features can mitigate the wind)

* Spin drift

* Coriolis effect

* Eötvös effect

* Decreasing bullet stability through the transonic region (-> significant dispersion beyond supersonic flight)

* Ammo temperature affects muzzle velocity

* High power scopes get adjustable Mil/MOA Turrets

* Wind indicator

* Protractor

* Temperature simulation

* Humidity simulation

* High caliber bullet trace effect

* Mirage effect and parallax adjustment

-- More or less planned features ---

* More advanced sight adjustment system for vehicle mounted weapons (M2, ...)

* Dynamic wind (strength, direction, gusts) based on real world weather data

* Maybe sandbags, tripods where you can rest your weapon on.

--- How to use ---

- You can enable/disable all features in the userconfig/hpp file.

- Default key combination for showing the wind indicator is SHIFT+K

- Default key combination for showing the protractor is CTRL+SHIFT+K

- Default keys for turning the scope turret dials are (UP, DOWN, LEFT, RIGHT)

- Default keys for parallax adjustment are (CTRL+UP, CTRL+DOWN)

- Default keys for scope zero adjustment are (CTRL+SHIFT+UP, CTRL+SHIFT+DOWN)

Community made tutorials:

Precision Shooting (vekongmaster) - scribd - zippyshare

--- Ballistic Tables ---

.408 CheyTac - scribd - zippyshare

Courtesy of TiborasaurusRex:

12.7x108mm

.50 BMG M33

.50 BMG A-Max

.416 Barrett

.408 CT

338 Lapua Mag

.303 British

7.62x54mm

M80

M118LR

Mk248 Mod 0

Mk248 Mod 1

.300 WM Berger Hybrid OTM

7.62x39mm

300 AAC Blackout

6.5x47mm Lapua Scenar

6.5x39mm Grendel

5.56x45mm

MK262

MK318

5.45x39mm

Muzzle velocity variation table

AB Calibrated Ammo Parameters (Actual BC & MV)

--- Compatibility ---

- Fully compatible with 3rd party ammunition and weapons

- Fully compatible with weather modification addons

--- Ammunition database ---

Download: http://pastebin.com/htWS3gJF

--- Weapon Database ---

Download: http://pastebin.com/4AjDWkna

--- Guideline for 3rd party content creators ---

If you wish to support this addon, then please add the following configuration data to your weapon and ammo classes:

Ammo class:

ACE_caliber - bullet caliber in inches

ACE_bulletLength - bullet length in inches

ACE_bulletMass - bullet mass in grains

ACE_ammoTempMuzzleVelocityData[] - array of muzzle velocity shifts in m/s with 11 data points from -15 °C to 35 °C example: {-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};

ACE_ballisticCoefficients - array of ballistic coefficients (contains one element more than the velocity boundary array)

ACE_velocityBoundaries - array of velocity boundaries

ACE_standardAtmosphere - "ASM" or "ICAO"

ACE_dragModel - Number that specifies the drag model [1, 2, 5, 6, 7, 8]

ACE_muzzleVelocities - array of muzzle velocities (same size as barrel length array)

ACE_barrelLengths - array of barrel lengths (same size as muzzle velocity array)

Weapon class:

ACE_barrelTwist - barrel twist rate in inches

ACE_twistDirection - direction of twist (-1 = left, 0 = no rifling, 1 = right)

ACE_barrelLength - barrel length in inches

--- Changelog ---

release 35:

-Made all config entry names ACE3 compliant

-Removed all 3rd party ammo and weapon config data

release 34.1:

-Fixed incorrect LRR and GM6 config

release 34:

-CBA Keybinds compatibility update

release 33:

-Added config data for the Marksmen DLC

-Fixed an incorrect config entry (arifle_Katiba_f barrel length)

release 32:

-Fixed an incorrect config entry (arifle_Katiba_f barrel length)

-Fixed incompatibility with new BI weapon config initSpeed

-Fixed incompatibility with AGMs changeProjectileDirection function

-Added missing config data to fully support the RH M4 v1.25 weapon pack

-Added missing config data to fully support RHS v0.3.6 weapons

release 31.1:

-Replaced outdated AdvancedBallistics.dll

release 31:

-Fixed conflict with NATO SF and Russian Spetsnaz Weapons pack

-Added optional PBO "advancedballistics_optional_nato_russian_sf_cfg": Adds new magazines and adjusts several ammo classes

release 30:

-Added config data for the Veteran mod

-Added more ammo configs (6.5×47mm Lapua, Mk248 Mod 0, Mk248 Mod 1, Berger Hybrid OTM)

-Added a userconfig setting that allows you to enable the advanced ballistics selectively in the unit initialization

-Added optional PBO "advancedballistics_optional_vanilla_cfg": Adds new magazines (30Rnd_AB_65x47_Scenar_mag, 20Rnd_762x51_M118LR_Mag and 10Rnd_762x51_M118LR_Mag)

-Added optional PBO "advancedballistics_optional_trixie_recon_cfg": Adds new magazines (Trixie_10x127_Amax_Mag, Trixie_10x106_Mag, Trixie_30x556_Mk262_Mag,

Trixie_5x762_Berger_Hybrid_OTM_Mag, Trixie_5x762_Mk248_Mod_1_Mag, Trixie_5x762_Mk248_Mod_0_Mag, Trixie_5x762_M118LR_Mag, Trixie_10x762_M118LR_Mag, Trixie_20x762_M118LR_Mag)

release 29.1:

-DLL Extension: Fixed incorrect terrain initialization on some terrains

release 29:

-Added climate data for Panthera

-DLL Extension: Fixed a minor calculation error

-DLL Extension: Further improved the performance

-DLL Extension: The terrain initialization no longer needs to be repeated on mission restart

release 28.1:

-Fixed extension initialization freezing the game in some circumstances

-Fixed extension initialization being run even if no extension was used

release 28:

-Performance improvements

-Added an optional AdvancedBallistics.dll (huge performance increase)

-Added a userconfig setting that allows you enable/disable the use of dll extensions

-Added G1 drag coefficient to the russian 12.7x108 mm cartridge

-Added config data for the Community Upgrade Project - Weapon Pack

release 27:

-Added config data for the R3F French Weapons Pack

-Added more ammo configs (.416 Barret, .50 BMG Hornady A-MAX)

release 26:

-Added missing config data for (arifle_Mk20_GL_F, arifle_Katiba_GL_F, arifle_MX_GL_F, arifle_MX_SW_F, SMG_02_F and BWA3_B_762x51_Ball_SD)

-Added latitude and altitude information for (Caribou, Namalsk, MCN_Aliabad, Clafghan, Sangin, Sara, reshmaan, Thirsk and lingor)

release 25:

-Added config data for RHS (AFRF and USAF), TMR and the new HLC MP5 pack

-Added ability to see mirage through binoculars, rangefinders and laser designators

-Slightly increased the visibility of the mirage effect

-Scope zeroing is now persistent (retained on game restart)

-Fixed bullet trace not visible when looking through binoculars, rangefinders and laser designators

release 24:

-Added config data for several 3rd party weapon mods (RH, HLC, BWA3, Trixie and Massi)

-Added climate data for Bornholm and Imrali

-Minor performance improvements

release 23:

-Added a scope zero adjustment (adjustable point of impact with elevation being 0 mil)

-Added more ammo configs (Mk318, 7N6M, 7T3M, 7N14, 7T2, 57-N-231-P, 57-N-181-S, .32 ACP)

-Fixed another bug in the muzzle velocity calculation (was only present for some ammo types)

release 22:

-Fixed a minor bug in the muzzle velocity calculation (sometimes caused RPT errors)

-Refined and expanded the ammo config (added .303 British, Mk318 and Russian M43)

-Userconfig setting AB_VEHICLE_GUNNER_ENABLED is now true by default

release 21:

-Fixed newly introduced advanced ballistics for rounds fired from vehicles not working on multiplayer clients

-Fixed config setting AB_DISABLED_IN_FULL_AUTO_MODE not working correctly for burst- and custom fire modes

-The muzzle velocity shift array (AB_ammoTempMuzzleVelocityShifts) is now using SI units

release 20:

-Added a userconfig entry that allows you to enable the advanced ballistics for rounds fired from vehicles

-Fixed a bug regarding muzzle velocity variation due to ammo temperature

release 19:

-Refined the ammo class configs

-Fixed some minor flaws in the ammo class configs

release 18:

-Fixed server initialization not being excecuted

-Fixed bullet trajectories not being coincident on every client (when the scope turret adjustments were used)

release 17:

-Improved air density calculation (ICAO and ASM atmosphere models are now correctly implemented)

-Fixed AB_dragModel config entry not being read from the config file

-Temperature, Pressure and Humidity synchronization no longer requires the server to run the addon

release 16:

-Full 3d wind simulation (head-, tail- and crosswinds are now taken into account, vertical winds are also supported)

-Added G1/G7 drag model (allows you to specify a ballistic coefficient in the config)

-BCs can change with velocity (BC array in the ammo config)

-Muzzle velocity changes with barrel length (MV array in the ammo config)

release 15:

-Major performance optimizations (will be noticeable during full-auto fire)

-Fixed temperature and humidity not being synchronized properly in multiplayer

-Fixed a minor bug that caused too much wind deflection when the bullet is flying close above ground

release 14:

-Fixed muzzle velocities being read incorrectly from the configuration classes

-Fixed muzzle velocity changes due to muzzle accessories being read incorrectly from the configuration classes

-Fixed muzzle velocity shift due to ammo temperature changes not working at all

release 13:

-Added mirage effect (only visible when looking through high power scopes and using the parallax adjustment)

-Added parallax adjustment (default key combination: CTRL+UP, CTRL+DOWN)

-Added a userconfig setting that allows to disable the mirage effect and parallax adjustment

-The wind indicator and protractor are now toggled on/off with the corresponding key combinations (they no longer disappear after 10 seconds)

release 12:

-Add a bullet trace effect (only visible when looking through high power optics)

release 11:

-Fixed bullet trajectory not being altered at all when AB_REDUCED_PRECISION was set to false

-Added a humidity simulation, based on real world climate graphs

-Small performance improvement when multiple trajectories are calculated at the same time

release 10:

-Fixed incorrect calculation of muzzle velocity variation due to ammo temperature

-Fixed coriolis drift not working since version 0.9

-Fixed spin drift not working since version 0.9

-Added a userconfig entry that allows you to disable the advanced ballistics for bullets coming from other players

-Added a userconfig entry that allows you to reduce the calculation precision in order to avoid frame drops

-Minor performance optimizations

release 09:

-Added bullet caliber, bullet length, bullet mass, barrel twist direction and barrel twist rate config data to all vanilla small arms weapons and ammunition

-3rd party ammunition developers can now specify a transonic stability coefficient in the ammo config that defines how well the bullet performs during transonic flight (0 unstable - 1 stable)

-3rd party ammunition developers can now specify a ammo temperature muzzle velocity variatian array in the ammo config that defines how the muzzle velocity varies with ammo temperature

-The stability factor and thereby spin drift now depends on the ammo and weapon config as well as atmospheric conditions

-The wind indicator and protractor will now be visible as long as you hold down the respective key combination, or 10 seconds if you release them earlier

-Fixed a bug in temperature calculation that occurred on some 3rd party maps

Multiplayer related:

-The addon is now qualified for use on a server

-Added a userconfig setting that allows the server to override the client settings

-Temperature simulation is now properly synchronized across all clients if the server also runs the addon

release 08:

- Minor code change - required to fix an issue the ATragMX and Kestrel 4500 addons had, after using team switch in singleplayer

release 07:

- (Shift+K) wind reading is now also affected by the effect obstacles and terrain have on the wind

- Wind speed near the ground (< 20m) is now considerably slower in urban areas

- Temperature now varies with altitude

- Temperature and barometric pressure are now affected by weather changes

- Added a new config entry to the userconfig file, where you can disable the advanced ballistics during full auto fire

- Fixed advanced ballistics not being active after using team switch

release 06:

-New wind features: The wind speed now varies with the height above ground and obstacles like buildings or certain terrain features can mitigate the wind

-Added a protractor that visualizes the inclination angle of your rifle (default key combination: CTRL+SHIFT+K)

release 05:

-Several bugfixes

release 04:

-Improved performance

-(experimental) Everbody should now see the same bullet flight path in multiplayer

release 03:

-Mil turret system works with every high power scope (opticType=2)

-Improved visualizing of the current scope turret setting

-Every scope now has its own setting memory

-Shift+K wind estimation (similar to Arma 2 ACE)

release 02:

-Fixed latitude not corresponding with map

release 01:

-Initial release

--- Download ---

Zip Package: @AdvancedBallistics_v3.5.zip

news_download_a3_3.png

@advancedballistics.png

--- Requirements ---

* CBA - Community Base Addons

* (optional): Kestrel4500

* (optional): ATragMX

Edited by Ruthberg
Update to version 3.5
  • Like 2

Share this post


Link to post
Share on other sites

Will your ballistic be activated the whole time, or it will be like Von quest sniper system that only works when your prone?

Share this post


Link to post
Share on other sites

This looks like it could be very interesting when combined with my ballistics code. I don't think I have to tell you how daunting of a task this will be to implement in ArmA. 2 things that have a major impact on how ballistics work in a combat environment are Armor Systems and Material Densities, this is where my ballistics code hits a wall.

Currently in game when a solider wears armor it covers his whole body extremities included, to make things worse, personal armor give a FLAT bonus to energy dissipation, which means that it affect the bullets HIT value REGARDLESS of its penetration capabilities. This is something that NO ballistics code alone can fix, this is BIS at their finest to simplify combat. Now if the Bullet penetrability and densities of objects can be properly calculated and calibrated as well as fixing the personal armor code could be implemented then we could get into some real interesting results regarding combat ballistics.

Share this post


Link to post
Share on other sites

@Ckrauslo, the above example code runs every time you fire a bullet from a handheld weapon.

@Spartan0536, my current focus is on what is happening before the bullet hits a target.

All I want to achieve with this addon is a correct trajectory for given bullet, velocity, firearm and atmospheric parameters. If that works you can simply plug in real world data for those parameters and get reasonably accurate results.

Edited by Ruthberg

Share this post


Link to post
Share on other sites

Don't want to discurage you, but here are some things you should think about:

1. Wind ballistics have been done in at least three mods already and one of them has been out for a long time, since Arma3 Alpha.

2. The other stuff (at least some of it) you mention will be very hard or nearly impossible to implement.

3. Until DLC Marksman is released, we don't know what Bohemia will do. They may change some fundamental stuff that may break your mod or make parts of it obsolete.

Share this post


Link to post
Share on other sites

Thanks for your input on this subject.

You are right, some of the stuff (especially: different wind speeds at various locations and different heights) might not be possible to implement. But most of it is not very difficult to implement.

I know that many folks already tried to do wind ballistics in Arma, but non of if it worked in a way that you could say it's a) plausible and b) comes close to real world data.

Arma 3 Marksmen is planned for the first quarter of 2015 and I do not believe that it will contain any of the stuff mentioned above. Even though I would of course like to have it as part of the official product.

I am willing to invest some time into developing the needed features, to make long-range-shooting in Arma 3 more challenging and more fun. Like it was in Arma 2 ACE: http://forums.bistudio.com/showthread.php?180127-ATragMX-Handheld-ballistics-calculator-1-0-Stable-Release-Thread

Share this post


Link to post
Share on other sites

Very nice.

Adding to the soup:

Besides humidity (saturation) and temperature, air pressure changes with elevation and wind. The more wind the lower the fluid ´s (air) pressure (Bernoulli´s principle). And also gravity changes depending on where you are on the globe, being the Earth an ellipses instead of a perfect round sphere. On Arma 2 OA, BI uses the gravity factor of 9,0000 m/s2, so you might consider using coefGravity = 1.09; in order to fix it to 9,81 m/s2.

And the BC´s are not constant, as I´m sure you know, they change with speed, specially around the transonic ones and depending a lot on the form factors. The game engine does not simulate it, for it uses, in the configs, the parameter airFriction as being a constant, while in real life it´s not. On my experiments, due to this limitation the MAPE - Mean Average Percentage Error of ACE ammo and real life ones get around 5%.

Despite the level of detail you might be pursuing I quite appreciate your offer and make votes you be well succeed man!

Share this post


Link to post
Share on other sites

Thank you very much for your thoughts.

For now air pressure only changes with elevation. It is not yet related to any weather effects.

The base elevation and temperature profile changes with the map.

Gathering additional data for different ammo types is on the TODO list. This includes:

- Muzzle Velocity variation with temperature changes

- Stability Factor

- And maybe different BC's for different flight speeds

Are you sure that BI is using a gravity factor of 9,0 m/s2? I developed a tool called ATragMX for ArmA 2 OA ACE which uses a gravity factor of -9.80665 m/s2 and the calculated fireing solutions are very accurate.

Share this post


Link to post
Share on other sites

This is some fantastic stuff. Super cool. I may have to scape that part of mine and use yours. I wasn't planning on getting that detailed. Great job!

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

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

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

PS: I am not sure about the version.

Your first post states 01 but the readme states 03. Can you be so kind to tell us which version this is? :)

Share this post


Link to post
Share on other sites

Oh, wow! Did you really implement all those features listed on Armaholic already? In that case, nice job. Definitely going to check it out. :)

---------- Post added at 12:44 ---------- Previous post was at 12:14 ----------

I think I found a nasty bug. It's a gamebreaker becouse the projectile (in this case it's 6.5mm) does not travel further than about 20-30 meters.

Here's a screenshot with an error which must be related I guess:

http://i57.tinypic.com/5apb86.jpg (139 kB)

Share this post


Link to post
Share on other sites

Hello ! I tried your addon a few hours ago, great job. It's already up on our server.

One question : is AI affected by these new ballistics ?

Share this post


Link to post
Share on other sites

@Brisse, yeah everything listed on armaholic is already implemented.

@ElTyranos, I am glad that you like it so much. AI is not affected by this addon.

I will certainly continue to work on this. Suggestions for improvement are welcome.

Edit: @Brisse, thanks for testing. I'll try to reproduce this error.

Share this post


Link to post
Share on other sites

Hi Ruthberg, really nice work. However, do you plan on implementing sort of a weather mod with it as well? Arma's own wind likes to go completely nuts sometimes and is not synched.

Another thing. I can't get the turrets to work. Do you have any idea why? (tried LRPS on M200)

Share this post


Link to post
Share on other sites

Barometric pressure and temperature simulation are already implemented. A more sophisticated wind simulation is on the wish list.

SOS, DMS, Nightstalker and TWS scopes should work. Maybe a keybinding conflict?

Share this post


Link to post
Share on other sites

ah thx, works fine, haven't tried the sos yet. will you add the LRPS (the SOS is so ugly^^) and scopes from other mods as well? thinking about massis Zeiss, trixies Sniper Scopes and rksl's PMII. Should just be a classname thing, no?

Share this post


Link to post
Share on other sites

hi nice mod maybe can you see with the ADSG JR mod to make it compatible with all the scope ?

Share this post


Link to post
Share on other sites

At the moment there is a simple white list with all the class names of compatible scopes. But I will search for a better solution. A better graphical/audible feedback for clicking the turret is on the TODO list as well.

This mod is still in a very early stage. So thanks a lot for all the good quality feedback so far.

Edit: @M1n1d0u, great idea. I'll give it a try.

Edited by Ruthberg

Share this post


Link to post
Share on other sites

Good to see you have plans for the future.

I hope to quickly have AI supported as well has more scopes.

Keep it up !

Share this post


Link to post
Share on other sites

How do you want the AI to be affected by this addon? Do you want them to be less accurate in difficult weather situations?

Share this post


Link to post
Share on other sites

To be ass affected in every situation like everyone, like is kind of lame having a regular infantry "Rifleman, machine gunner, combat medic ...etc" being able to hit perfect shots at 500 meters or a bit more "Yes they can" usually regular infantry combat goes from 50 to 300 meters ...make the marksman and sniper more accurate at longer ranges than the other ones "If possible"

Share this post


Link to post
Share on other sites
To be ass affected in every situation like everyone, like is kind of lame having a regular infantry "Rifleman, machine gunner, combat medic ...etc" being able to hit perfect shots at 500 meters or a bit more "Yes they can" usually regular infantry combat goes from 50 to 300 meters ...make the marksman and sniper more accurate at longer ranges than the other ones "If possible"

ASR AI does exactly what you're looking for ;)

How do you want the AI to be affected by this addon? Do you want them to be less accurate in difficult weather situations?

Maybe just by making them "adjusting" their shots. Except for snipers units which are supposed to be trained to adjust their scopes. They could be like starting to fire slowly as if they were correcting their aim. Then being more deadly and shoot faster ?

Then, yes, they could adjust longer if weather is difficult, and be faster if there's no wind.

This is just some general idea. You're addon already make balistics deeper on players' side. And that was we were looking for.

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

×