Jump to content


How is Sacred 2 Weapon Damage Calculated


Recommended Posts

The generic formula for blueprint bonuses:

On 7/14/2024 at 10:20 AM, Maneus said:

ValueOfBonus = FLOOR((FLOOR(((ValueAt200 - ValueAt0) / 200) * ItemLevel) + ValueAt0) * BlueprintMultiplier * 0.001)

ChanceToEvade = 1000 * ValueOfBonus / (ValueOfBonus + 1000)

OpponentsChanceToEvade = 1000 * ValueOfBonus / (ValueOfBonus + 1000)

ChanceThatOpponentsCannotEvadeAttacks = ValueOfBonus

For all three formulas: to get the percentage that is shown in-game, simply divide by 10. For example: If a formula gives you 666.6..., then the shown percentage in-game is 66.6%.

In the tooltips, there might be precision loss from 32-bit floats. It is very likely to occur when the result is rounded down before dividing by 10. Currently, I don't know if ChanceToEvade and OpponentsChanceToEvade are rounded down. Will test soon.

Note: "Opponent's chance to evade" is shown in-game as a negative value, but my formula below assumes that it is given as a positive value.

 

I haven't done any tests to see how multiple bonuses of the same type stack. See my next post.

 

The bonus type for "Chance to evade" is BONUS_EVADE.

The bonus type for "Opponent's chance to evade is BONUS_NOEVADE.

The bonus type for "Chance that opponents cannot evade attacks" is BONUS_SUREHIT.

 

The full formula for ChanceToHit is:

ChanceToHit = FLOOR2((AttackValue / (AttackValue + FLOOR(DefenseValue * DefenceFactorDiff * 0.001)) + ChanceThatOpponentsCannotEvadeAttacks * 0.001) * (1 - ChanceToEvade * 0.001) * (1 / (1 - OpponentsChanceToEvade * 0.001)))

 

Edit: There are some additional parameters in balance.txt that are very likely playing a role in the formula:

Quote

AttackFactorDiff = {800,1000,1750,2750,4500},
MP_combatvalue = {1000,1100,1210,1330,1460},
HitFactorMT = {1000,1500,2000,2000},

From my previous testing, MP_combatvalue certainly works. But how exactly - I don't know yet.

 

Enough for now. I'll continue tomorrow :yawn:

Edited by Maneus
  • Like! 1
Link to comment
 
8 hours ago, Maneus said:

I haven't done any tests to see how multiple bonuses of the same type stack.

The ValueOfBonus of each item modifier is added together, and then the formula for the specific bonus is applied. For example:

You have two rings with "Chance to evade" (ValueOfBonus = 4500). Individually, each ring states 81.8% in the tooltip. Equipping both rings results in 90%.

ValueOfBonus = 4500 + 4500
ValueOfBonus = 9000

ChanceToEvade = FLOOR(1000 * ValueOfBonus / (ValueOfBonus + 1000))
ChanceToEvade = FLOOR(1000 * 9000 / (9000 + 1000))
ChanceToEvade = FLOOR(1000 * 9000 / 10000)
ChanceToEvade = FLOOR(900)
ChanceToEvade = 900 (Reference value is 90%)

 

  • Like! 1
Link to comment
 
12 hours ago, Maneus said:

The full formula for ChanceToHit is:

ChanceToHit = ROUNDDOWN((AttackValue / (AttackValue + FLOOR(DefenseValue * DefenceFactorDiff * 0.001)) + ChanceThatOpponentsCannotEvadeAttacks * 0.001) * (1 - ChanceToEvade * 0.001) * (1 / (1 - OpponentsChanceToEvade * 0.001)), 2)

Trying to understand that formula(yes I'm dumb so I need to "try":connie_xmas-moose:) I got stuck on the last ", 2)". A recount of the brackets and some googling fixed my confusion. It's just the second value for the ROUNDDOWN function at the start, determining the number of decimals. Man this stuff is getting complicated, but it's certainly worth understanding. And it finally explains how I always reach bs amounts of >200% hit chance.
An imbalance of the (ChanceToEvade, OpponentsChanceToEvade) values causes that.
 

13 hours ago, Maneus said:

There is an exception when AttackValue and DefenseValue are both 0 - in that case, the chance to hit will be 50%. But it is unknown if this percentage is the one that is used in practice. Tooltips tend to be misleading.

Well at least that one should rarely happen in a natural environment. The player's attributes should always contribute some attack/defense value.
The tooltip lying here would suck in general because it would mean we'd never get a nice formula like the one above. Imagine how much dancing with the Gar'Colossus it would take to determine the hit chance formula statistically.
I guess we just have to hope this one is a good, nice and honest tooltip :)

  • Like! 1
Link to comment
 

Regarding the formulas for ChanceToEvade and OpponentsChanceToEvade - the result is not rounded down. In theory, since it is not rounded down, it is much harder to observe precision loss. I'll probably test this at some point. Even if there is precision loss, it concerns only the tooltips, so it is not important.

Regarding the formula for ChanceThatOpponentsCannotEvadeAttacks - precision loss can be observed fairly often, because the ValueOfBonus is rounded down. Again, this concerns only the tooltips.

The skill Shield Lore adds a percentage bonus to the defense value. I assume that it affects all sources of defense. But only while a shield is equipped. The final result is rounded down.

The skill Speed Lore adds a percentage bonus to both attack and defense. Again, I assume that it affects all sources of attack and defense. The value in the tooltip is shown as a flat value, but it is in fact a percentage, and it is missing the decimal part. I think this is already fixed in the popular mods. Example: At skill level 75, the tooltip states "Attack and Defense Value +135". In the inventory screen, 1000 attack becomes 2356 and 1000 defense becomes 2355.

Note to self: Test how percentage bonuses work (roundings).

The wolf that I'm testing on appears to have a +9 attack bonus in bronze difficulty. Because AttackFactorDiff for bronze difficulty is 800, the final attack value becomes 7. This bonus is not present in silver, gold, platinum or niobium. I'll probably look into this later.

HitFactorMT is a multiplier that is applied to both attack and defense. There appear to be no intermediate roundings. So:
TotalAttackValue = FLOOR(AttackValue * AttackFactorDiff * 0.001 * HitFactorMT * 0.001)
TotalDefenseValue = FLOOR(DefenseValue * DefenseFactorDiff * 0.001 * HitFactorMT * 0.001)

MP_combatvalue is not reflected in the Last Opponent section, so we cannot know for sure how it works exactly. Judging by the name, it should multiply the TotalAttackValue and TotalDefenseValue. I have an idea on how to test this.

The weapon lore skills add a flat bonus to the attack value. This includes the skill "skill__enemy_lore" that a lot of creatures have.

Keep in mind skills must be attached directly to the creature (not the "template creature") and have the advanced flag set to 0. Otherwise they will not work. At least, that is what I observed from my earlier testing.

 

My meeting with Mr. Gar'Colossus went well. There were a few issues that we discussed. He kindly asked me to delay publishing my findings until everything is resolved.

Gar'Colossus is given dexterity:

Spoiler

mgr.addCreatureBonus( 76, {
    intensity = 2500,
    bonus = 21,
})

The bonus in blueprint.txt

Spoiler

newBonus = {
--  name = "crbonus_attr_dex_npc",
  rating = 0,
  basedonskill = "SKILL_INVALID",
  type = "BONUS_STATS",
  spez = "STAT_DEX",
  spez2 = "",
  usagebits = 65535,
  minconstraints = {1,0,0},
  difficultyvaluerange0 = {0,23,525},
  difficultyvaluerange1 = {1,25,578},
  difficultyvaluerange2 = {2,28,635},
  difficultyvaluerange3 = {3,31,700},
  difficultyvaluerange4 = {4,34,770},
}
mgr.createBonus(21, newBonus);

At level 200, he has 1925 dexterity.

Spoiler

CreatureLevel = 200
ValueAt0 = 34
ValueAt200 = 770
Intensity = 2500

ValueOfBonus = FLOOR((FLOOR((ValueAt200 - ValueAt0) * (1 / 200) * CreatureOrItemLevel) + ValueAt0) * Intensity * 0.001)
ValueOfBonus = FLOOR((FLOOR((770 - 34) * (1 / 200) * 200) + 34) * 2500 * 0.001)
ValueOfBonus = FLOOR((FLOOR(736) + 34) * 2.5)
ValueOfBonus = FLOOR((736 + 34) * 2.5)
ValueOfBonus = FLOOR(770 * 2.5)
ValueOfBonus = FLOOR(1925)
ValueOfBonus = 1925

Dexteirty = ValueOfBonus
Dexterity = 1925

Gar'Colossus is given strength:

Spoiler

mgr.addCreatureBonus( 76, {
    intensity = 2000,
    bonus = 20,
})

The bonus in blueprint.txt

Spoiler

newBonus = {
--  name = "crbonus_attr_str_npc",
  rating = 0,
  basedonskill = "SKILL_INVALID",
  type = "BONUS_STATS",
  spez = "STAT_STR",
  spez2 = "",
  usagebits = 65535,
  minconstraints = {1,0,0},
  difficultyvaluerange0 = {0,23,525},
  difficultyvaluerange1 = {1,25,578},
  difficultyvaluerange2 = {2,28,635},
  difficultyvaluerange3 = {3,31,700},
  difficultyvaluerange4 = {4,34,770},
}
mgr.createBonus(20, newBonus);

At level 200, he has 1540 strength

Spoiler

CreatureLevel = 200
ValueAt0 = 34
ValueAt200 = 770
Intensity = 2000

ValueOfBonus = FLOOR((FLOOR((ValueAt200 - ValueAt0) * (1 / 200) * CreatureOrItemLevel) + ValueAt0) * Intensity * 0.001)
ValueOfBonus = FLOOR((FLOOR((770 - 34) * (1 / 200) * 200) + 34) * 2000 * 0.001)
ValueOfBonus = FLOOR((FLOOR(736) + 34) * 2)
ValueOfBonus = FLOOR((736 + 34) * 2)
ValueOfBonus = FLOOR(770 * 2)
ValueOfBonus = FLOOR(1540)
ValueOfBonus = 1540

Strength = ValueOfBonus
Strength = 1540

He is also given the skill "skill__enemy_lore".

Spoiler

mgr.addCreatureSkill( 76, {
    skill_id = 63,
    advanced = 0,
    skill_name = "skill__enemy_lore",
})

The skill, at level 66, shoud give him an additional 162 attack.

Spoiler

CreatureSkillLevel = FLOOR(CreatureLevel / 3)
CreatureSkillLevel = FLOOR(200 / 3)
CreatureSkillLevel = FLOOR(66.66666666666667)
CreatureSkillLevel = 66

I gave my character a Weapon Lore skill at that skill level and the tooltip shows 162.

His base attack value should be 1971.

Spoiler

AttackValue = 162 + FLOOR(Strength * 0.8) + FLOOR(Dexterity * 0.3)
AttackValue = 162 + FLOOR(1540 * 0.8) + FLOOR(1925 * 0.3)
AttackValue = 162 + FLOOR(1232) + FLOOR(577.5)
AttackValue = 162 + 1232 + 577
AttackValue = 1971

And his base defense value should be 1925 (equal to his dexterity).

In niobium difficulty his TotalAttackValue should be 17739.

Spoiler

AttackValue = 1971
AttackFactorDiff = 4500 (Niobium)
HitFactorMT = 2000 (Boss, monstertype = 2)

TotalAttackValue = FLOOR(AttackValue * AttackFactorDiff * 0.001 * HitFactorMT * 0.001)
TotalAttackValue = FLOOR(1971 * 4500 * 0.001 * 2000 * 0.001)
TotalAttackValue = FLOOR(17739)
TotalAttackValue = 17739

And his TotalDefenseValue should be 17325.

Spoiler

DefenseValue = 1925
DefenseFactorDiff = 4500 (Niobium)
HitFactorMT = 2000 (Boss, monstertype = 2)

TotalDefenseValue = FLOOR(DefenseValue * DefenseFactorDiff * 0.001 * HitFactorMT * 0.001)
TotalDefenseValue = FLOOR(1925 * 4500 * 0.001 * 2000 * 0.001)
TotalDefenseValue = FLOOR(17325)
TotalDefenseValue = 17325

If I give my character exactly 17325 attack, then the "Player - Chance to hit" should be exactly 50%. And if I give my character exactly 17739 defense, then the "Opponent - Chance to hit" should be exactly 50%. And that is what I see in the Last Opponent section.

But we haven't proven that these are the exact values. If the formulas are correct, then:

If I lower my attack value by 1 (to 17324), then the "Player - Chance to hit" should be exactly 49%. And if I increase my defense value by 1 (to 17740), then the "Opponent - Chance to hit" should be exactly 49%. And that is precisely what happens.

 

 

gar colossus hit chance.jpg

  • Like! 1
Link to comment
 

Some preliminary findings about the skill Combat Reflexes.

The evasion bonus from Combat Reflexes appears to be a separate multiplier in the ChanceToHit formula. It is not merged together with the "Chance to evade" item modifier.

It appears to use a similar formula to the one used by Tactics Lore (Aspect Lore) and Warding Energy Lore. But there is a second layer applied on top - the same formula for ChanceToEvade.

For pre-mastery levels:

ValueOfBonus = FLOOR(100 * (2 / 3) * mean_value * (SkillLevel + SkillPivotPoint * 0.015) / (SkillLevel + SkillPivotPoint)) / 10

For post-mastery levels:

ValueOfBonus = 1000 * (1 / 3) + FLOOR(100 * (2 / 3) * advance_mean_value * (ModifiedSkillLevel + SkillPivotPoint * 0.015) / (ModifiedSkillLevel + SkillPivotPoint)) / 10

And finally:

ChanceToEvade(CR) = 1000 * ValueOfBonus / (ValueOfBonus + 1000)

 

But I don't know if these are the exact formulas used. It is hard to prove.

  • Like! 1
Link to comment
 
9 hours ago, Maneus said:

The weapon lore skills add a flat bonus to the attack value.

This was common knowledge to everyone but the cm_patch team,
which is why they added a wrongful % to the tooltips :connie_xmas-moose:

9 hours ago, Maneus said:

My meeting with Mr. Gar'Colossus went well. There were a few issues that we discussed. He kindly asked me to delay publishing my findings until everything is resolved.

It's nice to hear the two of you are getting along so well. I'm sure that comes from a deep understanding of each others "values".
And what a nice picture of the two of you sharing your values :)
All those barbaric players and campaing quest npcs just wanted him dead.
Turns out all this time Mr. Gar'Colossus was just misunderstood.

2 hours ago, Maneus said:

The evasion bonus from Combat Reflexes appears to be a separate multiplier in the ChanceToHit formula. It is not merged together with the "Chance to evade" item modifier.

That is interesting. That would basically mean against someone with that skill one would almost always have a crappy hitchance. From the wiki: lvl 200 =>+61.4%evade ... now I know what we got those 300% hitchances for... :)

  • Like! 1
Link to comment
 

The impact of Willpower on secondary damage effects

Willpower reduces the total duration of secondary damage DOTs like burning and poison. By reducing the total duration, it indirectly reduces the total damage of the DOT.

The formula for the damage multiplier is:

WillpowerDamageMultiplier = MIN(1, (CreatureLevel + 9) * 0.1 * EffectWillpower * (1 / MAX(1, Willpower)))

NewTotalDamage = TotalDamage * WIllpowerDamageMultiplier

Where:
- EffectWillpower - from balance.txt. Default value is 25.

It doesn't affect spell DOTs.

And it doesn't appear to affect the duration or stat penalty from weaken and freeze. Although I need to study those more, in general.

Question: How does it stack with Spell Resistance Mastery and Detrimental magic effects -X%?

 

 

As a completely separate thing: Both secondary damage DOTs and spell DOTs are affected by the level difference bonus (and probably penalty). In the case of secondary damage DOTs, they benefit twice. First, by increasing the damage of the initial hit (10000 -> 22500), and then a second time by increasing the DOT damage itself (22500 -> 50625).

Also, the secondary damage DOT, when inflicted from a creature to the player's character, appears to be affected by the parameter Enemy_spelldamage (fourth value in niobium).

 

Examples:
A creature at level 1 will reduce the duration of secondary damage DOTs beginning at 26 willpower, where 10000 damage will become 9615.
A creature at level 177 will reduce the duration of secondary damage DOTs beginning at 466 willpower, where 10000 damage will become 9978.
A creature at level 200 will reduce the duration of secondary damage DOTs beginning at 523 willpower, where 10000 damage will become 9990.
A creature at level 200 and having 1000 willpower will reduce the duration of secondary damage DOTs such, that 10000 damage will become 5225.

Edited by Maneus
  • Like! 1
Link to comment
 

Testing the chance to hit in combat

I'm using a High Elf, level 200. Fighting against a wolf, level 2, in niobium difficulty.

DefenseFactorDiff = {650,1000,1500,2500,4500} -> {650,1000,1500,2500,1000}

Case 1:
Character's attack value = 0
Opponent's defense value = 0
Expected hit chance: 50%
Sample size: 150
Results: 80 hits, 70 misses, 53.3% hit chance

Spoiler

ooxoxxxoxoxxoxoxxxxxxxooxxxxooxxxxooooxooxxoxoxoxxxooxoooxxoxooxxxxxooooxooxooxxoxoxoxxoxxooooxxxoooooxxxoxooxooxxxxxoooooxxoxoxooxxoxxoooxxxxoxxxxoox

x = Hit
o = Miss

Case 2:
Character's attack value = 1
Opponent's defense value = 1000
Expected hit chance: 0%
Sample size: 150
Results: 0 hits, 150 misses, 0% hit chance

Case 3:
Character's attack value = 340
Opponent's defense value = 1000
Expected hit chance: 25%
Sample size: 150
Results: 41 hits, 109 misses, 27.3% hit chance

Spoiler

oooooooooooooxoxooooooooxxoooooxoooxoxxooooxxooxoxoxxoooxxoxxooooooooxoooooxooooxoooxoooxoxoooxooooooooxooxxooxxoooxooooxoxooxoooooooxxooxoxoooxoooxox

x = Hit
o = Miss

Case 4:
Character's attack value = 1000
Opponent's defense value = 1000
Expected hit chance: 50%
Sample size: 150
Results: 71 hits, 79 misses, 47.3% hit chance

Spoiler

ooxoxooxxxooooxoooooxoxooxooxoxxxxxoxxxxxoooooooxoxoxoxxoxxoxoxxoooxxxooxxxxooooxooxoxoxoxxxxoxoxoxxoooxxxxooooxooooxxooooxoxxxxoooxxxooooxxxxoxooxoox

x = Hit
o = Miss

Case 5:
Character's attack value = 3000
Opponent's defense value = 1000
Expected hit chance: 75%
Sample size: 150
Results: 106 hits, 44 misses, 70.6% hit chance

Spoiler

xxxxoxoxxxxxxxooxoxoxoxxxxoxooxoxxxxxoxxxoxoxxxxoxxxxoxxxxxoxxxxxxxxxxxxxxxxoxxoxoxxxoooxxoxxxooxxxxxxxxxxooxoxooxxxoxxooxxxxxxoxxxxooxxxxxooxoxxxoooo

x = Hit
o = Miss

Case 6:
Character's attack value = 20000
Opponent's defense value = 1000
Expected hit chance: 95%
Sample size: 150
Results: 139 hits, 11 misses, 92.6% hit chance

Spoiler

xxxooxxxoxxxxxxxxoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxoxxxxxxxxxxxxxxxxxxooxxxxxooxxxxxxxxxxxxxxxxxxxxxxxxxxoxxxxxxxxxxxxxxxxxxxxxxxxxxxxoxxx

x = Hit
o = Miss

 

  • Like! 1
Link to comment
 

These parameters:

Quote

AllEnemy_lvl = {1,10,20,200,250},
Enemy_armor = {800,900,1000,6000,7200},
Enemy_weapondamage = {650,850,1000,3300,3630},
Enemy_spelldamage = {500,800,1000,3500,3850},

They appear to be related.

Specifically Enemy_weapondamage appears to work in the following way:

First, the current creature level is used to determine, let's say a category, based on AllEnemy_lvl.

If the creature level is 200, then it belongs in the fourth category. That means the fourth value of Enemy_weapondamage is used.

But if the creature level is 210, it now sits between the fourth and the fifth categories. So a formula is applied to scale the damage like so:

DamageMultiplier = (FLOOR((CreatureLevel - Level1) * (Value2 - Value1) / (Level2 - Level1)+ Value1) * 0.001

Where:
- Value2 - The value of the higher category (from Enemy_weapondamage).
- Value1 - The value of the lower category (from Enemy_weapondamage).
- Level2 - The level of the higher category (from AllEnemy_lvl).
- Level1 - The level of the lower category (from AllEnemy_lvl).

In this case:

DamageMultiplier = (FLOOR((CreatureLevel - Level1) * (Value2 - Value1) / (Level2 - Level1)+ Value1) * 0.001
DamageMultiplier = (FLOOR((210 - 200) * (3630 - 3300) / (250 - 200)+ 3300) * 0.001
DamageMultiplier = (FLOOR(10 * 330 / 50+ 3300) * 0.001
DamageMultiplier = (FLOOR(66+ 3300) * 0.001
DamageMultiplier = (66 + 3300) * 0.001
DamageMultiplier = 3366 * 0.001
DamageMultiplier = 3.366

So 1000 damage will become 3366. This is exactly what happens in-game.

Additional notes:
- Enemy_weapondamage is not reflected in the Last Opponent section.
- Difficulty level does not matter.
- We know this from before: This multiplier is not applied to the attribute bonus.

I haven't tested the other two parameters.

Another example (in niobium difficulty again):

CreatureLevel = 100

DamageMultiplier = (FLOOR((CreatureLevel - Level1) * (Value2 - Value1) / (Level2 - Level1)+ Value1) * 0.001
DamageMultiplier = (FLOOR((100 - 20) * (3300 - 1000) / (200 - 20)+ 1000) * 0.001
DamageMultiplier = (FLOOR(80 * 2300 / 180+ 1000) * 0.001
DamageMultiplier = (FLOOR(1022.222222222222+ 1000) * 0.001
DamageMultiplier = (1022 + 1000) * 0.001
DamageMultiplier = 2022 * 0.001
DamageMultiplier = 2.022

So 100000 damage will become 202200.

 

Edit: The final division by 1000 is already included in my other formula from here https://darkmatters.org/forums/index.php?/topic/18511-how-is-sacred-2-weapon-damage-calculated/&do=findComment&comment=7146203.

Edit2: I was planning on doing more hit chance tests, but got distracted by this instead.

Edited by Maneus
  • Like! 1
Link to comment
 
 
On 10/5/2024 at 8:09 AM, Maneus said:

The wolf that I'm testing on appears to have a +9 attack bonus in bronze difficulty. Because AttackFactorDiff for bronze difficulty is 800, the final attack value becomes 7. This bonus is not present in silver, gold, platinum or niobium. I'll probably look into this later.

The reason is the skill "skill__enemy_lore"

Spoiler

mgr.addCreatureSkill( 132, {
    skill_id = 63,
    advanced = 1,
    skill_name = "skill__enemy_lore",
})

Even though the "advanced" flag is set to 1, it somehow works in bronze difficulty (and no other difficulty). At skill level 1 it provides a bonus of 9 attack value.

And the formula for the CreatureSkillLevel is actually:

CreatureSkillLevel = MAX(1, FLOOR(CreatureLevel / 3))

So creatures between level 1 and level 5 (both inclusive) have skills at level 1.

Edited by Maneus
  • Like! 1
Link to comment
 

Testing the chance to hit in combat - part 2

Same tests as before, but this time against a level 240 wolf.

Case 1:
Character's attack value = 0
Opponent's defense value = 0
Expected hit chance: 50%
Sample size: 150
Results: 64 hits, 86 misses, 42.6% hit chance

Spoiler

xoxxxoooxooooooooxoooooxooxxxoxxxxxoooooooxoxoooxooxoooxoxoxxooxxxooxxxoxoooxooooxoxooxxxooxoooxoxooxxxxxxoooooooxxoooxoxxoxoooxoxoxooxxxxoxooxxooxxxo

Case 2:
Character's attack value = 1
Opponent's defense value = 1000
Expected hit chance: 0%
Sample size: 150
Results: 0 hits, 150 misses, 0% hit chance

Case 3:
Character's attack value = 340
Opponent's defense value = 1000
Expected hit chance: 25%
Sample size: 150
Results: 43 hits, 107 misses, 28.6% hit chance

Spoiler

oooooxoooooooooooooooxoooxoxooooxoxxoxoooooxoxxoxxoxxoxoooooxxoooxxxooooxoooooooooxoxooooooooooxoooxxxooooooxoooxxoooxoxooxooooxxxoooxoxooxoooxoxxoooo

Case 4:
Character's attack value = 1000
Opponent's defense value = 1000
Expected hit chance: 50%
Sample size: 150
Results: 74 hits, 76 misses, 49.3% hit chance

Spoiler

ooooxooxxoooxooooxxoxooxoxoxxxxxxxooooxoxxxoooxxoxoxoxxxxxoooxxxoxxxxxxxooooooxooooxxxooxoxoxxoooxxxxxoooxoxooxxoxxxoxxoxxoooxoxoooxxxooxooxooxxooooxx

Case 5:
Character's attack value = 3000
Opponent's defense value = 1000
Expected hit chance: 75%
Sample size: 150
Results: 113 hits, 37 misses, 75.3% hit chance

Spoiler

xoxxoxxxxxxooxxoxxoxxxxxxooooxxoxxxxxoxxxoxxxoxoxxxxooxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxooxxoxoxooxxxxxxxxxxxoxxxoxoxxxxxxxxoxxxxoxxxxxoxxxxxoxoxooxxoooo

Case 6:
Character's attack value = 20000
Opponent's defense value = 1000
Expected hit chance: 95%
Sample size: 150
Results: 140 hits, 10 misses, 93.3% hit chance

Spoiler

oxxxoxxxxxxxxxxxxxxxxxxxxxxxxxxooxxxxxxxxxxxxxxxxxxxoxxxxxoxxxxxxxxxxxxxxxxxxxoxxxxxxoxxxxxxxxxxxxxxxxxxxxxxxxxoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxoxxxxxx

 

  • Like! 1
Link to comment
 
 
  • 3 weeks later...
 

Testing the base critical hit chance of weapon attacks at level 200 in niobium difficulty

High Elf, level 200, no attributes or relevant skills, 1 attack value
Wolf, level 200, no attributes or skills, 0 defense value
Chance to hit: 100%
Sample size: 1000
Results: 919 regular hits, 81 critical hits, 8.1% critical hit chance

Spoiler

oooooooxooooooxooooooooooooxoooooooooooooooooooooooooooxxoooooooooooooooooooooooooooooooooooxoooooooxxoxooooooooooxooooooooooooooooooooooooooooooooxxoxoooooooooooooooooooooooooooooooxoooooooooooxoooooooooooxooooooooooxoooooooxoooooooooooooooooxooooxoooxoooooooooooooooooxxoxoooooooooooooooxxoooxooooxooooooooooooooooxooooooxoooooooooooooooooooooooooooooooooooooxooooooooxoooxooooooooooooooooooooooooooooooooooooooooooxoooxooxooooooooooooooxooooooooxooooooooooooooooooooooooooooxoooooooxooooooooooooooxooooooooooooxoooooooooooooooooooooxooooooooooooooooooooooooooxxoxoooooooooooooooooooxoooooooxoooooxoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooxoooooooooooxoxoooooooooooooooooxxooooooooxooxooooxooooooooooooxooooooooooooooxooooooooooooooooooxooooooooooooooooooooxoooooooooooooooxoooooooooooooooxxxooxooxxooooooooooooxooxooxooooooxoooooooxxooooooooooooooooooooooooooooooooooooooooxxoxoooooooooooooooooooxoooxoooooooooooooooooxoooooooooooooooooooxoooooooooooooooooooooo

x = Critical Hit
o = Regular Hit

 

With Chance that opponents cannot evade attacks +100%
Chance to hit: 200%
Sample size: 500
Results: 403 regular hits, 97 critical hits, 19.4% critical hit chance

Spoiler

ooooooooxooxooooxooooxoooooooxoxoxooxxooxoooxooooooooooooooxooxxooxxoooooooooxooooooxooooooooooooxooooooooxxooooxxooooooxxoxoooooooxoooooooxooooooooooxoooxoxxoooooooooooooooxooooooxooooxoooxooxxooooooxooooooxooooooooxoooooooooxoooxoooxooooooooooooxoooooooooxxxooxooxxooxoooooooooxooxooxoooooooxooooooxxoooxoooxoxoooxxooxooooxoooxxooooooxooxoooooxoxoooooxoooooooxooxooooooooxoooxxoooooooxooooooooooooooooooxoooooooooooooooxooooooooxoooxooooxoooxooxooxoooxoooxooooooooooooxxooooxxooxooxxooooooxxooooooo

x = Critical Hit
o = Regular Hit

 

With Chance for critical hits +42%
With Chance that opponents cannot evade attacks +100%
Chance to hit: 200%
Sample size: 200
Results: 76 regular hits, 124 critical hits, 62% critical hit chance

Spoiler

oxoooxxxoxxxxxxoxoxxxxxoxxxoxxoxxxxxooxoxxxxxxxxxxxoxxxoooxxxxxxoxxxooxxxxxxxoxxoooxxoxoxxxxooxxoxxxxooooxxxxoxxxxoxooxxooxoxxxoxxxxoooxoxxxoxooooxooxxooxxxooxxxxxxxooooooxooooooxxoxxxxxxxxoxxooooxoxo

x = Critical Hit
o = Regular Hit

 

With Chance that opponents cannot evade attacks +200%
Chance to hit: 300%
Sample size: 500
Results: 343 regular hits, 157 critical hits, 31.4% critical hit chance

Spoiler

oooooooooxooxoooooooxooxoooooxooxxoxooxooxxooxoooooxooxooxooxoxxxoooooooxoxooxxooooxxooxxxooooooooxxooooooooxoxoooxxxoooooxooxoxxoooxoooooxoxxxooooooooxooxxxooooxxoooooooooxoooooxxxxxooooxoxoxxoooooxooxooxooxxoxooxoooooooooxxooxoooxoxoooooooxoxoooooooxxxxooooxooxooxoooooooooxxxoxoxoooooooxxoooooxxooooxoooxoooxoxxooxooxooxoooxxooooooxoxxoooooxxxxoxoooxoooooxxxxoooxooooxooooxxooxooxoxoooooxooooooooxooxooooooxxoxoxxxxoooooxoooxooooxxoooooooxxoxoooooooxoooooxxxxxxooxoxoxooxooxoxxoxxoooxoooooxoxoxooo

x = Critical Hit
o = Regular Hit

 

With Chance that opponents cannot evade attacks +700%
Chance to hit: 800%
Sample size: 501
Results: 107 regular hits, 394 critical hits, 78.6% critical hit chance

Spoiler

oxooxxxxxxxxxxxooxxxxxxxxxxxxoxxxxxxxxxxxoxoxxxxxxxxoooxxxxxxxoxxxoxxxooxxxoxxoxxxxxxxxxxxxxxxxxxxooooxxxxoxxxxoxxoxxxxxoxxxxxooxoxxxoxooxxoooxxxxxxxxxxooxoxxoxoxxxxoxxxxxxxoxxxxxoxooxxoxoxxxxxxxxxxxxoooooxxxxxoxxxoxxxxxxxxxxxxxxxoxxxoxxxxoxxxoxxoxxxxxxoxoxxxxxxxxxxoxxxxoxxxoxoxoxxxxooxxxxxoxxxxxxxxoxxxxoxxxxxxxxxxxxxxxxxxoxxxxxxxxxxxxoxxxxxxoxxxxxxxooxxxoxxxooxxxxxoxxxxooxoxoxxxxxxxxxxooxxxoxxoxxxxxxxxxxxxxxxxoxxxxxxxxxxxxxooxxxxxoxxxoxxxxxxxxoxxxoxxxxxxoxxxooooxxxxxxoxxooxoooxxxxoxxxxoxxxxxxxxx

x = Critical Hit
o = Regular Hit

 

I gave the wolf the skill Combat Reflexes

Spoiler

mgr.addCreatureSkill( 132, {
    skill_id = 15,
    advanced = 0,
    skill_name = "skill_combat_reflexes",
})

The skill level is 66

Spoiler

CreatureSkillLevel = MAX(1, FLOOR(CreatureLevel / 3))
CreatureSkillLevel = MAX(1, FLOOR(200 / 3))
CreatureSkillLevel = MAX(1, FLOOR(66.66666666666667))
CreatureSkillLevel = MAX(1, 66)
CreatureSkillLevel = 66

At skill level 66, it gives Evade Chance +35.1% and Chance Against Critical Weapon Hits -61.9% (SkillValue = 1626)

To compensate for the Evade Chance, I gave my character Opponent's chance to evade -35.1% (ValueOfBonus = 542).

With Chance that opponents cannot evade attacks +700%
Chance to hit: 800%
Sample size: 500
Results: 105 regular hits, 395 critical hits, 79% critical hit chance

Spoiler

oxxxoxxxxxoxxxxxxxxxxxxxxxoxxxxxxxoxxxxxxxxxxxxxxxooxxxxxxoxxxooxxxxxxxxxxoxxxxxxxxxxxxxxxxxxxxoxooxxxxxoxxoxxoxxoxxoxxxxxxxxooxoxxxoxooooxoooxxxxxxxxxxxxxooxoxoooxxxxxoxxxxxxxoxxxxxxxoxxoxxxoxxxxxxxxxxxxoooxoxxxxxoxxxxoxxoxxxxxxoxxxxxxxxoxoxxxxxoxxxoxxoxxxxxxoxoxxxxxxxxxxxoooxxxxxxoxoxxxooxoooooxxxxoxxxxxxxxooxxoxxxxoxxxxxxxxxxxxoxxxxxxxxxxxxxxxxxxxooxxxxxxoxxoxxxxxoxxooxxxxxxxxxxxxooxoxxxoxxxxxxxxooxxxoxxoxxxxxxxxxxxxxxxoxxxxxxoxoxxoxxxxxxxxxxxxxxoxxxxoxxxxxxxxxxxoooxxoxxxoxxxoxoxxxxxxxoxxooxx

x = Critical Hit
o = Regular Hit

 

Edited by Maneus
Link to comment
 
 
2 hours ago, Eru said:

Hope that helps.

That is amazing! So many things to unpack here...

 

2 hours ago, Eru said:

HitChance/10

While I haven't done thorough tests with less than 100% hit chance, this part of the formula seems to be correct.

 

2 hours ago, Eru said:

(SCV/(Lvl/20+10)+10)/10

I didn't know that the critical chance bonus was affected by the character level, but it indeed is!

Although, judging solely based on the tooltip value, the formula seems to be (SCV / ((Lvl / 20) + 10)) / 10

For example:
At skill level 200 and character level 1.
SCV = 3778
According to the first formula, the critical hit chance should be 38.592039800995 %
According to the second (modified) formula, the critical hit chance should be 37.592039800995 %
The in-game tooltip shows 37.5%.

And I think there are probably some roundings involved too.

 

2 hours ago, Eru said:

the +10/10=1 only seems to get added, if you actually have the skill (but I am not sure here)

Probably. I think there are other such cases.

 

2 hours ago, Eru said:

and ATT is the relevant attribute ( I.e. intelligence, if aspect lore and dexterity, if tactic lore).

Ooh, so dexterity also affects the critical hit chance? I'm going to test this soon.

2 hours ago, Eru said:

ATT/100

I did some rough tests earlier here and found that somewhere up to 9000 intelligence was needed to achieve 100% critical hit chance. That makes a lot of sense now.

 

2 hours ago, Eru said:

I think only CR mastery affects crits. Without mastery it should not do anything here (except lowering hit chance).

I'm going to test this too! :yay:

 

Edited by Maneus
  • Like! 1
Link to comment
 
11 hours ago, Maneus said:

Sample size: 1000

11 hours ago, Maneus said:

Sample size: 500

11 hours ago, Maneus said:

Sample size: 200

11 hours ago, Maneus said:

Sample size: 500

11 hours ago, Maneus said:

Sample size: 501

And you did all that? You alone, the sole Maneus, sample size: 1 ? Wow. Taking a break definitely recharged your power-cow equivalent :connie_xmas-moose:

And @Eru, you're here as well? And already unleashing secret knowledge again - dex does crit? cool.

I'm so glad the two of you have found each other :cow:

  • Appreciation 1
Link to comment
 

I increased the level of the wolf to 225, which raises the skill level to 75 (mastery).

At skill level 75, it provides Evade Chance +48.3% and Chance Against Critical Weapon Hits -64.3% (SkillValue = 1808).

To compensate for the Evade Chance, I gave my character Opponent's chance to evade -48.3% (ValueOfBonus = 936).

With Chance that opponents cannot evade attacks +700%
Chance to hit: 800%
Sample size: 500
Results: 360 regular hits, 140 critical hits, 28% critical hit chance

Spoiler

ooooooooxooxoooxooooooooxoxxxoxooxooxooxxoxoooooxooooooxooooxxoooooooooooxoooxxoooxooooooxoooooooxooooxxooooooxooooooxoxoooooooxxxooooooooooxxoxooooxoooooooooxoooooxxooxoooxoxxxooooooxxooxoxxoxooooxooooooooooxxoooxooxoxooooooxoxooooxoxxxxxooooxxoooooooooooooxxoxxooooooooxoxoooxxoooxooxoooxoooxooooxooxxooooxoooxooooxoxoooxoooooxxxxoxxoooxxooxoooxoooxooooxooooooxooxooooooooxoooxxoooooxoxoxoooxxoooooxxoxoooooooxooooxxxoxxoxooxooxooxoooooxoxxoxoxoooooxoxxooxooxoxoooxxoooooooooooooxxxooooooxxxoooooox

x = Critical Hit
o = Regular Hit

If we assume that the critical hit chance is 80% before the reduction, then with the reduction it should become 80 - 64.3% = 28.56

 

With Chance for critical hits +50%
With Chance that opponents cannot evade attacks +900%
Chance to hit: 1000%
Sample size: 500
Results: 231 regular hits, 269 critical hits, 53.8% critical hit chance

Spoiler

oxoxxxxoxoxxxoooxoxoxoxxxxxxoxxooxooxoxxxxxxxxooxxxooxoxxxooxxxooxxxoxxxxxoxxoxxoxxxxxxooxxoxxxxoooooxxxxxooxxxxxooxxooxxoxxooxoooxoxxxooooooooooxxxooxxxxoooooooxoxxooooxxxxxoxooxoxxoxoooxxxooooxoxxxxxxooxxooooxoxxooxoxoxxxoxooxxoooxxxoxooxoxxxxooxxooooxxxxooooxxooxxooxooxxoxxxxoxxxooxxooxoxoxxxoooxoxxxoooxxoxoxooxxoxoxxoxxxooxooooooxxxxxxxoooxoxooxxxxxooxoxoxoxxoooooxooxxxooxooxxoxxxxxoxoooooxooxxxxooxxoxoxxoxxxooxxxxxooxoxxxxxxxoxoxoxxooxoxooxxoxxooooxxxooxxoooxoxooxoxxxxooooooxoooooxxxxxoxoxo

x = Critical Hit
o = Regular Hit

Again, if we assume that the critical hit chance is 150% before the reduction, then with the reduction it should become 150 - 64.3% = 53.55

 

2 hours ago, SLD said:

And you did all that? You alone, the sole Maneus, sample size: 1 ? Wow. Taking a break definitely recharged your power-cow equivalent :connie_xmas-moose:

Definitely :crazy_pilot: 

Edited by Maneus
  • Like! 1
Link to comment
 

Testing the impact of dexterity on critical hits from left-click attacks

With 800 dexterity
Chance to hit: 100%
Sample size: 200
Results: 175 regular hits, 25 critical hits, 12.5% critical hit chance

Spoiler

ooooooooooooooxoooxxooooxoooooooooxoxooooooooooooooooooxoxoooooooooooooxooooooooooooooooooooooxxxoooooooooxoooooooooooooooooooooooooxooooxooooooooooooooooooooxoooxooxxxoxooooxoooooooooooxoooooooooooxx

x = Critical Hit
o = Regular Hit

 

With 8000 dexterity
Chance to hit: 100%
Sample size: 200
Results: 24 regular hits, 176 critical hits, 88% critical hit chance

Spoiler

xxxxxxxxxxxxxxxxxxxxxxxxxxxxoxxxxxxoxxoxxoxxxxxxxxxxxxxxxxxxxxxxxxxxoxxxoxxoxxxxxxxxxxxxxxxxxxxxoxoxxxxxxxxxxoxxxxxxxxxxxxxxxxxoxxxxxxxxoxoooxxxxxxxxxxxxoxooxoxoxxxooxxxxxxxxxxxxxoxxxxxxxxxxxxxxxxxxxo

x = Critical Hit
o = Regular Hit

 

Edited by Maneus
  • Like! 1
Link to comment
 
 

I am planning to test how reflected damage works.

I remembered that Reflective Emanation has a modification that states "Riposte - Adds a chance to increase the reflected damage". I always interpreted that as "Reflected hits will sometimes do more damage", but looking at the combat art definition in spells.txt, it appears that it simply increases the Chance to Reflect Close Combat Damage.

Quote

entry6 = {"et_chance_reflect_CC", 150, 4, 5, 41 },

The full combat art definition:

Spoiler

mgr.defineSpell( "sk_tc_umlenkung", {
    eiStateName = "cSpellCast",
    fxTypeCast = "FX_SK_UMLENKUNG_C",
    fxTypeSpell = "FX_SK_UMLENKUNG",
    fxTypeCastSpecial = "FX_SK_CAST_L",
    duration = 10.000000,
    animType = "ANIM_TYPE_SM12",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_INVALID",
    animTypeSpecial = "ANIM_TYPE_RIDESM06-SPECIAL",
    causesSpellDamage = 1,
    tokens = {
        entry0 = {"et_chance_reflect_CC", 300, 8, 0, 41 },
        entry1 = {"et_range_area", 2000, 0, 0, 4 },
        entry2 = {"et_chance_reflect_stun", 300, 8, 1, 41 },
        entry3 = {"et_chance_reflect_missile", 300, 8, 2, 41 },
        entry4 = {"et_chance_reflect_root", 300, 8, 3, 41 },
        entry5 = {"et_chance_reflect_spell", 300, 8, 4, 41 },
        entry6 = {"et_chance_reflect_CC", 150, 4, 5, 41 },
        entry7 = {"et_friendfactor", 500, 0, 6, 8 },
    },
    fightDistance = 0.000000,
    aspect = "EA_SK_TACTICALCOMBAT",
    cooldown = 0.000000,
    soundProfile = 0,
    cost_level = 500,
    cost_base = 500,
    focus_skill_name = "skill_SK_tactical_combat_focus",
    lore_skill_name = "skill_tactics_lore",
    spellClass = "cSpellSkUmlenkung",
    spellcontroltype = "eCAtype_t_buff",
    spelllogictype = "ca_ct_boost",
    magicType = "MAGIC_TYPE_BUFF",
    sorting_rank = 5,
})

 

Edited by Maneus
  • Like! 1
Link to comment
 
7 hours ago, Maneus said:

I remembered that Reflective Emanation has a modification that states "Riposte - Adds a chance to increase the reflected damage". I always interpreted that as "Reflected hits will sometimes do more damage", but looking at the combat art definition in spells.txt, it appears that it simply increases the Chance to Reflect Close Combat Damage.

Sry I couldn't warn you about that one... :connie_xmas-moose:
that was already known for a long time, I think some mods already fixed the description text.
 

8 hours ago, Maneus said:

I am planning to test how reflected damage works.

May I add something weird to your long list of potential things to test?
It has come up now in multiple threads, that "in combat life/shield regeneration" (from constitution, item/buff mods, TG shield) might have a delay either when first taking damage or potentially even whenever being hit.
I always considered those regeneration sources permanent, but recently had ingame encounters that made me feel like there might be something to it after all.
It is possible that this is actually some weird EE specific happening and that everyone that encountered it just might have been playing EE at that time, just like I do now.
But if it is not it might be some mechanic worth looking at in the base game and you already touched on it when you looked at energy shield regen and constitution.

Sources where others claimed freak  regeneration behaviour:
Roderick describes it: here and here
And Lindor claims it specifically for TG shields here
And now that I feel they might have been on to something it's bugging me as well :)
I would be happy to see science defeat our three sources of superstition :cow:

  • Like! 1
Link to comment
 
 

thank you! Could you make sure that constitution mastery and tg shield regen follow the same mechanics? I just want this stuff settled once and for all :)
Such conspiracy theories are hard to debunk :)

Thanks for the info on how the tooltip/red bar update. That explains a lot of the symptoms.
What happens if you had like a 16k regen and a 4k damage wolf that hits like 3,5 times per second? Would that really lead to the health bar being "overdepleted"? Also, is the health danger indicator ping thingy that tells you that you reached below "warning level" based on reality or the red bar?

Link to comment
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...