Jump to content
krzychuzokecia

Ballistics and terminal ballistics in OFP

Recommended Posts

I've searched the forums, but I don't have satisfactory answer...

Short version: how are ballistics and terminal ballistics calculated in OFP? What does the "hit" value and "(min/mid/max)Range" (CfgAmmo), and initSpeed, maxSpeed (CfgWeapons), and are there any links between them?

Long version: I'm making config for Silent War mod weapons pack, and I've looked into JAM3 values. What hit me was that JAM's 9x19 NATO, and 9x18 Makarov have the same hit value: 6.5 (JAM_Pistol_Bullet). That's kind of surprising because terminal ballistics of Makarov cartridge are more similiar to the .380 ACP, not 9mm Luger. Then, in CfgWeapons section, initSpeed for 9mm is set to 457, while Makarov value is 323. I learned that initSpeed in OFP affects only bullet trajectory. But what with "Range" values set for bullet? Again JAM's Luger and Mak use the same JAM_Pistol_Bullet class. And in real life ballistics of both cartridges are more-less identical (difference is only when it comes to terminal ballistics). So, that makes me think that initSpeed value can also have effect on the damage the bullet makes... Or maybe JAM guys were only wrong?

I've got basic data for both cartridges (projectile weight, speed at muzzle, energy at muzzle, effective range etc.) - how I can "compute" them into "OFP-friendly" values?

Also: how is rate of fire calculated? What I can see in game config looks nowhere near the real data.

Thanks in advance!

  • Like 1

Share this post


Link to post
Share on other sites

For the cfgammo, i take the BIS M16 example

The BIS M16 use single and burst shots, in the class M16:Riffle you can see

		class Single
		{
		ammo="BulletSingleW";
and

	class Burst
		{
		ammo="BulletBurstW";

So in the CfgAmmo, the single shot mode use class BulletSingleW and the burst mode use class BulletBurstW

Looking at the CfgAmmo section of the config, class BulletSingleW:BulletSingle inherit from class BulletSingle:Default and class BulletBurstW:BulletBurst from class BulletBurst:BulletSingle

So let's see now

	class BulletSingle:Default
	{
	hit=9;
	indirectHit=2;
	indirectHitRange=0.1;
[..]
	minRange=10;
	minRangeProbab=0.1;
	midRange=50;
	midRangeProbab=0.38;
	maxRange=200;
	maxRangeProbab=0.04;

	class BulletBurst:BulletSingle
	{
	minRange=0.5;
	minRangeProbab=0.25;
	midRange=70;
	midRangeProbab=0.5;
	maxRange=250;
	maxRangeProbab=0.08;

The burst does not have a hit= , so it inherit from the hit= value of bulletsingle

hit=9;

indirectHit=2;

indirectHitRange=0.1;

means that a direct hit does 9 damage , indirect hit and indirecthitrange means that in a radius of 0.1 (i assume it's in meter) , there will be 2 damage.

The damage are then used against the armor and localised armor value of the target.

For the relation between the damage and the vehicle, refer to that archived cavs page, in the bottom there's a lot of usefull explanation about the armor and damage parameters

http://web.archive.org/web/20060619160840/http://203.96.151.15/ofpnz/ofsi_cavs.htm

They're for vehicles, but it can be applied to human targets, that have their own armor / armorstructural / localised armor.

But even with those explanations, when testing you'll still observe odd results, i really wonder if it's because OFP collision system is not that good that sometime the damage is not given to the correct location or if there's something else in play.

Anyways, it needs lot of testing, i spent insane amount of time to get the WW4 damage vs armor to be the ones i wanted to reflect the difference in equipment between corps.

Now for the

minRange=

minRangeProbab=

midRange=

midRangeProbab=

maxRange=

maxRangeProbab=

These are value used for the AI only, they're in meter , and the probab value is to tell the AI how much he should use a specific mode at a specific range (notice that the max range define the maximum range the AI will shoot, it will never shoot at more than that range, in theory and if you're lucky it will try to move closer, but in practice it's more likely that it will stay prone in the middle of nowhere)

So you have to balance those value and their probabilities to tell the AI that you want it to give priority to burst at some range, and do priority to single at other range, lots of testing to do in order to get those value rights when ingame.

Edited by Sanctuary
  • Thanks 1

Share this post


Link to post
Share on other sites
direct hit does 9 damage , indirect hit and indirecthitrange means that in a radius of 0.1 (i assume it's in meter) , there will be 2 damage.

The damage are then used against the armor and localised armor value of the target.

OK, I get that part, but my question is: why it's set to 9 for 5.56 bullet? Is it only "because it was working with armor values of other units", or is there something more into it (some kind of calculation made from public ballistic data)? I bet that only BIS guys would know, but it's not the first thread about it since OFP release...

Now for the

minRange=

minRangeProbab=

midRange=

midRangeProbab=

maxRange=

maxRangeProbab=

These are value used for the AI only, they're in meter , and the probab value is to tell the AI how much he should use a specific mode at a specific range

OK, but then how is flightpath of the bullet set (I thought that AI behavior is affected only by aiRateOfFire[Distance])? I read that it is adjusted by initSpeed value, which is kind of artificial value, and I have no idea how it really works. But then again, when I'm back to my 9mm Luger and Makarov example, JAM settings are identical hit for both (while IRL Makarov is weaker bullet), but Mak's got smaller initSpeed - that'd suggest that Makarov flightpath is... shorter, less flat?

Or maybe initSpeed simulates not trajectory but... initial speed/muzzle speed, which is naturally smaller for Makarov, and have effect on "smaller power" of this cartridge in-game (despite hit value equal to 9mm Para)? But if it's so, again we don't have control on the trajectory...

Oh, I almost forgot: big thanks for working CAVS link! It'll be really helpful!

Share this post


Link to post
Share on other sites

initspeed works on the bullet gravitational drop effect, it's calculated in m/s directly from the real values (you can even use wikipedia values for that), I think OFP didn't use the initspeed for the punching effect, but rather the hit value for those things.

Hit value is the direct hit damage that the unit will receive, it's 9 for 5.56mm because 9 is near the body value of hitpoints of a normal soldier (so it will die from a direct shot in the upper body). It can't be too much because it could do too much damage to APC's like the BRDM or airplanes that have low armor value. (but you can see that the BMG values are in the 12's because of the punching damage that it can do)

The indirect damage I think it was calculated by how much indirect damage can do a bullet if it hits near a soldier. A interesting thing about indirect damage is that at 0 meters it will do the same indirect damage that it's settled in the config, but it will decrease as the bullet goes less near from the target, so if you set indirecthitrange at 100 meters, at 100 meters from the hit you will receive 0 damage, and at 50 meters you will receive 1/2 of the damage, etc.

  • Thanks 1

Share this post


Link to post
Share on other sites

The indirect damage I think it was calculated by how much indirect damage can do a bullet if it hits near a soldier. A interesting thing about indirect damage is that at 0 meters it will do the same indirect damage that it's settled in the config, but it will decrease as the bullet goes less near from the target, so if you set indirecthitrange at 100 meters, at 100 meters from the hit you will receive 0 damage, and at 50 meters you will receive 1/2 of the damage, etc.

Yes, that's how the grenades (and anything exploding) works too in OFP

hit=20;

indirectHit=18;

indirectHitRange=7;

a grenade deals damage at 7 meters around the explosion, but fortunately the more far away you are from the point of impact, the less damage you'll recieve.

  • Like 1

Share this post


Link to post
Share on other sites
initspeed works on the bullet gravitational drop effect, it's calculated in m/s directly from the real values (you can even use wikipedia values for that)

That was one of my early assumptions, so it looks now that JAM's Makarov round is just overpowered, with it's hit value equal to NATO cartridge! (or maybe it's just for balancing purposes, still not realistic)

But, then how the trajectory looks? Some rounds, soviet 7.62x39 M43 for example, have very curved flightpath, making them useless in marksman applications, while others not (with similar bullet speed). Does it mean that OFP doesn't take that into account, or is there some other value that affects that (airFriction?)?

Anyway, thanks for help guys, but if someone would add something more, I'd be grateful (maybe it's about time to look through JAM3 and fix unrealistic values).

Now, have anybody idea how rate of fire is calculated?

Edit: Another thing I found, which puzzles me: in some addons initSpeed is defined not only in CfgWeapons/magazine class, but also in CfgAmmo/bullet class. Anybody have idea why, and which value is taken into account when I have two different initSpeeds in bullet, and magazine, which uses the bullet above?

Edited by krzychuzokecia

Share this post


Link to post
Share on other sites

You need to be careful when fiddling with damage values for weapons, if you start changing damage values you may need to tweak armor values as well and end up in a vicious circle of tweaking each ammo type and armor value.

You will find "indirectHit" actually has a massive effect on the damage of a round even when a direct hit is scored, for example if a soldier is hit in the arm, the direct hit damage is applied against their armorHand, but I found indirect damage is actually dealt to their other body parts depending upon the relative distance of the hit to other body parts and the round's indirectHitRange, so you can actually cause fatal damage to the head from a hit to the arm or leg, depending upon the weapon's indirectHit capability.

So you can broadly separate mods into two categories; balanced and realistic.

The BIS weapons are what I would call "balanced" where by the weapons available to each side, west, east and resistance are exactly the same with the exception of their appearance. E.g. a BIS AK-74 does the same damage as a BIS M-16. While not as important for single player missions (they can be rebalanced by mission design), in multiplayer this kind of "balance" is absolutely critical.

"Realistic" would be a mod that tries to replicate the real world characteristics of a gun as closely as possible. JAM would be a reasonably good example, where all the muzzle velocities and accuracies are based on real world data and terminal effects are also estimated. But you will find a lot of examples in JAM where apparently balance had to be applied to achieve good gameplay.

You will find mods that try to be both realistic and balanced have to be VERY careful with their weapon selections to achieve fairness in multiplayer. WW4 is a good example of this, as is, (if I do say so myself) MWC. In MWC I was very careful to offer realistism in terms of muzzle velocities and accuracy. But being a multiplayer mod, balance has to come in somewhere. Namely the damage done by weapons is proportional to their real life muzzle energy, while still being "arcade like" for fun gameplay.

MWC uses a baseline damage for 5.56mm NATO of hit=9; indirectHit=2; indirectHitRange=0.1. With a range from hit=6; indirectHit=1; indirectHitRange=0.05 for 9mm Parabellum from a suppressed pistol, up to hit=20; indirectHit=2;indirectHitRange=0.1; for .50 BMG fired from an M82. This is then applied to over the top arcade infantry armor of armor=6; armorStructural=2; armorHead=2; armorBody=2; armorHands=0.5;armorLegs=0.5. Or armor=50; armorStructural=6; armorHead=2; armorBody=12; armorHands=12;armorLegs=12; for a player in a Juggernaut suit!

  • Like 1

Share this post


Link to post
Share on other sites
So you can broadly separate mods into two categories; balanced and realistic.

The BIS weapons are what I would call "balanced" where by the weapons available to each side, west, east and resistance are exactly the same with the exception of their appearance. E.g. a BIS AK-74 does the same damage as a BIS M-16. While not as important for single player missions (they can be rebalanced by mission design), in multiplayer this kind of "balance" is absolutely critical.

"Realistic" would be a mod that tries to replicate the real world characteristics of a gun as closely as possible. JAM would be a reasonably good example, where all the muzzle velocities and accuracies are based on real world data and terminal effects are also estimated. But you will find a lot of examples in JAM where apparently balance had to be applied to achieve good gameplay.

Well, the best example would be my case of JAM pistol cartridges, where NATO 9mm, and Soviet 9mm have the same hit value.

What I'm trying to achieve with Silent War is not to reinvent the wheel, but rather make "a realistic JAM", where I use JAM values as a basis, but don't really care about balancing weapons from both sides of the front. I leave that to original JAM (which authors made fantastic and huge work!), or MP-oriented mods like WW4 or Your MWC (which I also like BTW). See, I've already made something like... 3 different magazines for AK-74: original 5N7, subsonic 7U1, and modern armor piercing 7N10. And I want to see the difference between them in-game!

Thing that annoys me the most is lack of any flightpath control - I can set hit, and initSpeed, but no how bullet flies. See JAM 7.62x39 - it's more powerful than 5mm rounds, have smaller initSpeed (so it's fly is shorter I believe), but when You'll check ranges - they're the same like M16 or AK-74 rounds. In real life, it's trajectory is more curved, which disqualifies it as a marksman bullet - that's why Soviets had to make 5.56 equivalent. In OFP, I can set the ranges lower, but this affects only AI, not the actual abilities of the round. Lowering the initSpeed may bring some problems, which I want to avoid...

MWC uses a baseline damage for 5.56mm NATO of hit=9; indirectHit=2; indirectHitRange=0.1.

Probably like 99% of the mods - that's the values of BIS M16, and I think we all treat it like "benchmark", to avoid the problem You've described in the first line:

You need to be careful when fiddling with damage values for weapons, if you start changing damage values you may need to tweak armor values as well and end up in a vicious circle of tweaking each ammo type and armor value.

Thanks for Your input!

Share this post


Link to post
Share on other sites
Thing that annoys me the most is lack of any flightpath control - I can set hit, and initSpeed, but no how bullet flies. See JAM 7.62x39 - it's more powerful than 5mm rounds, have smaller initSpeed (so it's fly is shorter I believe), but when You'll check ranges - they're the same like M16 or AK-74 rounds. In real life, it's trajectory is more curved, which disqualifies it as a marksman bullet - that's why Soviets had to make 5.56 equivalent. In OFP, I can set the ranges lower, but this affects only AI, not the actual abilities of the round. Lowering the initSpeed may bring some problems, which I want to avoid...

Ahhhh! I think you forgot something very important when it comes to ballistics and the user's perception of bullet drop in OFP; the zeroing of a weapon's optics (distanceZoomMin/distanceZoomMax). You will find that nearly all weapons are zeroed to 300m, this means that the perceived bullet drop of lower velocity rifle rounds is considerably reduced (because the zeroing is compensating for it). In MWC I was careful to ensure that scopes "marketed" as close combat optics were zeroed at 200m, while "tactical" were zeroed to 300m and "sniper" scopes to 400m. The ART scope actually the only one that allows a variable zero, making it one of the most popular scopes in MWC despite its inferior zoom compared to the "ballistic scope". The reason the ART is the only one that can have a variable zero is that the engine links the zero directly to the zoom level (opticsZoomMin/Max), so as far as I know you can't vary zero/bullet drop compensation independently of zoom in OFP because it was specifically designed for the ART mechanics.

I suggest you experiment with some different optics and zeroes on your weapons to get a good feel for the engine ballistics (which do work). I think you'll find that at long ranges there is a clear difference between weapons even when using real life muzzle velocity values. Regarding damage, as I said I used real life muzzle energy figures as a base line then applied some modifiers for rounds that had a "reputation" for better/worse terminal effects (due to all manner of real and imagined phenomena often quoted by gun nuts). For example I made sure 5.56mm carbines do much less damage than a 5.56mm round from a full length barrel since the round is supposedly unlikely to fragment when fired from 14-inch barrels, thus greatly reducing terminal effectiveness. Again playing into the hands of a gun/calibre's "reputation" not only gives you some bollocks to throw at gun nuts (and there are a lot playing this genre) as "realism" it also actually "feels right" in normal gameplay (you are reinforcing the player's preconceptions of a particular weapon).

Share this post


Link to post
Share on other sites

Such a nice topic, just found it...

Okay, some of us already knows how to change projectile's trajectory with config values. I even have some demoes: with that option there is an ability to add some realistic artillery, not just those rifles. 

First of all, i want to ask of those MWC mod to look into a config. My goal is to create a new level of gameplay by using these new-old config values. I have a dream: to create a MP-mod with all this things on. 

With pure config and modelling we can achieve some realistic values ingame:

-bullet drop, trajectory

-init speed

-adjustable scopes/ironsights

-bullet drop compensators

-working proper optics (ART, Hyperion)

-optical ranfefinders

-optics magnification

-realistiv optics FOV

-darker lenses for an old optics

-NV scopes (bright green texture shines)

-proper roles of various weapons at the battlefield

-dexterity for carbines/heavy ones

-.....

Again: these values are in config/models so i wonder that those values are still default in most mods.

I am already have a mass of a weapons models, prepared, with proper LODs, but i can't handle muzzle flash/chambering/blowback modelling. I have most hit values precalculated and tested ingame already. I have a precalculated values for a heavy weapons hit and armored veh's armour/parts values (need to be tweaked - first attempt was failed, so i need to recalculate with some ×2 coefficient). Inflantry armour values are default, some BIS values are comes in hand, so they are same as mine in some cases. I am asking for help to make it live, i am bad at scripting, can model some primitives on O2, config is my stuff. Oh, i can draw some scopes, hehe.

 

 

  • Like 2

Share this post


Link to post
Share on other sites

Once i was found a book "russian ammunition blah-blah" with ofp terminal ballistics in my mind... There was some formulaes to calculate dammage for jet planes by different types of ammo (kinetic, explosive, incendiary). So in time there comes a whole new values of hit/indirect hit for everything (in mine addons stockpile) up to larger calibers: inflantry armour was default and a new system fits well and proves itself with time, but with larger shells then i have to change armoured's vehicles armour values. And again: brief testing shows that it needs to be changed in some ways, but it is potent too. 

By default heavy weapon's and armour values are nice with it's simplicity, but i wanted to reflect a bit more realistic behaviour. As for a hand-held: Fal/G3 hits for 5, FIVE - just like a beretta does = nonsence.

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

×