Author Topic: How does damage bonus work?  (Read 5407 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
How does damage bonus work?
« on: November 30, 2015, 11:57:40 am »
Let's assume the Bow has 10 base damage (instead of 0).
Let's assume the Bow user gives it a damage bonus of 40.

What is the final damage spread?

a/ 0-100 ? (10+40 => 50 => 0-200% => 0-100) ...also, if this is the case, does the 0-200% get applied at the end or on both components separately?
b/ 40-60 (10 => 0-200% => 0-20 => +40 => 40-60)
c/ 10-90 (40 => 0-200% => 0-80 => +10 => 10-90)
d/ other?

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: How does damage bonus work?
« Reply #1 on: November 30, 2015, 12:21:44 pm »
I think a) is the proper answer. Might also be, a') (0-20)+(0-80), so 0-100 but more consistent. Need to ask Yankes, who wrote the code to be 100% sure...

Offline Yankes

  • Commander
  • *****
  • Posts: 3207
    • View Profile
Re: How does damage bonus work?
« Reply #2 on: December 01, 2015, 12:14:23 am »
a) bonus damage is added to weapon power and rest of game logic follow normal rules of weapon damage.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: How does damage bonus work?
« Reply #3 on: December 01, 2015, 12:48:29 am »
What about stuff like hammers with +50% stun?

Is it:
a) calculate main weapon power (ie power + stat bonus), multiply by 50% and then subtract armor

b) calculate main weapon power, subtract armor, calculate actual damage, multiply by 50% and apply that extra

The first option is not really useful as the target's armor goes up, whereas the second always remains relevant.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: How does damage bonus work?
« Reply #4 on: December 01, 2015, 01:55:30 am »
b) is true for smoke & Stun weapons. All lethal weapons multiply the Stun damage caused by Fatal Wounds instead.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: How does damage bonus work?
« Reply #5 on: December 01, 2015, 02:41:28 am »
Oh? So that makes it sound like I shouldn't rely on weapons with +100% stun to stun things.. It sounded like it'd work well (do anything above 50% of health as damage and that would stun the target), and in fact it did work rather well ???

I couldn't find in the code where the game calculates damage dealt, or extra stun damage, so I don't really know how much stun it actually means. In UFOPaedia.org, it says 0-4 damage is dealt on per hit, but that's so low that even with +100%, I wouldn't expect to stun much of anything.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: How does damage bonus work?
« Reply #6 on: December 01, 2015, 02:18:44 pm »
and in fact it did work rather well ???

In fact it does work rather well, and that's everything I need to know. It doesn't work reliably but it shouldn't.

Offline Kronos913

  • Captain
  • ***
  • Posts: 88
    • View Profile
Re: How does damage bonus work?
« Reply #7 on: September 02, 2023, 08:01:03 pm »
How to make the weapon amplify the power of the ammo? That is, for the same ammo to have different strengths in different weapons