ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Regulating NPC Recoil Control

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  02:00:52  2 December 2009
profilee-mailreply Message URLTo the Top
Senior Resident

On forum: 05/21/2009
Messages: 232
Regulating NPC Recoil Control

What elements dictate how an NPC controls recoil? I was under the impression it was cam_relax_speed_ai, but after giving it all sorts of crazy values, like 0 and 500 and all sorts of other entries, I'm getting absolutely no difference in how NPC's handle their weapons.

Some of my weapons have high recoil, and when NPC's fire, them they start shooting at the sky gradually, and I have no idea how to regulate their capability of handling weapons. I know there are base variables that act as a modifier for how NPC's accuracy dispersion and bullet cones are affected, but I have no idea how I can apply that to recoil.

Anybody have any knowledge they can shed for that? Also does anyone know where the function for weapon ranks and exchanging weapon's is handled in the scripts?
  02:17:51  2 December 2009
profilee-mailreply Message URLTo the Top
On forum: 08/02/2009
Messages: 50
If I were you I'd ask PLR. He seemed to find a workaround in his Realistic Weapons mod somehow.
  19:51:44  2 December 2009
profilee-mailreply Message URLTo the Top
Senior Resident

On forum: 04/16/2007
Messages: 257

I think there's a) seperate accuracies for NPCs and b) a limit to how many degrees they can fire and still re-zero the weapon.

From the Redux boards, an explanation on fixing NPC rezeroing issues:

"The first stat, cam_dispersion, seems to affect how quickly recoil climbs in the hands of the AI.

The second stat, cam_dispersion_inc, seems to affect how quickly recoil climbs, AND how well the AI returns its aim to center.

These two stats seem to be multiplied by each other somewhere in code, as setting either of them to zero eliminates all recoil on NPCs.

Cam_dispersion_inc seems to have a greater effect on recoil than cam_dispersion, as a little of it seems to go a LONG way.

Setting cam_dispersion to 0.3 and cam_dispersion_inc to ANYTHING above 0.2 seems to create recoil that the AI cannot deal with. Setting cam_dispersion_inc above 0.25 seems to create uncontrolable recoil in the first volley (meaning that the AI does not return the barrel to the zero aim point).

Setting cam_dispersion to 0.4 (the Redux level for the AKM) and cam_dispersion_inc to a value less than 0.2 seems to greatly improve the situation. I set mine to 0.175, and the AI builds recoil to a high level at the end of a volley, but the AI aim returns to the starting aim point for the next volley (volleys typically come after anything that causes the AI to stop firing, such as reloading, reacting to a hit, etc).

So, to sum it up, cam_dispersion_inc is set too high. I find that dividing 0.06 by the cam_dispersion value seems to come up with a good starting number for cam_dispersion_inc. In this case, it resulted in 0.15. I increased this to 0.175 in order to reflect the weapon being hard to control, and this seems to work.

I hope this helps."

Credit to Gideon for writing this explanation.

words from silverpower, when plr had the problem.
  07:15:29  3 December 2009
profilee-mailreply Message URLTo the Top
Storm Shadow
A machine, a Shadow Machine.


On forum: 11/14/2007
Messages: 1430
I was under the impression that PLR fixed that issue with cam_relax_speed_ai. As I did the same thing, I have much higher values of cam_dispersion_inc than stated in that post, and have no prob with ai returning there wpn to zero.

All I did, was go through every wpn.ltx file and set cam_relax_speed[ to 0, then added in the line cam_relax_speed_ai underneath and set it to what ever the vanilla setting was for cam_relax_speed.

That works a treat for me, but it sounds like you've allready done that?
Each word should be at least 3 characters long.
Search conditions:    - spaces as AND    - spaces as OR   
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion

All short dates are in Month-Day-Year format.


Copyright © 1995-2022 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.