ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
Prevent wounded npc being killed by one bullet.

Posted by/on
Question/AnswerMake Oldest Up Sort by Ascending
  13:40:36  21 September 2013
profilee-mailreply Message URLTo the Top
On forum: 02/09/2012

Message edited by:
09/21/2013 13:42:28
Messages: 26
I know how this work, the issue I am having is this.
If I set "def.hp_state" to 50 hp,then after losing enough health and reaching 50 hp, npc will fall on the floor wounded.
While npc wounded, single bullet from a gun even in leg will kill him, which is scripted because if npc have 50 hp a single shot from the gun in the leg shouldn't do anything to him.

It creates a problem, even if I set "def.hp_state" to 50 (give a nice margin to get into wounded state) and shot at him from the assault riffle, lets say I can drop his health to 50 hp with 5 rounds.
So I am sending 6 rounds in his direction, first 5 take his hp down to 50 which is the threshold and sixth round will kill him before he even manage to fall in wounded state.

Its even more random because of the way armor piercing works in stalker.
Technically, depending on the armor and ap in bullet stat, the bullet penetrate npc many times,which mean that even fourth or fifth bullet can drop npc dead even if he has 40% of his health left but is in wounded state.

Because of that I need to find setting/script that is killing npc with one bullet after his health enter threshold margin and disable it, so npc will fall on the floor wounded, but as long as he have health one or two shots wont kill him.
  07:03:14  20 September 2013
profilee-mailreply Message URLTo the Top
Senior Resident

On forum: 07/28/2008
Messages: 177
In xr_wounded.script, look for the following lines:

		local state = wounded_by_state[math.mod(npc:id(), 3)]
		def.hp_state			= "10|"..state.."@help_heavy"
		def.hp_state_see		= "10|"..state.."@help_heavy"
		def.psy_state			= "10|{=best_pistol}psy_armed,psy_pain@wounded_psy|20|{=best_pistol}psy_shoot,psy_pain@{=best_pistol}wounded_psy_shoot,wounded_psy"
		def.hp_victim			= "10|nil"
		def.hp_cover			= "10|false"
		def.hp_fight			= "10|false"
		def.syndata				= ""
		def.help_dialog			= "dm_help_wounded_medkit_dialog"
		def.help_start_dialog	= nil
		def.use_medkit			= true
		def.enable_talk			= true

the number 10 corresponds to the maximum percentage of health that an NPC can be at to go into the 'wounded' state. The line: def.use_medkit = true allows the NPC to use a medkit on himself if he has been injured for a long enough period of time without any outside help.
  14:42:28  6 September 2013
profilee-mailreply Message URLTo the Top
On forum: 02/09/2012

Message edited by:
09/06/2013 14:45:54
Messages: 26
Prevent wounded npc being killed by one bullet.

I would like to get more inured npc's in game, so I raised critical health threshold and raised bullet defence proportionally.
While it much easier now, to get npc into wounded state, I still get many killed.

While npc in wounded state, every bullet that hit him anywhere will kill npc instantly regardless of the amount of health, weapon or place bullet hit.
When npc in wounded state, he often doesnt fall instantly and usually catch a bullet or two, which kill him instantly because he is wounded.

Is there is a way to disable it?
I looked trough xr_wounded.script but cant find anything there that would have this effect on npc.
Would be very grateful if someone can help.
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.: Clear Sky 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.