Difference between revisions of "Talk:Gun Spread Formula"

5,762 bytes added ,  19:53, 8 February 2011
Silly me... my "AimBonus" is Iron Sights, isn't it?
imported>Henning
imported>Henning
(Silly me... my "AimBonus" is Iron Sights, isn't it?)
 
(11 intermediate revisions by 2 users not shown)
Line 299: Line 299:


:[[User:Raven55|Raven55]] 19:31, 22 June 2009 (GMT -5)
:[[User:Raven55|Raven55]] 19:31, 22 June 2009 (GMT -5)
== How "Min Spread" works - another theory and game test ==
Just finished a comprehensive round of testing, and I think I finally figured out exactly how Min. Spread interacts with bullet path. It's in fact surprisingly simple.
1. The Spread Formula, as you wrote it, controls the wobble of the player's arm and torso. This gives us a barrel axis.
2. Whenever a shot is fired, each single projectile will have a trajectory determined by the barrel axis, modified by the Min. Spread value.
So, as suggested above, Min. Spread is in fact added to regular spread. This has gameplay implications : you can for example have a very precise shotgun (Min. Spread of 1.5), in the hands of a very clumsy shooter (large Gun Spread Formula value). The character's aim will wander widely, but the pellets in each shot will stay tightly grouped.
So, to summarize :
- Gun Spread Formula = player's aim
- Min. Spread = weapon's own precision
Testing this is easy : take a vanilla Fallout3, modify the base 10mm to have a 0 Min. Spread, and set fGunSpreadCondBase to 20. Load a game, spawn a brand new gun, set smallguns to 100. Shoot - your arm goes everywhere, but each bullet follows a visibly straight path out of the gun's barrel. Now set fGunSpreadCondBase to 0, and Min. Spread to 20. Your gun stays still, bullets fly everywhere.
With that in mind, it may be a good idea to rename the Gun Spread Formula to Aim Spread Formula, or something to that effect.
NOTE : this opens the possibility that the gun's spread (not the player's) has its own formula using Spread, something like :
Gun Spread = Spread * ''Unknown setting/var'' + Min. Spread
This would explains the cryptic claim by Ajunta, in the weapons' talk page, that the setting does indeed work, possibly because of a seemingly unrelated setting or game var that's different on his setup. So far, however, I haven't been able to identify it. So, for now, just food for thought.
[[User:DomFada|DomFada]] 23:38, 11 November 2009 (UTC)DomFada
== MUST READ !!! I've found the answer to Min. Spread and Spread !!! ==
Gah ! In retrospect, that was so bleeding obvious...
Just as I said before, there are TWO formulas, not one.
Player's aim : your formula works just fine
Gun spread : the following formula
Gun Spread = Spread * WeaponConditionSpread + Min. Spread
where WeaponConditionSpread is determined by the gun's condition and the fWeaponConditionSpreadX settings.
Tested and validated in game. Set the 10mm's Min. Spread to 0, and Spread to 20. Then, set all the fWeaponConditionSpreadX settings to 1. Go in game. Shoot. Change Spread to 3. Repeat. Change Spread to 0. Rinse.
No idea why they set the settings to 0 in the release, the system works perfectly. Dumbing down for their expected "target demographics" ? Anyway, I can't believe it took all of us so long to figure it out. Glad it's over - or at least I hope so.
PS : I'm leaving the previous subject because it contains a detailed explanation of the bullet path mechanics, and I'm too lazy to properly merge both. When you've validated this and changed the main page, feel free to remove my comments to clear this page. Until then, I've made a minor edit to the main page encouraging readers to look here. Hope I'm not breaking policy by such an edit, but I have validated this new formula thoroughly, and I believe it would be of use to anyone consulting the page. Reverse if needed.
[[User:DomFada|DomFada]] 00:32, 12 November 2009 (UTC)DomFada
:I can verify that this is correct.  The gun's minimum spread DOES have a separate effect from the formula shown here.  In creating a mod to show the player's accuracy in a circle on the HUD, I had to refine this formula - I discovered that both min spread and skill are taken into account in calculating the weapon accuracy - HOWEVER, as far as I can tell, spread still does not come into play at all.  Or at least, if it does, it's not in the way proposed above.  The two formulas are calculated at a 3:1 ratio - essentially, the formula is:
Spread = (PerkModifiers(IronSightsBonus * CrouchBonus * (ConditionPenalty + SkillBonus) * (WalkPenalty + RunPenalty) + ArmPenalty)) * 3 + MinSpread
:I can't verify that this is the EXACT angle that's used for spread (although it does seem probable that it is, I haven't done the trigonometric calculations required to actually compute the exact angle - there may be some multiplier in there or something), but I can verify that the ratio is 3:1.  However, the WalkPenalty and RunPenalty calculations are incorrect.  They should read:
:'''WalkPenalty''' = fGunSpreadWalkBase * !''IsRunning'' + GunSpreadWalkMult * (''IsMoving>''>0) * !''IsRunning''
:'''RunPenalty''' = GunSpreadRunBase * ''IsRunning'' + GunSpreadRunMult * (''IsMoving''>0) * ''IsRunning''
:Where ''IsMoving'' is the [[IsMoving]] function (''IsMoving''>0 means this value is 1 if IsMoving is non-zero, 0 otherwise) and ''IsRunning'' is the [[IsRunning]] function.  (The reason this correction has to be made is that IsRunning returns true even if the player is standing still, as long as the "run" key is being held or autorun is enabled.)
:The proof here is in the pudding: I just released [http://www.fallout3nexus.com/downloads/file.php?id=15724 this mod] that very accurately shows your accuracy across all weapons and at all skill values, even with the walking, running, and condition modifiers changed.
:I think the article should be edited ASAP, but I'd like to leave this here for a bit for peer review before I do so, just in case someone else finds my revision in need of additional revision.  Experience with writing and testing my mod, however, leads me to believe that the above is correct.
:--[[User:ShadauxCat|ShadauxCat]] 23:36, 8 February 2011 (UTC)
Anonymous user