Cyberpunk 2077
0 of 0

File information

Last updated

Original upload

Created by


Uploaded by


Virus scan

Safe to use

About this mod

Note: Armor is calculated differently in patch 2.0, and now weapon type doesn't matter at all, so this mod is no longer needed, and won't be updated.

Makes armor reduce damage from ALL weapon types (instead of only ranged) and fixes some ranged weapons where armor was working too much (shotgun, turrets, drones) or not at all (Oda's gun).

Permissions and credits
The Problem:

Thanks to some observations by Scissors (of Full Gameplay Rebalance) that shotguns and some other weapons were doing very little damage to the player, I discovered some weird stuff in the game's armor logic. After some digging, it looks like there are some incorrect data values the game uses to calculate damage reduction for armor for certain weapons, but not others.

Armor is supposed to reduce damage by 0.1 DPS per point of armor. That's what it says in the game. That means that the reduction per hit is different for each weapon, since a shotgun or submachine gun hits more often and for smaller amounts of damage than a rifle or something like that.

In the unmodded game, when processing a hit to the player, the game pulls an "attacksPerSec" stat for the weapon the NPC is using and uses that and the armor point amount to calculate the damage reduction. The problem is that the attacksPerSec value is clearly wrong for a few ranged weapons, and is 0 for all melee weapons, causing those to be unaffected by armor. I don't know if making melee weapons unaffected by armor is intentional or not.

For my armor_works_against_melee mod I just changed attacksPerSec to a new value I found through experimentation whenever it was set to 0. This was ok for melee weapons, but didn't fix the problem with shotguns and other weapons which I didn't know about.

The Solution:

My new solution for all weapons is to calculate attacksPerSec using the NPC's DPS value (determined by their level and the difficulty setting) and the damage of the hit, making the armor damage reduction consistent across all attacks. This results in an identical reduction for most ranged weapons, and a corrected reduction for shotguns (used to be reduced by over 100% for a typical amount of armor), turrets and drones (same), Oda's smart gun (no reduction in unmodded game), and probably some other weapons I didn't encounter in my testing. If you want to test the effects yourself, note that armor can't reduce damage below 1. So you should be able to see that turret and drone attacks do as low as 1 damage to you per bullet in the unmodded game if you have a normal amount of armor for your level.

Shotguns used to do 1 damage per hit before 1.5, when they buffed enemy shotgun damage a bit.

Note: NPCs do not have armor. There is a perk that makes tech weapons ignore armor, I think, and if that has any affect it must be processed somewhere else. Maybe it just grants a bonus to damage.

  • Make sure to DELETE "Cyberpunk 2077/r6/scripts/armor_works_against_melee.reds" if you were using that one. If you use Lifepath Bonuses and Gang/Corp Traits you can just skip this mod because I will incorporate this fix into that mod. They modify the same redscript function, so I have to do it that way.
  • IMPORTANT: This mod depends on redscript. Download and install that first!
  • To install this mod, extract the zip file into the Cyberpunk 2077 installation folder (the mod files go to "Cyberpunk 2077/r6/scripts").

Check out my other mods:

  • redscript by jekky is essential for this mod.
  • Cyber Engine Tweaks is very helpful for debugging redscript-based mods.
  • Thanks to Scissors for noticing the issue and letting me know about it!