Page 2 of 4
Re: [WIP] Realistic Deviation
Posted: 2008-05-13 01:58
by PRC_Heavy_Z
Have you considered a logarithmic or exponential decrease rate instead of a linear one for the deviation from maximum deviation to minimum deviation?
This would reflect the more time and concentration required to hit a target say 200~300 meters away with a rifle versus hitting something 50~100 meters away.
Re: [WIP] Realistic Deviation
Posted: 2008-05-13 02:14
by Wolfe
PRC_Heavy_Z wrote:Have you considered a logarithmic or exponential decrease rate instead of a linear one for the deviation from maximum deviation to minimum deviation?
This would reflect the more time and concentration required to hit a target say 200~300 meters away with a rifle versus hitting something 50~100 meters away.
Not sure if that's even possible, but that would be nice. The only deviation values I'm aware of are those located in the .tweak of each weapon which doesn't allow for exponential recovery times. For example, fire dev only has 3 sets of values: max, per shot, and recovery rate per server frame.
If someone knows how to make this logarithmic, post it.
I only know about
this much (
I'm holding my thumb and index finger 1 millimeter apart) so much of this is new to me and I'm learning as I go.
Re: [WIP] Realistic Deviation
Posted: 2008-05-13 02:35
by Mosquill
Wolfe wrote:The .8 zoom time isn't a big problem for snipers.. in fact i think it enhances it.
So.. you would have to wait almost 2 seconds to unzoom the gun. That's unacceptable.
Re: [WIP] Realistic Deviation
Posted: 2008-05-13 03:02
by Wolfe
.8 is less than a second.
Re: [WIP] Realistic Deviation
Posted: 2008-05-13 04:30
by Wolfe
Ran into a problem during testing tonight:
Suppression Effect: pointless when scoped at 65 or closer.
The suppression effect doesn't obstruct your view enough. At 65 meters and closer, scoping in on your target allows you to see him clearly enough to easily kill. This was tested by person A going full auto and suppressing person B. Person B, while in full suppression, calmly scoped his rifle, aimed, and killed person A.
Going full auto from-the-hip may not kill your target, but should suppress them enough to the point they are unable to return effective fire. For this to happen, the suppression effect would have to blur your vision 3x to 10x more than it does now, but reduce the suppression time.
Also,
[R-CON]Mosquill wrote:Also your deviation should include both human factors and gun's accuracy in moa. And it shouldn't be scaled in any way.
You're right.. I tested hitbox detection (using an absolute 0 dev gun) and found the hitbox doesn't extend beyond the body in most areas. My fear was that it did, which could have affected the relative size of soldiers. It doesn't so no worry. I'm using real-life MOA for mindev.
Re: [WIP] Realistic Deviation
Posted: 2008-05-13 09:38
by Mosquill
Wolfe wrote:.8 is less than a second.
I was talking about sniper rifles with double-zoom. For example you zoom-in on someone in the middle of a firefight, but then you want to quickly unzoom for some reason, and you can't because you have to click double-zoom first, switching to that will take 0.8s, and only then you can unzoom but that will take at least 0.8s more.
Also, I think 0.8s is too much for any gun, not just sniper rifles.
Re: [WIP] Realistic Deviation
Posted: 2008-05-13 16:59
by Darktrooper
Wolfe wrote:[*]Shooting while moving:
- Unsighted:
Walking forward has minimal increase to deviation. Side strafing has moderate increase to deviation. At 20 meters, side strafing while full auto will most likely wound them with has a chance of killing them (less of a chance than if you were standing still).
- Sighted:
Walking forward while scoped in allows you to suppress a target while advancing towards it, single shot or full auto. At 100m, your most bullets will hit. Side strafing while shooting scoped decreases that accuracy to 25% chance of hitting your target, but all bullets will land around him. After moving, it takes a moment to regain max accuracy.
I'm loving that part... I hate how now a minimal movement can make your deviation jump to max giving you no more chance than the one who was running toward you ...
Really, really good improvement here. Of course it can't be perfect right now, and a lot of values may need to be changed, but at least it can be done ...
Thanks

Posted: 2008-05-13 18:10
by Cp
Wolfe wrote:slight animation snag:
M16a4
Try these values:
Code: Select all
rem ---BeginCompefaultZoomComp ---
ObjectTemplate.createComponent DefaultZoomComp
ObjectTemplate.zoom.zoomDelay .8
ObjectTemplate.zoom.zoomLod 1
ObjectTemplate.zoom.addZoomFactor 0
ObjectTemplate.zoom.addZoomFactor .25
ObjectTemplate.zoom.changeFovDelay .812
ObjectTemplate.zoom.disableMuzzleWhenZoomed 1
rem ---EndComp ---
and
Code: Select all
Objects/Weapons/Handheld/usrif_m16a4/animations/1p/1p_m16a2_tozoom.baf
animationManager.looping 0
animationManager.length 0.68
Then zoom in the rifle and note the following:
1. Rifle animation begins, rifle moves to eye
2. Screen flickers for an instant, showing scope at the top of the screen.
3. Your are now looking through the scope as normal.
It's that second part, #2, that I want to eliminate. I just want it to start the animation then change to the zoom screen without that flicker.
this:
and this
have to match each other, otherwise youll have the 1p_m16a2_zoom_stand animation "playing" without the zoom for 0.12 seconds.
This is easily fixed by simply changing the animation length of 1p_m16a2_tozoom to 0.8
so dont touch the .tweak but change the AnimationSystem1p.inc to
Code: Select all
Objects/Weapons/Handheld/usrif_m16a4/animations/1p/1p_m16a2_tozoom.baf
animationManager.looping 0
animationManager.length 0.8
Theres still some glitching when zooming in, which I dont think can be fixed without altering the animation (nothing hard to do, really, but cant be done with notepad :wink

Re: [WIP] Realistic Deviation
Posted: 2008-05-13 18:19
by Sabre_tooth_tigger
[quote=""'[R-CON"]Mosquill;674208']I was talking about sniper rifles with double-zoom. For example you zoom-in on someone in the middle of a firefight, but then you want to quickly unzoom for some reason, and you can't because you have to click double-zoom first, switching to that will take 0.8s, and only then you can unzoom but that will take at least 0.8s more.
Also, I think 0.8s is too much for any gun, not just sniper rifles.[/quote]
Sniper scope should be awkward to use, people try to use them in the wrong places all the time - they should die
[quote="Wolfe""]I would like to have MOA (and recoil)
based in realism, but not copy it exactly. Why not? Because in the real world, you have to deal with many known and random factors to shoot accurately. In the game, all I have to do is move my mouse a fraction of an inch. Realism doesn't always translate well to fiction.
For example, the effective range of an abrams tank is 3k-4k meters. That's roughly the size of the entire Kashan map therefore the range of tanks has been reduced. Small arms follows the same principal.[/quote]
Got to say I agree, being literally realistic is a fail when it enables unrealistic tactics
Re: [WIP] Realistic Deviation
Posted: 2008-05-13 18:45
by Wolfe
Cp20000 wrote:Code: Select all
ObjectTemplate.zoom.zoomDelay .8
animationManager.length 0.8
Yep, that works.
Re: [WIP] Realistic Deviation
Posted: 2008-05-13 20:30
by Wolfe
Don't get hung up on specific .5, 6, 7, or .8 zoom times. A LOT of squad vs. squad play testing is required to determine what the zoom time will be, not theoretical guessing on the forums.
But there WILL be a delay in the end product. There has to be. Not just for realism sake, but for game mechanics sake. Without a delay, everyone will be able to switch from from a wide cone of fire to a narrow cone of fire near-instantaneously... going prone and scoping in before they hit the ground... then we're right back to v.75 atari-like deviation physics.
Re: [WIP] Realistic Deviation
Posted: 2008-05-13 20:43
by Wolfe
Another known issue:
Medic M16a2 animation: missing graphics
Slowing down the M16a4 (rifleman) animation speed worked perfectly, but it affected the M16a2 (medic). Even though the rifleman and medic have the same zoom delay speed, the medic's rifle dissappears during the zoom animation (pictured below). The M16a2 folder doesn't contain an animation file; it seems to run off the M16a4... any ideas how to fix this?
Update: Fixed.
Re: [Coding] Realistic Deviation [WIP]
Posted: 2008-06-02 22:45
by Wolfe
Question:
The simrad (officer's binocs) have a range finder display. I have slowed down the animation of brining the binocs to your eyes, but the range display appears immediately (before the animation is complete). How do I delay the appearance of the range finder so that it displays after the binoc animation is complete?
Re: [Coding] Realistic Deviation [WIP]
Posted: 2008-06-02 22:49
by bosco_
This thread gives me hope, thank you Wolfe.

Re: [Coding] Realistic Deviation [WIP]
Posted: 2008-06-02 23:10
by dbzao
Wolfe wrote:Question:
The simrad (officer's binocs) have a range finder display. I have slowed down the animation of brining the binocs to your eyes, but the range display appears immediately (before the animation is complete). How do I delay the appearance of the range finder so that it displays after the binoc animation is complete?
You can probably put a show delay in the HUD file for that.
Re: [Coding] Realistic Deviation [WIP]
Posted: 2008-06-02 23:12
by Wolfe
How? Remember, you're talking to a noob coder who knows next-to-nothing about such things.
Re: [Coding] Realistic Deviation [WIP]
Posted: 2008-06-03 03:30
by nedlands1
You can find the HUD file here: menu_server.zip\HUD\HudSetup\Weapons\HudElementsLaserPainter
Code: Select all
hudBuilder.createSplitNode IngameHud LaserPainterHud
hudBuilder.setNodeLogicShowVariable EQUAL GuiIndex 1
hudBuilder.createTextNode LaserPainterHud SimradRangeText 462 400 101 10
hudBuilder.setTextNodeStyle Fonts/vehicleHudFont_6.dif 2
hudBuilder.setTextNodeStringVariable TargetDistanceString
hudBuilder.setNodeColor 0.8 0 0 1
hudBuilder.createTextNode LaserPainterHud TargetLabelOn 476 420 115 10
hudBuilder.setTextNodeStyle Fonts/vehicleHudFont_6.dif 0
hudBuilder.setTextNodeString HUD_TEXT_LASERTARGET_TARGET_AQUIRED
hudBuilder.setNodeShowVariable HasMissileConnection
hudBuilder.setNodeColor 0.7 0.1 0.1 1
hudBuilder.setNodeOutTime 0.1
rem -------------------------------------- Laser Target Indication --------------------------------------
hudBuilder.createObjectMarkerNode LaserPainterHud LaserPainterMarker 120 170 540 230
hudBuilder.setObjectMarkerNodeTexture 0 Ingame\Vehicles\Icons\Hud\Air\Attack\F15\HeatSeeking\lockBoxFriendly.tga
hudBuilder.setObjectMarkerNodeTexture 1 Ingame\Vehicles\Icons\Hud\Air\Attack\F15\HeatSeeking\lockBox.tga
hudBuilder.setObjectMarkerNodeTexture 2 Ingame\Vehicles\Icons\Hud\Air\Attack\F15\HeatSeeking\lockBoxLocked.tga
hudBuilder.setObjectMarkerNodeTexture 3 Ingame\Vehicles\Icons\Hud\Land\Tunguska\rangeLine.tga
hudBuilder.setObjectMarkerNodeTextureSize 0 32 32
hudBuilder.setObjectMarkerNodeTextureSize 1 32 32
hudBuilder.setObjectMarkerNodeTextureSize 2 64 64
hudBuilder.setObjectMarkerNodeTextureSize 3 16 256
hudBuilder.setObjectMarkerNodeObjects 4
hudBuilder.setObjectMarkerNodeLockOnType 1
hudBuilder.setNodeColor 0 0.8 0 1
I tried putting in
hudBuilder.setNodeInTime X, where X was a number but the rangefinder wouldn't show up.
Posted: 2008-06-03 04:10
by Wolfe
That's the target painter (white box/missile connection) which is different (although used simultaneously) than the range finder (numbers that show distance)?
The simrad .tweak file has this line of code:
ObjectTemplate.weaponHud.hasRangeFinder 1
and also has references to:
Ingame\Weapons\Icons\Hud\
So I'm wondering if the range finder is a separately controlled file located there or elsewhere? It must be a separate thing.. because tanks have range finders but don't have target painters.
I would also have to find the range finder code for the HAT (the range finder numbers appear before the animation is complete).