Jump to content

Weapon Range Calculation.


HeyYou

Recommended Posts

I am real curious how this actually works. Apparently, barrel length is the key here, but, it is just a modifier, what, exactly, is it modifying?? I would love to see the actually equation for calculating a weapons max range..... But, that information seems to be beyond my ability to find.

Link to comment
Share on other sites

Effective range in RW is the distance one can accurately hit a target with the weapon/ammo combination. The weapon/ammo combination produce a ballistic arch and at some point, the arch starts heading for the ground. When the arch starts heading down, you have reached maximum effective range. The variables which affect this ballistic arch are many, from the type and weight of bullet to the type and volume of the powder to the type of primer to how the bullet is seated into the case to the length of the barrel to whether the weapon is an automatic/semi-automatic or not. RW shooters claim that the way the powder lays in the case when the round is chamber can affect the ballistic arch. All that is why real world shooters are picky about their weapons, and hand load their own ammo using closely guarded recipes.

 

The length of the barrel is only one variable. The barrel affects range by keeping the bullet in the lands and grooves longer, thereby imparting a stronger and more consistent ballistic spin to the projectile. That ballistic spin stabilizes the projectile in flight and keeps it in the air longer, like the spiral on an American football. The more time in the air, the longer the ballistic arch. The length of the barrel can possible improve the range of a bullet by as much as 20 percent, but that is about the top end.

 

Translating those variables into the game is a weapon/ammo makers nightmare. First, as in the real word, you have to work on the ammo. If you look closely at the vanilla game files, you will see that the .308 caliber round and the .50 caliber rounds (projectile records) have the same characteristics, which is total crap. So the first step in affecting weapon range is to fix the statistics of the ammo to ensure that the bullets are capable of reaching the ranges appropriate for the ammo, because after a bullet in game reaches the limit of it's projectile range, it simply drops off the planet. So to work, the range of the ammo needs to be greater than the range of the weapon.

 

Next, is the weapon itself. And here is where things get weird. Pistols have less range than rifles. Everyone know that, but why. The answer is simple if one contemplates the weapons use. A pistol is meant to be used with one hand. If you fire a weapon with too much power with our outstretched arm, you run the risk of breaking your wrist and smacking yourself in the face with the weapon on recoil. Or, you use two hands, which defeats the purpose of a pistol. So pistol ammo is generally loaded with smaller powder charges to protect your body. This is why even the most powerful handguns have an effective range of 20-50 meters. Past that point, throw rocks. (FYI, this is why the .38 caliber hunting rifle or .45 caliber military rifle are such jokes). So, how to code weapon range.

 

I start with the .44 caliber pistol, as it has RW counterparts and it can be used as a base for the range calculations. In RW, the maximum effective range of the average .44 caliber pistol is approximately 35 meters, with an effective range of 30 meters. So using that as a base, we can calculate the range values for other weapons. The Maximum effective range of a .308 Caliber weapon is about 800 meters, with an effective range of 700 meters. A 7.62x51 NATO round is about 750 Meters with an affective range of 660 meters. A 5.56x45 NATO round is about 650 meters with an effective range of 550 meters. A .50 caliber weapon is 1800 meters with an effective range of 1200 meters.

 

So, starting with the .44 caliber round, get the range of the base weapon. The value for the range becomes our base (personally, I reduce this number some, as the game makers exaggerate the range of their .44 weapons). That value is assumed to be about 30 meters . The formula then becomes the effective range of the weapon in question divided by 30 multiplied by the effective range value of the .44. So, for the .50 caliber, the variables become 1200 divided by 30 = 40. The effective range value for a .50 caliber weapon becomes 40 times the value of the range value for the .44. Simple, huh.

 

But, not so fast. The game cheats. There are game scaling affects which come into effect which can make the values calculated above somewhat ineffective. So, after you do the calculations, try the weapon in the game. Here are some excerpts from the notes left by Poorly Aged.

 

 


 

I used a basic .50 Caliber sniper rifle as a test base. My rule was, If I can see them, I should be able to shoot them with the .50. I used the ranges I figured were appropriate for the weapon based on the ranges of other weapons.

 

I used two places to test the weapon. The first was the derelict tank near Northhagan Beach. From there, I could see all the raiders on the boats on that side of Libertalia. I fiddled with the range on the weapon and the projectile until I could hit those raiders with one shot each.

 

Then I moved to Quincy and went up on the throughway (the one where Clinton hangs out), and went to the end by the quarry. My objective was the same, using those raiders as targets. It got to be fun, shooting them from so far away they never knew where I was and running around like ants trying to figure it out.

 

 

So, there is what I and others have done on the range of the weapons in Fallout 4.

Link to comment
Share on other sites

That's all well and good, but, not what I am looking for. I want to adjust some stats, to increase the range of a few weapons. I play at ugrids=7, and I can see folks a LOT further away than I can actually hit them. There are various stats in the CS, but, the "weapon min/max range" has zero effect on a weapons effective range. Change the barrel range modifier does indeed increase range, but, it's just a modifier, I and trying to find out what it is actually modifying. I think the min/max range values are used by NPCs to determine if they need to be closer to their target... that, and EVERY weapon has the exact same values. I tried changing them, but, it had zero effect on the Range stat displayed for the weapon.

Link to comment
Share on other sites

Actually, so far as I've come to understand it, a weapon form's min/max range does actually impact its effective range. The disconnect is the comparison between vanilla's numbers, the modifiers on OMODs, and the way falloff is calculated.

 

The understanding I've built is that, while inside a weapon's minimum range, shots fired will always do 100% damage before any other calculations. Once the shot distance passes the minimum range, it starts dropping off, until it hits its minimum damage at maximum range. At maximum range, the damage is scaled to the out-of-range damage multiplier. So, for example, 100 damage at max range on a 0.5 multiplier would be 50. My assumption has been that, in between min and max, the falloff formula compares the out-of-range multiplier to how far the shot has travelled in between the min and max bounds, but I couldn't say if it's a linear falloff, exponential, or what.

 

Vanilla's numbers are all very small in terms of the actual game units used. The default standard of 256/256 is absolutely worthless alone. Try using "getdistance" on points of reference to see what I mean. What makes weapons have actual range are the modifiers on OMODs. The reason why is that they're absolutely silly. A long barrel on a pipe gun uses a MUL+ADD operation on MaxRange to 16.0, which, to my understanding, means 16x the base value. Working off of the base value of 256, that comes out to 4,096, which is a lot more reasonable for ordinary in-game distances.

 

The reason why all weapons use the same 256/256 min/max range, as far as I could imagine, is that the developers just wanted to simplify everything and make weapon range primarily determined by the barrel OMOD or range offset mods. It's why you'll often see a lot of very similar numbers depending on a weapon's barrel length, even between very different weapons.

 

One thing I'd suggest is to just completely disregard the stats reported by the weapon cards in-game. A lot of them are weird mergers of many different stats calculated in not-always-intuitive ways, like range being a mix of min, max, and the out-of-range multiplier. The only reliable information you're ever going to get is to crack open the game files and see the guts for yourself.

 

As a disclaimer, this is all information I've only surmised, not anything I have hard data to back up. I've done a lot of in-game weapons tests, but they're muddied by my own biases and a lack of a consistent testing area. It's given me a reliable basis, but I can't say for certain that's the actual math involved. And, man, am I bad at math.

 

Take everything I've said with a grain of salt.

Link to comment
Share on other sites

Hhhhmmm...... Ok, guess I need to do some experimentation then. One of the weapons I had in my inventory when I made the change to max range, the displayed stat didn't change, however, another weapon I had in inventory, the stat DID change......

 

The problem I am trying to circumvent is, with a sniper rifle, and LONG barrel, there are some targets at longer range that I simply cannot hit. The target does not react to my shots at all. Doesn't even seem to notice it is being fired at. Standing on the roof of the corvega factory, firing at the molerats at the junkyard to the west?, one molerat near the fence was an easy, one-shot kill, another molerat, that was nearer the far fence, I simply could not hit. At all.

 

And weapon ranges in Fallout 4 are just stupid. :) With a weapon specifically designed for long-range shooting, if I can see it, I should be able to hit it, and at stock numbers, weapon range is woefully short.

Link to comment
Share on other sites

So I did all this work many years ago to shoot at 50,000 game units unfortunatley the associated article was lost during the nexodus cleanout (ofc like tears in the rain). Lets try again:

 

With standard 5 uGrids and ultra settings actors fade out at around 15K game units. Increasing that needs both UgridsToLoad AND fLODFadeOutMultActors).

 

Reaching the actors is a function of the ammo projectile, most default ammo disappears from the game at 10K game units no matter what weapon settings.

 

The damage done OnHit is a function of fMaxRange damage curve which can be adjusted on either the receiver or barrel OMOD. I have only logged three damage value steps; 100%, 50% and 0% after a crap tonne of datalogging shots from 0 to 10,000 game units over the years.

 

You can see all of that including the projectile edit, OMOD edit and data table outcomes in this 5 minute demo video:

 

 

I have never bothered to correlate the pipboy numbers with range/damage thresholds because they look like BS (see video at 4:20)

Link to comment
Share on other sites

So I did all this work many years ago to shoot at 50,000 game units unfortunatley the associated article was lost during the nexodus cleanout (ofc like tears in the rain). Lets try again:

 

With standard 5 uGrids and ultra settings actors fade out at around 15K game units. Increasing that needs both UgridsToLoad AND fLODFadeOutMultActors).

 

Reaching the actors is a function of the ammo projectile, most default ammo disappears from the game at 10K game units no matter what weapon settings.

 

The damage done OnHit is a function of fMaxRange damage curve which can be adjusted on either the receiver or barrel OMOD. I have only logged three damage value steps; 100%, 50% and 0% after a crap tonne of datalogging shots from 0 to 10,000 game units over the years.

 

You can see all of that including the projectile edit, OMOD edit and data table outcomes in this 5 minute demo video:

 

 

I have never bothered to correlate the pipboy numbers with range/damage thresholds because they look like BS (see video at 4:20)

 

Thank you for reinforcing what I said earlier.

 

 

 

 

< trim >

 

So the first step in affecting weapon range is to fix the statistics of the ammo to ensure that the bullets are capable of reaching the ranges appropriate for the ammo, because after a bullet in game reaches the limit of it's projectile range, it simply drops off the planet. So to work, the range of the ammo needs to be greater than the range of the weapon.

 

< prune >

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...