Jump to content


How is Sacred 2 Weapon Damage Calculated


Recommended Posts

14 hours ago, Maneus said:

The displayed value does not have a decimal part. I believe that the decimal part is still there, it is just not shown. Some other item mods do show a decimal part, but only one digit after the decimal point.

well, wearing many items with "+1 to all skills" never results in an extra point beyond that, therefore the value shown is also the value applied. The decimal part does however matter if you socket an item with "+1 to all skills" into a silver/gold socket. Those sockets increase the modifier values by a small percentage that for "large enough +1s" can reach +2.

14 hours ago, Maneus said:

Unlockable items are easily accessible*

never had any of the codes. I wonder how they were originally distributed, or wether they ever were...

Link to comment
 
9 hours ago, SLD said:

well, wearing many items with "+1 to all skills" never results in an extra point beyond that, therefore the value shown is also the value applied. The decimal part does however matter if you socket an item with "+1 to all skills" into a silver/gold socket. Those sockets increase the modifier values by a small percentage that for "large enough +1s" can reach +2.

7.5% for silver sockets, 15% for gold sockets.

For All Skills, yes, you have to break through the next whole number for the bonus to increase, so 7.99 will still give you only 7 to All Skills. Always important to check the bonus value in silver vs gold sockets to maximize gains and not waste a gold slot for basically nothing.

 

Regarding CtfV, I'd be interested in:

1) Why at Mastery, it's shown as 2 values.

2) I suspect the lower value is general CtfV, which works on everything while the (4 or 5, can't check at the moment) times higher value only works on lootable containers and not enemy kills.

 

Because it they were both the general CtfV, it would improve loot quality from kills much more noticeably. There are also some notes regarding this skill in the script files, where it does say something specifically about lootable containers IIRC.

 

Another thing that I've been wondering about: Chance to bypass armor. I always assumed it only worked on weapon attacks and CAs, but not spells. Never actually got around to testing it. Could probably be done by using an item with the stat (preferably unique) and massively increasing the value in blueprint.txt do that it's 100%+ while giving a specific enemy ludicrous amounts of armor and just testing it.

Edited by idbeholdME
Link to comment
 
7 hours ago, idbeholdME said:

7.5% for silver sockets, 15% for gold sockets.

that is correct.

7 hours ago, idbeholdME said:

Regarding CtfV, I'd be interested in:

1) Why at Mastery, it's shown as 2 values.

2) I suspect the lower value is general CtfV, which works on everything while the (4 or 5, can't check at the moment) times higher value only works on lootable containers and not enemy kills.

I'm pretty sure the EP skill only shows the values that the wiki lists in an unmodded game. Wether whoever added another line there actually knew what they ere doing is unknown to me. I suspect the same as you, as the mastery specifically states it works on chests etc. If one could mod this skill to absurd values testing could be done to see if it works at all and on what it works. Wether the effect matches the numbers or how it interacts with ctfv from other sources like gear,we'll probably never know as there is no reasonable way to test it. We could only prove wether one source overrides another.
 

7 hours ago, idbeholdME said:

Another thing that I've been wondering about: Chance to bypass armor. I always assumed it only worked on weapon attacks and CAs, but not spells. Never actually got around to testing it. Could probably be done by using an item with the stat (preferably unique) and massively increasing the value in blueprint.txt do that it's 100%+ while giving a specific enemy ludicrous amounts of armor and just testing it.

My memory assumes the same though I don't know if it was tested back then. Achieving 100% doesn't need modified items, Silala's ring is your friend. It should also be easily noticeable even without modding armor values. If that download button on the wiki works you can just get the ring that way, dump 6 copies on a highlvl char and test spells with it, no editing neccessary.

Link to comment
 
 

I made a lot of progress with the formulas for the weapon (item) damage. There are lots of parameters and multiple layers involved. There are more things to test, but let's begin from somewhere.

 

First, we need to determine the elements involved (physical, magic, fire, poison, ice). The damage for each element is calculated completely separately and then the totals are added up to form what we see in the item tooltip and in the inventory screen (just like with the spell-based combat arts).

There are two places where the elements are specified: in material.txt and in blueprint.txt .

 

In material.txt you will find the following:

Quote

allotphys = 1000,
allotfire = 0,
allotice = 0,
allotpoison = 0,
allotmagic = 0,

The above means 100% physical.

Quote

allotphys = 870,
allotfire = 0,
allotice = 0,
allotpoison = 0,
allotmagic = 130,

The above means 87% physical and 13% magic.

 

In blueprint.txt you will find the following:

Quote

allotment_pmfpi = {1000,0,0,0,0},

The above means 100% physical.

Quote

allotment_pmfpi = {0,500,500,0,0},

The above means 50% magic and 50% fire.

 

But how do the values from both files work together?

In blueprint.txt, this exact line allotment_pmfpi = {1000,0,0,0,0}, has a special meaning - ignore allotment_pmfpi and use whatever is specified in material.txt. So for example:

Quote

allotphys = 870,
allotfire = 0,
allotice = 0,
allotpoison = 0,
allotmagic = 130,
allotment_pmfpi = {1000,0,0,0,0},

The above means 87% physical and 13% magic.

Quote

allotphys = 0,
allotfire = 1000,
allotice = 0,
allotpoison = 0,
allotmagic = 0,
allotment_pmfpi = {1000,0,0,0,0},

The above means 100% fire.

 

But if the line in blueprint.txt is different, then the following happens:

Quote

allotphys = 0,
allotfire = 1000,
allotice = 0,
allotpoison = 0,
allotmagic = 0,
allotment_pmfpi = {980,0,20,0,0},

The above means 49% physical and 51% fire.

Quote

allotphys = 500,
allotfire = 0,
allotice = 500,
allotpoison = 0,
allotmagic = 0,
allotment_pmfpi = {500,0,500,0,0},

The above means 50% physical, 25% ice and 25% fire.

In short: The values from both files are added together and then divided by 2.

 

Edit: I found a strange exception to the above rule, where a blueprint containing allotment_pmfpi = {1000,0,0,0,0}, is not ignored. I'm still investigating.

At some point I'll also look into how damage conversion works, because it is not very intuitive.

Edited by Maneus
  • Like! 1
Link to comment
 

How to determine the base (average) weapon damage

BaseWeaponDamage = ZRareBasepointsXX * 0.01 * BasepointsMultiplier * (1 / TopLevelCalc) * (ElementAllotment / 1000) * (modbasepointsT / 1000) * (modbasepointsM / 1000) * ((modrealT + modrealM) / 2000) * (1 + (ItemLevel / damBasepoints))

Where:
- ZRareBasepointsXX - from balance.txt. XX is the item tier (00-15).
- BasepointsMultiplier - from balance.txt. Default value is 500 (unmodded game).
- TopLevelCalc - from balance.txt. Default value is 200 (unmodded game).
- ElementAllotment - the allotment value for the current element. See the previous post for more details.
- modbasepointsT - the parameter modbasepoints from the typification (typification.txt).
- modbasepointsM - the parameter modbasepoints from the material (material.txt).
- modrealT - the parameter modreal from the typification (typification.txt).
- modrealM - the parameter modreal from the material (material.txt).
- damBasepoints - from balance.txt. Default value is 20 (unmodded game).

 

How to determine the damage spread (min and max)

There are two parameters that determine the damage spread: weapondamagespread in typification.txt and dmgvariation in blueprint.txt .

Quote

weapondamagespread = 0,
dmgvariation = 0,

The above means DamageSpread = 0

Quote

weapondamagespread = 0,
dmgvariation = 100,

weapondamagespread = 100,
dmgvariation = 0,

weapondamagespread = 150,
dmgvariation = 100,

The above combinations mean DamageSpread = 100

Quote

weapondamagespread = 100,
dmgvariation = 150,

The above means DamageSpread = 150

If the value of dmgvariation is not zero, then it overrides the value of weapondamagespread.

 

The formulas for the minimum and maximum weapon damage are:

MinDamage = FLOOR(BaseDamage * (1 - DamageSpread / 1000))

MaxDamage = ROUND(BaseDamage * (1 + DamageSpread / 1000))

Where:
- ROUND - Round half up (1.49 becomes 1 and 1.5 becomes 2).
- MinDamage and MaxDamage - what is shown in the tooltip of the weapon.

 

Note: Even when DamageSpread is zero, the above formulas are still applied!

 

I haven't figured out what the parameter modfocus in material.txt and typification.txt is used for.

Edited by Maneus
  • Like! 1
Link to comment
 

How to determine the attribute bonus

Updated with the findings from https://darkmatters.org/forums/index.php?/topic/18511-how-is-sacred-2-weapon-damage-calculated/&do=findComment&comment=7145350

 

Important:
1. Calculate each element (physical, magic, fire, ice, poison) separately
2. Calculate min and max separately

AttributeBonus = AttributeBaseDamage * 0.001 * FLOOR(attrWdam_fact * 0.001 * FLOOR(Attribute * TopLevelCalc * FLOOR(100 * damBasepoints / (damBasepoints + ItemLevel)) / basepointsMultiplier))

Where:
- AttributeBaseDamage - The damage that the attribute bonus is based on. There is a difference between the inventory screen and actual combat. See the formulas below.
- attrWdam_fact - from balance.txt. Default value is 250 (unmodded game).
- Attribute - the total attribute value (after survival bonus).
- TopLevelCalc - from balance.txt. Default value is 200 (unmodded game).
- damBasepoints - from balance.txt. Default value is 20 (unmodded game).
- BasepointsMultiplier - from balance.txt. Default value is 500 (unmodded game).

For the inventory screen:

AttributeBaseDamage = WeaponDamage

Where:
- WeaponDamage - What is shown in the weapon tooltip.

AverageAttributeBonus = FLOOR((FLOOR(MinAttributeBonus) + FLOOR(MaxAttributeBonus)) / 2)

Where:
- AverageAttributeBonus - the value shown in the tooltip when you hover over the attribute (Weapon Damage +X).

For actual combat:

AttributeBaseDamage = FLOOR(FLOOR(WeaponDamage * (1 + SumPercentageBonuses / 1000)) * (CombatArtMultiplier / 1000))


I hope I didn't make any mistakes. I'll have to review these posts again :)

Edited by Maneus
  • Like! 1
Link to comment
 
Quote

ZRareBasepoints15 = 1350,
ZRareBasepoints14 = 1320,
ZRareBasepoints13 = 1290,
ZRareBasepoints12 = 1260,
ZRareBasepoints11 = 1230,
ZRareBasepoints10 = 1200,
ZRareBasepoints09 = 1175,
ZRareBasepoints08 = 1150,
ZRareBasepoints07 = 1125,
ZRareBasepoints06 = 1100,
ZRareBasepoints05 = 1080,
ZRareBasepoints04 = 1060,
ZRareBasepoints03 = 1040,
ZRareBasepoints02 = 1020,
ZRareBasepoints01 = 1000,
ZRareBasepoints00 = 750,

These parameterers from balance.txt are also used to determine the damage based on the item tier. In my previous post, I was using a tier 13 item and that is where the constant 12.9 came from.

I'll amend my previous post later - DONE.

Edited by Maneus
Link to comment
 
13 hours ago, Maneus said:

These parameterers from balance.txt are also used to determine the damage based on the item tier. In my previous post, I was using a tier 13 item and that is where the constant 12.9 came from.

If I remember correctly, this acts as a multiplier on all the values of the item (damage, bonuses). Meaning a tier 13 rare will have 29% higher values, than a same level tier 1 white item.

Edited by idbeholdME
Link to comment
 
On 7/21/2024 at 3:50 AM, Maneus said:

I hope I didn't make any mistakes. I'll have to review these posts again :)

I wouldn't be able to tell if you did make any mistakes, but all the gamefile stuff basically only matters for modders anyway. Don't worry, as all you post is of such high quality, I'm certain that if you did make any mistakes, they would be high quality mistakes :)

  • Haha 1
Link to comment
 
11 hours ago, SLD said:

I wouldn't be able to tell if you did make any mistakes, but all the gamefile stuff basically only matters for modders anyway. Don't worry, as all you post is of such high quality, I'm certain that if you did make any mistakes, they would be high quality mistakes :)

I did have a few mistakes, but hopefully no one saw :whistle:

 

Anyway, I'm planning a new update for the spell damage calculator. The biggest change is that it will now work with "entries" rather than "elements". The same entries from spells.txt. But only a few will be supported. Here is the list:

Spoiler

Flat damage entries:
et_spelldamage_physical
et_spelldamage_magic
et_spelldamage_fire
et_spelldamage_ice
et_spelldamage_poison

Percentage bonus entries:
et_damage_any_rel
et_damage_magic_rel
et_damage_fire_rel
et_damage_ice_rel

Flat damage entries against a specific enemy type:
et_spelldam_UD_mag
et_spelldam_TC_fir

These will be treated as regular flat damage entries.

Flat damage entries that are only used by Malicious Totem:
et_essence_spelldam_phy
et_essence_spelldam_poi

These two appear to be only 50% effective, meaning that every 80 points provide 1 damage instead of every 40. I'm not aware of other differences at this time.

The calculator won't support DOT damage entries or plague damage entries.

Working with entries makes the calculator more cluttered, BUT it will now be possible to load a preset. I will add presets for all combat arts that use the above entries (for the 7 character classes). Just from the base game though :)

I think this way it achieves a nice balance between the needs of regular players and modders.

Edited by Maneus
  • Like! 1
Link to comment
 

How is spell DOT (damage over time) determined?

I did a few tests using Frost Flare

Spoiler

mgr.defineSpell( "he_st_frostschlag", {
    eiStateName = "cSpellCast",
    fxTypeCast = "FX_HE_FROSTSCHLAG_C",
    fxTypeSpell = "FX_HE_FROSTSCHLAG",
    fxTypeCastSpecial = "FX_HE_CAST_K",
    duration = 10.000000,
    animType = "ANIM_TYPE_SM08",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_INVALID",
    animTypeSpecial = "ANIM_TYPE_RIDESM01-SPECIAL",
    causesSpellDamage = 1,
    tokens = {
        entry0 = {"et_duration_sec", 1000, 5, 0, 8 },
        entry1 = {"et_dotdamage_ice", 1050, 525, 0, 42 },
        entry2 = {"et_damage_ice_rel", 0, 20, 0, 5 },
        entry3 = {"et_debuff_movespeed", 400, 10, 0, 42 },
        entry4 = {"et_spelldamage_ice", 210, 105, 0, 133 },
        entry5 = {"et_range_area", 150, 0, 0, 4 },
        entry6 = {"et_cost_thisSpell", 250, 0, 1, 4 },
        entry7 = {"et_debuff_movespeed", 300, 3, 2, 42 },
        entry8 = {"et_debuff_EAW", 500, 20, 3, 42 },
        entry9 = {"et_dotdamage_ice", 400, 200, 4, 42 },
        entry10 = {"et_range_area", 350, 0, 5, 4 },
        entry11 = {"et_duration_sec", 500, 2, 6, 8 },
    },
    fightDistance = 525.000000,
    aspect = "EA_HE_STORM",
    cooldown = 0.000000,
    soundProfile = 0,
    cost_level = 300,
    cost_base = 600,
    focus_skill_name = "skill_HE_storm_focus",
    lore_skill_name = "skill_HE_storm_lore",
    spellClass = "cSpellHeFrostschlag",
    spellcontroltype = "eCAtype_a_effect_attack_ray",
    sorting_rank = 1,
})

It appears that the entry et_dotdamage_ice determines the total damage, while the parameter DurationDot (from balance.txt) determines the total duration. The value of DurationDot in the base game is 500.

In practice, damage is dealt a total of 5 times. The first 4 instances do about 20.62% of the total damage (there could be some minor variation), while the last instance does less. But the sum of all 5 instances always equals the total damage. It appears that a damage instance is dealt at the end of each second*. For example: the first instance is dealt one second* after the initial (normal) hit.

* I assume that it is a second. I haven't actually measured the exact time.

 

What is shown in the combat art tooltip?

Given a total damage of 4892, the tooltip shows  978.4 / s, which is exactly 5 times less. I'm not sure of the exact rounding method yet.

Changing the value of DurationDot to 600 increased the number of damage instances to 6, but now each damage instance does less damage.

Given the same total damage of 4892, the tooltip shows 815.3 / s, which is exactly 6 times less.

Note:  There is precision loss in the tooltip value. For example: 1653.2 / s is shown as 1653.1 / s.

 

How is the total damage determined?

Almost the same as regular spell damage. It turns out that the entry et_damage_ice_rel does not interact with the DOT damage. And neither does the entry et_damage_any_rel.

The intelligence bonus (not displayed), Aspect Lore, Ancient Magic, Combat Discipline, +X% Ice damage (equipment) are applied as expected.

Note: When the initial hit is a critical hit, the DOT damage is not affected. Needs more testing.

 

After all of this, I think I might add DOT damage to the calculator.  :)

Edited by Maneus
Link to comment
 
6 hours ago, Maneus said:

When the initial hit is a critical hit, the DOT damage is not affected. Needs more testing.

can the dot instances crit on their own?

6 hours ago, Maneus said:

How is the total damage determined?

Almost the same as regular spell damage

please check blazing tempest. That one is odd as the aspect lore somehow manages to double dip or at least be applied multiplicative to the dot portion. Thats why in an unmodded game the "hit" damage starts out scaling more flat value per CA-LVL but later in the game the DOT gets more flat value per level. There is so far no exact explanation for this as spell scaling should be linear and both hit and dot are affected by the same mods. The flip can only be seen when taking the lore skill otherwise the hit always does more damage than 1 second of the dot.
 

6 hours ago, Maneus said:

* I assume that it is a second. I haven't actually measured the exact time.

It gives me such joy to see, that you think of that at all :) :resp:

 

  • Like! 1
Link to comment
 
20 hours ago, SLD said:

please check blazing tempest. That one is odd as the aspect lore somehow manages to double dip or at least be applied multiplicative to the dot portion. Thats why in an unmodded game the "hit" damage starts out scaling more flat value per CA-LVL but later in the game the DOT gets more flat value per level. There is so far no exact explanation for this as spell scaling should be linear and both hit and dot are affected by the same mods. The flip can only be seen when taking the lore skill otherwise the hit always does more damage than 1 second of the dot.

Just when I thought that I had it all figured out, you sent me down a very deep rabbit hole.

It appears that there are at least two different things that lead to this discrepancy.

 

1) The entry et_cone_adapt lowers the regular damage of the spell (at least in the tooltip).

Blazing Tempest does more damage (regular, not DOT) when the cone is small (click as far away as possible) and less damage when the cone is large (click as close to the character as possible). I'll need to do tests to figure out how cones work in the first place.

I don't know how the above entry relates to the cone. but from a few quick tests, it appears that changing the value of the entry does not scale the damage linearly.

In spells.txt, the entries et_cone_adapt and et_missile_adapt appear to be related.

Quote

mgr.addTokenBonus( {"et_cone_adapt", 419 })  -- 419 = bb_mult_spelldamage_any
mgr.addTokenBonus( {"et_missile_adapt", 419 })  -- 419 = bb_mult_spelldamage_any

The entry et_missile_adapt is apparently used to determine the amount of projectiles created by certain spells like Ancestral Fireball and Glacial Thorns.

But that's all for now.

 

2) The entry et_dotdamage_fire is special and behaves differently than et_dotdamage_ice.

The DOT damage of Blazing Tempest does indeed benefit twice from Arrant Pyromancer Lore. The total damage of the DOT is calculated as normal (including the Aspect Lore), but afterwards the whole total is multiplied again by the Aspect Lore. Example:

Spoiler

Character level = 200
SpellBaseDamage = 1000 (Removes the division by 40)
attrSdam_fact = 0 (Removes the intelligence bonus)
DurationDot = 500
Base combat art level = 1
et_dotdamage_fire, 10000 initial damage, 0 per level
Aspect Lore 200, +377.8%
Ancient Magic 200, +188.9%
Combat Discipline 200, +283.3%
Total % bonus = 850%

Expected damage of Fire DOT = 95000 (19000 / s)
Actual damage of Fire DOT = 453910 (90782 / s)

Let's see what we get when we divide by the aspect lore bonus:
X = 453910 / (1 + 3.778)
X = 453910 / 4.778
X = 95000

I did the same test with +121.8% Fire Damage from rings.

Expected damage of Fire DOT = 107180 (21436 / s)
Actual damage of Fire DOT = 512106 (102421.2 / s)

X = 512106 / (1 + 3.778)
X = 512106 / 4.778
X = 107179.99

Same with +214% Fire Damage from the Fire Demon (instead of the rings).

Expected damage of Fire DOT = 116400 (23280 / s)
Actual damage of Fire DOT = 556158.5 (111231.7 / s)

X = 556158.5 / (1 + 3.778)
X = 556158.5 / 4.778
X = 116399.85

Edit: The intelligence bonus, when present, is multiplied too (as expected).

Also, the tooltip is correct in the sense that you do actually do that much damage to enemies with the DOT.

I tried to figure out why this happens. In spells.txt, I replaced almost everything of Blazing Tempest with the data from Frost Flare (except the fire DOT), but there was no change in the behavior of the DOT. I did the same thing on the other side with Frost Flare and the Ice DOT, but I couldn't make it behave like this. So finally, I restored the original spells.txt and simply swapped the elements - now Blazing Tempest has an Ice DOT, and Frost Flare has a Fire DOT. But in-game, the tooltips stopped showing a DOT damage - it's gone! But I decided to try both spells on an enemy anyways. And it turns out that the DOT IS there and doing damage. And now Blazing Tempest does the expected (lower) damage, while Frost Flare does the increased damage!

So I have to conclude that et_dotdamage_fire simply works differently. At least for now. I'll have to test the other DOT entries too.

Additional note: et_dotdamage_fire is not affected by et_damage_fire_rel or et_damage_any_rel. Similarly to et_dotdamage_ice.

Edit: I had both Arrant Pyromancer Lore and Mystic Stormite Lore at level 200. The second multiplication is not tied specifically to Arrant Pyromancer Lore.

Edited by Maneus
  • Thanks! 1
Link to comment
 
6 minutes ago, Maneus said:

Just when I thought that I had it all figured out, you sent me down a very deep rabbit hole.

Thats what I'm here for. :)

6 minutes ago, Maneus said:

The DOT damage of Blazing Tempest does indeed benefit twice from Arrant Pyromancer Lore.

I'm glad I didn't send you down there in vain.

10 minutes ago, Maneus said:

I'll have to test the other DOT entries too.

As always, thank you for doing all the hard work for us!

  • Appreciation 1
Link to comment
 

I added five different DOT entries to Blazing Tempest, one for each element.

Spoiler

entry2 = {"et_dotdamage_ice", 10000, 0, 0, 42 },
entry3 = {"et_dotdamage_poison", 10000, 0, 0, 42 },
entry4 = {"et_dotdamage_magic", 10000, 0, 0, 42 },
entry5 = {"et_dotdamage_fire", 10000, 0, 0, 42 },
entry6 = {"et_dotdamage_physical", 10000, 0, 0, 42 },

1) The tooltip of Blazing Tempest shows only the Fire DOT.

2) In actual combat, a single DOT damage instance shows five different floating numbers - one for each element. Adding more entries with the same elements does not increase the amount of floating numbers. Instead, each floating number shows the combined value for that element. The order of the floating numbers appears to be the same as the order of the entries, but in reverse. So [entry6, entry5, entry4, entry3, entry2] pop out at the same time. Adding more entries after these does not affect the order.

3) Fire and Poison are multiplied by Aspect Lore twice, while Magic, Ice and Physical are not.

4) There is one more DOT entry, et_dotdam_TC_mag, used exclusively by Cobalt Strike.

I plan to test this, along with the other similar entries. next.

5) The item modifier Chance for critical hits +X% does not apply to spells.

At least, this specific bonus in blueprint.txt does not

Spoiler

newBonus = {
--  name = "crbonus_chance_criticalhit",
  rating = 0,
  basedonskill = "SKILL_INVALID",
  type = "BONUS_CRITICALHIT",
  spez = "",
  spez2 = "",
  usagebits = 65535,
  minconstraints = {1,0,0},
  difficultyvaluerange0 = {0,150,200},
  difficultyvaluerange1 = {1,165,230},
  difficultyvaluerange2 = {2,180,260},
  difficultyvaluerange3 = {3,200,300},
  difficultyvaluerange4 = {4,225,350},
}
mgr.createBonus(420, newBonus);

6) To achieve over 100% critical chance, I added the entry et_chance_criticalhit to Blazing Tempest.

Quote

entry12 = {"et_chance_criticalhit", 1234, 0, 0, 5 },

Now the initial (regular) hit is always a critical hit. But the DOT damage instances are not affected.

 

Now I wonder if the spell intensity check affects DOT damage.

Edited by Maneus
  • Like! 1
Link to comment
 

There are three entries that are tied to a specific enemy type:

Quote

et_dotdam_TC_mag
et_spelldam_TC_fir
et_spelldam_UD_mag

For the following tests I went to Teardrop Hamlet in niobium difficulty. The Undeads to the west are level 189, and the T-Mutants to the east are level 202. The level of the T-Mutants is higher than my character's level (200) because of the survival bonus.

These T-Mutants have exactly 45% physical and magic damage mitigation. I assume that T-Mutants naturally have mitigation, and that a combination of the difficulty level and the enemy level results in the aforementioned value.

On the other hand, the Undeads have exactly 10% fire damage vulnerability. I'm not sure if it scales in any way. But this doesn't matter for these tests.

1) et_dotdam_TC_mag

Spoiler

Total damage from the entry is 10000
The tooltip of Cobalt Strike shows 2000 / s
The actual total damage dealt is 5500. It is lower because of the 45% magic damage mitigation.

With Aspect Lore, level 200, +377.8%
With Combat Discipline, level 200, +283.3%
Total +661.1%
The total damage is now 76110
The tooltip of Cobalt Strike shows 15222 / s
The actual total damage dealt is 41860. Again, 45% less.

With Aspect Lore, level 200, +377.8%
With Combat Discipline, level 200, +283.3%
With Ancient Magic, level 200, +188.9%
Total +850%
The total damage is now 95000
The tooltip of cobalt strike shows 19000 / s
The actual total damage dealt is 80275. That is 15.5% less.

Ancient Magic at level 200 reduces the opponent's immunities by 65.3%, according to the in-game tooltip and the wiki.
X = 45 * (1 - 0.653)
X = 45 * 0.347
X = 15.615
So the actual damage mitigation should now be ~15.6%.

I'll have to do more tests with Ancient Magic.

The Aspect Lore is not applied twice.

The entries et_damage_any_rel and et_damage_magic_rel are not applied.

2) et_spelldam_TC_fir

The Aspect Lore is applied twice.

The entries et_damage_any_rel and et_damage_fire_rel are also applied.

3) et_spelldam_UD_mag

The Aspect Lore is applied twice.

The entries et_damage_any_rel and et_damage_magic_rel are also applied.

 

Edit: During all of this testing, I never saw DOT damage inflicting secondary damage effects (weaken, burning, etc.). Whenever I get to testing secondary damage effects, I'll test this again to make sure.

 

Edited by Maneus
  • Like! 1
Link to comment
 

Just a note:

A lot of things are hardcoded in the .dll files and can't be changed in the script files. Things like spell classes, what tokens can be applied to what or even the behavior of the tokens themselves.

So it seems that the magic and poison DoTs were programmed differently than the other elements.

Also regarding DoTs, they are unaffected by armor, can't crit or cause secondary effects and are not subject to the Spell Intensity/Spell Resistance check. They are affected by damage mitigation, which reduces the total duration, but not tick damage, besides the final one (50% reduction will cause 2 full damage ticks and one half tick). And as far as I can tell, Willpower has no effect on built-in spell DoTs, only actual secondary damage effects.

Edited by idbeholdME
Link to comment
 
On 7/8/2024 at 5:20 AM, SLD said:

I could swear the tech lore should be a multiplicative effect on the enhancement mods before they are added to your base damage.

Time to put this to the test.

Previous tests can be found here https://darkmatters.org/forums/index.php?/topic/18511-how-is-sacred-2-weapon-damage-calculated/&do=findComment&comment=7144788

Seraphim, level 200
Dexterity 549
Revered Technology Focus 200
BeeEffGee, level 98, with both Enhancement modifications

spells.txt

Spoiler

mgr.defineSpell( "se_te_beeeffgee", {
    eiStateName = "cSpellCast",
    fxTypeCast = "FX_SE_BEEEFFGEE_C",
    fxTypeSpell = "FX_SE_BEEEFFGEE",
    fxTypeCastSpecial = "FX_SE_CAST_L",
    duration = 10.000000,
    animType = "ANIM_TYPE_SM10",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_INVALID",
    animTypeSpecial = "ANIM_TYPE_RIDESM07-SPECIAL",
    causesSpellDamage = 1,
    tokens = {
        entry0 = {"et_summon_level", 10, 10, 0, 8 },
        entry1 = {"et_AW_rel", 100, 20, 0, 5 },
        entry2 = {"et_summon_item", 1000, 1412, 0, 5 },
        entry3 = {"et_addskill_distancewpn", 30, 20, 0, 5 },
        entry4 = {"et_item_chance_piercing", 200, 1, 0, 133 },
        entry5 = {"et_itemdam_phy", 80, 20, 1, 133 },
        entry6 = {"et_regThisBuff", 500, 5, 2, 8 },
        entry7 = {"et_itemdam_phy", 80, 20, 3, 133 },
        entry8 = {"et_regThisBuff", 500, 5, 4, 8 },
        entry9 = {"et_item_chance_surehit", 100, 1, 5, 133 },
        entry10 = {"et_item_chance_piercing", 500, 5, 6, 133 },
    },
    fightDistance = 0.000000,
    aspect = "EA_SE_TECHNICS",
    cooldown = 0.000000,
    soundProfile = 0,
    cost_level = 667,
    cost_base = 667,
    focus_skill_name = "skill_SE_technics_focus",
    lore_skill_name = "skill_SE_technics_lore",
    spellClass = "cSpellSeBeeeffgee",
    spellcontroltype = "eCAtype_t_buff",
    sorting_rank = 5,
})

Extra flat damage from the enhancement modifications: 408

Spoiler

PhysicalDamage = (160 + (98 * 40)) / 10
PhysicalDamage = (160 + 3920) / 10
PhysicalDamage = 4080 / 10
PhysicalDamage = 408

Case 1: Without Revered Techonlogy Lore; Summoned from an occupied weapon slot

The weapon tooltip shows 367-508 damage
The dexterity tooltip shows 215
The inventory screen shows 956-1166 damage (590-660 physical and 366-506 ice)

Case 2: Without Revered Techonlogy Lore; Summoned from an empty weapon slot

The weapon tooltip shows 775-916 damage
The dexterity tooltip shows 417
The inventory screen shows 1157-1368 damage (791-862 physical and 366-506 ice)

The extra flat damage is added onto the weapon which increases the dexterity bonus. We know this from before.

Case 3: With Revered Technology Lore; Summoned from an occupied weapon slot

Revered Technology Lore, level 75, +180.8% damage
The weapon tooltip shows 367-508 damage
The dexterity tooltip shows 215
The inventory screen shows 1693-1903 damage (1327-1397 physical and 366-506 ice)

The damage is a lot higher compared to case 1.
Let's compare the minimum and maximum physical damage from the inventory screen (from case 1):
1327 - 590 = 737
1397 - 660 = 737
408 * 1.808 = 737.664
Remember, this is the difference between x1 and x2.808. The total damage from the enhancement modifications is 408 + 737 = 1145.

Case 4: With Revered Technology Lore; Summoned from an empty weapon slot

Revered Technology Lore, level 75, +180.8% damage
The weapon tooltip shows 1512-1653 damage
The dexterity tooltip shows 781
The inventory screen shows 2258-2469 damage (1892-1963 physical and 366-506 ice)

Here, let's compare the minimum and maximum of the weapon tooltip (from case 2):
1512 - 775 = 737
1653 - 916 = 737

Two extra cases:

Spoiler

Case 5: With Revered Technology Lore at level 22; Summoned from an occupied weapon slot

Revered Technology Lore, level 22, +77.0% damage
The weapon tooltip shows 367-508 damage
The dexterity tooltip shows 215
The inventory screen shows 1270-1480 damage (904-974 physical and 366-506 ice)

904 - 590 = 314
974 - 660 = 314
408 * 0.77 = 314.16

Case 6: With Revered Technology Lore at level 22; Summoned from an empty weapon slot

Revered Technology Lore, level 22, +77.0% damage
The weapon tooltip shows 1089-1230 damage
The dexterity tooltip shows 572
The inventory screen shows 1626-1837 damage (1260-1331 physical and 366-506 ice)

1089 - 775 = 314
1230 - 916 = 314

 

Conclusion: Revered Techonlogy Lore multiplies the flat damage bonus from the Enhancement modifications!

  • Thanks! 1
Link to comment
 
6 hours ago, idbeholdME said:

So it seems that the magic and poison DoTs were programmed differently than the other elements.

To recap. So far we have confirmed that the following entries are multiplied by the Aspect Lore (unrelated to the percentage bonus to damage):

et_itemdam_phy (Used exclusively by BeeEffGee. Should be tested on another character and/or with a different lore skill)
et_dotdamage_fire (Fire DOT)
et_dotdamage_poison (Poison DOT)
et_spelldam_TC_fir (Regular fire damage against T-Energy creatures)
et_spelldam_UD_mag (Regular magic damage against Undead creatures)

The last two are found on: Lumen's Dazzle (?), Cleansing Brilliance and Expulse Magic.

I don't yet know where exactly (in the order of operations) does the multiplication take place. It feels like it happens at the end, but it could theoretically happen in the beginning, before any other calculations take place.

 

6 hours ago, idbeholdME said:

They are affected by damage mitigation, which reduces the total duration, but not tick damage, besides the final one (50% reduction will cause 2 full damage ticks and one half tick).

During all of my testing, the DOTs always did five instances of damage. Even against the T-Energy creatures, which have 45% physical and magic damage mitigation. It was the damage that was reduced, not the duration/number of instances. Even the Burning (secondary damage effect) had 5 instances.

Here is a test on a T-Energy creature.

The original definition of Cobalt Strike

Spoiler

mgr.defineSpell( "he_ar_energieblitz", {
    eiStateName = "cSpellCast",
    fxTypeCast = "FX_HE_ENERGIEBLITZ_C",
    fxTypeSpell = "FX_HE_ENERGIEBLITZ",
    fxTypeCastSpecial = "FX_HE_CAST_K",
    duration = 0.150000,
    animType = "ANIM_TYPE_SM14",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_INVALID",
    animTypeSpecial = "ANIM_TYPE_RIDESM01-SPECIAL",
    causesSpellDamage = 1,
    tokens = {
        entry0 = {"et_dotdam_TC_mag", 1120, 560, 0, 42 },
        entry1 = {"et_spelldamage_magic", 630, 315, 0, 133 },
        entry2 = {"et_spelldamage_physical", 350, 175, 0, 133 },
        entry3 = {"et_spelldamage_magic", 310, 155, 1, 133 },
        entry4 = {"et_chance_chain_nr", 800, 1, 2, 4 },
        entry5 = {"et_chance_electrify", 400, 4, 3, 5 },
        entry6 = {"et_chance_chain_nr", 800, 1, 4, 4 },
        entry7 = {"et_chance_areasplash", 500, 5, 5, 5 },
        entry8 = {"et_chance_criticalhit", 99, 1, 6, 5 },
    },
    fightDistance = 525.000000,
    aspect = "EA_HE_ARCANE",
    cooldown = 0.000000,
    soundProfile = 0,
    cost_level = 250,
    cost_base = 500,
    focus_skill_name = "skill_HE_arcane_focus",
    lore_skill_name = "skill_HE_arcane_lore",
    spellClass = "cSpellHeEnergieblitz",
    spellcontroltype = "eCAtype_a_effect_attack_ray",
    sorting_rank = 1,
})

The modified entries of Cobalt Strike

Spoiler

entry0 = {"et_spelldamage_physical", 10000, 0, 0, 133 },
entry1 = {"et_spelldamage_magic", 10000, 0, 0, 133 },
entry2 = {"et_spelldamage_fire", 10000, 0, 0, 133 },
entry3 = {"et_spelldamage_ice", 10000, 0, 0, 133 },
entry4 = {"et_spelldamage_poison", 10000, 0, 0, 133 },
entry5 = {"et_dotdamage_physical", 10000, 0, 0, 42 },
entry6 = {"et_dotdamage_magic", 10000, 0, 0, 42 },
entry7 = {"et_dotdamage_fire", 10000, 0, 0, 42 },
entry8 = {"et_dotdamage_ice", 10000, 0, 0, 42 },
entry9 = {"et_dotdamage_poison", 10000, 0, 0, 42 },
entry10 = {"et_spelldamage_magic", 310, 155, 1, 42 },
entry11 = {"et_chance_chain_nr", 800, 1, 2, 4 },
entry12 = {"et_chance_electrify", 400, 4, 3, 5 },
entry13 = {"et_chance_chain_nr", 800, 1, 4, 4 },
entry14 = {"et_chance_areasplash", 500, 5, 5, 5 },
entry15 = {"et_chance_criticalhit", 99, 1, 6, 5 },

We have regular spell damage of 10000 for each element. And we have DOT damage of 10000 for each element.

The setup:

Spoiler

High Elf, level 200
SpellBaseDamage = 1000 (To remove the division by 40)
attrSdam_fact = 0 (To remove the intelligence bonus)
MP_damage = {0,1050,1100,1160,1220}, (Reduce enemy damage to 0)
MP_lifeHP = {10000000,1300,1650,2100,2650}, (Massively increase enemy life to avoid killing anything)
MP_combatvalue = {0,1100,1210,1330,1460}, (Reduce enemy attack and defense values to 0)
MP_armor = {0,1100,1210,1330,1460}, (Reduce enemy armor to 0)
(Even with all of these settings, occasionally the enemies hit me for exteremely high damage values and kill me)
AdjustCriticalDamageFactor = 1000 (Crits deal the same damage as regular hits)
SpellResistFactor = 1000 (Failed intensity checks deal the same damage as regular hits)

The inventory screen shows 10000 damage of each element for a total of 50000.

Hitting a level 189 high elf

The regular hit does 50000 damage. This is a single floating number.
The first DOT instance does [2021, 2021, 2021, 2021, 2021] damage. That's five floating numbers.
The second DOT instance does [2037, 2037, 2037, 2037, 2037] damage.
The third DOT instance does [2035, 2035, 2035, 2035, 2035] damage.
The fourth DOT instance does [2033, 2033, 2033, 2033, 2033] damage.
The fifth DOT instance does [1874, 1874, 1874, 1874, 1874] damage.
Total DOT damage is 10000 per element, or 50000 combined.

Hitting a level 199 Mutated Boar

The regular hit does 41000 damage.
The first DOT instance does [2023, 2023, 2023, 1112, 1112] damage.
The second DOT instance does [2035, 2035, 2035, 1119, 1119] damage.
The third DOT instance does [2013, 2013, 2013, 1107, 1107] damage.
The fourth DOT instance does [2027, 2027, 2027, 1115, 1115] damage.
The fifth DOT instance does [1902, 1902, 1902, 1047, 1047] damage.
Total DOT damage is 10000 for [poison, ice, fire], and 5500 for [magic, physical]. 41000 combined.

I think the reduction of the duration comes from somewhere else. Could the enemies have mastery of the Spell Resistance skill or -X% DOT?

 

I also managed to poison a Mutated Giant Rat (level 199 also). This added an additional floating number.
Poison instance #1 does 8288
Poison instance #2 does 8304
Poison instance #3 does 8240
Poison instance #4 does 8272
Poison instance #5 does 7896
The total is 41000.

That is very surprising, because my poison damage is only 10000. Interesting. I remember reading about this somewhere.

 

6 hours ago, idbeholdME said:

And as far as I can tell, Willpower has no effect on built-in spell DoTs, only actual secondary damage effects.

Do you know if Willpower reduces incoming spell damage (other than raising the "Spell Reistance" stat)? I've been wondering about that for a long time.

Edited by Maneus
  • Thanks! 1
Link to comment
 
16 hours ago, Maneus said:

Conclusion: Revered Techonlogy Lore multiplies the flat damage bonus from the Enhancement modifications!

Thanks for clearing this up. You could get even more information on this if you put all kinds of other things that effect damage like tactics lore/+%dmg and a combat art with another additive +% and a multiplicative +% and see if it all fits your current expectation, just to check that this tech lore multiplier doesn't somewhere else add with something instead of being fully multiplicative. Just an idea as I saw you tested it without any other dmg increases at all.


I just pulled together 4 giant quotes from different posts you made on dot stuff to explain a potential mistake. When I was done I found out that I had managed to prove myself wrong in the process. So sad I had to delete all that again :)

15 hours ago, Maneus said:

I think the reduction of the duration comes from somewhere else. Could the enemies have mastery of the Spell Resistance skill or -X% DOT?

So far it's just an alleged reduction of the duration, there's no documented case yet.
Spell resist mastery or "-% dot duration" would make sense to cause such a thing. No clue if enemies in an unmodded game can have those.
"-% DOT" is confusing as there's also a "dot mitigation" mod that could be meant by that. As far as I know that one again does for dots what normal mitigation does for all damage. The two effects are expected to stack additive for dots making it easier to achieve "immunity" but this has not been thoroughly tested yet. I wonder who might change that :)
 

15 hours ago, Maneus said:

That is very surprising, because my poison damage is only 10000. Interesting. I remember reading about this somewhere.

I doubt there is a source of equivalent quality where you could have read anything of value about this.
The poison and ingnite secondary damage effects are however "damage" that is "calculated" somehow and looking at your track record I have this odd feeling, soon we'll all know exactly how it's being calculated.
 

15 hours ago, Maneus said:

Do you know if Willpower reduces incoming spell damage (other than raising the "Spell Reistance" stat)? I've been wondering about that for a long time.

I doubt that willpower does anything "on its own". No other attribute does either, afaik. The moment I wrote this, I already started wondering wether I was wrong. All known effects of Strength, Dexterity, Stamina, Vitality and Willpower are shown in their tooltip, but intelligence supposedly has a hidden +% crit chance for spell combat arts. Has this ever been tested? Or did I just find another thing that could go on the long list of things to test for the one and only person motivated enough to do so. 

As always, thank you for doing all the hard work we are to lazy to do ourselves.
If Ancaria had a nobel prize I think I know who'd win it. :)

  • Like! 1
Link to comment
 
 
On 7/30/2024 at 1:27 PM, SLD said:

Thanks for clearing this up. You could get even more information on this if you put all kinds of other things that effect damage like tactics lore/+%dmg and a combat art with another additive +% and a multiplicative +% and see if it all fits your current expectation, just to check that this tech lore multiplier doesn't somewhere else add with something instead of being fully multiplicative. Just an idea as I saw you tested it without any other dmg increases at all.

 

Alright. I'll also use this opportunity to demonstrate the accuracy of the new item damage and attribute bonus formulas.

Before doing anything, I restored the original scripts folder.

Let's start from the combat art

Spoiler

mgr.defineSpell( "se_te_beeeffgee", {
    eiStateName = "cSpellCast",
    fxTypeCast = "FX_SE_BEEEFFGEE_C",
    fxTypeSpell = "FX_SE_BEEEFFGEE",
    fxTypeCastSpecial = "FX_SE_CAST_L",
    duration = 10.000000,
    animType = "ANIM_TYPE_SM10",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_INVALID",
    animTypeSpecial = "ANIM_TYPE_RIDESM07-SPECIAL",
    causesSpellDamage = 1,
    tokens = {
        entry0 = {"et_summon_level", 10, 10, 0, 8 },
        entry1 = {"et_AW_rel", 100, 20, 0, 5 },
        entry2 = {"et_summon_item", 1000, 1412, 0, 5 },
        entry3 = {"et_addskill_distancewpn", 30, 20, 0, 5 },
        entry4 = {"et_item_chance_piercing", 200, 1, 0, 133 },
        entry5 = {"et_itemdam_phy", 80, 20, 1, 133 },
        entry6 = {"et_regThisBuff", 500, 5, 2, 8 },
        entry7 = {"et_itemdam_phy", 80, 20, 3, 133 },
        entry8 = {"et_regThisBuff", 500, 5, 4, 8 },
        entry9 = {"et_item_chance_surehit", 100, 1, 5, 133 },
        entry10 = {"et_item_chance_piercing", 500, 5, 6, 133 },
    },
    fightDistance = 0.000000,
    aspect = "EA_SE_TECHNICS",
    cooldown = 0.000000,
    soundProfile = 0,
    cost_level = 667,
    cost_base = 667,
    focus_skill_name = "skill_SE_technics_focus",
    lore_skill_name = "skill_SE_technics_lore",
    spellClass = "cSpellSeBeeeffgee",
    spellcontroltype = "eCAtype_t_buff",
    sorting_rank = 5,
})

I think entry2 is used to determine which blueprint to use. It's the second number.

Quote

entry2 = {"et_summon_item", 1000, 1412, 0, 5 },

The blueprint of BFG

Spoiler

newBlueprint = {
  id = 1412,
  name = "sera_beeeffgee",
  palettebits = "1111111111111111",
  dmgvariation = 160,
  minconstraints = {1,15,0},
  lvljump = 1,
  usability = 0,
  allotment_pmfpi = {333,0,0,0,667},
  uniquename = "unique",
  specialuseonly = 1,
  bonusgroup0 = {530,1200,1,5,0},
  bonusgroup1 = {537,1000,1,5,0},
  bonusgroup2 = {26,1000,1,5,0},
  itemtypes = {8738,},
  wearergroups = {'WEARGROUP_DEFAULT',},
}
mgr.createBlueprint(1412, newBlueprint);

The item type

Spoiler

newItemType = {
    -- standard info
    renderfamily = "RENDERFAM_ARMOR",
    family       = "FAMILY_WEAPON",
    subfamily    = "SUBFAM_PRI_ENERGY_WEAPON",
    classification = "CLF_ENERGY_WEAPON",
    flags        = "FLAG_HASPREVIEWIMAGE",
    weargroup    = "WEARGROUP_INVALID",
    -- 3d model + animation info
    model0Data = {
      name         = "models/heroes/seraphim/weapon/c_BFG-tgun.GR2",
      user         = "WEARGROUP_DEFAULT",
    },
    -- logic bounding box
  logicBox = {
    minx=-5.146, miny=-53.012, minz=-8.967, 
    maxx=5.146, maxy=53.012, maxz=8.967, 
    },
    dangerclass   = 0,
}
mgr.typeCreate(8738, newItemType);

The typification

Spoiler

newTypification = {
  id = 28,
  name = "CLF_ENERGY_WEAPON",
  stat = "STAT_DEX",
  modreal = 1000,
  modfocus = 0,
  modbasepoints = 1180,
  bonusgroupID = 158,
  weapondamagespread = 160,
  fightdistance = 525.000000,
}
mgr.createTypification(28, newTypification);

The item info

Spoiler

newItemInfo = {
    type           = 8738,
    material       = "E_tech_powerdrain",
    usability      = 0,
    invbreite      = 2,
    invhoehe       = 4,
}
mgr.itemInfoCreate(newItemInfo);

The material

Spoiler

newMaterial = {
  id = 51,
  name = "E_tech_powerdrain",
  modreal = 1000,
  modfocus = 0,
  modbasepoints = 1000,
  allotphys = 333,
  allotfire = 0,
  allotice = 667,
  allotpoison = 0,
  allotmagic = 0,
  materialsound = "SOUND_MATERIAL_DAMPED",
}
mgr.createMaterial(51, newMaterial);

 

Let's start with the elements. We have:

Quote

allotphys = 333,
allotfire = 0,
allotice = 667,
allotpoison = 0,
allotmagic = 0,

allotment_pmfpi = {333,0,0,0,667},

We add together the allotments and divide by 2. We end up with:
Physical allotment = 333
Ice allotment = 667

Now let's determine the damage spread:

Quote

weapondamagespread = 160,
dmgvariation = 160,

Damage spread = 160

We need to determine the item level and item tier. Since the BFG is a summoned item, I assume that it spawns with the minimum item tier allowed by the blueprint - 15. This is also the maximum possible tier.

For the item level, maybe we can look at the combat art again.

Quote

entry0 = {"et_summon_level", 10, 10, 0, 8 },

I don't know how to interpret this yet. But let's look at the actual value from my character.

Seraphim, level 200
Revered Technology Focus, level 200
BeeEffGee, level 98

The summoned item level is 200.

 

BaseWeaponDamage = ZRareBasepointsXX * 0.01 * BasepointsMultiplier * (1 / TopLevelCalc) * (ElementAllotment / 1000) * (modbasepointsT / 1000) * (modbasepointsM / 1000) * ((modrealT + modrealM) / 2000) * (1 + (ItemLevel / damBasepoints))

MinDamage = FLOOR(BaseDamage * (1 - DamageSpread / 1000))

MaxDamage = ROUND(BaseDamage * (1 + DamageSpread / 1000))

Let's calculate the ice damage first:

Spoiler

ZRareBasepoints15 = 1350
BasepointsMultiplier = 500
TopLevelCalc = 200
ElementAllotment = 667
modbasepointsT = 1180
modbasepointsM = 1000
modrealT = 1000
modrealM = 1000
ItemLevel = 200
damBasepoints = 20

BaseWeaponDamage = 1350 * 0.01 * 500 * (1 / 200) * (667 / 1000) * (1180 / 1000) * (1000 / 1000) * ((1000 + 1000) / 2000) * (1 + (200 / 20))
BaseWeaponDamage = 6750 * 0.005 * 0.667 * 1.18 * 1 * (2000 / 2000) * (1 + 10)
BaseWeaponDamage = 26.563275 * 1 * 11
BaseWeaponDamage = 292.196025

MinDamage = FLOOR(292.196025 * (1 - 160 / 1000))
MinDamage = FLOOR(292.196025 * (1 - 0.16))
MinDamage = FLOOR(292.196025 * 0.84)
MinDamage = FLOOR(245,444661)
MinDamage = 245

MaxDamage = ROUND(292.196025 * (1 + 160 / 1000))
MaxDamage = ROUND(292.196025 * (1 + 0.16))
MaxDamage = ROUND(292.196025 * 1.16)
MaxDamage = ROUND(338.916069)
MaxDamage = 339

Ice damage: 245-339

Now let's calculate the physical damage:

Spoiler

ZRareBasepoints15 = 1350
BasepointsMultiplier = 500
TopLevelCalc = 200
ElementAllotment = 333
modbasepointsT = 1180
modbasepointsM = 1000
modrealT = 1000
modrealM = 1000
ItemLevel = 200
damBasepoints = 20

BaseWeaponDamage = 1350 * 0.01 * 500 * (1 / 200) * (333 / 1000) * (1180 / 1000) * (1000 / 1000) * ((1000 + 1000) / 2000) * (1 + (200 / 20))
BaseWeaponDamage = 6750 * 0.005 * 0.333 * 1.18 * 1 * (2000 / 2000) * (1 + 10)
BaseWeaponDamage = 13.261725 * 1 * 11
BaseWeaponDamage = 145.878975

MinDamage = FLOOR(145.878975 * (1 - 160 / 1000))
MinDamage = FLOOR(145.878975 * (1 - 0.16))
MinDamage = FLOOR(145.878975 * 0.84)
MinDamage = FLOOR(122.538339)
MinDamage = 122

MaxDamage = ROUND(145.878975 * (1 + 160 / 1000))
MaxDamage = ROUND(145.878975 * (1 + 0.16))
MaxDamage = ROUND(145.878975 * 1.16)
MaxDamage = ROUND(169.219611)
MaxDamage = 169

Physical damage: 122-169

The total damage is 367-508. This is what is shown in the weapon tooltip. Reference value is 367-508.

 

Now let's look at the dexterity bonus.

EDIT: USING THE UPDATED FORMULA

Let's first simplify the formula a bit, because we will need to reuse it many times:

Spoiler

Dexterity = 549
attrWdam_fact = 250
TopLevelCalc = 200
damBasepoints = 20
ItemLevel 200
BasepointsMultiplier = 500

AttributeBonus = AttributeBaseDamage * 0.001 * FLOOR(attrWdam_fact * 0.001 * FLOOR(Attribute * TopLevelCalc * FLOOR(100 * damBasepoints / (damBasepoints + ItemLevel)) / basepointsMultiplier))
AttributeBonus = AttributeBaseDamage * 0.001 * FLOOR(250 * 0.001 * FLOOR(549 * 200 * FLOOR(100 * 20 / (20 + 200)) / 500))
AttributeBonus = AttributeBaseDamage * 0.001 * FLOOR(0.25 * FLOOR(219.6 * FLOOR(2000 / 220)))
AttributeBonus = AttributeBaseDamage * 0.001 * FLOOR(0.25 * FLOOR(219.6 * FLOOR(9.090909090909091)))
AttributeBonus = AttributeBaseDamage * 0.001 * FLOOR(0.25 * FLOOR(219.6 * 9))
AttributeBonus = AttributeBaseDamage * 0.001 * FLOOR(0.25 * FLOOR(1979.1))
AttributeBonus = AttributeBaseDamage * 0.001 * FLOOR(0.25 * 1979)
AttributeBonus = AttributeBaseDamage * 0.001 * FLOOR(494.75)
AttributeBonus = AttributeBaseDamage * 0.001 * 494
AttributeBonus = AttributeBaseDamage * 0.494

AttributeBaseDamage = WeaponDamage

AttributeBonus = WeaponDamage * 0.494

 

Now let's find the attribute bonus:

Ice 121.03-167.466

Spoiler

MinAttributeBonus = MinWeaponDamage * 0.494
MinAttributeBonus = 245 * 0.494
MinAttributeBonus = 121.03

MaxAttributeBonus = MaxWeaponDamage * 0.494
MaxAttributeBonus = 339 * 0.494
MaxAttributeBonus = 167.466

Physical 60.268-83.486

Spoiler

MinAttributeBonus = MinWeaponDamage * 0.494
MinAttributeBonus = 122 * 0.494
MinAttributeBonus = 60.268

MaxAttributeBonus = MaxWeaponDamage * 0.494
MaxAttributeBonus = 169 * 0.494
MaxAttributeBonus = 83.486

Average 215. This is what we see in the dexterity tooltip. The reference value is 215.

Spoiler

AverageAttributeBonus = FLOOR((FLOOR(MinAttributeBonus) + FLOOR(MaxAttributeBonus)) / 2)
AverageAttributeBonus = FLOOR((FLOOR(121.03) + FLOOR(60.268) + FLOOR(167.466) + FLOOR(83.486)) / 2)
AverageAttributeBonus = FLOOR((121 + 60 + 167 + 83) / 2)
AverageAttributeBonus = FLOOR(431 / 2)
AverageAttributeBonus = FLOOR(215.5)
AverageAttributeBonus = 215

 

Now let's calculate the damage in the inventory screen:

So the physical damage is 182-252. The reference value is 182-252.

Spoiler

MinInventoryDamage = MinWeaponDamage + MinAttributeBonus
MinInventoryDamage = 122 + 60.268
MinInventoryDamage = 182.268

MaxInventoryDamage = MaxWeaponDamage + MaxAttributeBonus
MaxInventoryDamage = 169 + 83.486
MaxInventoryDamage = 252.486

And the ice damage is 366-506. The reference value is 366-506.

Spoiler

MinInventoryDamage = MinWeaponDamage + MinAttributeBonus
MinInventoryDamage = 245 + 121.03
MinInventoryDamage = 366.03

MaxInventoryDamage = MaxWeaponDamage + MaxAttributeBonus
MaxInventoryDamage = 339 + 167.466
MaxInventoryDamage = 506.466

 

 

 

Alright. Now let's add a ton of stuff and do a test with Pelting Strikes.

Revered Technology Focus, level 200
Revered Technology Lore, level 200, +377.8%
Exalted Warrior Focus, level 200
Tactics Lore, level 200, +377.8%
Combat Discipline, level 200, +283.3%
Ring with 54 flat damage
Ring with +46.9% physical damage

We'll take both Enhancement modifications on BeeEffGee.
We'll take the Thrust modification on Pelting Strikes.

Both BeeEffGee (the combat art) and Pelting Strikes are level 98

Keep in mind that BeeEffGee at this item level (200) gives +20 to Tactics Lore. I realized this late, so I adjusted my skill points to 180. The total remains 200.

The flat damage bonus from the Enhancement modifications should be: 1949

Spoiler

The entries of the Enhancement modification:

entry5 = {"et_itemdam_phy", 80, 20, 1, 133 },
entry7 = {"et_itemdam_phy", 80, 20, 3, 133 },

Combine the two entries and calculate the damage:

PhysicalDamage = (160 + (98 * 40)) / 10
PhysicalDamage = (160 + 3920) / 10
PhysicalDamage = 4080 / 10
PhysicalDamage = 408

Multiplied by the Aspect Lore

PhysicalDamage = 408 * (1 + 3.778)
PhysicalDamage = 408 * 4.778
PhysicalDamage = 1949.424
PhysicalDamage = 1949 (Rounded down)

 

Pelting strikes in spells.txt

Spoiler

mgr.defineSpell( "se_co_schlaghagel", {
    eiStateName = "cSMSchlaghagel",
    fxTypeCast = "",
    fxTypeSpell = "",
    duration = 0.000000,
    animType = "ANIM_TYPE_SM02",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_INVALID",
    animTypeSpecial = "ANIM_TYPE_RIDESM02-SPECIAL",
    causesSpellDamage = 0,
    tokens = {
        entry0 = {"et_duration_sec", 1500, 10, 0, 8 },
        entry1 = {"et_mult_weapondamage", 900, 3, 0, 9 },
        entry2 = {"et_baseAW", 200, 250, 0, 5 },
        entry3 = {"et_damage_any_rel", 320, 80, 0, 5 },
        entry4 = {"et_chance_doublehit", 200, 0, 1, 5 },
        entry5 = {"et_mult_weapondamage", 150, 1, 2, 9 },
        entry6 = {"et_cost_thisSpell", 250, 0, 3, 4 },
        entry7 = {"et_debuff_EVW", 1000, 10, 4, 42 },
        entry8 = {"et_chance_criticalhit", 99, 1, 5, 5 },
        entry9 = {"et_debuff_armor_phy", 500, 10, 6, 42 },
    },
    fightDistance = 45.000000,
    aspect = "EA_SE_COMBAT",
    cooldown = 0.000000,
    soundProfile = 0,
    cost_level = 250,
    cost_base = 500,
    focus_skill_name = "skill_SE_combat_focus",
    lore_skill_name = "skill_tactics_lore",
    spellClass = "cSpellSMove",
    spellcontroltype = "eCAtype_a_weapon_attack",
    magicType = "MAGIC_TYPE_ATTACK",
    sorting_rank = 2,
})

 

The combat art multiplier is: 1.442

Spoiler

entry1 = {"et_mult_weapondamage", 900, 3, 0, 9 },
entry5 = {"et_mult_weapondamage", 150, 1, 2, 9 },

CombatArtMultiplier = (1050 + (98 * 4)) / 1000
CombatArtMultiplier = (1050 + 392) / 1000
CombatArtMultiplier = 1442 / 1000
CombatArtMultiplier = 1.442

 

The percentage bonus is: 8.160

Spoiler

entry3 = {"et_damage_any_rel", 320, 80, 0, 5 },

PercentageBonus = (320 + (98 * 80)) / 1000
PercentageBonus = (320 + 7840) / 1000
PercentageBonus = 8160 / 1000
PercentageBonus = 8.160

 

I think we have all we need to calculate the combat art damage (shown in the inventory screen). We will summon the BFG from an occupied weapon slot.

Total ice 5691-7875 (Reference value is 5691-7875)

Spoiler

MinBaseDamage = FLOOR(FLOOR((MinWeaponDamage + SumFlatBonuses) * (1 + SumPercentageBonuses / 1000)) * (CombatArtMultiplier / 1000)) * (CriticalMultiplier / 1000)
MinBaseDamage = FLOOR(FLOOR((245 + 0) * (1 + 8.160 + 3.778 + 2.833)) * 1.442)
MinBaseDamage = FLOOR(FLOOR(245 * 15.771) * 1.442)
MinBaseDamage = FLOOR(FLOOR(3863.895) * 1.442)
MinBaseDamage = FLOOR(3863 * 1.442)
MinBaseDamage = FLOOR(5570.446)
MinBaseDamage = 5570

MinCombinedDamage = MinBaseDamage + MinAttributeBonus
MinCombinedDamage = 5570 + 121
MinCombinedDamage = 5691

MaxBaseDamage = FLOOR(FLOOR((MaxWeaponDamage + SumFlatBonuses) * (1 + SumPercentageBonuses / 1000)) * (CombatArtMultiplier / 1000)) * (CriticalMultiplier / 1000)
MaxBaseDamage = FLOOR(FLOOR((339 + 0) * (1 + 8.160 + 3.778 + 2.833)) * 1.442)
MaxBaseDamage = FLOOR(FLOOR(339 * 15.771) * 1.442)
MaxBaseDamage = FLOOR(FLOOR(5346.369) * 1.442)
MaxBaseDamage = FLOOR(5346 * 1.442)
MaxBaseDamage = FLOOR(7708.932)
MaxBaseDamage = 7708

MaxCombinedDamage = MaxBaseDamage + MaxAttributeBonus
MaxCombinedDamage = 7708 + 167
MaxCombinedDamage = 7875

Total physical 49823-50946 (Reference value is 49823-50946)

Spoiler

MinBaseDamage = FLOOR(FLOOR((MinWeaponDamage + SumFlatBonuses) * (1 + SumPercentageBonuses / 1000)) * (CombatArtMultiplier / 1000)) * (CriticalMultiplier / 1000)
MinBaseDamage = FLOOR(FLOOR((122 + 54 + 1949) * (1 + 8.160 + 3.778 + 2.833 + 0.469)) * 1.442)
MinBaseDamage = FLOOR(FLOOR(2125 * 16.24) * 1.442)
MinBaseDamage = FLOOR(FLOOR(34510) * 1.442)
MinBaseDamage = FLOOR(34510 * 1.442)
MinBaseDamage = FLOOR(49763.42)
MinBaseDamage = 49763

MinCombinedDamage = MinBaseDamage + MinAttributeBonus
MinCombinedDamage = 49763 + 60
MinCombinedDamage = 49823

MaxBaseDamage = FLOOR(FLOOR((MaxWeaponDamage + SumFlatBonuses) * (1 + SumPercentageBonuses / 1000)) * (CombatArtMultiplier / 1000)) * (CriticalMultiplier / 1000)
MaxBaseDamage = FLOOR(FLOOR((169 + 54 + 1949) * (1 + 8.160 + 3.778 + 2.833 + 0.469)) * 1.442)
MaxBaseDamage = FLOOR(FLOOR(2172 * 16.24) * 1.442)
MaxBaseDamage = FLOOR(FLOOR(35273.28) * 1.442)
MaxBaseDamage = FLOOR(35273 * 1.442)
MaxBaseDamage = FLOOR(50863.666)
MaxBaseDamage = 50863

MaxCombinedDamage = MaxBaseDamage + MaxAttributeBonus
MaxCombinedDamage = 50863 + 83
MaxCombinedDamage = 50946

Total (ice + physical) 55514-58821 (Reference value is 55514-58821)

Note: This is what is shown in the inventory screen, but not the actual damage dealt. The formula for the actual damage dealt is slightly different.

Alright. I need to take a break. :)

Edited by Maneus
Link to comment
 

Continuing the previous post.

Let's now summon the BFG from an empty slot. This will add the 1949 flat damage onto the weapon and change our dexterity bonus.

Since it is physical damage, we only need to recalculate the physical part.

Physical 1023.074-1046.292

Spoiler

MinAttributeBonus = MinWeaponDamage * 0.494
MinAttributeBonus = (122 + 1949) * 0.494
MinAttributeBonus = 2071 * 0.494
MinAttributeBonus = 1023.074

MaxAttributeBonus = MaxAttributeBaseDamage * 0.494
MaxAttributeBonus = (169 + 1949) * 0.494
MaxAttributeBonus = 2118 * 0.494
MaxAttributeBonus = 1046.292

Average is 1178. This is what we see in the dexterity tooltip. The reference value is 1178.

Spoiler

AverageAttributeBonus = FLOOR((FLOOR(MinAttributeBonus) + FLOOR(MaxAttributeBonus)) / 2)
AverageAttributeBonus = FLOOR((FLOOR(121.03) + FLOOR(1023.074) + FLOOR(167.466) + FLOOR(1046.292)) / 2)
AverageAttributeBonus = FLOOR((121 + 1023 + 167 + 1046) / 2)
AverageAttributeBonus = FLOOR(2357 / 2)
AverageAttributeBonus = FLOOR(1178.5)
AverageAttributeBonus = 1178

We can be lazy here and just add the difference in the attribute bonus to the previous results.

MinFinalDamage(Physical) = 49823 + (1023 - 60)
MinFinalDamage(Physical) = 49823 + 963
MinFinalDamage(Physical) = 50786

MaxFinalDamage(Physical) = 50946 + (1046 - 83)
MaxFinalDamage(Physical) = 50946 + 963
MaxFinalDamage(Physical) = 51909

The physical damage is 50786-51909 (Reference value is 50786-51909)
The ice damage is 5691-7875 (from the previous post)
The total damage is 56477-59784 (Reference value is 56477-59784)

 

bfg_screenshot1.jpg

Edited by Maneus
Link to comment
 
11 hours ago, SLD said:

but intelligence supposedly has a hidden +% crit chance for spell combat arts. Has this ever been tested? Or did I just find another thing that could go on the long list of things to test for the one and only person motivated enough to do so. 

Yes, Intelligence does increase the crit chance of certain (not all) combat arts. For example: Skeletal Fortification and Spectral Hand are affected, while Belligerent Vault is not. Belligerent Vault is a spell and receives the intelligence bonus, just like Skeletal Fortification. Belligerent Vault, like regular attacks, can still crit occasionally, so there appears to be some universal base % crit chance.

 

https://www.sacredwiki.org/index.php/Sacred_2:Intelligence The wiki claims that

Quote

each 50 points in Intelligence give +1% chance for critical hit.

If this is true, then giving a character 5000 intelligence should make every spell cast crit. I did a quick test and 5000 intelligence is far from enough to achieve 100% crit chance. I tested again with 9000 and it seems to be enough. But I really don't know how to approach testing chance-based mechanics. And the survival bonus constantly increases the attributes during the testing.

Edited by Maneus
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...