Talk:Gun Spread Formula


Revision as of 21:31, 24 December 2008 by Quetzilla (Talk | contribs) (Clearer Formatting)

Clearer Formatting

I think we can make this page a bit clearer if we simplify the formula by merging the Base/Mult pairs in the variables section. So we'd do something like:

Skill Factor (SF) = fGunSpreadSkillBase + (fGunSpreadSkillMult * RelatedSkillValue)

And then in the formula you could just plug in SF instead of (SB + (S * SM)), which will reduce the length of the formula by ~half, as well as making it easier to understand visually.

Another guideline we could use is UESP: UESP Damage Formula

I have to go out for a bit but when I come back I'll make a mockup on my user page so we can decide which works better

--Quetzilla 21:43, 21 December 2008 (UTC)

I agree the formula is a bit unwieldy. I didn't put it in a <code> tag because that style of formatting messes up when it spans multiple lines. It makes sense to separate it into logical fragments, such as (ISB + ISM) and (CrB + CrM) and etc.--SnakeChomp 22:33, 21 December 2008 (UTC)
Okay, I've complete my mockup of how I think we could improve the page:
This is intended just for the first two sections of this page rather than the whole thing. I've put the formula itself first as that way the essence of how the settings affects things can be comprehended before seeing all the details about the settings themselves
I've left the formula as is, but split up into into 3 stages to aid in understanding. It may not be as comprehensive to see it separately, but I think it will be more helpful to new users looking at the information than the previous method.
Also, is it possible that WeaponMinSpread is just added onto the total spread, rather than the Max() function being used? I imagine that when the other values aren't trivial (skill < 20 for example), the min spread may just be hard to discern.
--Quetzilla 00:17, 22 December 2008 (UTC)
It is definately possible that the min spread is simply added in after the perk multiplier, but its hard to scientifically test that as the observations of spread differences can be subjective. I'll update the formula page based off the new format.--SnakeChomp 03:25, 22 December 2008 (UTC)
Actually I lied, I'll see if I make some tweaks to the example page you made but I'll wait on changing the actual one.--SnakeChomp 03:49, 22 December 2008 (UTC)
I updated the formatting, take look and see what you think.--SnakeChomp 20:27, 24 December 2008 (UTC)
  • ArmFactor needs to be named ArmPenalty or something similar. 'Factor' implies that it is multiplied by something but it is not. I chose Factor and Penalty in my mock up specifically.
  • The initial part that builds up the formula needs a clearer walkthrough in common human terms to go along with the formulas. Also, it should really be in reverse order from this, more how I did in the mock up. The purpose of the page is to illustrate to the reader how the game arrives at the spread that is observed in the game, thus it is important to start from the beginning rather than the end.
  • The parts that say 'fSomeSetting = X.X' need to be clarified to show that they represent the default values and not hard coded constants.
  • Parts where the formula is X + Y * A should be formatted as X + (Y * A). You and I know how PEMDAS works but not everyone reading the page does, and it also serves as a visual aid in understanding the formulas presented
--Quetzilla 23:06, 24 December 2008 (UTC)
I attempted to remedy these concerns with a few changes.
  • Renamed formula components to indicate the intent of the component (Bonus vs Penalty)
  • Removed the first formula box, making note of the minimum weapon spread in a new section below the formula instead.
  • Changed "fFoo = 1" to "fFoo default value: 1" to hopefully indicate these are not constants
I feel it is appropriate to assume that readers have basic mathematical knowledge, so I will leave formulas as they are. This purpose of this page is to document a mathematical formula, after all.
--SnakeChomp 01:04, 25 December 2008 (UTC)
Bonus/Penalty is good. I think the defaults part would look better this way:
  • fGunSpreadIronSightsBase: 1.0 (default)
I think the explanation of the formula itself still needs work, which I might take a crack at later. Do you have a reason for not including the parentheses as I mentioned? They aid comprehension regardless of whether the reader understands PEMDAS or not, and the only downside I can say is possibly that they look ugly, but that can be fixed with formatting.
--Quetzilla 01:31, 25 December 2008 (UTC)

Formula still needs work

Current Forumla:

Gun Spread = PerkModifiers((AB + AC * AM) + (ISB + ISM) * (CrB + CrM) * (CB + C * CM + SB + S * SM) * (WB + WM + RB + RM))

I think this is still inaccurate particularly this part:

(CB + C * CM + SB + S * SM)

If this is true, then when S (skill) == 100, with default values, that whole part of the equation collapses to 0. That part is multiplied by everything else in the equation except the ArmCrippled influence, but if the arm is not cripple then that is 0 as well, which would result in 100 skill completely eliminating spread, which isn't what I observe in the game. 100 skill would also eliminate any effect of crouching or iron sights, which doesn't seem to be true either.

Also, this formula doesn't take into account the Spread value set on the Weapon Object in the GECK at any point, that I can see.

I have heard that a weapon skill of 100 is indeed supposed to remove weapon sway, but I haven't checked it myself. I'll take a moment to do that, but consider my next statement to see if that describes the behavior you see.
As for the weapon spread on the weapon form, I think there is a max() function that is compared with the value of the formula and the weapon minimum spread chance. Even with the formula resulting in a value of 0. So the real result would be max(min wepaon spread, formula), therefore you never actually have 0 weapon spread, you only ever have something like 0.5 spread as specified on the weapon form (the 10mm pistol has 0.5 spread)--SnakeChomp 22:18, 21 December 2008 (UTC)
Just did a quick test, and indeed, with a weapon skill of 100 using a weapon with 0 spread, there is 0 spread. Using a weapon with a non zero spread, there is still spread equal to the spread value of the weapon form. I'll add this to the formula page.--SnakeChomp 22:22, 21 December 2008 (UTC)
Personal tools