ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
Shotgun modding Questions

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  00:22:16  18 October 2013
profilee-mailreply Message URLTo the Top
boy&hisdogs
(Novice)
 
On forum: 10/18/2013
Messages: 6
Shotgun modding Questions

Hello guys. I've been doing some very light weapons modding over the past few years for various FPS games. I am a lifelong hunter and gun nut so unrealistic ballistics annoy me more than the average person.

I've been slowly chipping away at the weapons for Clear Sky and hit a snag. The shotguns. Mainly, the buckshot rounds.

I'm assuming the damage of each pellet adds up to the base damage, right? If I have hit_power = 1.0 in w_toz34.ltx and use buckshot with 10 pellets per shell, then each pellet does .1 damage, correct?

Also, what is the difference between k_pierce and k_ap when it comes to the ammo itself? For instance, a shotgun slug would punch through brush and fences pretty well but wouldn't pierce armor, so it should have a high k_pierce value and a low k_ap value?

Does a bullet's trajectory behave the same way it does in real life? IE: will the bullet hit the ground eventually, instead of taking a perfectly flat trajectory? I assume this is what the k_air_resistance stat is for.

I want my weapons' ranges to be limited by accuracy and trajectory, not by the round simply disappearing in midair. That was extremely frustrating since all I have are shotguns and a mak.

Thank you for reading and I appreciate any input you may have, even if it's not something I asked about.
  07:04:48  19 October 2013
profilee-mailreply Message URLTo the Top
xDeaDManx
Senior Resident
 

 
On forum: 07/28/2008
 

Message edited by:
xDeaDManx
10/19/2013 7:17:50
Messages: 177

---QUOTATION---
I'm assuming the damage of each pellet adds up to the base damage, right? If I have hit_power = 1.0 in w_toz34.ltx and use buckshot with 10 pellets per shell, then each pellet does .1 damage, correct?
---END QUOTATION---



Not quite correct. The hit power of the weapon is multiplied by the hit power of the round. So for a shotgun with 1.0 hit power using slugs (1.0 hit power in the slugs ammo section), the damage is 1.0 * 1.0 = 1.0

This applies regardless of the buck_shot value, so the hit power of a single buck shot pellet (0.3 hit power in ammo section) from a shotgun with 1.0 hit power will be 0.3 * 1.0 = 0.3. The buck_shot value simply multiplies the amount of 'bullets' fired per ammo consumed.



---QUOTATION---
Also, what is the difference between k_pierce and k_ap when it comes to the ammo itself? For instance, a shotgun slug would punch through brush and fences pretty well but wouldn't pierce armor, so it should have a high k_pierce value and a low k_ap value?
---END QUOTATION---



You are correct. k_pierce determines the penetrating ability of a bullet through walls and level objects. k_ap is the armor-piercing ability of the bullet.

However, k_ap is NOT a multiplier to the enemy's armor, but instead a flat reduction on the damage values found in configs/creatures/damages.ltx. In damages.ltx, under the [body_damage_5] section, the values are 1.0, 0.7. The first value is unimportant and doesn't do anything useful. The second value is the armor rating (not a percentage), with higher values = more armored. If your bullet in the ammo section has k_ap = 0.5, this means that enemies you hit with your bullet will take damage as if they had an armor rating that is 0.5 lower than listed (but armor rating cannot go below zero).

For example, if you shot your bullet at an npc using [body_damage_5], his effective armor rating against that bullet is 0.7 - 0.5 = 0.2, and he will take damage as if your bullet had k_ap = 0 and his armor rating was 0.2.



---QUOTATION---
Does a bullet's trajectory behave the same way it does in real life? IE: will the bullet hit the ground eventually, instead of taking a perfectly flat trajectory? I assume this is what the k_air_resistance stat is for.
---END QUOTATION---



Yes, bullets will behave, by default, according to near-real life physics. Look in configs/weapons/weapons.ltx. The first section in the file is [bullet_manager], which determines a few things.

gravity_const is the acceleration at which the bullet will drop (and by default is set to real-life settings).

air_resistance_k is a constant which will slow down the bullet over time, though I don't know the exact calculation. A higher value results in more air resistance.

Also look at hit_probability_max_dist, as you'll probably want to change this. hit_probability_max_dist does exactly what it says: it is the percent value that, at the maximum distance indicated by your gun and ammo type, a hit on an enemy will register as an actual damaging hit. The probability of your hits registering as damaging hits starts at 100% at 0 distance and decreases gradually to the value specified for hit_probability_max_dist. If you want your bullets to always hurt your enemies when they hit, regardless of range, you should change it to hit_probability_max_dist = 100, implying that it will always damage if it hits.


---QUOTATION---
I want my weapons' ranges to be limited by accuracy and trajectory, not by the round simply disappearing in midair. That was extremely frustrating since all I have are shotguns and a mak.
---END QUOTATION---



The maximum range of a weapon is specified in each weapon file's ltx. The parameter is fire_distance. Increasing this will increase the maximum range before your bullet disappears. You'll notice that some guns have awful fire_distance values, such as the PM, with a value of fire_distance = 30 (that's meters).

Alternatively, you can increase the value of k_dist for the desired ammo types (or all ammo types) in each ammo section. k_dist is a multiplier to the weapon's maximum distance value, which means that a k_dist value of 10 or greater will essentially make all bullets never disappear before hitting the ground.

If you're interested in changing accuracy to a sway-oriented accuracy instead of the random-dispersion accuracy, you can play around with the values at the bottom of configs/misc/effectors.ltx. Under the section [zoom_intertion_effector], you can play around with all those values to implement some sway. Here's an example from the SoC SMP:

[zoom_inertion_effector]
camera_move_epsilon = 0.02 ;maximum angle shift between sway cycles
disp_min = 0.00 ;don't use this, use the disp_k below
speed_min = 0.000 ;don't use this, use the speed_k below
zoom_aim_disp_k = 0.04 ;minimum amplitude of a sway cycle
zoom_aim_speed_k = 0.00 ;minimum speed of sway
delta_time = 180 ;time between sway cycles

The reason I say to use the latter two parameters instead of the first two is that the latter 2 parameters will change depending on your stance (i.e. lower sway when crouched and stationary). The PDM values in each weapon ltx file will act as a multiplier to the above zoom_aim_disp_k and zoom_aim_speed_k values, which allows for tuning of each weapon's sway in every stance.


Hope this helped.
  07:44:11  19 October 2013
profilee-mailreply Message URLTo the Top
boy&hisdogs
(Novice)
 
On forum: 10/18/2013
Messages: 6

---QUOTATION---
I'm assuming the damage of each pellet adds up to the base damage, right? If I have hit_power = 1.0 in w_toz34.ltx and use buckshot with 10 pellets per shell, then each pellet does .1 damage, correct?

Not quite correct. The hit power of the weapon is multiplied by the hit power of the round. So for a shotgun with 1.0 hit power using slugs (1.0 hit power in the slugs ammo section), the damage is 1.0 * 1.0 = 1.0

This applies regardless of the buck_shot value, so the hit power of a single buck shot pellet (0.3 hit power in ammo section) from a shotgun with 1.0 hit power will be 0.3 * 1.0 = 0.3. The buck_shot value simply multiplies the amount of 'bullets' fired per ammo consumed.


Also, what is the difference between k_pierce and k_ap when it comes to the ammo itself? For instance, a shotgun slug would punch through brush and fences pretty well but wouldn't pierce armor, so it should have a high k_pierce value and a low k_ap value?

You are correct. k_pierce determines the penetrating ability of a bullet through walls and level objects. k_ap is the armor-piercing ability of the bullet.

However, k_ap is NOT a multiplier to the enemy's armor, but instead a flat reduction on the damage values found in configs/creatures/damages.ltx. In damages.ltx, under the [body_damage_5] section, the values are 1.0, 0.7. The first value is unimportant and doesn't do anything useful. The second value is the armor rating (not a percentage), with higher values = more armored. If your bullet in the ammo section has k_ap = 0.5, this means that enemies you hit with your bullet will take damage as if they had an armor rating that is 0.5 lower than listed (but armor rating cannot go below zero).

For example, if you shot your bullet at an npc using [body_damage_5], his effective armor rating against that bullet is 0.7 - 0.5 = 0.2, and he will take damage as if your bullet had k_ap = 0 and his armor rating was 0.2.


Does a bullet's trajectory behave the same way it does in real life? IE: will the bullet hit the ground eventually, instead of taking a perfectly flat trajectory? I assume this is what the k_air_resistance stat is for.

Yes, bullets will behave, by default, according to near-real life physics. Look in configs/weapons/weapons.ltx. The first section in the file is [bullet_manager], which determines a few things.

gravity_const is the acceleration at which the bullet will drop (and by default is set to real-life settings).

air_resistance_k is a constant which will slow down the bullet over time, though I don't know the exact calculation. A higher value results in more air resistance.

Also look at hit_probability_max_dist, as you'll probably want to change this. hit_probability_max_dist does exactly what it says: it is the percent value that, at the maximum distance indicated by your gun and ammo type, a hit on an enemy will register as an actual damaging hit. The probability of your hits registering as damaging hits starts at 100% at 0 distance and decreases gradually to the value specified for hit_probability_max_dist. If you want your bullets to always hurt your enemies when they hit, regardless of range, you should change it to hit_probability_max_dist = 100, implying that it will always damage if it hits.

I want my weapons' ranges to be limited by accuracy and trajectory, not by the round simply disappearing in midair. That was extremely frustrating since all I have are shotguns and a mak.

The maximum range of a weapon is specified in each weapon file's ltx. The parameter is fire_distance. Increasing this will increase the maximum range before your bullet disappears. You'll notice that some guns have awful fire_distance values, such as the PM, with a value of fire_distance = 30 (that's meters).

Alternatively, you can increase the value of k_dist for the desired ammo types (or all ammo types) in each ammo section. k_dist is a multiplier to the weapon's maximum distance value, which means that a k_dist value of 10 or greater will essentially make all bullets never disappear before hitting the ground.

If you're interested in changing accuracy to a sway-oriented accuracy instead of the random-dispersion accuracy, you can play around with the values at the bottom of configs/misc/effectors.ltx. Under the section [zoom_intertion_effector], you can play around with all those values to implement some sway. Here's an example from the SoC SMP:

[zoom_inertion_effector]
camera_move_epsilon = 0.02 ;maximum angle shift between sway cycles
disp_min = 0.00 ;don't use this, use the disp_k below
speed_min = 0.000 ;don't use this, use the speed_k below
zoom_aim_disp_k = 0.04 ;minimum amplitude of a sway cycle
zoom_aim_speed_k = 0.00 ;minimum speed of sway
delta_time = 180 ;time between sway cycles

The reason I say to use the latter two parameters instead of the first two is that the latter 2 parameters will change depending on your stance (i.e. lower sway when crouched and stationary). The PDM values in each weapon ltx file will act as a multiplier to the above zoom_aim_disp_k and zoom_aim_speed_k values, which allows for tuning of each weapon's sway in every stance.


Hope this helped.
---END QUOTATION---



Wow! That was quite a bit more than I expected! Thank you very much!

To clarify, the k_hit value of the ammo times the hit value of the shotgun is the damage of each pellet? So if my buckshot's k_hit = .3 and the shotgun itself is 1.0 then each pellet does .3 damage? And if the shell has 10 pellets then my target will receive a total of 3.0 damage if hit with all 10 pellets, correct?
  23:11:36  19 October 2013
profilee-mailreply Message URLTo the Top
xDeaDManx
Senior Resident
 

 
On forum: 07/28/2008
Messages: 177

---QUOTATION---
To clarify, the k_hit value of the ammo times the hit value of the shotgun is the damage of each pellet? So if my buckshot's k_hit = .3 and the shotgun itself is 1.0 then each pellet does .3 damage? And if the shell has 10 pellets then my target will receive a total of 3.0 damage if hit with all 10 pellets, correct?
---END QUOTATION---



That's correct.

As a comparison, if you were to change the value of the buck_shot parameter of a random bullet type from 1 to 2, you'll see that, when shooting an enemy, you'll do exactly 2 times the damage. This is only because you have multiplied the amount of bullets by 2. The damage of each single bullet has not changed.
  00:14:36  20 October 2013
profilee-mailreply Message URLTo the Top
boy&hisdogs
(Novice)
 
On forum: 10/18/2013
Messages: 6

---QUOTATION---
To clarify, the k_hit value of the ammo times the hit value of the shotgun is the damage of each pellet? So if my buckshot's k_hit = .3 and the shotgun itself is 1.0 then each pellet does .3 damage? And if the shell has 10 pellets then my target will receive a total of 3.0 damage if hit with all 10 pellets, correct?

That's correct.

As a comparison, if you were to change the value of the buck_shot parameter of a random bullet type from 1 to 2, you'll see that, when shooting an enemy, you'll do exactly 2 times the damage. This is only because you have multiplied the amount of bullets by 2. The damage of each single bullet has not changed.
---END QUOTATION---



Okay, thank you. I've got all my piercing, damage, accuracy, etc. all sorted out now. There is one last thing though. I noticed on the STALKER wiki it says that slugs are "most effective against humans with little to no armor and is ineffective against mutants."

This is absolutely not true in real life, since slugs were designed for hunting pigs and other large, tenacious game. Is this determined by the k_ap and armor level of the creature? Is there another factor I'm missing?
  04:31:21  22 October 2013
profilee-mailreply Message URLTo the Top
xDeaDManx
Senior Resident
 

 
On forum: 07/28/2008
Messages: 177

---QUOTATION---
I noticed on the STALKER wiki it says that slugs are "most effective against humans with little to no armor and is ineffective against mutants."

This is absolutely not true in real life, since slugs were designed for hunting pigs and other large, tenacious game. Is this determined by the k_ap and armor level of the creature? Is there another factor I'm missing?
---END QUOTATION---



Nope, that's just the STALKER wiki being a bit dumb. The reason it might be considered "ineffective" against mutants is that it generally takes a lot more firepower to kill a mutant, which is maximized by buckshot at close range. It's not that slugs are ineffective against mutants, they're just not as powerful as buckshot at close range.

Unlike Stalkers, mutants don't have any sort of armor ratings, and they are all considered unarmored. So no, there is no other missing factor.
 
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.: Clear Sky 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.