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

« Previous 10 events | 1 2 3 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  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: 427
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: 6340
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: 1421
@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: 427
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: 1421

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