|
|||||||
| PR Community Modding : Discussion on PR community mod projects. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 | |
|
PR Contributor
![]() Join Date: Mar 2007
United States of AmericaPosts: 1,067
|
Primary Objectives:
Definition of "Realistic Deviation": BF2 does not have weapon sway. Realistic infantry combat cannot exist without it, so the only known way to create it is to simulate it through weapon deviation. This decreases the weapon accuracy but increases the realistic deviation when that weapon is in the hands of a soldier. So by "Realistic Deviation", I am referring to deviation when the weapon is in the hands of a soldier, not when it is locked down with clamps and firing down range in perfect lab conditions. Coding Outline:
Special Coding Values: The following information is being provided as a technical reference for myself as well as a reference for anyone who is interested in understanding deviation coding. I will be adding more to this section as time allows. Per-shot delay*: Located in the weapon.tweak file. Regulates how often pressing the "fire" or "zoom" key will be registered in a given amount of time. For example, a value of 10 will only allow the weapon to be fired/zoomed once every ~10 seconds. A value of 0.08 will only allow the weapon to fire 5-6 bullets per second. Firing a weapon as quickly as you can click a button is unrealistic. Using this code adds a valuable element of realism by limiting rapid single-shot to human-like abilities. rem ---BeginComp:DefaultAnimationComp --- ObjectTemplate.createComponent DefaultAnimationComp ObjectTemplate.animation.useShiftAnimation 1 ObjectTemplate.animation.shiftDelay 0.08 Fire-Delay-From-Prone: Located in the soldier/common/common.con file. Prevents a weapon from being fired when switching to the crouch/stand position from the prone position. Helps to prevent jack-in-the-box shooting from prone. rem *** number of seconds the player must wait to fire weapon after being prone... Vars.Set fire-delay-from-prone 1.2 Ironsight Zoom Factor: Located in the weapon.tweak file. This removes 99% of the zoom effect; a vast improvement over the current 0.9 value. ObjectTemplate.zoom.addZoomFactor 1.099 Zoom Delay: Located in the weapon.tweak file. This is the delay (in seconds) before a weapon will switch to and from the final zoom view after the zoom key is pressed. During this delay, the weapon cannot be fired. ObjectTemplate.zoom.zoomDelay 0.7 Zoom Field-of-View Delay: Located in the weapon.tweak file. This prevents the background from slowly zooming in during the zoom delay so that once the zoom animation completes, the view instantly switches to the zoom mode (instead of slowly zooming in during the animation). This code should only be used for scopes where the scope view has black screen edges. This code should NOT be used for open scope weapons such as iron sights or reflex sights such as the spec ops weapon. ObjectTemplate.zoom.changeFovDelay 0.7 Mouse Turning Rate: Located in the weapon.tweak file. This regulates how quickly you can turn while zoomed in. Values range from 1.0 (no restriction) to 0.0 (no turning). This code is not used for scoped weapons and more useful for ironsights with a value of .8. The lower the number, the slowing the turning rate. Useful for preventing a soldier from doing rapid 180 degree turns. ObjectTemplate.zoom.mouseSpeedMod 0.4 Deviation Calculation: Documentation regarding how BF2 calculates deviation is rare, outdated, and often incorrect. For example, the BF2 wiki page states that deviation is calculated as [(Mindev * Stance) + (Fire + Speed + Turn) * Zoom] but have found this to be inconsistent with ingame results. If this were true, a (0 base dev), (2 stance), and (5 additional shot) should result: 0 * 2 + 5 = 5, but it does not. The in-game result is 10, not 5. This and other testing leads me to believe the deviation calculation is as follows (if anyone can confirm or correct this, please do): [(Mindev + Fire,Speed,Turn) * Stance * Zoom] Known Issues: Development Status: The following represents the latest deviation models: Rifleman Quote:
| |
|
Last edited by [R-CON]Wolfe; 07-23-2008 at 04:26 PM..
|
|
|
#2 |
![]() Join Date: Apr 2007
United KingdomLocation: Peterhouse college, Cambridge
Posts: 2,679
|
Re: [WIP] Realistic Deviation
Recoil:
See my ballistics spreadsheet, 4shared.com - online file sharing and storage - download (4) ballistic tables BC.xls for a model of the relative recoil effects. Most of the values are obvious, to adjust them all find out what the recoil for the L85A2 should be and put that in box E144. Then just read off the values. This method has been decided to more accurate than energy methods by people who have shot the actual guns, but does not account for different dampening. It is the entire effect, no accounting for the time it actually takes. The easiest way to fix this is to group all the dampning methods into a few groups and rate them according to effectiveness, then apply multipliers based on that. |
|
Ballistics + Zeroing !!!Nedlands1 for [R-CON]!!! (Done) !!!Nedlands1 for [R-DEV]!!!
|
|
|
|
|
#3 | |
|
PR Coder Team
![]() Join Date: Aug 2007
UkrainePosts: 606
|
Re: [WIP] Realistic Deviation
Quote:
animationManager.looping 0 animationManager.length 0.083333 Just change the lenght to what you want. If there is no 'animationManager.length' for the animation, add one. The animation you need usually has '_tozoom' at the end. | |
|
|
|
#4 |
![]() Join Date: Feb 2008
United States of AmericaLocation: Redownloading PR, due to buggy install last time
Posts: 1,240
|
Re: [WIP] Realistic Deviation
will this interfere with the balistics?
|
![]() WIPs: Minor helping of PMC mod, SPG9 |
|
|
|
|
#5 |
![]() Join Date: Mar 2008
United KingdomLocation: Manchester
Posts: 1,001
|
Re: [WIP] Realistic Deviation
Good sfuff - anything which reduces prone spamming has got to be good - I can hear the prone spammers crying now! - Good luck.
|
|
|
|
| Sponsored Links | |
|
|
#6 |
![]() Join Date: Apr 2007
United KingdomLocation: Peterhouse college, Cambridge
Posts: 2,679
|
Re: [WIP] Realistic Deviation
|
|
Ballistics + Zeroing !!!Nedlands1 for [R-CON]!!! (Done) !!!Nedlands1 for [R-DEV]!!!
|
|
|
|
|
#7 |
![]() Join Date: Feb 2008
United States of AmericaLocation: Redownloading PR, due to buggy install last time
Posts: 1,240
|
Re: [WIP] Realistic Deviation
sheesh jonny I was just asking no need for that :'-(
|
![]() WIPs: Minor helping of PMC mod, SPG9 |
|
|
|
|
#8 | ||
|
PR Contributor
![]() Join Date: Mar 2007
United States of AmericaPosts: 1,067
|
Re: [WIP] Realistic Deviation
Quote:
Quote:
No. Deviation and Ballistics are two different things and located in two different files. Deviation only affects the initial direction of the bullet based on stance and gun movement at the instant you pull the trigger. After the bullet leaves the gun, separate ballistics tell it how to behave based on gravity and other factors. I am only working on deviation. | ||
|
Last edited by [R-CON]Wolfe; 05-12-2008 at 04:58 PM..
|
|
|
#9 |
![]() Join Date: Jul 2007
NorwayLocation: Norway
Posts: 3,076
|
Re: [WIP] Realistic Deviation
Erm... The wheel is pretty large. Does this mean that we might have trouble with hitting a man sized target 100-150 meters away? In that case, whats the point of having ballistics if the bullet doesnt go where you aimed it anyway?
|
|
Never argue with an idiot, he will just drag you down to his level and beat you by experience
Killing for peace is like f*cking for virginity I Jaymz
|
|
|
|
|
#10 |
![]() Join Date: Apr 2007
United KingdomLocation: Peterhouse college, Cambridge
Posts: 2,679
|
Re: [WIP] Realistic Deviation
|
|
Ballistics + Zeroing !!!Nedlands1 for [R-CON]!!! (Done) !!!Nedlands1 for [R-DEV]!!!
|
|
|
| Sponsored Links | |
![]() |
| Bookmarks |
| Tags |
| coding, deviation, realistic, wip |
| Thread Tools | |
| Display Modes | |
|
|