so no known damage formula yet?

Post » Sun Jun 24, 2012 9:09 am

Obviously the weapons add or multiply the damage done in Melee combat but what other NORMAL factors are known to be included?

By normal I mean not magic, no perks or spells or potions and such.

Stamina?

Skill I would think...

I need a very simple damage formal to calculate a basic amount of damage for an NPC hitting another NPC with accidental friendly fire.

I already have all the other scripting done to make this happen but I am stuck on how to calc the damage.
As this is accidental and not focused (deliberate) it will not be as much as a normal attack so I am not worried about the "little things".
User avatar
SexyPimpAss
 
Posts: 3416
Joined: Wed Nov 15, 2006 9:24 am

Post » Sun Jun 24, 2012 12:46 am

I also wondered this, just like the criteria for the enemy attack damage data.
User avatar
Strawberry
 
Posts: 3446
Joined: Thu Jul 05, 2007 11:08 am

Post » Sun Jun 24, 2012 12:59 am

As far as I know it's as simple as

base weapon damage * (((fDamageSkillMax - fDamageSkillMin) * skill/100) + fDamageSkillMin)

plus any perks (most higher level NPCs have perks that increase their damage by a large amount, independent from the perks the player has access to. They're called crExtraDamageXX. Power attacks do additional damage as well of course (usually 2x unless the actor has the perk that increases standing power attacks to 2.5x damage).

For the player there are extra game settings called fDamagePCSkillMin and Max.

I know this is correct for the player and I'm pretty sure it's correct for NPCs as well. Stamina, the most useless and bugged attribute ever, has no effect.
User avatar
Janette Segura
 
Posts: 3512
Joined: Wed Aug 22, 2007 12:36 am

Post » Sun Jun 24, 2012 5:45 am

WHAT!!!! oh man..... :down: (Bethesda what were you thinking?)

well I am using the following and it seems to work well for my application:

Weapon Skill x weapon type (dagger= 0.25, sword= 1.0, 2h war hammer= 2.0 etcetera ) x stamina

This was giving me 95 damage for a sword. (75 is about what I normally see NPC take to their health from a sword including their armor.)
So I may throw in some kind of armor check as well.


Have you EVER been able to get play sound to work?

Sound Property HitFlesh Auto

HitFlesh.play(targetRef)

This is in a quest script and I get a compile error saying the HitFlesh is not a property. But I HAVE set HitFlesh to a standard sound that came with the game (no custom sound effect).


Thank you very much Phitt


I know this is correct for the player and I'm pretty sure it's correct for NPCs as well. Stamina, the most useless and bugged attribute ever, has no effect.
User avatar
Daniel Lozano
 
Posts: 3452
Joined: Fri Aug 24, 2007 7:42 am

Post » Sun Jun 24, 2012 10:46 am

I've extensively tested the formula here: http://uesp.net/wiki/Skyrim:Weapons and it seems to be exactly correct

displayed damage = (base damage + smithing increase) * (1 + 0.5 * skill/100) * (1 + perk effects) * (1 + item effects) Perk Effects = .2 * Barbarian/Armsman/Overdraw rank level

Where in this part: (1 + 0.5 * skill/100)

The ''1'' is fDamagePCSkillMin and the ''0.5'' is (fDamagePCSkillMax - fDamagePCSkillMin)

Where vanilla values are

fDamagePCSkillMin = 1
fDamagePCSkillMax = 1.5

Changing these float variables and looking at the new damage shown in the inventory I got exactly the numbers you'd also calculate with this formula.

NPCs use different versions of those float settings where they have the same name without ''PC'', and higher values (presumably to make up for the fact that they can't upgrade their weapons through smithing).

If you want to start taking armor into consideration, the formulas here are also correct: http://uesp.net/wiki/Skyrim:Armor

Don't know from the top of my head which number in that formula is which game setting, but can look it up for u if u want.
User avatar
:)Colleenn
 
Posts: 3461
Joined: Thu Aug 31, 2006 9:03 am


Return to V - Skyrim