ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
npc's preferring shotguns?

1 2
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  16:40:14  22 May 2012
profilee-mailreply Message URLTo the Top
the_marked_one
Senior Resident
 

 
On forum: 11/21/2010
Messages: 647
npc's preferring shotguns?

I know natvac came up with a fix for this so im hoping can tell me how to fix it too, why is it that npc's prefer shotguns, its annoying watching an npc with a high power rifle pickup and use a shotgun instead, like watching a duty member pickup and use a toz rather than their groza just doesnt make sense
  17:04:22  22 May 2012
profilee-mailreply Message URLTo the Top
ZaGaR
Skaarj Hybrid - NaPali survivor
(Resident)

 

 
On forum: 07/24/2007
Messages: 647
If NatVac did something for that (I really hope he did), it shoud be in ZRP. The priorities are hardcoded in the engine and have been cause of despair from the day0. Did you make any tests about this behaviour with ZRP?

Also, bear in mind that the so called "AI packss" mess these things up. Rulix's AI for example, has its own priority table and causes most of the time such behaviour.
  17:14:56  22 May 2012
profilee-mailreply Message URLTo the Top
the_marked_one
Senior Resident
 

 
On forum: 11/21/2010
Messages: 647

---QUOTATION---
If NatVac did something for that (I really hope he did), it shoud be in ZRP. The priorities are hardcoded in the engine and have been cause of despair from the day0. Did you make any tests about this behaviour with ZRP?

Also, bear in mind that the so called "AI packss" mess these things up. Rulix's AI for example, has its own priority table and causes most of the time such behaviour.
---END QUOTATION---



Well i thought he did but then maybe im remembering wrongly, its been a few years since i even played zrp, i moved on to other mods then started my own and im now at the stage where after several playthroughs its time to address the annoyances which although dont cause issues in the game are well just annoying
  17:35:58  22 May 2012
profilee-mailreply Message URLTo the Top
ZaGaR
Skaarj Hybrid - NaPali survivor
(Resident)

 

 
On forum: 07/24/2007
Messages: 647
Well, ZRP is not really a mod, I wouldn't put it in the line with mods. It is basically the vanilla with bugs and anoyances ironed out step-by-step. Of course, this process produces something different from the GSC's vanilla, so it can be named a mod, but IMO that's the wrong way to see it.

From what you're saying, I gather you did not base your mod on ZRP, so you need to fix things bit by bit on your own.
  17:47:36  22 May 2012
profilee-mailreply Message URLTo the Top
ERForman
Senior Resident
 

 
On forum: 04/12/2007
Messages: 224
still happens


---QUOTATION---
If NatVac did something for that (I really hope he did), it shoud be in ZRP. The priorities are hardcoded in the engine and have been cause of despair from the day0. Did you make any tests about this behaviour with ZRP?

Also, bear in mind that the so called "AI packss" mess these things up. Rulix's AI for example, has its own priority table and causes most of the time such behaviour.
---END QUOTATION---



This type of behavior still occurs in the game even while running the most current release of the ZRP.
  16:01:31  25 May 2012
profilee-mailreply Message URLTo the Top
100RadsBar
100RadsBar - Formerly known as LoboTheMan
(Resident)

 

 
On forum: 06/03/2009
Messages: 1717

---QUOTATION---
still happens

If NatVac did something for that (I really hope he did), it shoud be in ZRP. The priorities are hardcoded in the engine and have been cause of despair from the day0. Did you make any tests about this behaviour with ZRP?

Also, bear in mind that the so called "AI packss" mess these things up. Rulix's AI for example, has its own priority table and causes most of the time such behaviour.

This type of behavior still occurs in the game even while running the most current release of the ZRP.
---END QUOTATION---



You can do it manually, try to look at this thread:

https://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr&thm_page=65&thm_id=13811&page=all&sort=ASC&sec_id=16#183320
  16:54:20  25 May 2012
profilee-mailreply Message URLTo the Top
the_marked_one
Senior Resident
 

 
On forum: 11/21/2010
Messages: 647
Thanks, i need to do some more testing here (after reading that thread you linked) as it may be that when they go into combat mode they use their main guns anyway, could always make shotguns a protected item and stop all npc's from picking them up, rather not even see a veteran carrying a toz when they have in oleg fiends case a sniper obokan in their backpack
  17:21:23  25 May 2012
profilee-mailreply Message URLTo the Top
the_marked_one
Senior Resident
 

 
On forum: 11/21/2010
Messages: 647
Just done a quick test, give oleg fiend a shotgun and he equips it, spawn something for him to shoot and he changes to his sniper obokan and shoots it, give him some ammo for the shotgun however and things fall apart and he runs away from combat and if they come to him he just ignores them getting shot
  17:39:56  25 May 2012
profilee-mailreply Message URLTo the Top
100RadsBar
100RadsBar - Formerly known as LoboTheMan
(Resident)

 

 
On forum: 06/03/2009
 

Message edited by:
100RadsBar
05/25/2012 17:41:46
Messages: 1717

---QUOTATION---
Just done a quick test, give oleg fiend a shotgun and he equips it, spawn something for him to shoot and he changes to his sniper obokan and shoots it, give him some ammo for the shotgun however and things fall apart and he runs away from combat and if they come to him he just ignores them getting shot
---END QUOTATION---



Change the sawn-off shotguns, so that they can be equipped in the pistol slot instead, and classify sawn-off shotgun as a pistol.

This should force the NPC's to see the sawn-off shotgun as a pistol, not a rifle. And use them as pistols.

Sawn-off BM16 was made into a pistol class by using these values:

; ef_main_weapon_type = 1
ef_weapon_type = 5 ;7


; weapon_class = shotgun

By commenting out ef_main_weapon_type, changing the ef_weapon_type to 5, commenting out weapon_class, the NPC's should see and use the sawn-off as a pistol.
I also changed the slot to slot 1 instead of slot 2

slot = 1
  17:45:14  25 May 2012
profilee-mailreply Message URLTo the Top
ZaGaR
Skaarj Hybrid - NaPali survivor
(Resident)

 

 
On forum: 07/24/2007
Messages: 647
That solution has the problem of the shotgun never being used. AI will not choose the sawed-off in close range engagements, considering it an underpowered pistol.

F..ck GSC for coding so many elementary things under the engine's hood.
  17:52:15  25 May 2012
profilee-mailreply Message URLTo the Top
100RadsBar
100RadsBar - Formerly known as LoboTheMan
(Resident)

 

 
On forum: 06/03/2009
Messages: 1717

---QUOTATION---
That solution has the problem of the shotgun never being used. AI will not choose the sawed-off in close range engagements, considering it an underpowered pistol.

F..ck GSC for coding so many elementary things under the engine's hood.
---END QUOTATION---



Yes it is not a perfect solution, but at least it will save the NPC from going into combat with a sawn-off shotgun, if they have an assault rifle in their possession
  18:05:21  25 May 2012
profilee-mailreply Message URLTo the Top
the_marked_one
Senior Resident
 

 
On forum: 11/21/2010
Messages: 647
What i did was to just change ef_weapon_type (left ef_main_weapon_type alone) for the toz34 (may also check the other shotguns) so rather than being 7 its now 5, tested fine oleg no longer even equips it, it and the ammo i sold him now sits in his inventory
  18:18:23  25 May 2012
profilee-mailreply Message URLTo the Top
100RadsBar
100RadsBar - Formerly known as LoboTheMan
(Resident)

 

 
On forum: 06/03/2009
 

Message edited by:
100RadsBar
05/25/2012 18:20:03
Messages: 1717

---QUOTATION---
What i did was to just change ef_weapon_type (left ef_main_weapon_type alone) for the toz34 (may also check the other shotguns) so rather than being 7 its now 5, tested fine oleg no longer even equips it, it and the ammo i sold him now sits in his inventory
---END QUOTATION---



You can take a look at the Priboi Story Overhaul, there you can see the changes I made to the weapons. Might make it easier, to change the remaining weapons.

Direct link: http://semak.dk (Take the full version on the top of the page )
  18:30:41  25 May 2012
profilee-mailreply Message URLTo the Top
the_marked_one
Senior Resident
 

 
On forum: 11/21/2010
Messages: 647
Remaining weapons now changed, i left the winchester 1300 and spas 12 alone as those are pretty rare in my game besides i didnt want father diodor or poker to start using other weapons, the list of annoyances is getting less and less, few days time i should be done with changes that require a new game (these dont but others im doing do)
  14:30:21  13 June 2012
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
Messages: 4303
Yes, it is not fixed in the ZRP, which keeps the vanilla behavior. I thought about including such a change, but every mod that added weapons has their own settings in the config files that would override whatever was in the ZRP, and there might even be conflicts with those mods that only added new weapons.

No one has brought it up lately, and I suspect that's because the ones who care enough are already using something like AMK Arsenal (see link below) or the Rulix/Bak Weapon Manager.

Just an interesting FYI to show one how far you can take this ef_weapon_type change:

In the thm_id=13811 thread cited by LoboTheMan, Storm Shadow referenced silverpower's explanation in the "weapon classes" thread (thm_id=13201, post dated 29 January 2008). But silverpower and Skullhunter got together and worked more details out with a solution later in the year.

See Skullhunter's 10 August 2008 post in this thread:

---QUOTATION---
"AMK Weapon Add-on - WIP", page 5:
https://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr&thm_id=14310&page=5&sec_id=16
---END QUOTATION---

  14:33:28  13 June 2012
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
 

Message edited by:
SetaKat
06/13/2012 14:33:40
Messages: 6342
Great info.
Always nice when little gems like this surface.
  15:39:33  13 June 2012
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519
Wow, I had no idea that this weapon priority thing ever got a solution
  10:02:44  20 June 2012
profilee-mailreply Message URLTo the Top
Storm Shadow
A machine, a Shadow Machine.
(Resident)

 

 
On forum: 11/14/2007
 

Message edited by:
Storm Shadow
06/20/2012 10:03:25
Messages: 1430
I've been testing with this for some time. and although i cant go so far as to say that Skull Hunter is wrong, I certainly havnt been able to reproduce his results with my weapons.

I dont have it all figured out just yet, but more testing is required.

anyone else had any success with this method? the problem im having is that NPCs are now preferring to use their pistols instead of there assault rifles or other weapons (regardless of range)!

also, does anyone know what ef_main_weapon_type is for and how it works....?

cheer
  13:56:39  20 June 2012
profilee-mailreply Message URLTo the Top
ZaGaR
Skaarj Hybrid - NaPali survivor
(Resident)

 

 
On forum: 07/24/2007
Messages: 647
I find also difficult to see how it works. At the time, I did some reclasification and reordering by altering both ef_weapon_type and ef_main_weapon_type, but nothing happened. I'm not eve sure that the first one can use values above 10, although they say it can. Most probably the engine truncates or converts the values >10 to something below it.
  08:37:18  2 September 2012
profilee-mailreply Message URLTo the Top
Storm Shadow
A machine, a Shadow Machine.
(Resident)

 

 
On forum: 11/14/2007
Messages: 1430
Want to know why NPCs seem to love there shitty old shotguns so much? Want to answer the age old question of "how can i give an AKSU-74 to an NPC who already has a BM-16?" want to know what ef_weapon_type really does? or want to know why NPCs will only fire some weapons in single shot and others in full auto?

all this and more is now answered in this one complete thread:
[Tutorial] The Truth about ef_weapon_type
https://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr&thm_id=21708&sec_id=16page=1
 
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-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.