Jump to content
Sign in to follow this  
galzohar

Wind Ballistics

Recommended Posts

Galz Wind Ballistics

This simple mod adds wind ballistic simulation to the game. Every bullet fired by any unit as well as any vehicle will get its velocity adjusted every frame based on the current direction of the wind current velocity direction of the bullet.

Feautres

- Estimated ballistic coefficient for each weapon, which should provide a reasonable effect for all weapon types.

- Works for any projectile fired (including mortars!).

- Uses game wind directly, so visual effects will match the ballistic effects.

- Runs on every frame and simulates based on time passed since last frame, which should result in relatively consistent results regardless of mission performance.

- Uses CBA for automatic initialization in any mission and compatibility with other mods.

Limitations

- Wind ballistic coefficients are a pretty rough estimation, though rifle rounds shouldn't be far off of what their real life values should have been (considering they are imaginary, after all). Feel free to suggest different coefficients if you have any RL data combined with in-game testing to base it on. Realize that multiplying a coefficient by X multiplies the offset by X, so if you know that IRL weapon Y has offset Z at range R, you just test for the actual in-game offset under the same conditions and suggest to multiply the coefficient by whatever is needed to get the realistic value. If you have any real life data, help would be appreciated improving the coefficients.

- Script runs for every bullet fired every frame and must finish running before the next frame can start, and was not tested with an extreme number of bullets being fired simultaneously. If you have any performance issues, please report them, and I'll try see if it's worth it to skip wind simulation for some bullet types or for non-local units.

- Grenades cannot be affected by wind due to bug #16371: http://feedback.arma3.com/view.php?id=16371

- No easy way to force clients to use this mod on a dedicated server, however it is still possible. Best way is to have the mission script to check for isClass(configFile >> "CfgPatches" >> "Galz_WindBallistics"); and remove weapons in a loop or find other creative ways to deal with them. You could also try to place the mod in the requiredAddons in your mission.sqm. Notice that those methods are untested! Please report if you have success with them. Don't forget to add the addon key to the server keys folder and use verifySignatures=2; in your server config file. Players not using the mod will have an advantage if it isn't forced.

- More realistic simulation of wind effects on rockets is still not implemented. If you can provide any real life data it would be much appreciated.

- Wind is not synchronized across clients by default. Use fixed wind settings in the editor, use scripts that make sure wind is synchronized, or deal with the fact each client sees something else.

- OnEachFrame is still not on every actual physics simulation frame (suggest you read more on physics simulation in games), which might make it not perfect in that aspect. But it's still much better than using the script scheduler (aka loop with sleep) and is probably the best that can be done with a mod/script.

- Projectiles added via mods must define the appropriate config value or inherit from a class that has a coefficient that suits the mod's projectile. So if you add a new 5.56 bullet that inherits from the default 5.56 you will get a reasonable coefficient, but if you add a 15mm bullet that inherits from the 12.7mm one the coefficient will not be so good if the mod does not define one itself.

- AI has no clue there is wind. Upon request, I may disable this for AI or add a variable that allows disabling it for AI.

How can I help?

If you wish to help improve this mod to match RL ballistics better, follow these steps:

1. Find RL data of wind offsets for a caliber that exists in-game.

2. Script or configure a weapon to fire that caliber at a velocity equal to that of the weapon the data from #1 is made for.

3. Set the wind in the editor to a fixed value (no gusts) in a direction perpendicular to your shooting direction.

4. Fire at the target and measure the offset.

5. Provide how "off" the offset was compared to what it should be IRL, as in "in-game offset is 70% smaller than the RL offset" or "in-game offset is 1.5 times bigger than the RL offset".

Repeat until all calibers have proper values. Or just do 1 and hope more people contribute values for the others.

Big Thanks

- Kju, for helping me make the configs and CBA work correctly as well as making some tweaks to the scripts.

- L etranger, for his VTS wind mod which this mod is based on. While almost all code was rewritten, the basic idea remains. Big thanks for allowing me to use his mod as a base and re-distribute it.

Required addons:

@CBA_A3: http://www.armaholic.com/page.php?id=18767

Download

V0.02 (mediafire)

http://www.mediafire.com/download/6y5h2oyln20a6x4/galz_wind_ballistics.zip

Enjoy!

Edited by galzohar

Share this post


Link to post
Share on other sites

This is cool. Makes sniping but more challenging. Will give it a try.

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!

Share this post


Link to post
Share on other sites
This is cool. Makes sniping but more challenging. Will give it a try.

Not just sniping - Mortars and artillery too :)

Of course, more true-to-life coefficients will be appreciated.

Share this post


Link to post
Share on other sites

As a quick word of advice, if you lookup/Google shooters' ballistics charts chances are you'll find what you're looking for in terms of real life data for different calibers.

Share this post


Link to post
Share on other sites

The problem is other than 12.7x99mm and 5.56x45, none of the rifle calibers exist in in real life. And even for those, the muzzle velocity of the in-game weapon will not match.

Bottom line is it is a lot of work to create the real coefficient (you would first have to change a weapon config for the same velocity which was used to create the RL table or use a script to correctly modify the velocity as soon as the bullet is fired). Even then, all "made up" ammo will have to use approximated coefficients based on a simple physical/geometrical formula, basing it on the most similar ammunition type that has been tested and compared to real life.

While I will try to slowly work on adjusting coefficients when I have the time to do it, it will be much faster if more people contribute some time to test and compare to RL values so that we can improve the realism level of this mod.

In any case, at least it should be much more true-to-life than VTS wind mod, as while the values aren't accurate, they at least make sense in terms of consistency and basic physics, and of course the simulation itself (how the coefficient is applied in real time) should be greatly improved as well.

Share this post


Link to post
Share on other sites

@galz

The "vanilla-ingame" projectile speeds are roughly scaled down to a ~70% compared to RL stats?

Share this post


Link to post
Share on other sites

Not as far as I can tell. In fact, the 7.62X45mm fired out of an EBR actually flies ~5% faster than a 7.62X51mm NATO fired out of an M24. Of course, I haven't tested terminal speed (slow down due to air resistance), only muzzle velocity, so if air resistance is calculated wrong in-game then my wind coefficients will not be true-to-life either (and actually cannot be if that is the case).

Basically it's all config values made up for the made up ammo in the futuristic ArmA world, but at least the ones I've looked at didn't seem to be extremely unrealistic.

With slight modifications to the scripts you can add messages that will show you any information you want in the chat. I didn't want to have a variable to enable them to save on performance in run-time.

Share this post


Link to post
Share on other sites
The problem is other than 12.7x99mm and 5.56x45, none of the rifle calibers exist in in real life. And even for those, the muzzle velocity of the in-game weapon will not match.

Bottom line is it is a lot of work to create the real coefficient (you would first have to change a weapon config for the same velocity which was used to create the RL table or use a script to correctly modify the velocity as soon as the bullet is fired). Even then, all "made up" ammo will have to use approximated coefficients based on a simple physical/geometrical formula, basing it on the most similar ammunition type that has been tested and compared to real life.

While I will try to slowly work on adjusting coefficients when I have the time to do it, it will be much faster if more people contribute some time to test and compare to RL values so that we can improve the realism level of this mod.

In any case, at least it should be much more true-to-life than VTS wind mod, as while the values aren't accurate, they at least make sense in terms of consistency and basic physics, and of course the simulation itself (how the coefficient is applied in real time) should be greatly improved as well.

Have you looked up these rounds? They exist in real life. If you think the configs could be more realistic, then make a ticket with information from a credible source to backup this claim and BI will fix it. They have done so many times in the past.

Share this post


Link to post
Share on other sites

Unfortunately, if something "exists" in real life but is extremely rare, then getting proper data for it with any reliability is practically impossible.

For example see this for 7.62x45: http://forums.gunboards.com/showthread.php?271831-7-62-x45-ammo

Very hard to find and very corrosive with a lot of duds!

So good luck getting any reliable wind info on it.

Also, finding the info is not the only problem. Figuring out from that info what the coefficient should be is a lot of work, and not something I have the time to do right now, especially not for every single round of ammo in the game. If anyone wishes to help, all you need to do is provide the factor by which I need to multiply the current coefficient after you have experimented with the mod and compared it to RL data. You will need to make sure though that you compare to RL data of the same bullet fired at the same velocity (most likely by modifying the in-game velocity to match before you run your tests). In the end all I need is "Bullet X under certain conditions was offset by Y, while it should have been offset by Z" and I can fix the coefficient value easily. But without collaborated effort to get those values tweaked, it will take me a very long time to find the time to do it across the board. In any case, it should still work much better than the original mod by L etranger as I've at least tried to add some config values that do make sense and are relatively consistent with physics and geometry.

I can't say the config values are flat out "wrong", as I don't know what they are actually used for and what scale they use. For example, the "caliber" property and the actual "caliber" are rarely correlated and definitely not on the same scale, but god knows what this actually means as I don't know what the "caliber" property is actually used for in-game.

For wind itself, none of the currently existing config values are of any use for getting anywhere near realistic results, which as far as I understand is why L etranger discontinued his wind mod.

Share this post


Link to post
Share on other sites

:confused:

The M14 EBR uses 7.62x45mm? I haven't played ARMA3 in more than a month so I might be wrong, but AFAIK the gun uses NATO 7.62x51mm and according to the weapon config it also uses 762x51.

All of the rounds and calibers exists in real life. Bullet velocity in game is very close to real world counterparts and compared to my data I could gather the velocity is often slightly higher. The bullet caliber value relates to its penetration potential, a higher caliber value means that the bullet will lose less velocity when penetrating an object, resulting in higher penetration. In game weapon configs only have one major problem in my opinion and it is that barrel length does not matter in game, a short MXC shoots just as good as a DMR MXM.

The offset will never be 100% true to real life without some form of arma cheating. To get it close you have to take humidity and altitude into account, and I'm guessing that you already apply the coriolis effect. Available ballistics charts work well in game. For lesser used ammunition getting the coefficient value means getting your calculator out. You can get a good rough number from the bullet's size, weight and angles. This data is easily available and when it's not you can extrapolate the values from a photo or drawing. I can send you a PDF with all of the formulas if you want them.

Share this post


Link to post
Share on other sites

Like I said - Better calibration would take time. Any help would be much appreciated. Coming here and saying how easy it is will not help. I know exactly what needs to be done and what can be done, and I'm not denying there is a lot more work to make it better. If you want to make it better, your time is much better spent comparing in-game results to RL data and providing info about which values need to be tweaked. Otherwise you'll have to wait a very long time until I can do it myself, slowly, step by step.

Again, it's not just about finding the charts, it's also about doing in-game testing to measure the exact difference between the chart and the in-game results to get the correct tweak required for the coefficient. If you want to post charts here for other people to test you're more than welcome to. Personally, I don't know when I'll have the time to do it - Again, I'll try doing it slowly step by step, but it will be much faster if more people contribute.

If you want proper realism you will have to tweak the muzzle velocity of the in-game weapon to the RL velocity of the weapon from which you grabbed the data, or else it is pretty useless.

Currently I have only tweaked 7.62x51 at 790ms to match wind offsets of M24, and all other calibers were assumed to have a matching coefficient based on the caliber difference. So, for example, the in-game EBR which fires a 7.62 caliber at a higher velocity will have smaller offsets than the M24 as it uses the same coefficient but spends less time in flight and thus has less time for the wind to affect it. Anything more accurate is pointless unless it is done with RL ballistic tables of real weapons using the same ammo. Bottom line is this mod is for you guys, and if you want to help make it better you are more than welcome to. If not - Enjoy it as is or wait patiently for me to make improvements and tweaks.

Share this post


Link to post
Share on other sites

I'm just saying certain parts aren't as difficult as you believe them to be, a lot of the information you want is out there. The mathematics behind ballistics works well, even in a game. I've developed ballistic scripts among other scripts and configs for weapons so if you require assistance or want to collaborate just send me a PM. :)

Share this post


Link to post
Share on other sites

Like I said, the best help would be executing the following steps:

1. Find RL data of wind offsets for a caliber that exists in-game.

2. Script or configure a weapon to fire that caliber at a velocity equal to that of the weapon the data from #1 is made for.

3. Set the wind in the editor to a fixed value (no gusts) in a direction perpendicular to your shooting direction.

4. Fire at the target and measure the offset.

5. Provide how "off" the offset was compared to what it should be IRL, as in "in-game offset is 70% smaller than the RL offset" or "in-game offset is 1.5 times bigger than the RL offset".

With this kind of information I can then modify the coefficient for said ammo type to fix it. With enough people testing enough different ammo types, we might get some more realistic configuration here. But doing it all by myself will take a very long time, especially since I don't have that much free time for this mod to begin with.

Share this post


Link to post
Share on other sites

With my mod all clients need it. This change was needed to make other things work better and more realistically, as well as reduce network traffic. These improvements were not possible to achieve with a server-side mod.

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
Sign in to follow this  

×