April 28, 2024, 01:02:39 pm
Username:

Password:

Topic: Damage Formula?  (Read 2951 times)

Boon

  • Posts: 64
    • View Profile
Damage Formula?
« on: May 04, 2014, 10:08:26 am »
Im sure i saw it somewhere but i cant seem to find it.

Does anyone have it? Im asking mostly because im curious as to how ammo mods work.
Wasteland is harsh.

Urukhai

  • Posts: 254
    • View Profile
Re: Damage Formula?
« Reply #1 on: May 04, 2014, 01:37:22 pm »
I may be wrong but from what I remeber I can explain you.

So...
I'm wielding a regular avenger minigun,  2 BRDs and one MRD

I see Boon under psycho and beer and all thoughnesses in CA MK2 with 75% dmg resistance, who is standing 25 hexes away from me, I'm aiming him and start shooting.
Probability of hitting the target: I forgot the exact formula but nevermind

If I hit you with 14 bullets of 5mm AP:)

minimal damage of an avenger is 12 maximal 15.

lets calculate the minimal damage: 12 + 7 (7 brd + brd + mrd)
19*14 = 266! but lets not forget, 5mm AP have 2/3 dmg modifier and -35% target resistance
I have to modify my damage because of AP ammo: 266*2/3 = 178!
But you are a fucking tank, so... lets calculate your resistance 75 - 35 = 40%
Now, I have to put away 40% of 178 = 107 on minimal damage (but don't forget that you have adrenaline rush I don't know how it works exactly after)
On maximal damage you will get 22 * 14 *2 / 3 = 205 - 40% = 123

So, If you are without adrenaline rush and any dermal implants nor a buffed CA. You will get in your face between 107 and 123 dmg :)
What about critical hit probability, I cannot tell you, because I don't know how it works, and it's better so !

I think I answered your question.



Kaaon

  • Guest
Re: Damage Formula?
« Reply #2 on: May 04, 2014, 01:51:14 pm »
you forgot DT :D

Urukhai

  • Posts: 254
    • View Profile
Re: Damage Formula?
« Reply #3 on: May 04, 2014, 02:15:15 pm »
yeah, damge treshold,
your Minimal damage you do - DT (the little number before your resistance in inventory when you are watching what armor you are wearing)
and olny then you calculate your percentage. So it must be lower.

Boon

  • Posts: 64
    • View Profile
Re: Damage Formula?
« Reply #4 on: May 05, 2014, 05:05:53 am »
Yup, that answered it all right, though i have another question.

I was fooling around with JHP and Finesse and it seems they can push the targets resistance to 100%
(which wiki says 90% is the cap) thus doing no damage.

Is 100% resist the true cap?

Say we're out in the wastes.
You're drugged out with CA and Avenger with 90% resist.
Im here with a jacket, finesse and 10mm pistol/AP rounds about to bring the pain.

Would i be up against:

Finesse 30% + 90% = 120% - 35% AP = 85% Resist
or
Finesse 30% + 90% = 100% - 35% AP = 65% Resist
or
I'm wrong about finesse and it DOESN'T exceed the 90% cap, thus:
Finesse 30% + 90% = 90% still - 35% AP = 55% Resist

Wasteland is harsh.

Urukhai

  • Posts: 254
    • View Profile
Re: Damage Formula?
« Reply #5 on: May 05, 2014, 06:45:49 am »
I think that it's the first formula  :D

I tested before. No dmg happened always, when I was shooting with JHP ammo or when I used finess on a full tank. Just tank your self up to 75% and go farm Enclave or BoS. Stay one hexed in front af avenger minigun. The three first shots will be for no dmg, cuz these mobs are using JHP ammo ;)

Kaaon

  • Guest
Re: Damage Formula?
« Reply #6 on: May 05, 2014, 06:58:49 am »
Just tank your self up to 75% and go farm Enclave or BoS. Stay one hexed in front af avenger minigun. The three first shots will be for no dmg, cuz these mobs are using JHP ammo ;)
nope, they have AP ammo loaded defaulty, it was changed 3 months ago
- Changed default ammo type from JHP to AP for some weapons,
« Last Edit: May 05, 2014, 07:20:24 am by Seki »

Urukhai

  • Posts: 254
    • View Profile
Re: Damage Formula?
« Reply #7 on: May 05, 2014, 08:55:06 am »
Omg I haven't farmed them for so much time xD

cubik2k

  • Administrator
  • Posts: 30
    • View Profile
Re: Damage Formula?
« Reply #8 on: May 05, 2014, 07:22:09 pm »
A part of combat.fos:
   // ammo modifiers:
   //DMMod - damage multiplier
   //DDMod - damage divider
   //DRMod - armor damage resistance (DR) modifier
   //Ammo_DTDiv - armor damage treshold (DT) modifier (as AP ammo)

Code: [Select]
int dmgType = attack.DmgType;
   
    int targetDR = target.GetDR(dmgType, attack.AimHead);
    int targetDT = target.GetDT(dmgType, attack.AimHead);

    int partialBypassChance = GetPartialBypassChance(target, attack.AimHead);
    int partialBypassedRounds = 0;
    int armorDR = target.GetArmorDR(dmgType, attack.AimHead);
    int armorDT = target.GetArmorDT(dmgType, attack.AimHead);

    int partialBypassDR = targetDR - armorDR + (armorDR / 4);
    int partialBypassDT = targetDT - armorDT + (armorDT / 4);

    if(FLAG(eff, HF_BYPASS_ARMOR) && dmgType != DAMAGE_EMP)
    {
        targetDT /= 4;
        targetDR /= 4;
        targetDR -= (valid(attacker) ? (attacker.Trait[TRAIT_FINESSE] != 0 ? 30 : 0) : 0);
    }
    else if(weaponPerk == WEAPON_PERK_PENETRATE)
        targetDT /= 5;
    else if(COMBAT_AMMO_AP(attack.Ammo))
        targetDT /= attack.Ammo.Ammo_DTDiv;
else if(isThrust)
targetDT /= 2;



    if(validAttacker && attacker.Trait[TRAIT_FINESSE] != 0)
    {
        targetDR += 30;
        partialBypassDR += 30;
    }
    targetDR += attack.DRMod;   // Always
    partialBypassDR += attack.DRMod;




    partialBypassDR = MIN(partialBypassDR, targetDR);
    targetDR = CLAMP(targetDR, 0, 100);
    partialBypassDR = CLAMP(partialBypassDR, 0, 100);
    partialBypassDT = MIN(partialBypassDT, targetDT);



    int dmgMin = attack.DmgMin + attack.BonusDmg + attack.DmgMin * attack.SelectWeaponBonus(BONUS_WEAPON_MIN_DMG)/100;
    ;
    int dmgMax = attack.DmgMax + attack.BonusDmg + attack.DmgMax * attack.SelectWeaponBonus(BONUS_WEAPON_MAX_DMG)/100;
    ;
    int rawDmg;
    int totalDmg = 0;
    //dmgMul *= attack.DMMod;
    int dmgDiv = 2 * attack.DDMod;



    for(uint i = 0; i < rounds; i++)
    {
rawDmg = Random(dmgMin, dmgMax);
        _dmgMul[i] *= attack.DMMod;
rawDmg *= _dmgMul[i];

        rawDmg /= dmgDiv;
        if(!FLAG(eff, HF_BYPASS_ARMOR) && partialBypassChance > 0 && Random(1, 100) <= partialBypassChance)
        {
            rawDmg -= partialBypassDT;
            rawDmg -= (rawDmg * partialBypassDR) / 100;
            partialBypassedRounds++;
        }
        else
        {
            rawDmg -= targetDT;
            rawDmg -= (rawDmg * targetDR) / 100;
        }
        if(rawDmg > 0)
            totalDmg += rawDmg;
    }