I've finally gotten around to write up this 'more info' post about kill counters in Cyberpunk 2077. I'll continue to edit and finetune it for some time after this.
First Group of Stats (Killed, Finished, Defeated, Incapacitated Enemies)
The first and second group of stats are controlled via an internal data tracking system that is mostly hidden without this mod, because in its original form it primarily serves as a progress tracker in the background for certain achievements (e.g. to kill or incapacitate 300 enemies with ranged weapons, 100 enemies with melee weapons etc.). Each damage-dealing hit sends out so called data tracking events with a new NPC kill data tracking request created every time an NPC is killed, finished, defeated, or incapacitated, in summary, "downed." The four categories can be described as below. This is where the mod fixes the companion and robot kills and where body disposals were switched to non-lethal by ensuring they don't damage the NPC.
Incapacitated Basically knocked out - the NPC loses consciousness, but is otherwise unharmed and breathing, their floored bodies even visibly moving slighly. Roleplay-wise it can be assumed they'd wake up in an hour and go about their business. (But code-wise, they DON'T, the bodies just despawn after you leave the area.) Ways to incapacitate an NPC: - Melee: Blunt weapons, Gorilla Arms, Fists - Ranged: - (unless you use a Pax mod) - Quickhacks: Short Circuit, Contagion, late-game Cyberware Malfunction (if queued three times on the same enemy), System Collapse*, Memory Wipe + Reboot Optics + Sonic Shock combo* - Other: Incendiary grenades, Biohaz grenades
Defeated These NPCs suffer serious bodily harm as a result of your attacks, e.g. they get burnt from Overheat or bleeding profusely from bullet wounds. They are not dead yet, they would probably die very soon, but there's a chance they'll get help. The game's internal 'defeat mechanism' decreases their health to 0.1. Ways to defeat an NPC: - Melee: Any blade/thrown weapon hitting them on their limbs. Try to aim at their arms and legs! - Ranged: Any ranged weapon hitting them on their limbs. Try to aim at their arms and legs! - Quickhacks: Overheat - Other: EMP grenades
Finished If you defeat or incapacitate an enemy, and you decide to hit them at least once again for whatever reason, they are marked as finished. These are the equivalent of cold-blooded murders. WARNING! You can finish them accidentally as well, if your weapon deals area-of-effect damage, damage-over-time (with a % chance to deal electrical etc. damage with each hit), or you blow up explosives near them. Ways to finish off an NPC: - Anything, if you hit them again at least one more time (anywhere on their body)
Killed There's no two ways about it, if an NPC is marked as killed, they are well and truly dead! Your attacks leading to this can vary from pre-planned single sniper headshots or dismembering shots, but most often are just hits in the heat of the battle. WARNING! If an otherwise non-lethal weapon deals area-of-effect damage or damage-over-time (with a % chance to deal electrical etc. damage with each hit), you can kill them accidentally as well. Ways to kill an NPC: - Melee: Head hits, hits to the torso with any blade/thrown weapon, Mantis Blades, Monowire, Projectile Launch Systems - Ranged: Headshots, shots to the torso with any ranged weapon - Quickhacks: Synapse Burnout, Suicide, Cyberpsychosis (only self, their other kills are not recorded due to bug), Detonate Grenade*, Blackwall Gateway* - Other: Explosions, Frag grenades, Antipersonnel grenades
*Not recorded in stats due to a bug
Whenever a downed event is recorded, it is classified in one of the below event types:
- If a hit is flagged as non-lethal AND the enemy would, at most, be marked as defeated otherwise --> Incapacitated - If a hit is flagged as defeating an enemy (health down to 0.1) --> Defeated - If neither of the above, but the body was marked as defeated/incapacitated before this hit event --> Finished - If none of the above --> Killed
Second Group of Stats (Downed Enemies, Downed With Melee/Ranged, Downed With Quickhacks/Other)
These are also controlled via the NPC kill data tracking requests and are evaluated at the same stage as the event types of the first group. The game requests if a downed event was sent and a down was recorded, and evaluates these based on a series of simple IF conditions. These are also much more straightforward to understand than the first group. A lot of bugs around which IF case a hit falls under was fixed here.
Downed Enemies This is logged every time a downed event is sent through, for any of the event types of the first category - except for finished enemies, because any Finished enemy was, by definition, already included in either the Defeated or the Incapacitated column before. These were double-counted without this mod. (I.e. if one just queries the vanilla behaviour with e.g. the original Kill Counter mod.)
Downed With Melee/Ranged Any last hit with any of the Melee/Ranged weapons listed under the event types of the first group results in these stats increased by one. (Respectively, of course) Melee includes attacks from normal, quick and strong melee, thrown knives as well as normal and charged Monowire whips. Ranged includes direct and ricochet (reflect) hits.
Downed With Quickhacks/Other The only difference to the vanilla game is that these two stats were added by this mod - otherwise they ostensibly behave the same way as the Downed With Melee/Ranged categories. I've also changed the vanilla code's IF statements to so-called 'nestled IF' statements, which avoids a hit falling into two categories at once by mistake. (E.g. a hit from a 'core' quickhack damage will count as Downed With Quickhacks, even if the quickhack has an area-of-effect damage that finishes an enemy after he was defeated or incapacitated.) The Quickhacks stat is increased if the last hit was from a quickhack or directly a damage-over-time effect. The Other stats is increased if the last hit was directly from area-of-effect damage (explosions or pressure waves).
Third Group of Stats (Downed With Takedowns, Downed With Non-Lethal Takedowns)
These stats are grouped separately, mainly because they are governed by a separate function in the vanilla game - via takedown action data tracking requests, which, unlike the aboves, are called when there is a black-and-white case of a takedown in one of the below categories. (This separation is the cause of the only big outstanding bug that this mod couldn't address so far, the double-count of downs if you hit an NPC that was downed with a Non-Lethal Takedown.) Both of these increase the total Downed Enemies stat and one of the first group stats as well, depending on which event type they are classified into. (This is another fix from this mod.)
Downed With Takedown This is very specific to increasing in one of the following two cases: 1) When you can sneak up behind an enemy, Grab him or her and then select Kill (instead of Non-Lethal Takedown). 2) When you sneak up behind an enemy that is either standing next to a disposal device or you drag them there while grappled, and select Kill and Dump Body. Both of these increase the Killed counter as well.
Downed With Non-Lethal Takedowns Similar to the previous, but instead sneak up to an enemy, Grab him or her and then select Non-Lethal Takedown (instead of Kill). Note that when next to a disposal device, there is no option to 'Non-Lethal Takedown and Dump Body', so that case is not possible for this stat. (In other words, every neutralisation next to a disposal device is a kill-and-dump, with the accompanying animation and the increase is the Killed count column.)
Most of the vanilla code for these descriptions can be found in the three methods of the game code below - they are an interesting read, with the many cases and categories the developers described e.g. for takedowns and attack types. Comparing them with the code for my mod is basically what I've tried to summarise in this stickied post!
Thank you for testing this, and also for sharing the workaround.
I have had multiple gos at it since your report, but I'm ashamed to say I couldn't resolve the issue (yet). I know what it is (or where it is at least), I just can't find a way to correct it. It's a tricky one.
Assuming there's a decent chunk of your audience who are using this mod to help headcanon the challenge of making it through the game in pacifist mode, an on-screen, in-your-face notification that you've just killed someone according to the game's rules would be useful. I have shell shock from the many times I've had to reload an hours-old save to recover my squeaky clean kill count, and even though that hasn't happened so far with the latest revision of this mod, notifications would still potentially permit me to play the game without reflexively checking my stats every 20 minutes.
Ideally, the nature of the notification could be user-defined. For example, I could easily miss a message shunted to the left in post-2.0's tiny little font, but I sure wouldn't miss the front-and-center pop-up message that the game does for certain notifications.
Aye no worries, just didn’t know if you had a chance to check or not (figured the sticky was a “this will most definitely be broken with the new patch” type of deal) - anyway, cheers mate!
I'd love a way to track these stats by Affiliation to see how many of each gang member I am killing and how many regular people(hopefully none) I'm killing. Whether its possible or not, I very much appreciate the work that has been put into this mod and love using it.
Finally got around to starting a new game with this mod from the beginning and have been nurturing my "0 kills" stat so far.
I noticed a likely bug. If I incapacitate an enemy with a melee attack (they are still alive and the mod has not incremented a kill), but then dump them in a trash bin, the mod registers the latter act as a kill. It does not register dumping bodies as a kill if I down them with a (non-lethal) takedown instead. According to the mod description, the latter case is the intended behavior. I'm trying to work some melee knockouts into my loop so I can raise Solo, but for the time being, I won't be able to dump any bodies I incapacitate this way.
Hiya! Thanks for reporting this - This should be fixed now in v1.08. (Hopefully for good; I've had a few goes at it now as evidenced by the changelog lol!)
Not strictly related to this mod, but is there a way of tweaking the kill count in the save file?
Reason I ask is because I was originally going to do my playthrough guns-a-blazing since CDPR famously gave zero purpose (not even a counter) in shooting for a pacifist run. But then I found this mod, and suddenly there actually is purpose. Except I have some kills already tallied.
i weird bug in that mission with the basilisk training and getting laid with panam, when i kill all the raffens, when i try to park the ship an aldecaldo dies, so i cant continue even reloading a previous save :( is there a way to reset the kill counter?
115 comments
This mod is fully compatible with Patch 2.21.
Reinstall of the latest version (1.12) is required, however.
First Group of Stats (Killed, Finished, Defeated, Incapacitated Enemies)
The first and second group of stats are controlled via an internal data tracking system that is mostly hidden without this mod, because in its original form it primarily serves as a progress tracker in the background for certain achievements (e.g. to kill or incapacitate 300 enemies with ranged weapons, 100 enemies with melee weapons etc.). Each damage-dealing hit sends out so called data tracking events with a new NPC kill data tracking request created every time an NPC is killed, finished, defeated, or incapacitated, in summary, "downed." The four categories can be described as below. This is where the mod fixes the companion and robot kills and where body disposals were switched to non-lethal by ensuring they don't damage the NPC.
Incapacitated
Basically knocked out - the NPC loses consciousness, but is otherwise unharmed and breathing, their floored bodies even visibly moving slighly. Roleplay-wise it can be assumed they'd wake up in an hour and go about their business. (But code-wise, they DON'T, the bodies just despawn after you leave the area.) Ways to incapacitate an NPC:
- Melee: Blunt weapons, Gorilla Arms, Fists
- Ranged: - (unless you use a Pax mod)
- Quickhacks: Short Circuit, Contagion, late-game Cyberware Malfunction (if queued three times on the same enemy), System Collapse*, Memory Wipe + Reboot Optics + Sonic Shock combo*
- Other: Incendiary grenades, Biohaz grenades
Defeated
These NPCs suffer serious bodily harm as a result of your attacks, e.g. they get burnt from Overheat or bleeding profusely from bullet wounds. They are not dead yet, they would probably die very soon, but there's a chance they'll get help. The game's internal 'defeat mechanism' decreases their health to 0.1. Ways to defeat an NPC:
- Melee: Any blade/thrown weapon hitting them on their limbs. Try to aim at their arms and legs!
- Ranged: Any ranged weapon hitting them on their limbs. Try to aim at their arms and legs!
- Quickhacks: Overheat
- Other: EMP grenades
Finished
If you defeat or incapacitate an enemy, and you decide to hit them at least once again for whatever reason, they are marked as finished. These are the equivalent of cold-blooded murders. WARNING! You can finish them accidentally as well, if your weapon deals area-of-effect damage, damage-over-time (with a % chance to deal electrical etc. damage with each hit), or you blow up explosives near them. Ways to finish off an NPC:
- Anything, if you hit them again at least one more time (anywhere on their body)
Killed
There's no two ways about it, if an NPC is marked as killed, they are well and truly dead! Your attacks leading to this can vary from pre-planned single sniper headshots or dismembering shots, but most often are just hits in the heat of the battle. WARNING! If an otherwise non-lethal weapon deals area-of-effect damage or damage-over-time (with a % chance to deal electrical etc. damage with each hit), you can kill them accidentally as well. Ways to kill an NPC:
- Melee: Head hits, hits to the torso with any blade/thrown weapon, Mantis Blades, Monowire, Projectile Launch Systems
- Ranged: Headshots, shots to the torso with any ranged weapon
- Quickhacks: Synapse Burnout, Suicide, Cyberpsychosis (only self, their other kills are not recorded due to bug), Detonate Grenade*, Blackwall Gateway*
- Other: Explosions, Frag grenades, Antipersonnel grenades
*Not recorded in stats due to a bug
Whenever a downed event is recorded, it is classified in one of the below event types:
- If a hit is flagged as non-lethal AND the enemy would, at most, be marked as defeated otherwise --> Incapacitated
- If a hit is flagged as defeating an enemy (health down to 0.1) --> Defeated
- If neither of the above, but the body was marked as defeated/incapacitated before this hit event --> Finished
- If none of the above --> Killed
Second Group of Stats (Downed Enemies, Downed With Melee/Ranged, Downed With Quickhacks/Other)
These are also controlled via the NPC kill data tracking requests and are evaluated at the same stage as the event types of the first group. The game requests if a downed event was sent and a down was recorded, and evaluates these based on a series of simple IF conditions. These are also much more straightforward to understand than the first group. A lot of bugs around which IF case a hit falls under was fixed here.
Downed Enemies
This is logged every time a downed event is sent through, for any of the event types of the first category - except for finished enemies, because any Finished enemy was, by definition, already included in either the Defeated or the Incapacitated column before. These were double-counted without this mod. (I.e. if one just queries the vanilla behaviour with e.g. the original Kill Counter mod.)
Downed With Melee/Ranged
Any last hit with any of the Melee/Ranged weapons listed under the event types of the first group results in these stats increased by one. (Respectively, of course) Melee includes attacks from normal, quick and strong melee, thrown knives as well as normal and charged Monowire whips. Ranged includes direct and ricochet (reflect) hits.
Downed With Quickhacks/Other
The only difference to the vanilla game is that these two stats were added by this mod - otherwise they ostensibly behave the same way as the Downed With Melee/Ranged categories. I've also changed the vanilla code's IF statements to so-called 'nestled IF' statements, which avoids a hit falling into two categories at once by mistake. (E.g. a hit from a 'core' quickhack damage will count as Downed With Quickhacks, even if the quickhack has an area-of-effect damage that finishes an enemy after he was defeated or incapacitated.) The Quickhacks stat is increased if the last hit was from a quickhack or directly a damage-over-time effect. The Other stats is increased if the last hit was directly from area-of-effect damage (explosions or pressure waves).
Third Group of Stats (Downed With Takedowns, Downed With Non-Lethal Takedowns)
These stats are grouped separately, mainly because they are governed by a separate function in the vanilla game - via takedown action data tracking requests, which, unlike the aboves, are called when there is a black-and-white case of a takedown in one of the below categories. (This separation is the cause of the only big outstanding bug that this mod couldn't address so far, the double-count of downs if you hit an NPC that was downed with a Non-Lethal Takedown.) Both of these increase the total Downed Enemies stat and one of the first group stats as well, depending on which event type they are classified into. (This is another fix from this mod.)
Downed With Takedown
This is very specific to increasing in one of the following two cases: 1) When you can sneak up behind an enemy, Grab him or her and then select Kill (instead of Non-Lethal Takedown). 2) When you sneak up behind an enemy that is either standing next to a disposal device or you drag them there while grappled, and select Kill and Dump Body. Both of these increase the Killed counter as well.
Downed With Non-Lethal Takedowns
Similar to the previous, but instead sneak up to an enemy, Grab him or her and then select Non-Lethal Takedown (instead of Kill). Note that when next to a disposal device, there is no option to 'Non-Lethal Takedown and Dump Body', so that case is not possible for this stat. (In other words, every neutralisation next to a disposal device is a kill-and-dump, with the accompanying animation and the increase is the Killed count column.)
Most of the vanilla code for these descriptions can be found in the three methods of the game code below - they are an interesting read, with the many cases and categories the developers described e.g. for takedowns and attack types. Comparing them with the code for my mod is basically what I've tried to summarise in this stickied post!
https://codeberg.org/adamsmasher/cyberpunk/src/branch/master/cyberpunk/NPC/NPCPuppet.swift
https://codeberg.org/adamsmasher/cyberpunk/src/branch/master/cyberpunk/systems/dataTrackingSystem.swift
https://codeberg.org/adamsmasher/cyberpunk/src/branch/master/cyberpunk/damage/attackData.swift
Thanks for the update 👍
Sorry English is not my first language!
NCPD's organized crime utilizes non-lethal takedowns to throw enemies into the box.The mission cannot be completed after defeating all enemies!
I then tested using non-lethal knockdowns to knock down all enemies without throwing them into the box.
This time the mission is accomplished.
I have had multiple gos at it since your report, but I'm ashamed to say I couldn't resolve the issue (yet). I know what it is (or where it is at least), I just can't find a way to correct it. It's a tricky one.
Kill notifications.
Assuming there's a decent chunk of your audience who are using this mod to help headcanon the challenge of making it through the game in pacifist mode, an on-screen, in-your-face notification that you've just killed someone according to the game's rules would be useful. I have shell shock from the many times I've had to reload an hours-old save to recover my squeaky clean kill count, and even though that hasn't happened so far with the latest revision of this mod, notifications would still potentially permit me to play the game without reflexively checking my stats every 20 minutes.
Ideally, the nature of the notification could be user-defined. For example, I could easily miss a message shunted to the left in post-2.0's tiny little font, but I sure wouldn't miss the front-and-center pop-up message that the game does for certain notifications.
I've got some IRL things going on atm - and some health issues as well - but I'll look into adding this!
That said, I'm literally just in the middle of updating it right now, so should be out in a few minutes.
Should work now, if you reinstall the latest version (1.11) - let me know if it doesn't, please.
(E.g. Gig: Goodbye, Night City)
The latest version is v1.1 now. (There were two new releases today, v1.08 and v1.1, apologies if it was confusing.)
I noticed a likely bug. If I incapacitate an enemy with a melee attack (they are still alive and the mod has not incremented a kill), but then dump them in a trash bin, the mod registers the latter act as a kill. It does not register dumping bodies as a kill if I down them with a (non-lethal) takedown instead. According to the mod description, the latter case is the intended behavior. I'm trying to work some melee knockouts into my loop so I can raise Solo, but for the time being, I won't be able to dump any bodies I incapacitate this way.
Reason I ask is because I was originally going to do my playthrough guns-a-blazing since CDPR famously gave zero purpose (not even a counter) in shooting for a pacifist run. But then I found this mod, and suddenly there actually is purpose. Except I have some kills already tallied.