NS2 damage in detail

NintendowsNintendows Join Date: 2016-11-07 Member: 223716Members, Squad Five Blue
edited January 2017 in NS2 General Discussion
The current damage model was very confusing for me and everywhere I read about it was wrong or missing huge parts of the logic, so I decided to read the lua code behind it. Below are the results of delving into the depths. It's not super straightforward for me so I apologize in advance if I'm missing something or mis-reading it.

Damage is first multiplied based on the source and receiver:
  • Flamethrower does 2.5 times to flammable things
  • Flamethrower does 1.125 times damage to structures
  • Grenade launcher does 0.8 times damage to players
  • Corrosion is really weird since it only does damage to armor and structure health. Marines take 12% damage, exos take 40% damage and structures take 100%.
  • Nanoshield multiplies damage by 0.68
  • Lerk Umbra multiplies damage by 0.75 against shotguns, bullets (?), miniguns and railguns.
  • Focus adds 16.6% damage per veil if you are using the following abilities: Bite, Spit, LerkBite, Swipe, Stab, Gore. There are exceptions in the code, but they all lead to the same number, as far as I can tell.
  • If you are damaging a structure or exo, crush applies to all damage. The source gets an additional 7% damage per shell.
Vampirism is then calculated if the receiver is a player (exo included) and the damager has vampirism and the attacker follows certain criteria:
  • If a Gorge, not dealing damage with DotMarker, Babbler, Hydra, or anything "biological" (?)
  • If an Onos, not dealing damage with Stomp
  • If a skulk, not dealing damage with parasite or xenocide
    If you met the criteria, the following applies
  • Lifesteal amount is set for any damage you deal based on life form:
    • Skulk gets 14
    • Gorge gets 15
    • Fade gets 20
    • Onos gets 40
    • If you are a lerk, you get 0 lifesteal unless using Spike or Bite abilities: 2 for spiking, 10 for biting.
  • This lifesteal is then multiplied by 0.333 for each veil, so the number remains the same at 3 Veils.
  • Lifesteal only heals you for health, not armor.
If you have armor, damage is applied to armor based on the damage type. No more than 70% of the damage can be applied to armor this way, unless perhaps the reciever is a structure, where up to 90% of the damage can be applied to armor (see below) Any remaining damage is applied to health.
  • Armor fraction starts at 70%, but is increased by crush at this point if the reciever isn't an exo or structure. The source gets an additional 7% armor fraction per shell. So with 3 shells, you deal 91% armor damage, 9% health damage.
  • Armor is reduced by damage based on damage type. Damage types are:
  • Normal: 2 damage = 1 armor
  • Heavy: 1 damage = 1 armor
  • Light: 4 damage = 1 armor
On top of that, there are more exceptions:
  • Structures take a different amount of damage to health compared to armor but I can't quite figure out what that is
  • Babblers cannot take more than 5 damage from anything
  • Gas and poison only deal damage to breathing targets and only to health
  • Nerve Gas only damages aliens and their armor but still has some reductions
  • Poison can't reduce lower than 5
  • Friendlies cannot damage each other, with the exception of self-damage from grenades and splash damage from ARcs.
If you can find more info, let me know and I'll update this.
«1

Comments

  • MephillesMephilles Germany Join Date: 2013-08-07 Member: 186634Members, NS2 Map Tester, NS2 Community Developer
    I don't know if this is completely up to date but I figured out that this helps me quite a bit aswell:

    https://wiki.naturalselection2.com/view/Damage_Types#List_of_Damage_Types
  • KarpmanKarpman Join Date: 2012-11-19 Member: 172488Members
    Trying to apply this to gameplay. Help me out here.

    Normal damage is 1=1 for health, 2=1 for armor.
    Normal damage does 40% damage to health, 70% to armor
    Skulk bite does 75 base normal damage.
    Rines start with 100H 30A.

    So base skulk bite vs base marine does 30 damage to health, 52.5 to armor. Armor absorbs half of normal damage, so armor is subtracted by 26.25. So a rine after one bite is left with 70H, 3.75A.

    Next bite, that 3.75 armor absorbs it's worth of damage. Since armor absorbs half normal damage, 3.75 armor absorbs 7.5 of 75 bite damage. 67.5 bite damage is directed to health. Rine is left with 2.5 health.

    Is this all correct?
  • HandschuhHandschuh Join Date: 2005-03-08 Member: 44338Members, NS2 Playtester, NS2 Community Developer
    Well you are left with 10hp after 2 bites with armor 0 which is 1 parasite.
    And there are no digits behind the dot - I assume.. soundsmore like 2/3 damage to armor
  • BlrgBlrg Join Date: 2013-09-01 Member: 187580Members, Reinforced - Supporter, Reinforced - Gold, Reinforced - Shadow
    Karpman wrote: »
    Normal damage does 40% damage to health, 70% to armor

    70%+40%=110%
  • KarpmanKarpman Join Date: 2012-11-19 Member: 172488Members
    Blrg wrote: »
    Karpman wrote: »
    Normal damage does 40% damage to health, 70% to armor

    70%+40%=110%
    D'oh!

  • KarpmanKarpman Join Date: 2012-11-19 Member: 172488Members
    Soooooo....

    1 skulks bite does 52.5 armor damage, 22.5 health damage. Armor reduced by 26.25, health by 22.5, left with 3.75 armor, 77.5 health. Next bite, armor absorbs 7.5 total damage. 67.5 damage done to health. 77.5-67.5=10 health.

    Eureka!
  • ZdrytchXZdrytchX Australia Join Date: 2016-02-06 Member: 212662Members
    I don't think crush provides extra damage at all. The numbers match up where 75 damage with or without crush deals the same damage. Instead of doing partial damage to armour and health, it'll just deal 37 damage to armour
  • NintendowsNintendows Join Date: 2016-11-07 Member: 223716Members, Squad Five Blue
    Crush just shifts your damage from health to armour against a marine, so it's mostly a downgrade. They still die in the same number of bites because the armour runs out sooner.

    It doesn't do that against anything else. It increases your damage against Exos and structures by 21%.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    Crush is meant for attacking RTs and other structures. Someone's gotta res bite.
  • The_Welsh_WizardThe_Welsh_Wizard Join Date: 2013-09-10 Member: 188101Members, Reinforced - Supporter
    Nintendows wrote: »
    Crush just shifts your damage from health to armour against a marine, so it's mostly a downgrade. They still die in the same number of bites because the armour runs out sooner.

    It doesn't do that against anything else. It increases your damage against Exos and structures by 21%.

    Killing marines armor faster is an upgrade, not a downgrade.
  • NintendowsNintendows Join Date: 2016-11-07 Member: 223716Members, Squad Five Blue
    Nintendows wrote: »
    Crush just shifts your damage from health to armour against a marine, so it's mostly a downgrade. They still die in the same number of bites because the armour runs out sooner.

    It doesn't do that against anything else. It increases your damage against Exos and structures by 21%.

    Killing marines armor faster is an upgrade, not a downgrade.

    To be clear: Biting an armour 3 marine as a skulk with crush leaves the marine with 93 health and 55 armour, but without crush leaves them with 77 health and 63 armour. You're free to think of that as whatever you want, but I see that as a downgrade.
  • HandschuhHandschuh Join Date: 2005-03-08 Member: 44338Members, NS2 Playtester, NS2 Community Developer
    edited March 2017
    Because you need to see the bigger picture.. a comm can restore hp, but no armor and marines who weld cannot shoot..
    So in order to kill a marine which gets medpacks he first needs to get on low armor before he is going to be killed..
    If the marines have armor 3 and your a fade you would learn to appreciate marines with full hp and low armor
  • FoxyFoxy United Kingdom Join Date: 2014-08-19 Member: 198032Members, NS2 Playtester, NS2 Map Tester, Reinforced - Shadow
    A lot of good points made about Crush, It's odd that it feels out of place when damaging marines directly, because its the first actual upgrade that benefits several lifeforms playing together rather than just the individual, albeit this was probably not intended.
  • KarpmanKarpman Join Date: 2012-11-19 Member: 172488Members
    You can get focus and crush together. How does that work out? The community wiki does not have focus data and the new wiki has disappeared.
  • NintendowsNintendows Join Date: 2016-11-07 Member: 223716Members, Squad Five Blue
    Focus adds 16.6% damage per veil if you are using the following abilities: Bite, Spit, LerkBite, Swipe, Stab, Gore. This happens before crush is calculated.
  • ZdrytchXZdrytchX Australia Join Date: 2016-02-06 Member: 212662Members
    I still don't really see crush as much of an upgrade though. Exosuits aren't actually that hard to kill and using crush against a guy welding an exosuit doesn't help your team. I also don't really see the damage upgrade from crush when attacking structures, maybe there is a bug, gotta recheck later
  • KarpmanKarpman Join Date: 2012-11-19 Member: 172488Members
    Onos gore vs exo (after subtracting armor abortion) with and without crush:
      * Without=100 * With=121

    That's a significant amount of extra damage. Vs A1 exos, that's three hits instead of four. Vs A2 it's four hits for both, but crush leaves the exo with seven health after the third hit. At A3, it's 5 hits without crush, 4 with.

    Of course gameplay doesn't happen in a vacuum like my example, but I think it illustrates the point that crush can definitely make a big difference.
  • SteelcapSteelcap Join Date: 2010-11-19 Member: 75049Members, NS2 Playtester, Squad Five Blue, NS2 Community Developer
    See the trouble with crush is that armor is designed to reduce damage, the more of your damage that goes towards armor the more effective it is at that job. So it's just really weird to consider it an upgrade to ensure that you must get through 100% of the armor before you can begin to damage health.

    Since the obverse effect would be so obviously an upgrade it's hard to consider the way it is now as an advantage. The opposite effect being reducing the armor ratio by 7% per level, so at max crush you'd deal 49% armor and 51% health. That would mean a 75 damage skulk would always kill a 100 hp soldier in no more than 3 bites.
  • NintendowsNintendows Join Date: 2016-11-07 Member: 223716Members, Squad Five Blue
    Steelcap wrote: »
    See the trouble with crush is that armor is designed to reduce damage

    Sadly we don't have a lot of insight into the damage system in NS2 or why it was designed this way. I can only find high-level design docs from years ago.
  • HandschuhHandschuh Join Date: 2005-03-08 Member: 44338Members, NS2 Playtester, NS2 Community Developer
    So narrowminded, even tried to read my last post? A jetpack without armor dies much faster than one with full armor.. even with medpacks...
  • KarpmanKarpman Join Date: 2012-11-19 Member: 172488Members
    Steelcap wrote: »
    See the trouble with crush is that armor is designed to reduce damage, the more of your damage that goes towards armor the more effective it is at that job. So it's just really weird to consider it an upgrade to ensure that you must get through 100% of the armor before you can begin to damage health.

    Since the obverse effect would be so obviously an upgrade it's hard to consider the way it is now as an advantage. The opposite effect being reducing the armor ratio by 7% per level, so at max crush you'd deal 49% armor and 51% health. That would mean a 75 damage skulk would always kill a 100 hp soldier in no more than 3 bites.

    Medpacks. You're version of crush would make medpacks work much better. Current crush makes medpacks less effective.
  • NintendowsNintendows Join Date: 2016-11-07 Member: 223716Members, Squad Five Blue
    Karpman wrote: »
    Steelcap wrote: »

    Medpacks. You're version of crush would make medpacks work much better. Current crush makes medpacks less effective.

    Med packs certainly do make marine health almost unimportant, since you can regenerate it all in under a second.
  • VetinariVetinari Join Date: 2013-07-23 Member: 186325Members, Squad Five Blue, Reinforced - Shadow, WC 2013 - Silver
    Nintendows wrote: »
    Karpman wrote: »
    Steelcap wrote: »

    Medpacks. You're version of crush would make medpacks work much better. Current crush makes medpacks less effective.

    Med packs certainly do make marine health almost unimportant, since you can regenerate it all in under a second.

    At the expense of tres, though.

    Over medding is a thing.
  • NintendowsNintendows Join Date: 2016-11-07 Member: 223716Members, Squad Five Blue
    Vetinari wrote: »
    Nintendows wrote: »
    Karpman wrote: »
    Steelcap wrote: »

    Medpacks. You're version of crush would make medpacks work much better. Current crush makes medpacks less effective.

    Med packs certainly do make marine health almost unimportant, since you can regenerate it all in under a second.

    At the expense of tres, though.

    Over medding is a thing.

    I agree. But even spending 12 res to save an extractor is worth it.
  • RevanCoranaRevanCorana Join Date: 2015-08-14 Member: 207125Members
    Regardless which situation the more meds are dropped the riskier it is, because your marine can still die and be just a bigger waste
  • NintendowsNintendows Join Date: 2016-11-07 Member: 223716Members, Squad Five Blue
    Knowing when to abandon a marine and recycle is a valuable skill.
  • VetinariVetinari Join Date: 2013-07-23 Member: 186325Members, Squad Five Blue, Reinforced - Shadow, WC 2013 - Silver
    Nintendows wrote: »
    Knowing when to abandon a marine and recycle is a valuable skill.

    And here I thought you should never recycle RTs.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    Also, "in under a second" is not the same as "instant".
    Under a second is a large window of time in melee range combat..
  • The_Welsh_WizardThe_Welsh_Wizard Join Date: 2013-09-10 Member: 188101Members, Reinforced - Supporter
    Also "under a second" is not even true because you have a pick up delay.
Sign In or Register to comment.