ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
NPC armor in SOC

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  23:03:51  12 August 2019
profilee-mailreply Message URLTo the Top
Senior Resident

On forum: 03/21/2010

Message edited by:
08/14/2019 17:21:49
Messages: 433
NPC armor in SOC

I'm not sure if this is the best forum for this topic, but I figure it might help anyone modding NPCs.

I've been running tests on SOC to determine how the armor is applied to NPCs and what ammo does to inflict damage and this is my understanding of the mechanics according to my results:


This file determines the armor properties of the NPC meshes. It contains sections where armor values are assigned to individual bones, and those are combined into an armor profile that is assigned to each mesh.

bip01_pelvis = 1, 0.15

The second value is the armor property. The first value doesn't seem to do anything in damage calcuation against NPCs.

hit_fraction = 0.1

This is here is important. Hit fraction is, per GSC's use in SOC, intended to be the minimum percentage of total damage that a hit can inflict. 10% for all vanilla armors, except the Skats and the Exos, which take meaguer 5% per shot.

Now, how do weapons affect armor?

Any given weapon's damage output is determined by the weapon's hit power and the ammo multiplier.

weaponDamage = hit_power * k_hit

This damage output is then substracted the amount of bone armor points of a given npc profile.

If the substraction results in a value that is smaller than the armor's hit_fractionDamage (weaponDamage * hit_fraction), then the percentage of total damage will be inflicted.

damage = weaponDamage * hit_fraction

If the value of the substraction is higher than the hit_fractionDamage, then the difference is inflicted.

damage = weaponDamage - bone_armor

Lets use the PM as an example:

PM hit_power = 0.3
9x18 FMJ k_hit = 1
9x18 PMM k_hit = 1.1

A PM loaded with FMJ rounds has an output of 0.3 damage points per hit, while loaded with PMM it increases to 0.33.

When a bullet fired from the PM hits a rookie jacket, the jacket will susbtract 0.15 damage points from the impact.

So an FMJ round inflicts 0.15 damage points, while a PMM round will inflict 0.18.

That's against a jacket, how does it stack against a Stalker suit?

The stalker suit uses the gilet (vest) definition, which has 0.25 armor points.

9x18 FMJ = 0.05 damage per shot
9x18 PMM = 0.08 damage per shot

The next three armor profiles defined (kombez for SEVA, armor for SKAT and exo for the Exoskeleton) all have over 0.4 armor points, so for all of them hit_fraction will apply.

9x18 FMJ = 0.3 * 0.1 = 0.03 damage per shot (kombez)
0.3 * 0.05 = 0.015 (armor and exo)
9x18 PMM = 0.33 * 0.1 = 0.033 damage per shot (kombez)
0.33 * 0.05 = 0.0165 (armor and exo)

Notice that the only instance where the weapon could inflict full damage would be if the profile had bone armor set at 0.

All these numbers are true if the bone multiplier in m_stalker.ltx is set at 1.

In vanilla SOC, all these values are reduced in half when you shoot at the chest, because the torso bones (bip01_spine1 and bip01_spine2) have a 0.5 multiplier. Shooting in the stomach or the pelvis is best as those have 1.0 multiplier.

On the other hand, SOC has use_aim_bullet enabled, so all headshots that hit will have a x5 multiplier applied, as long as a second has passed since the last shot. Otherwise the multiplier will only be x2.

These values can further be messed about by changing fire_wound_immunity in immunities.ltx.

Those are set at 1.0 by default in profiles used by vanilla SOC. These are intended to affect only NPC immunity to anomalies and environment effects the way they are implemented (there is what seems to be an oversight here, as for some reason any NPC profile that uses medium_resistance is 50% more resistant to explosive damage).

Keep in mind that in SOC there is a bunch of unused NPC meshes that some mods restore. Those are very old assets that by default have very antiquated physics boxes and come with old immunity profiles that do mess around with fire_wound_immunity. Any mod that uses these meshes without any alteration is bound to have even more spongy NPCs.

Another way to mess with this is by changing health_hit_part in m_stalker.ltx.

Any change made in m_stalker.ltx will apply to all human NPCs.

Changes in immunities.ltx and damages.ltx depend on which profiles an NPC mesh calls.
  14:14:46  23 August 2019
profilee-mailreply Message URLTo the Top
Storm Shadow
A machine, a Shadow Machine.


On forum: 11/14/2007
Messages: 1430
Very interesting, good discovery.
  06:59:21  1 April 2020
profilee-mailreply Message URLTo the Top
On forum: 03/02/2020
Messages: 16
Very interesting. But I have my guess between all of that. The organization within Xray Engine's .ltx files is a bit confusing, nothing like Source or Unreal, I worked on both engines and honestly in this part everything is very organized and explained.

Anyway, I'm working on a modification and this will help me a lot
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.: 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.