ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Damage and skill levels

« Previous 10 events | 1 2 | All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  04:53:20  31 August 2017
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
Messages: 4263
TKGP, I think you are right that the novice setting is the only one that matters -- at and beyond the hit_probability_max_dist distance.

---QUOTATION---
1. Set max_dist to 0 to eliminate probability falloff due to range as a variable. Set all hit_probs to 1 in both the actor section and one weapon to keep it as simple as possible.
---END QUOTATION---


Well, yeah. Using max_dist 0 proves your point by removing all but the "weapon" contribution (which is not a weapon contribution despite the name; it is just used to determine the ending percentage of shots that hit the player's hitbox and it is always the value from novice in defines.ltx for all weapons as I discussed in the eyeball-burning text I referenced above).

But max_dist is not zero in the game (normally). Here's how I thought it behaved, with vanilla 50% master in actor.ltx, 20% novice in defines.ltx, 10 meter max_dist:

      NPC accuracy on vertical axis
      ^
100%  |
      :
 50%  |\  drop-off starts at point-blank range,
      | \  until hit_probability_max_dist (+) reached (10 meters)
      |  \
 20%  |   ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  0%  +---+--------------------->
      distance from player on horizontal axis


In your example, there is no drop-off; the 20% (you use 100% and 0%) horizontal line starts at the left margin (hit_probability_max_dist = 0). Using a zero value there means you don't get hit at 0% or you do get hit at 100% "weapon" probability. The ending value is also the beginning one.

By using a large value for hit_probability_max_dist, you get a gradual drop from whatever the starting value is to the ending value in defines.ltx. There is a starting value; I'm just no longer sure where it is from. If the code fragment on that Pastebin page is the only place this stuff is used, the point-blank probability is fixed at 1.0 (100%).

Example using a 0 value for the "weapon" setting, a setting of 1.0 for the master difficulty probability (likely moot but the value is still 1.0 either way) and 1000 for max_dist: if the NPC is 100 meters away from you, the 1.0 point-blank accuracy will only reduce to 0.9 (90% chance of a hitbox hit) at 100 meters, one-tenth the distance on its way to a zero chance of hitting you (defines.ltx novice setting) at 1000 meters.

The illustration was given as a table of calculations for a range starting at point-blank to hit_probability_max_dist using the default value of 20% novice in defines.ltx on that thread's page 2 treatise.

It may very well be that it's only the novice setting in defines.ltx and the hit_probability_max_dist that determine the odds, without the actor.ltx value.

(The intent of that thread was to show that the player doesn't have the accuracy penalty that the NPCs do. It wasn't that concerned with the impact of settings on the NPC accuracy. But the statement that the NPC accuracy drops off from a starting value to your novice difficulty ending value at hit_probability_max_dist still seems to fit here. I'll amend my earlier statement to exclude the actor.ltx difficulty setting impact.)

But this means that NPCs do more damage at novice difficulty than at master difficulty without any corresponding reduction in the odds of hitting you. And the immunities setting for the player in actor.ltx is fixed to actor_immunities_gd_master without regard to the difficulty setting. No wonder novice can be harder. What a shocker.

About the only real benefits, then, are the ammo and item drops on corpses and the quicker takedown of opposing forces since you also deal higher damage.

__________

---QUOTATION---
As for hit_probability, it is the probability a bullet doesn't count after it already hit the target. Not really related to aiming or accuracy at all.
---END QUOTATION---


Huh. It sure looks like they are actually missing their shots, Alundaio.
  05:16:50  31 August 2017
profilee-mailreply Message URLTo the Top
TKGP
Senior Resident
 

 
On forum: 01/25/2013
Messages: 454
What I was trying to make clear was that the actor hit probabilities have no impact whatsoever to anything outside of explosives; the weapon contribution is the only contribution. Max_dist simply scales from 100% at 0 distance to the weapon probability at max_dist; although, given the vanilla value is only 10 in SoC and a measly 3 in CoP it may as well not exist in many circumstances.
Regarding where all these mechanics actually come from, xrGame\Level_bullet_manager_firetrace.cpp has the bulk of it, although it's a nightmare to read through.

I'm confused what you mean by this:

---QUOTATION---
But this means that NPCs do more damage at novice difficulty than at master difficulty without any corresponding reduction in the odds of hitting you. And the immunities setting for the player in actor.ltx is fixed to actor_immunities_gd_master without regard to the difficulty setting.
---END QUOTATION---


Do you mean because of the varying hit_powers? For NPCs, they use the master value regardless of difficulty, so that's not a factor. On the other hand, despite immunities_sect in [actor] seeming to be static, the immunity sections do actually work properly based on difficulty (easy to verify by using a scripted hit().)

In short: there are no ways in which Master is easier, and several in which it is harder.
  07:05:03  31 August 2017
profilee-mailreply Message URLTo the Top
Alundaio
Sad Clown
(Resident)

 

 
On forum: 04/05/2010
 

Message edited by:
Alundaio
08/31/2017 7:08:53
Messages: 2230

---QUOTATION---
Huh. It sure looks like they are actually missing their shots, Alundaio.
---END QUOTATION---



The trajectory of the bullet is tested using a ray pick, if it's a hit, probability is calculated, if the probability roll fails to be counted as a hit, it will play a whine sound and alter the trajectory to hit the point on it's longest possible travel time rather then travel time of impact.

It's just a simple cheat to control difficulty without having to alter damages, protections and other stats.
  14:15:25  31 August 2017
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
Messages: 427

---QUOTATION---
I'm confused what you mean by this:
But this means that NPCs do more damage at novice difficulty than at master difficulty without any corresponding reduction in the odds of hitting you. And the immunities setting for the player in actor.ltx is fixed to actor_immunities_gd_master without regard to the difficulty setting.
Do you mean because of the varying hit_powers? For NPCs, they use the master value regardless of difficulty, so that's not a factor. On the other hand, despite immunities_sect in [actor] seeming to be static, the immunity sections do actually work properly based on difficulty (easy to verify by using a scripted hit().).
---END QUOTATION---



I can confirm that player immunities do change with difficulty settings. I did a test run engaging rookie camp loners at close range, and you do tank more hits on lower difficulties.
  02:18:58  1 September 2017
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
 

Message edited by:
NatVac
09/01/2017 2:24:10
Messages: 4263

---QUOTATION---
What I was trying to make clear was that the actor hit probabilities have no impact whatsoever to anything outside of explosives; the weapon contribution is the only contribution. Max_dist simply scales from 100% at 0 distance to the weapon probability at max_dist; although, given the vanilla value is only 10 in SoC and a measly 3 in CoP it may as well not exist in many circumstances.
---END QUOTATION---


I've already agreed that the actor hit probabilities have no impact beyond hit_probability_max_dist, but the impact of hit_probability_max_dist is still present even in vanilla SoC, and the ZRP FPS tweak to make the NPCs more "accurate" is evidently solely depending on that increased range.

Granted, for most vanilla encounters, especially in CoP (3? Really?) the impact of hit_probability_max_dist is not noticeable. Technically, though, it is also a contribution, and makes for a more challenging game when it is increased from its default.

What you've also shown me is that there is nothing outside that code on the Pastebin page that uses the actor hit probabilities, so the point-blank hit probability is 1.0 without regard to the difficulty setting -- unless hit_probability_max_dist is also set to 0 as we've both seen.

It's weird that a zero value for hit_probability_max_dist doesn't crash the game with a divide-by-zero exception. I have confirmed that you can still die with a "weapon" novice hit probability of 0 in an otherwise vanilla game (max_dist of 10), as the hit probability still starts at 100% at point-blank distance.

>> outside of explosives

Yes, and it happens that explosives are not used this way in vanilla SoC (the Red Forest barrels are scripted), and the xStream/Rulix grenade and grenade-launcher mods artificially manage the grenades so that the engine function isn't used. So those actor hit probabilities don't apply at all.

A related clarification: Yes, the "weapon" difficulties are all loaded but only the novice value is used for the "weapon" value. I don't know why I quoted that comment when attempting to say the actor.ltx difficulties were used. I think I was trying to say that it wasn't just the novice value (0.2 in vanilla), it was also the actor.ltx difficulty value -- because my testing experience yielded a much higher probability that I would be struck at a distance less than hit_probability_max_dist. What I've realized here with your comments is that the value at point-blank range is always 1.0, not an actor.ltx probability value related to the difficulty setting.

---QUOTATION---
For NPCs, they use the master value regardless of difficulty, so that's not a factor. On the other hand, despite immunities_sect in [actor] seeming to be static, the immunity sections do actually work properly based on difficulty (easy to verify by using a scripted hit().)
---END QUOTATION---


That is very useful info. My experience is consistent with your immunities_sect comment, but I wasn't going by experience, I was going by the (unused) actor configuration data. It's not the first time I've been burned by misleading cruft/comments in the configuration files or misleading comments in the script files. One small example is the use of the word "immunity" when it is inverted -- zero immunity is full protection and 1.0 immunity is full damage.

And I verified your comment in an easy way. See my reply to MrSeyker below. The bad news is that I need to update the "What You Know That Ain't So" web page. The good news is that it isn't that much of a change. This also invalidates quite a bit of Modifier configuration entries.

>> In short: there are no ways in which Master is easier, and several in which it is harder.

Which is as it should be. Thanks for patiently explaining your info to me.
__________

---QUOTATION---
It's just a simple cheat to control difficulty without having to alter damages, protections and other stats.
---END QUOTATION---


And a very effective cheat from my point of view. Thanks for contributing that, Alundaio. It's good to know.
__________

---QUOTATION---
I can confirm that player immunities do change with difficulty settings. I did a test run engaging rookie camp loners at close range, and you do tank more hits on lower difficulties.
---END QUOTATION---


I can also confirm, MrSeyker. I changed [actor_immunities_gd_novice]'s strike_immunity to 0, then dropped myself from 200 meters. My health didn't change at all on impact while using novice difficulty (debug variable watch on actor.health stayed at 1) but I splashed and instantly died using master (ending actor.health == -1).
  11:10:58  1 September 2017
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
 

Message edited by:
MrSeyker
09/01/2017 11:15:13
Messages: 427

---QUOTATION---
The bad news is that I need to update the "What You Know That Ain't So" web page. The good news is that it isn't that much of a change. This also invalidates quite a bit of Modifier configuration entries.
---END QUOTATION---



The documentation of the ZRP also needs some updates (it still indicates weapon damage goes from novice to master, when it's actually backwards, among all the stuff about immunities and hit probability).

We can finally make use of that defines.ltx file in the optionals, as changing hit probability there does affect all npc weapon accuracy in vanilla.

And I'll have to update the PRP (and get someone at 4chan to update the repositories).
  00:42:35  4 September 2017
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
Messages: 427
This is somewhat related to the subject matter. NatVac, a person in the 4chan forums going over the source code specified some things regarding the use_aim_bullet setting in weapons.

In vanilla SOC, all head bones have a fourth value that is set to 10.

This is the special multiplier that interacts with aim bullets according to what he understood of the code.

Whenever an aim bullet is fired (how often this happens is determined by the time_to_aim setting), this bullet will do extra damage if it hits the bone with the multiplier defined.

The aim bullet otherwise behaves like a regular bullet when hitting any bone that doesn't have the extra multiplier defined.

This would mean a guarranteed headshot with any weapon regardless of their hit_power value, provided the player aims their shot carfully and actually hits the head.

I never performed a thorough test, but it does seem to check out, because the PM only has about 0.3 hit_power, and NPC heads only have a 2.0 multiplier, which would mean you would deal only 0.6 damage to an unarmored NPC.

But you can totally bring down a lightly armored stalker in a single headshot (npcs with head armor do survive the shot).
  01:07:59  4 September 2017
profilee-mailreply Message URLTo the Top
TKGP
Senior Resident
 

 
On forum: 01/25/2013
Messages: 454
@MrSeyker
I compiled it all into an image later so I wouldn't have to keep typing it out.
http://puu.sh/xqOFI/23b5ed7f58.png
The juicy bits are in xrGame\ShootingObject.cpp - CShootingObject::FireBullet and xrGame\damage_manager.cpp - CDamageManager::HitScale
It's pretty straightforward.
  01:24:09  4 September 2017
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
Messages: 427

---QUOTATION---
@MrSeyker
I compiled it all into an image later so I wouldn't have to keep typing it out.
http://puu.sh/xqOFI/23b5ed7f58.png
---END QUOTATION---



Love the last line in that file.

I wonder why those weird changes in NPCs in COP. I would not be surprised if the people working on that game didn't understand what the setting was meant to do.

The fact that they left the value on for the PB and knife makes me think they intended those two to be stealth weapons, but the nerfed multiplier makes the idea moot.
 
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.