ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
NPCs running off in a panic

1 2 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  12:36:06  5 May 2010
profilee-mailreply Message URLTo the Top
Kaidonni
First the Zone, then the world!
(Resident)

 

 
On forum: 08/30/2008
Messages: 1072
NPCs running off in a panic

Through my testing for my mod, I've noticed something. NPCs running off in a panic, mainly during the Nimble rescue mission. Now, the funny thing is, the bandits who are legging it DO have weapons, I've checked them when looting their corpse right after. They might even have the relevant ammo for that weapon. So...why do they run off in a panic if they have a weapon? Why not use it? Obviously it isn't acceptable that they run off in a panic...I mean, if I have to, I'll make it so that every NPC has at least a handgun.
  12:45:43  5 May 2010
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519
That's strange. They don't do that in Vanilla, do they?

One thing to mention is (IIRC) that the corpses will be populated with stuff after the NPC's dead, and this uses some random stuff being placed. So you won't have any guarantees that the weapons you find when looting an NPC's body where already in his property before.

Another settings I remember is the panic threshold you can set in config. However I have no idea whether this applies to your problem and how.
  13:20:21  5 May 2010
profilee-mailreply Message URLTo the Top
Kaidonni
First the Zone, then the world!
(Resident)

 

 
On forum: 08/30/2008
Messages: 1072
It might be that they have different items after they die. I'm using the same system as in SMP, referencing files for weapons and ammo rather than creating individual entries for each NPC in the character_desc_xxx files. I lowered the probabilities of weapons because of the trading issue (NPCs with plenty of gear), but obviously there's a disconnect between living and dead NPCs, so I probably need to balance it out by looking at the trade_generic values instead.
  12:10:59  15 July 2010
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
Messages: 319
So, did you find something to correct that?

I have the exact same issue when rescuing Nimble.

For info, it occurs when I'm testing my weapon MOD. Could it be a bad ogg commentary that triggers a reaction for some NPCs?

Also, I set the "panic_treshold" parameter to 0 in all creatures files, but the guy (sometimes two of them) keep running away form me like I'm Freddy Krueger or Mickael Myers.

Did someone ran into this and fixed it?
  12:22:50  15 July 2010
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340
Panic thresholds are a complicated factor. Its morale based, which is affected by npcs rank, current weapon, how many times they've been hit, their current health, how many enemies their are, enemies rank, etc. Setting it to zero should disable the panic, But I don't know why it wouldn't. You might have missed a panic_threshold variable somewhere.
  14:24:49  15 July 2010
profilee-mailreply Message URLTo the Top
{imperialreign}
Звуковой Шаман
(Resident)

 

 
On forum: 10/29/2008
Messages: 3075

---QUOTATION---
For info, it occurs when I'm testing my weapon MOD. Could it be a bad ogg commentary that triggers a reaction for some NPCs?
---END QUOTATION---



The only ogg comment type that would trigger a panic reaction are explosion types.

Now, if an NPC is being shot, but they don't "hear" it - that can sometimes send them into a panic. Either the sound_percieve values have been changed, or the sound commenting needs to be re-done. I doubt it's an issue with the sounds, though, as last I remember SmP was using mostly my and Darius6's work (which there are no issues with).

Additionally - if they happen to run across a dead comrade, although they never heard a shot (i.e. silenced weapon fire), that can send them into panic too . . . and there's also a chain reaction effect. One AI in a panic mode can send others into a panic mode . . .
  17:46:14  15 July 2010
profilee-mailreply Message URLTo the Top
RoboMook
Senior Resident
 

 
On forum: 11/12/2008
Messages: 4387
If the NPC is spawned with a weapon but no ammo then they will go into 'panic' mode as soon as their mag is empty (weapons are usually spawned with a full mag). So make sure the script you're using is also giving NPC's the appropriate ammo type, as long as they have a box in their inventory they will have infinite ammo (as Meltac mentioned most things you find on corpses, including ammo, are spawned on death by the death_manager script).
  15:10:50  31 July 2010
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
 

Message edited by:
SacriPan
07/31/2010 17:05:39
Messages: 319
Hey Stalkers!


I may have found why this happens, well, at least in my personal MOD.

I currently have a phosphorus grenade which requires NPC to actually bleed, so they can die from that grenade. So I set the wound_incarnation_v value to 0.0. So they can't heal themselves and die in 2-4 seconds. And it works!

If I used this modded file as it is now, some NPCs will run off in panic (Bandits from parking, mostly), but if, instead of setting the value to 0.0, I set it to an extremely low value (but not nil) like 0.000000001, guess what? NPCs don't run off in panic anymore.

I did quite some tests, with different weapons, ammo and suits, using stealth or rambo-style assault, and it's seems to have done the trick.

If Kaidonni could try that and let us know if it's the actual solution to our problem, of if I just got lucky when shooting those bastards.


EDIT:
Don't bother, it's not that. I did more tests after lunch and it went as bad as before.
I'm now trying to take off some files in my mod to isolate the one that "trigger" that run.
I'll keep you posted if I find something.
  21:21:40  31 July 2010
profilee-mailreply Message URLTo the Top
Steelyglint
Senior Resident
 

 
On forum: 06/06/2009
Messages: 5171
Would a negative value be worth trying? -0.1 instead of 0.0000001?

.
  20:42:00  25 September 2012
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
 

Message edited by:
SacriPan
09/25/2012 20:47:47
Messages: 319
Hi guys,

2 years later, I can say that RoboMook was onto something, at least regarding my personal mod.

The 9x18 ammo has 3 types: "fmj", "pbp" and "pmm".

In my mod, 2 are more than enough for what I need to do. So I removed the pmm from the weapons config files (pm, fort-12, etc...).

The thing is, some bandits at the carpark are spawned with "pmm" ammo. So once they empty their clip, they just run off in panic because their weapon can't accept the pmm ammunition... which is only one they've got.

The "fix" is to add back the ammo in the weapons config file, or change the spawning loadout from the NPCs that spawn with the ammunition we don't want to use in our mods.

Hope this helped a bit.
 
Each word should be at least 3 characters long.
Search:    
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-2020 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.