|
PR Time:
|
||||||
| Register | Forum Rules | Developer Blogs | Project Reality | Members List | Search | Today's Posts | Mark Forums Read |
| PR:BF2 Community Modding Making or wanting help making your own asset? Check in here |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 | |
|
Registered User
![]() Join Date: Mar 2007
Posts: 1,063
|
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 Wolfe; 07-23-2008 at 04:26 PM..
|
|
|
#2 |
![]() Join Date: Apr 2007
Location: Cambridge
Posts: 3,650
|
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. |
|
XKCD forums, in the middle of a perfectly sane conversation:
Has anyone really been far even as decided to use even go want to do look more like? Best post ever made! EG: PPSh is made of win and quite possibly stamped sheet metal |
|
|
|
|
|
|
#3 | |
|
PR:BF2 Developer
![]() |
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
Location: Glassboro NJ
Posts: 2,395
|
will this interfere with the balistics?
|
|
To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts. Biggest time killer :P To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts. |
|
|
|
|
|
|
#5 |
|
Banned
![]() |
Good sfuff - anything which reduces prone spamming has got to be good - I can hear the prone spammers crying now! - Good luck.
|
|
|
|
|
|
|
|
|
|
|
|
#6 |
![]() Join Date: Apr 2007
Location: Cambridge
Posts: 3,650
|
|
|
XKCD forums, in the middle of a perfectly sane conversation:
Has anyone really been far even as decided to use even go want to do look more like? Best post ever made! EG: PPSh is made of win and quite possibly stamped sheet metal |
|
|
|
|
|
|
#7 |
![]() Join Date: Feb 2008
Location: Glassboro NJ
Posts: 2,395
|
sheesh jonny I was just asking no need for that :'-(
|
|
To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts. Biggest time killer :P To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts. |
|
|
|
|
|
|
#8 | ||
|
Registered User
![]() Join Date: Mar 2007
Posts: 1,063
|
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 Wolfe; 05-12-2008 at 04:58 PM..
|
|
|
#9 |
|
Banned
![]() Join Date: Jul 2007
Location: Norway
Posts: 3,190
|
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?
|
|
|
|
|
|
#10 |
![]() Join Date: Apr 2007
Location: Cambridge
Posts: 3,650
|
|
|
XKCD forums, in the middle of a perfectly sane conversation:
Has anyone really been far even as decided to use even go want to do look more like? Best post ever made! EG: PPSh is made of win and quite possibly stamped sheet metal |
|
|
|
|
|
|
|
|
|
|
![]() |
| Tags |
| coding, deviation, realistic, wip |
| Thread Tools | |
| Display Modes | |
|
|