Jump to content
Sign in to follow this  
-Gews-

Issue with weapon attachment modifiers

Recommended Posts

Let's say we have three variants of a rifle that we want to put into DayZ. They are identical, except for the sights. 

 

The first rifle has precise target sights.
0k8lfA2.png



The second rifle has open, somewhat coarser hunting sights.
9GoOZfU.png



The third rifle only has a front sight, and is missing a rear sight.
pW4cIRi.png

 

 

 

Theoretically, all the rifles would have the same precision if they were fixed in some kind of machine rest....

OFTXfjA.png

...but they aren't. With these sights, rifle 1 will give the best groups, and rifle 3 will give the worst. 

 

In DayZ it doesn't matter if you have no rear sight, or a shorter sight radius... your eye is always in the same place, and that means all you need is the front sight.

We want players to be less accurate if their gun has crappy sights, and more accurate if it has precision sights, so we have to set dispersion values which account for this. Here are some completely arbitrary values for each gun:

n8uvVKu.png

 

 

Everything is okay so far.

Now for the problem described in the title: let's give all three rifles a telescopic sight.

 

PAMBm7P.png

 

Equipped with the scope, the iron sights are no longer an issue, and all three rifles should give the same accuracy. But that won't be the case, because the scope has only one 'dispersion modifier'.
 

Let's say this scope's dispersionModifier is based on rifle 1 with target sights, and is -0.00005. This brings the final dispersions to:

Rifle 1 = 0.0003-0.00005 = 0.00025
Rifle 2 = 0.0006-0.00005 = 0.00055
Rifle 3 = 0.0015-0.00005 = 0.00145

 

We want those final dispersions to be the same, but they're not even close.

 

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

 

You can see a related problem with in-game weapons. Let's compare the Sporter 22, the CR527 Carbine, and the Winchester Model 70.

ToK0ODi.png

Base dispersions:

Sporter = 0.00250
Carbine = 0.00125
Model 70 = 0.00100


Dispersions with scope (dispersionModifier -0.00025):

Sporter = 0.00225
Carbine = 0.00125
Model 70 = 0.00075


The same scope decreased the above weapons' dispersion areas by:

Sporter = 19%
Carbine = 31%
Model 70 = 44%

 

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

Solution:

Set weapon attachments' dispersionModifiers (and perhaps other modifiers as well) based on the specific weapon they are attached to.

So the dispersionModifier for an attachment would be in the weapon's configuration, not in the attachments' configuration.

 

 

 

 

 

 

Edited by -Gews-
  • Like 6

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  

×