ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
[Tutorial] The Truth about ef_weapon_type

1 2 3
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  07:06:22  2 September 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
09/03/2012 3:04:48
Messages: 1430
[Tutorial] The Truth about ef_weapon_type

References:
weapon classes
https://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr&thm_id=13201&sec_id=16&page=1
how to make npcs pick up all weapons
https://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr&thm_id=13811&sec_id=16&page=1
AMK Weapon Add-on - WIP
https://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr&thm_id=14310&page=5&sec_id=16
npc's preferring shotguns?
https://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr&thm_id=21512&sec_id=16&page=1


Below are the settings of how the vanilla weapons are grouped together:
ef_main_weapon_type:		ef_weapon_type:		group:
0				1			stabbing
0				5			pistol
1				7			shotguns
2				6			automatic
3				8			sniper
4				8			grenade launcher
0				10			hand grenade

you will want to look in m_stalker.ltx and take note of the settings in your fire queues. note that there is nothing wrong with the vanilla settings here, but you can make them more aggressive as you see fit. below i've noted the ranges that are hard coded for each of the fire queues:
;---FIRE QUEUE PARAMETERS
;far range 	= 30 - 1000m.
;med range 	= 15 - 30m. 
;close range 	= 0  - 15m. 

i've listed below what i've found from my testing. how ef_weapon_type relate to how an NPC will utilise a weapon:
ef_weapon_type:		NPC use of weapon:
1 - 4			as per fire queue
5			3 round burst at close and med range. as per fire queue at far range
6			as per fire queue
7			single shot at approx 1sec intervals
8			single shot at 3sec intervals
9			if range is farther than 20m, then as per the medium fire queue. if range is closer than 20m, then change weapon.
10			if range is between 3 - 20m, then as per fire queue. else change weapon
11			if range is farther than 3m, then as per fire queue. if range is closer than 3m, then change weapon
12 - 99			as per fire queue.

Notes:
- the weapon hierarchy is numerological. ie they will equip a weapon with a higher value in ef_weapon_type over a lower one.
- except that, all pistols must be ef_weapon_type = 5 & ef_main_weapon_type = 0 or you're going to have a bad time. (or the NPCs will choose their pistol instead of their rifle, i dont know why this is).
- once they have a new weapon, they might not equip it until next combat.
- as we all know, NPCs must have the correct ammo type in their inventory’s or they wont be able to reload their new weapons once the mag runs out.
- i really dont have any idea what ef_main_weapon_type does at all.
- the upper limit is not known, i just put 99 as a place holder.
- you will want to set use_single_item_rule = off in m_stalker.ltx
- min_radius, max_radius & fire_distance settings in each weapons .ltx file have no effect at all. these functions are instead determined by the fire queue
- as far as i can tell; mp_ranks.ltx has nothing to do with the hierarchy of NPC wpn evaluation, this is done solely by the ef_weapon_type value.

In my mod i've set every weapon in the game in a logical hierarchies and given each group its own unique ef_weapon_type.

using this method i have been able to successfully answer the age old questions of how to get an NPC to take an AKSU-74 off you when he already has a BM-16!

if someone would want to add this to the mod wiki as an article, that would be great.

(edits: formatting)
  07:56:46  2 September 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
Messages: 6342
Could you also explain how the "weapon_*_queue_size_far_*" and "weapon_*_queue_interval_*" relate the the fire queue, or don't you know what those parameter affect yet?
  08:13:44  2 September 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
09/02/2012 9:16:23
Messages: 1430

---QUOTATION---
Could you also explain how the "weapon_*_queue_size_far_*" and "weapon_*_queue_interval_*" relate the the fire queue, or don't you know what those parameter affect yet?
---END QUOTATION---



in m_stalker.ltx you will find:

;---FIRE QUEUE PARAMETERS
;far range = 30 - 1000m.
weapon_min_queue_size_far		= 1
weapon_max_queue_size_far		= 6
weapon_min_queue_interval_far		= 500
weapon_max_queue_interval_far		= 1000

;med range = 15 - 30m. 
weapon_min_queue_size_medium		= 4
weapon_max_queue_size_medium		= 6
weapon_min_queue_interval_medium	= 500
weapon_max_queue_interval_medium	= 750

;close range = 0 - 15m. 
weapon_min_queue_size_close		= 4
weapon_max_queue_size_close		= 10
weapon_min_queue_interval_close		= 300
weapon_max_queue_interval_close		= 500



min_queue_size & max_queue_size determines the upper and lower limits for a randomly generated figure that will be how many rounds an NPC fires in each fully automatic burst.

min_queue_interval & max_queue_interval determine the amount of time gap between each burst.

these are determined differantly depending on the range the NPC is from the target. being close, medium or far range. as you can see, the closer they are, the bigger and quicker the bursts, further away, they will use smaller and more spaced out bursts.

i've noted the range in meters for each of the 3 pre-determined ranges. these are hardcoded and i've based them on the observations from my testing.

of course, as per my OP, depending on the ef_weapon_type will determine whether or not an NPC will even use the fire queue for a each differant weapon.

EDIT: ref the intervals, 1000 = 1sec.
  08:19:02  2 September 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
Messages: 6342
'kay. Now we seem to have a specialized subset of variables for controlling how many rounds get fired at which range, and how rapidly in addition to the general ones in the various m_<faction> configs.
  08:21:52  2 September 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
09/02/2012 8:38:50
Messages: 1430

---QUOTATION---
'kay. Now we seem to have a specialized subset of variables for controlling how many rounds get fired at which range, and how rapidly in addition to the general ones in the various m_<faction> configs.
---END QUOTATION---



what are m_<faction> configs?

EDIT: if you are refering to m_army.ltx & m_bandit.ltx, then know that these files are not used by the vanilla game. all NPCs who spawn with section_name = stalker in the all.spawn, use the varibles from m_stalker.ltx (including those who spawn as section_name = stalker_trader)
  16:57:36  3 September 2012
profilee-mailreply Message URLTo the Top
ZaGaR
Skaarj Hybrid - NaPali survivor
(Resident)

 

 
On forum: 07/24/2007
 

Message edited by:
ZaGaR
09/03/2012 17:19:35
Messages: 647

---QUOTATION---

.....

Notes:
- the weapon hierarchy is numerological. ie they will equip a weapon with a higher value in ef_weapon_type over a lower one.
- except that, all pistols must be ef_weapon_type = 5 & ef_main_weapon_type = 0 or you're going to have a bad time. (or the NPCs will choose their pistol instead of their rifle, i dont know why this is).
.....

---END QUOTATION---



I played recently a russian mod that had the pistols = ef_weapon_type = 4 with no visible problems. It seems that this setting made the pistols a kind of "lesser choice", when the sawed-off is set bm_16 = ef_weapon_type = 5 . Don't know if you tested such combo.



EDIT (forgot to ask):

Another engine coded problem is the strange glitch AKSU - over - AK? With use_single_item_rule=on NPCs will NEVER pick up an AK (thrown to them) when they have an AKSU. This latter seems to be of more value than AK , but will gladly take AN over either of those. Can you repeat this test with your new classification?
  03:10:26  4 September 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
09/04/2012 9:09:26
Messages: 1430

---QUOTATION---
I played recently a russian mod that had the pistols = ef_weapon_type = 4 with no visible problems. It seems that this setting made the pistols a kind of "lesser choice", when the sawed-off is set bm_16 = ef_weapon_type = 5 . Don't know if you tested such combo.
---END QUOTATION---

All i know is that from my initial testing, i had pistols in differant tiers from ef_wpn 2 thru to 5 depending. and i had problems with NPCs prefering to use their pistol at ef_wpn 4 over there rifle which was ef_wpn 40. but the ones that had pistols at ef_wpn 5, didnt have this problem, they chose to use their rilfe (same rifle). so now i have all my pistols at ef_wpn 5 and i dont have any problems.

also note that in my mod, BM-16 acts the same as a pistol in every way. so its also set to ef_wpn_5. and everything works well.
---QUOTATION---
EDIT (forgot to ask):

Another engine coded problem is the strange glitch AKSU - over - AK? With use_single_item_rule=on NPCs will NEVER pick up an AK (thrown to them) when they have an AKSU. This latter seems to be of more value than AK , but will gladly take AN over either of those. Can you repeat this test with your new classification?
---END QUOTATION---

I've just tested this now. and yes i was able to give an NPC (who had only a pistol) an AK74u, which he accepted and changed to. then i gave him an AK74 and he changed to that. then I gave him an abakan and he took it, but didnt change to it until i equip'd my wpn.

i only ever use single_item off. if you turn this setting on, then you're gonna have a bad time.

cheers, Shad.



EDIT: did the same test again with use_single_item_rule = on (dont know why anyone would want to use this setting, but it is the vanilla setting) and it still worked perfectly.

same NPC with pistol, i gave him an AKSu and he equipped it, gave him an AK74 and he dropped the Su and equipped the 74. gave him an abakan and he equipped that and dropped the AK. no prob.

for those who are interested, in my mod's thread i've posted the list of all my mod's weapons and their corresponding ef_wpn_type here:
https://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr&thm_id=21537&page=6&sec_id=16
  23:11:49  4 September 2012
profilee-mailreply Message URLTo the Top
ZaGaR
Skaarj Hybrid - NaPali survivor
(Resident)

 

 
On forum: 07/24/2007
Messages: 647
Then it really works my man.
Cheers
  00:06:14  5 September 2012
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
Messages: 438
I was testing some guns with use_single_item to off and the default shotguns and rifles.

Gave that NPC you save at the garbage a Sawn-Off and ammo, and then gave him an AK-74U and ammo. He never equiped the rifle, until I attacked him.

He then switched to the rifle and kept using it until I was dead.

So, how common is this problem really?

I know that if the use_single_item rule is ON, for whatever reason they won't pick the rifle if they have the shotgun (I've also seen some NPCs pick the rifle, drop the shotgun, and then drop the rifle and pick the shotgun again once they notice it on the ground).

Just in case, I changed the ef_weapon_type of the BM16 and the TOZ34 from 7 to five.

The NPC uses the shotgun like a pistol, firing the shotgun's two shells as fast as possible, then reloading.

The Garbage newbie behaved exactly as with the unmodded weapons (rifle not equiped immediately, but used once in combat).

Granted, those are the only weapons I tested. Maybe I also tested with an AK-74, but I can't remember.
  00:28:44  5 September 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
Messages: 6342

---QUOTATION---
Just in case, I changed the ef_weapon_type of the BM16 and the TOZ34 from 7 to five.

The NPC uses the shotgun like a pistol, firing the shotgun's two shells as fast as possible, then reloading.
---END QUOTATION---


I noticed this behaviour as well a while ago, when I was messing around with the ef_weapon_type values. After that, I reverted to the vanilla values.
I think its just the assault rifles that need ef_weapon_type values higher than 10, so npc's will favour them over shotguns.
I'm still trying to sort through all this info, and figure out the best way to apply it without getting glitches like this.
  07:11:52  5 September 2012
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
 

Message edited by:
MrSeyker
09/05/2012 16:43:55
Messages: 438
I actually think the bug is acceptable for the double-barrelled shotguns, as they have two triggers. Just think of them firing both barrels simultaneously (or almost).

That fix should be avoided with the SPAS12 and the Winchester, though.
  09:41:19  5 September 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
Messages: 6342
Also, setting the shotguns to 5 or 6 results in them firing all shots at high speed, including combat shotguns. Realism goes out the window when an NPC fires a Chaser 13 faster than is humanly possible to do.
The ef_weapon_type values for shotguns and sniper rifles looks like it needs to be left alone, but AR's can have their type changed safely, it seems, provided it isn't to a 7 or 8. Ranking them 12 and above seems safe.
  11:00:51  5 September 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
09/05/2012 11:16:24
Messages: 1430
@ZaGaR

---QUOTATION---
Then it really works my man.
Cheers
---END QUOTATION---


it sure does bro


---QUOTATION---
I played recently a russian mod that had the pistols = ef_weapon_type = 4 with no visible problems. It seems that this setting made the pistols a kind of "lesser choice", when the sawed-off is set bm_16 = ef_weapon_type = 5 . Don't know if you tested such combo.
---END QUOTATION---



The whole reason that i started looking into this ef_wpn_type stuffs is from the posts by Skull Hunter in this thread:
AMK Weapon Add-on - WIP
https://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr&thm_id=14310&page=5&sec_id=16
(this is the same thread that Loner1 stated was of no relevance now)

if you look through skull hunters thread and take note of his pistol settings (from page 5), and then in later pages you will see that some of his users report similar problems as in my notes.

you see, Skull Hunter and Silver Power thought that they had cracked it, actually they had come very close but hadnt put the final pieces in place, so he couldnt quite fix these issues.

i also got hints about this from some posts that NatVac was involved in that hinted at all this stuff about each of the types being employed differently by the AI. thats in one of the threads that i refernaced my OP. thats why i included all these refernaces, and then posted in each of these threads to effectively close them all(well at the least on this topic anyway).

this got me onto testing each of the ef_wpn_type & ef_main_wpn_type values to come to the conclusions i've stated in my OP and is how i've come up with the list that i posted in the Reb 1.2 thread (link on previous page).

so i have to thank Skull Hunter and Silver Power (even tho they are no longer around) for starting this valuable work.


@MrSeyker

---QUOTATION---
I was testing some guns with use_single_item to off and the default shotguns and rifles.

Gave that NPC you save at the garbage a Sawn-Off and ammo, and then gave him an AK-74U and ammo. He never equiped the rifle, until I attacked him.

He then switched to the rifle and kept using it until I was dead.

So, how common is this problem really?
---END QUOTATION---


Were you using vanilla ef_weapon_type settings? or were they modified in anyway?

Thats normal, that they may not equip the wpn until next combat, sometimes they may wait till midway through a battle. but once they change to the higher typed wpn, they dont seem to switch back.
(of course they must also have ammo for the new weapon too)


---QUOTATION---
I know that if the use_single_item rule is ON, for whatever reason they won't pick the rifle if they have the shotgun (I've also seen some NPCs pick the rifle, drop the shotgun, and then drop the rifle and pick the shotgun again once they notice it on the ground).
---END QUOTATION---


there preferance is for the wpn with the highest ef_wpn_type value, regardless of single_item_rule or not.

in vanilla, all assault rifles are type 6, while all shotguns are type 7, thats why they prefer shotguns over assault rifles in vanilla.


---QUOTATION---
Just in case, I changed the ef_weapon_type of the BM16 and the TOZ34 from 7 to five.

The NPC uses the shotgun like a pistol, firing the shotgun's two shells as fast as possible, then reloading.
---END QUOTATION---


yeah, i had this aswell, so i've now changed all my double barrel shotguns back to type 7. and thats exactly as described by the table in my OP.


---QUOTATION---
The Garbage newbie behaved exactly as with the unmodded weapons (rifle not equiped immediately, but used once in combat).
---END QUOTATION---


what unmodded wpns?


---QUOTATION---
Granted, those are the only weapons I tested. Maybe I also tested with an AK-74, but I can't remember.
---END QUOTATION---




---QUOTATION---
I actually think the bug is acceptable for the double-barrelled shotguns, as they have two triggers. Just think of them firing both barrells simultaneously (or almost).

That fix should be avoided with the SPAS12 and the Winchester, though.
---END QUOTATION---


that's right, using this method you can set all your weapons as you see fit.

@SetaKat

---QUOTATION---
I noticed this behaviour as well a while ago, when I was messing around with the ef_weapon_type values. After that, I reverted to the vanilla values.
I think its just the assault rifles that need ef_weapon_type values higher than 10, so npc's will favour them over shotguns.
I'm still trying to sort through all this info, and figure out the best way to apply it without getting glitches like this.
---END QUOTATION---


you can look at my mod's thread for an example list of how i've set every wpn if you like. link on previous page.


---QUOTATION---
Also, setting the shotguns to 5 or 6 results in them firing all shots at high speed, including combat shotguns. Realism goes out the window when an NPC fires a Chaser 13 faster than is humanly possible to do.
The ef_weapon_type values for shotguns and sniper rifles looks like it needs to be left alone, but AR's can have their type changed safely, it seems, provided it isn't to a 7 or 8. Ranking them 12 and above seems safe.
---END QUOTATION---


thats right, all this is noted in the OP. the other way to slow that down would be to change the rpm value in the weapon.ltx file. but that's not a solution that i would reccomend (unless your rpm values are way too high in the 1st place. remember that the winchester shouldnt be set faster than the time it takes for the animation to pump the next round. mine is set to rpm = 46 for this reason).

Cheers all for your valued feedback, remember that i dont have all the answers, and their is still some finer details that are still unknown.

EDITS: formatting
  16:50:21  5 September 2012
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
Messages: 438
The shotguns I used in my test were all unmodded, Strom Shadow.

That's why I questioned how prevalent was the bug once use_single_weapon is set to off.

The second time I tested the behavior, I had changed the shotgun's ef_weapon_type to that of a pistol (but only the double barelled shotguns, as they are the lesser tier ones).
  01:29:50  7 September 2012
profilee-mailreply Message URLTo the Top
Daemonion
All About Audio
(Resident)

 

 
On forum: 09/27/2011
Messages: 567
All this stuff is really interesting, thanks for sharing.
  21:23:42  9 September 2012
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
 

Message edited by:
SacriPan
09/09/2012 21:46:51
Messages: 319
A little contribution related to weapon classes:


WP_LR300: This class is *NOT* what you think it is, period. It has NOTHING to do with assault rifles. This is the SMG class.
--> must be reffering to assault rifle that can't equip scope or GL like SMG

WP_AK74: Generic assault-rifle class.
--> can equip everithing

WP_GROZA: High-end AR class - FN2000 and Groza use it.
--> built-in GL

WP_VAL: Enhanced AR class, but (probably) not intended to be higher in
the rankings as the Groza-style guns are.
--> no GL intended

WP_SHOTG: Shotgun class - semi-autos only."
--> shotgun with "tri_state_reload" (reloading bullet/shells one by one)


I say this because it became pretty clear with my modded weapons.

--> An AK-74 Sniper, can't be declared with a sniper class if you still want to equip it with GL. The right-click entry in the inventory is there, the icon shows up, but you can't switch to GL at all.
Switch its class to AK74 (meant to receive every add-on) and it will work.

I think the "weapon_class" variable is more important to define the weapon, if it is used... (didn't do trial & error with it)

--> WP_SHOTG is used for the sniper mosin nagant, the version with bullet by bullet reload.

--> The saiga (auto shotgun with a clip) use an assault rifle or SMG class.


So classes have importance for us because of how the weapons behave, but I don't think it matters for NPCs. I could be wrong though....
  22:17:32  9 September 2012
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
Messages: 319
Ok the "weapon_class" is deteminant.

--> for the AK74_sniper example:

I set it to AK_74 which is an assault rifle "class". But as it's derivated from an assault rifle, I still want to be able to mount a GL. For this, I DO HAVE to set it to:

class = AK-74
weapon_class = assault_rifle

If I didn't want to mount a GL, I could set it like that:
class = WP_VINT
weapon_class = sniper_rifle
  10:13:23  10 September 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
09/10/2012 10:39:55
Messages: 1430

---QUOTATION---
That's why I questioned how prevalent was the bug once use_single_weapon is set to off.
---END QUOTATION---


@MrSeyker, bro the whole point of this tut is to answer the questions that have been posed and mysterious about all this stuffs, as per the articles that I referenced in the OP.

If this is not an issue for you, then you dont need to worry about it. But as you can see from the years of us wondering about all this stuffs, to some of us, it is an issue.


@Sacipan, good work on adding that additional infos in bro.

also bro, did you know that the classes are defined by class_register.script?
	
cs_register	(object_factory, "CWeaponAK74",		"se_item.se_weapon_magazined_w_gl",	"WP_AK74",	"wpn_ak74_s")
cs_register	(object_factory, "CWeaponLR300",	"se_item.se_weapon_magazined",		"WP_LR300",	"wpn_lr300_s")
cs_register	(object_factory, "CWeaponBinoculars","se_item.se_weapon_magazined",		"WP_BINOC",	"wpn_binocular_s")
cs_register	(object_factory, "CWeaponBM16",		"se_item.se_weapon_shotgun",		"WP_BM16",	"wpn_bm16_s")
cs_register	(object_factory, "CWeaponGroza",	"se_item.se_weapon_magazined_w_gl",	"WP_GROZA",	"wpn_groza_s")
cs_register	(object_factory, "CWeaponSVD",		"se_item.se_weapon_magazined",		"WP_SVD",	"wpn_svd_s")
cs_register	(object_factory, "CWeaponHPSA",		"se_item.se_weapon_magazined",		"WP_HPSA",	"wpn_hpsa_s")
cs_register	(object_factory, "CWeaponKnife",	"se_item.se_weapon",			"WP_KNIFE",	"wpn_knife_s")
cs_register	(object_factory, "CWeaponPM",		"se_item.se_weapon_magazined",		"WP_PM",	"wpn_pm_s")
cs_register	(object_factory, "CWeaponRG6",		"se_item.se_weapon_shotgun",		"WP_RG6",	"wpn_rg6_s")
	
cs_register	(object_factory, "CWeaponRPG7",		"se_item.se_weapon_magazined",		"WP_RPG7",	"wpn_rpg7_s")
	
cs_register	(object_factory, "CWeaponShotgun",	"se_item.se_weapon_shotgun",		"WP_SHOTG",	"wpn_shotgun_s")
	
--cs_register	(object_factory, "CWeaponMagazined","se_item.se_weapon_magazined",		"WP_MAGAZ",	"wpn_magazined_s")
	
cs_register	(object_factory, "CWeaponSVU",		"se_item.se_weapon_magazined",		"WP_SVU",	"wpn_svu_s")
cs_register	(object_factory, "CWeaponUSP45",	"se_item.se_weapon_magazined",		"WP_USP45",	"wpn_usp45_s")
cs_register	(object_factory, "CWeaponVal",		"se_item.se_weapon_magazined",		"WP_VAL",	"wpn_val_s")
cs_register	(object_factory, "CWeaponVintorez",	"se_item.se_weapon_magazined",		"WP_VINT",	"wpn_vintorez_s")
cs_register	(object_factory, "CWeaponWalther",	"se_item.se_weapon_magazined",		"WP_WALTH",	"wpn_walther_s")

(not that I can make heads or tails of it?? lol)

Shad.

PS - for those of you who weren't aware of what he was referanceing, it's all to do with SilverPower's old post here:
weapon classes
https://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr&thm_id=13201&sec_id=16

EDITS: Formatting
  17:48:43  10 September 2012
profilee-mailreply Message URLTo the Top
ZaGaR
Skaarj Hybrid - NaPali survivor
(Resident)

 

 
On forum: 07/24/2007
 

Message edited by:
ZaGaR
09/10/2012 17:49:34
Messages: 647
Usually those represent the C classes coded into the engine, not changeable through the script. Most probably, it is another unused script like lua_help.script, just providing documentation for the engine.

It is obvious, that only what's declared WP_AK74 gets a GL.

The WP_LR300 anomaly is maybe related to the lengthy development of the game. In the early 2000s, one of the ZMs experimental products was a "short" 11.5" barrel LR300. Probably at the time, GSC tried to get it in the game as western opposite to AKSU. As the development went on, the LR300 model changed quite a few times. Judging from the weight, 2.7kg and the in-game visual length, the final LR is the real life 14.5" barrel carbine. Yet, we have left in the game the class of a short & light rifle which is not used for anything, even for AKSU which fits perfectly into it.
  20:09:33  10 September 2012
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
Messages: 319
@Shad No I didn't
  11:18:26  8 November 2012
profilee-mailreply Message URLTo the Top
trojanuch
Senior Resident
 

 
On forum: 04/08/2007
Messages: 1444
Very good thread - sincere thanks.

I had my own deal of modifying this stuff previously in CoP (especially fire_queue is a usefull tool) - but its great that you've managed to put it all here in such a systematic form.

I'll be definatelly be digging more into this stuff now.
  17:12:06  2 September 2013
profilee-mailreply Message URLTo the Top
ZaGaR
Skaarj Hybrid - NaPali survivor
(Resident)

 

 
On forum: 07/24/2007
Messages: 647
Shadow my man, the xxxx_m1 and xxxx_m2, a.k.a "unique" pieces seem to be preferred from the engine. I did a test having Cordon NPCs carry mp5_m1 instead of makarovs. After combats, some AI carrying an AN or SIG, dropped it (with ...rule=on) in favor of a good state 9x18-MP5.
  04:07:35  3 September 2013
profilee-mailreply Message URLTo the Top
Storm Shadow
A machine, a Shadow Machine.
(Resident)

 

 
On forum: 11/14/2007
Messages: 1430

---QUOTATION---
Shadow my man, the xxxx_m1 and xxxx_m2, a.k.a "unique" pieces seem to be preferred from the engine. I did a test having Cordon NPCs carry mp5_m1 instead of makarovs. After combats, some AI carrying an AN or SIG, dropped it (with ...rule=on) in favor of a good state 9x18-MP5.
---END QUOTATION---



Zag my man, were you testing with vanilla stalker? or with modified ef wpn types? if not, could you repeat the test with suitable ef wpn types for each wpn tier...

cheers my man.
  23:27:41  3 September 2013
profilee-mailreply Message URLTo the Top
ZaGaR
Skaarj Hybrid - NaPali survivor
(Resident)

 

 
On forum: 07/24/2007
Messages: 647
It is the latest ZRP, man. With the default wpn table, the modified ones are absolutely preferred from AI. Then I did a test with a slightly better wpn table, along your guidelines here, just a few more numbers for AK, AN, SIG and so. Again the xxx_m1 models create confusion.

I believe I have to edit unique_items.ltx and insert specific ef_weapon_type into these models configuration, so they can have a proper ranking against the normal ones.
  03:59:28  4 September 2013
profilee-mailreply Message URLTo the Top
Storm Shadow
A machine, a Shadow Machine.
(Resident)

 

 
On forum: 11/14/2007
Messages: 1430

---QUOTATION---
It is the latest ZRP, man. With the default wpn table, the modified ones are absolutely preferred from AI. Then I did a test with a slightly better wpn table, along your guidelines here, just a few more numbers for AK, AN, SIG and so. Again the xxx_m1 models create confusion.

I believe I have to edit unique_items.ltx and insert specific ef_weapon_type into these models configuration, so they can have a proper ranking against the normal ones.
---END QUOTATION---



you only need to add an ef wpn type varible to unique items if either; it is already modified, or you want it to be in a differant tier to the original.

i cant comment on the latest zrp, as i havn't began my trials of it yet. but, i understand that it involves ai functions that may deal with wpn selection by script.
  06:00:27  14 September 2013
profilee-mailreply Message URLTo the Top
Storm Shadow
A machine, a Shadow Machine.
(Resident)

 

 
On forum: 11/14/2007
 

Message edited by:
Storm Shadow
09/14/2013 6:38:22
Messages: 1430
The Truth About ef_creature_type

Hey guys, revelation time now.

Intro
I had been experiencing a strange bug with these weapon settings that was doing my head in, I pretty much spent from after dinner time last night until almost dawn this morning testing variables and figuring it out, good thing it was a Friday! And guess what, I still don't really understand the system behind it, the why, but I have figured out the solution now, the how. You can make of it what you will.

The Bug
I found that using these weapon settings that NPCs would prefer to switch to a pistol (if avail) to fight mutants. Further digging revealed that this was only with certain low level mutants, such a dogs, rats, zombies.

The Progress
Wondering why, I started experimenting with the weapon files ef_main_weapon_type and with the creature files ef_weapon_type and ef_creature_type.

From this testing, I now believe that in the weapon files; ef_weapon_type relates to range and fire queueing, while ef_main_weapon_type related to the type of target. This is evaluated against the target's (mutant or human) ef_creature_type and ef_weapon_type

I'm not exactly sure how it deduces this evaluation, but my findings below show a full working solution

Solution
*Weapon Config Files:*
1. Configure all of your weapons to your desired ef_weapon_type parameters as detailed in this thread.

2. Set all slot1 weapons (pistols, machine pistols, single handed weapons, etc) to:ef_main_weapon_type = 0

3. Set all slot2 weapons (smg, rifle, shotguns, sniper, machine guns, etc) to:ef_main_weapon_type = 2

*Creature Config Files:*
4. Ensure all creatures are set not lower than: ef_creature_type = 10.

5. Ensure all creatures are set not lower than: ef_weapon_type = 3.

(note: I don't know what ef_detector_type does, but I didn't need to change this at all.)

Hope this helps, please comment with your feedback and findings from using these settings too.

Regards,

Shad
 
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.