ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Armor Piercing properties of ammo

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  02:33:18  4 October 2016
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
Messages: 394
Armor Piercing properties of ammo

I know that in CS and COP k_ap defined in ammo handles the capability of ammo to pierce armor, and that ammo in SOC instead just has increased k_hit values for AP ammo.

But I was looking at the code for the ammo used in multiplayer, and they do have a k_ap value in SOC.

So is this something that is actually coded in the engine and nobody payed attention to, something that only affects armor as worn by players or just unimplemented code that was finally finished in CS/COP?
  03:59:26  4 October 2016
profilee-mailreply Message URLTo the Top
TKGP
Senior Resident
 

 
On forum: 01/25/2013
Messages: 454
It only takes effect when the object being hit has a suit equipped. NPCs don't actually have a suit item (nor do monsters, obviously), so it would only matter when they were shooting at you.
But now that you bring it up, I believe if you spawn a suit in someone's inventory it does go into their outfit slot. I'm not 100% certain how or if that interacts with the usual model-based protection but if I'm reading the source right it would be taken into account. Not sure if you can get a monster to wear a suit either.
Warrants testing, in any case.
  07:31:19  4 October 2016
profilee-mailreply Message URLTo the Top
Azhren
(Novice)
 
On forum: 08/09/2014
Messages: 12

---QUOTATION---
Not sure if you can get a monster to wear a suit either.
Warrants testing, in any case.
---END QUOTATION---



Just pictured a controller in an exo-suit. Or a flesh wearing an Army Tac-vest
  19:16:26  4 October 2016
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
 

Message edited by:
SacriPan
10/04/2016 19:18:16
Messages: 319
@MrSeyker
What is sure is that the piercing value works for most objects in the maps, and therefore you and npcs can use those objects as covers (walls, etc).

Do some tests at the beginning of the game. Try to shoot the rookies while they are behind those thin wood walls. Depending on the value that you set, you will be able to hurt them, kill them, or do nothing.

And my opinion is that it's probably one more thing that wasn't fully implemented.

@TKGP
I didn't know about that trick
  05:31:39  5 October 2016
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
Messages: 394

---QUOTATION---
It only takes effect when the object being hit has a suit equipped. NPCs don't actually have a suit item (nor do monsters, obviously), so it would only matter when they were shooting at you.
But now that you bring it up, I believe if you spawn a suit in someone's inventory it does go into their outfit slot. I'm not 100% certain how or if that interacts with the usual model-based protection but if I'm reading the source right it would be taken into account. Not sure if you can get a monster to wear a suit either.
Warrants testing, in any case.
---END QUOTATION---




---QUOTATION---
@MrSeyker
What is sure is that the piercing value works for most objects in the maps, and therefore you and npcs can use those objects as covers (walls, etc).

Do some tests at the beginning of the game. Try to shoot the rookies while they are behind those thin wood walls. Depending on the value that you set, you will be able to hurt them, kill them, or do nothing.

And my opinion is that it's probably one more thing that wasn't fully implemented.

@TKGP
I didn't know about that trick
---END QUOTATION---



I'm well aware of all ammo having piercing properties on the environment. I've often taken damage from shots that manage to pass through some barriers.

If what TKGP says is true, though, it might be worth implementing it in the mod I was working on anyway. The value might not have an effect on NPCs, but it should have an effect on the player, which would add to the difficulty.
  09:34:55  7 September 2017
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
 

Message edited by:
MrSeyker
09/07/2017 12:31:02
Messages: 394
I decided to get back to this while I was editing my weapon mod, and just to see what it does, I set k_ap of 9x18 fmj to 10, equiped the exo, and stood before a rookie at the village. Weapon hit damage was 1.

Killed istantly. So yeah, setting it for AP ammo means you'd have to start paying way more attention to the stalkers in the north, who use mostly AP rounds.

EDIT: It would seem the damage is based on hit_power*(k_hit+(k_hit*k_ap)) when k_ap is better than the armor you wear. k_ap does no damage at all if k_hit is 0, until k_ap goes over 1, in which case it will do crazy amounts of damage.
  02:12:24  22 September 2017
profilee-mailreply Message URLTo the Top
nabsltd
(Novice)
 
On forum: 08/26/2017
Messages: 5

---QUOTATION---
I set k_ap of 9x18 fmj to 10, equiped the exo, and stood before a rookie at the village. Weapon hit damage was 1.

Killed istantly.
---END QUOTATION---


Unfortunately, this is another game issue where it doesn't apply to your shots, but does apply to NPC shots. Although damage to NPCs goes through CAI_Stalker::Hit(), which ends up the same place as the actor getting hit (CEntityCondition::HitOutfitEffect), at that point the code skips the part where the value loaded from k_ap is used, because NPC stalkers don't actually wear armor.

CAI_Stalker uses SBoneProtections data that is loaded through all.spawn, and this gives the same effect as wearing armor (CCustomOutfit also has an SBoneProtections member), but since it's not really armor, k_ap doesn't apply.


---QUOTATION---
EDIT: It would seem the damage is based on hit_power*(k_hit+(k_hit*k_ap)) when k_ap is better than the armor you wear. k_ap does no damage at all if k_hit is 0, until k_ap goes over 1, in which case it will do crazy amounts of damage.
---END QUOTATION---


Actually, any value of k_ap greater than zero starts to increase damage quickly, as the code shows:
float BoneArmour = m_boneProtection->getBoneArmour(element)*GetCondition()*(1-AP);
float NewHitPower = hit_power - BoneArmour;

hit_power is reduced by the protection value of the armor, which means that something like a Beril will completely remove most bullet damage, since it has 0.40 in the armor value. What k_ap does is remove a percentage of that protection, with k_ap at 1 making any armor useless.

The first bug is that this means k_ap does more damage to better armors, since it reduces by a percentage. For example, with k_ap at 0.5, an exoskeleton with value of 0.55 drops to 0.275, while a stalker suit goes from 0.25 to 0.125. In reality, the Kevlar in a stalker suit would provide no protection from an armor-piercing bullet. The huge bug is the lack of check for k_ap greater than one. In that case, it actually makes better armor damage you more. At k_ap of 2, damage to an exoskeleton wearer is increased by 0.55, while someone with a stalker suit only gets 0.25 extra damage.

The code for NPC stalkers doesn't use k_ap:
float BoneArmour = m_boneHitProtection->getBoneArmour(HDS.bone());
float NewHitPower = HDS.damage() - BoneArmour;

This is another place where the game model prevents the realism that the game was praised for. You can use k_ap to make the game harder for the player, but you can't use it to make the game more realistic.
  07:32:34  22 September 2017
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
Messages: 394

---QUOTATION---
You can use k_ap to make the game harder for the player, but you can't use it to make the game more realistic.
---END QUOTATION---



That was my intention. Give the npcs an advantage.

You have seen the source, code, so I'll trust your interpretation, but in my tests, i did survive for longer wearing the exo, as opposed to the leather jacket.
  01:51:30  23 September 2017
profilee-mailreply Message URLTo the Top
nabsltd
(Novice)
 
On forum: 08/26/2017
 

Message edited by:
nabsltd
09/23/2017 1:52:32
Messages: 5

---QUOTATION---
You have seen the source, code, so I'll trust your interpretation, but in my tests, i did survive for longer wearing the exo, as opposed to the leather jacket.
---END QUOTATION---


With k_ap less than about 0.9, that would make sense, since a leather jacket has only a 0.15 armor value. With k_ap from 0.9 to 1.0, both should give the same protection (almost none).

But, with k_ap greater than 1, you should die faster wearing the exoskeleton, and it would be most noticeable for weapons with a low hit_power, since hit hit_power weapons will all slice you up in 3 shots with k_ap = 1, which is the same as wearing no armor.

The source code is quite easy to get. Version 1.5 is available: https://github.com/OpenXRay/xray

I've compared it to the SoC 1.0004 code, and it's pretty much the same.
 
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-2017 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.