Maneus 236 Share Posted November 29 (edited) I've been looking at how combat art regeneration times work. There is already a lot of information in the forums and in the wiki, but there are some misconceptions about how it is calculated. I'll try to explain it from scratch. First of all, the "Regeneration Time Xs" and the "Regeneration Time of All Combat Arts +X%" (buff penalty) are calculated in completely different ways. Regarding "Regeneration Time Xs", the base regeneration time is calculated as: BaseRegenerationTime = (cost_base + Runes * cost_level + SumCABonus * cost_level * 0.5) * 0.01 Where: - cost_base - from the combat art definition in spells.txt. - cost_level - from the combat art definition in spells.txt. - Runes - the number of runes used. - SumCABonus - sum of all bonuses to the combat art level (from item modifiers). This BaseRegenerationTime is what we apply all other multipliers to. These multipliers are: - StaminaMultiplier - calculated based on the character level and total stamina. - SkillMultiplier - calculated based on the aspect focus and concentration skills. - ExpertTouchMultiplier - based on whether Expert Touch is enabled or not. - CombatDisciplineMultiplier - based on whether Combat Discipline is taken and the combat art is placed in a combo. - EquipmentMultiplier - sum of all Regeneration Time -X% bonuses from item modifiers (this includes equipment, concentration potions and buff bonuses). - BuffPenaltyMultiplier - sum of all buff penalties and probably the mount penalty. - ArmorMultiplier - calculated based on the armor regeneration bonus/penalty, but I haven't looked into it yet. StaminaMultiplier: StaminaMultiplier = 1 / (0.735 + CharacterLevel * 0.015 + Stamina * 0.01) SkillMultiplier: SumValueOfBonus = FocusValueOfBonus + ConcentrationValueOfBonus DiminishedValue = 1000 * SumValueOfBonus / (1000 + SumValueOfBonus) SkillMultiplier = 1 - DiminishedValue * 0.001 Where: - FocusValueOfBonus - This is basically the SkillValue of the Aspect Focus skill and needs to be calculated manually. There is no way to see what it is in-game. Edit: The value can be found in the table at the bottom of this page https://www.sacredwiki.org/index.php/Sacred_2:Aspect_Focus_-_formulas_and_tables. - ConcentrationValueOfBonus - This is basically the SkillValue of the Concentration skill and needs to be calculated manually. There is no way to see what it is in-game. Edit: The value can be found in the table at the bottom of this page https://www.sacredwiki.org/index.php/Sacred_2:Concentration_-_formulas_and_tables. ExpertTouchMultiplier: If Expert Touch is disabled, then it is equal to 1. If Expert Touch is enabled, then it is equal to 1000 / AddOn_RegenFactor. Where: - AddOn_RegenFactor - from balance.txt. Default value is 1500. CombatDisciplineMultiplier: If Combat Discipline is not taken (or the combat art is not in a combo), then it is 1. If Combat Discipline is taken, but not mastered, then it is 0.9. If Combat Discipline is taken and mastered, then it is 0.8. EquipmentMultiplier: DiminishedValue = 1000 * SumValueOfBonus / (1000 + SumValueOfBonus) EquipmentMultiplier = 1 - DiminishedValue * 0.001 Where: - SumValueOfBonus - add together the ValueOfBonus of all item modifiers. This includes equipment, concentration potions and buff bonuses. Unfortunately, each ValueOfBonus needs to be calculated manually (or guessed). For example: A Concentration Elixir gives Regeneration Time -60.0%. The ValueOfBonus in this case is 1500. Spoiler ValueOfBonus = 1500 DiminishedValue = 1000 * ValueOfBonus / (1000 + ValueOfBonus) DiminishedValue = 1000 * 1500 / (1000 + 1500) DiminishedValue = 1500000 / 2500 DiminishedValue = 600 TooltipValue = -0.1 * DiminishedValue TooltipValue = -0.1 * 600 TooltipValue = -60 BuffPenaltyMultiplier: BuffPenaltyMultiplier = 1 + SumBuffPenalties / 100 Where: - SumBuffPenalties - add together the penalties of all active buffs (and probably the mount). Note that the tooltip only shows one digit after the decimal point, but the real value has quite a long decimal part. To get a precise result, you will need to calculate the buff penalty manually. ArmorMultiplier: TODO And finally, multiply the BaseRegenerationTime with all of these multipliers to get the final regeneration time. FinalRegenerationTime = BaseRegenerationTime * StaminaMultiplier * SkillMultiplier * ExpertTouchMultiplier * CombatDisciplineMultiplier * EquipmentMultiplier * BuffPenaltyMultiplier * ArmorMultiplier Do not round down at any step of the calculations. If the combat art has a cooldown time, then this cooldown time also needs to be added to the FinalRegenerationTime. But I haven't done any tests regarding cooldown times yet. Edit: I forgot about Chance to halve regeneration time. I assume that it is an additional multiplier. Edit: Pelting Strikes has a modification, called Focus, that reduces the regeneration time. Quote entry6 = {"et_cost_thisSpell", 250, 0, 3, 4 }, This entry acts as an item modifier Regeneration Time -X% with ValueOfBonus = 250, but it is applied only to this combat art. It is part of the EquipmentMultiplier. Battle Stance has a modification, called Drill, that reduces the regeneration time penalty. Quote entry6 = {"et_regThisBuff", 500, 10, 3, 8 }, This entry acts as an item modifier Regeneration Penalty from Buffs -X% with the appropriate ValueOfBonus, but it is applied only to this combat art. It is part of the EquipmentMultiplier. Edited November 30 by Maneus 1 Link to comment
Maneus 236 Share Posted November 30 (edited) How to calculate the "Regeneration Time of All Combat Arts +X%" (buff penalty). Ratio = FinalCombatArtLevel / (Runes + SumCABonus) BasePenalty = (cost_level + (Runes * Ratio - 1) * cost_level * 0.5 + SumCABonus * Ratio * cost_level * 0.25) * 0.1 Where: - Runes - the number of runes used. - SumCABonus - sum of all bonuses to the combat art level (from item modifiers). - FinalCombatArtLevel - the combat art level after penalty. It is important to use the full decimal part. - cost_level - from the combat art definition in spells.txt. Then the following multipliers are applied: - StaminaMultiplier - same as above. - SkillMultiplier - same as above. - EquipmentMultiplier - sum of all Regeneration Penalty from Buffs -X% bonuses from item modifiers. FinalPenalty = BasePenalty * StaminaMultiplier * SkillMultiplier * EquipmentMultiplier Notes: - cost_base is not used. - Expert Touch does not affect buff penalties. - The Regeneration Time -X% bonus from Combat Discipline affects only combat arts that are in a combo, so buffs cannot benefit. - The regeneration bonus/penalty from armor doesn't appear to affect buffs. I am currently working on a calculator app, but it will take a while. Example: Spoiler CharacterLevel = 1 Stamina = 25 Runes = 2 SumCABonus = 1 FinalCombatArtLevel = 2.4 (HCALWP = 2) cost_level = 10000 Ratio = FinalCombatArtLevel / (Runes + SumCABonus) Ratio = 2.4 / (2 + 1) Ratio = 2.4 / 3 Ratio = 0.8 BasePenalty = (cost_level + (Runes * Ratio - 1) * cost_level * 0.5 + SumCABonus * Ratio * cost_level * 0.25) * 0.1 BasePenalty = (10000 + (2 * 0.8 - 1) * 10000 * 0.5 + 1 * 0.8 * 10000 * 0.25) * 0.1 BasePenalty = (10000 + (1.6 - 1) * 5000 + 2000) * 0.1 BasePenalty = (10000 + 0.6 * 5000 + 2000) * 0.1 BasePenalty = (10000 + 3000 + 2000) * 0.1 BasePenalty = 15000 * 0.1 BasePenalty = 1500 StaminaMultiplier = 1 / (0.735 + CharacterLevel * 0.015 + Stamina * 0.01) StaminaMultiplier = 1 / (0.735 + 1 * 0.015 + 25 * 0.01) StaminaMultiplier = 1 / (0.735 + 0.015 + 0.25) StaminaMultiplier = 1 / 1 StaminaMultiplier = 1 SkillMultiplier = 1 (No skills) EquipmentMultiplier = 1 (No item modifiers) FinalPenalty = BasePenalty * StaminaMultiplier * SkillMultiplier * EquipmentMultiplier FinalPenalty = 1500 * 1 * 1 * 1 FinalPenalty = 1500 (Reference value is 1500.0%) Edited November 30 by Maneus 1 Link to comment
Maneus 236 Share Posted November 30 (edited) Regarding the regeneration time penalty from mounts, there are two parameters in balance.txt: Quote Mount_Regenburden_Warhorse = 500, Mount_Regenburden_Ridehorse = 300, The second one appears to represent the regeneration time penalty for the common horses. 300 means 30%. The first one, from what I understand, is for special types of horses that can only be bought from a specific vendor. But I've never played with mounts, so I don't know. And for the class-specific mounts - I don't have one yet, but judging from the pictures in the wiki, they appear to use the second parameter (30%). These parameters form the BaseMountPenalty. The Riding skill has a hidden bonus, that reduces the regeneration time penalty. It is calculated as follows: ValueOfBonus = SkillValue DiminishedValue = 1000 * ValueOfBonus / (1000 + ValueOfBonus) The Riding skill at level 75 has a SkillValue of 2260. DiminishedValue = 1000 * ValueOfBonus / (1000 + ValueOfBonus) DiminishedValue = 1000 * 2260 / (1000 + 2260) DiminishedValue = 2260000 / 3260 DiminishedValue = 693.2515337423313 If this bonus was visible in the tooltip, then the value would be -69.3%. FinalMountPenalty = 0.1 * FLOOR(BaseMountPenalty * (1 - DiminishedValue / 1000)) FinalMountPenalty = 0.1 * FLOOR(300 * (1 - 693.2515337423313 / 1000)) FinalMountPenalty = 0.1 * FLOOR(300 * (1 - 0.6932515337423313)) FinalMountPenalty = 0.1 * FLOOR(300 * 0.3067484662576687) FinalMountPenalty = 0.1 * FLOOR(92.02453987730061) FinalMountPenalty = 0.1 * 92 FinalMountPenalty = 9.2 (Reference value is 9.1%) The reference value is lower by 0.1% because of precision loss from 32-bit floats. But the regeneration time penalty is actually 9.2%. I don't know yet if any other parameters affect the mount penalty. Edited November 30 by Maneus 1 Link to comment
Maneus 236 Share Posted December 1 Regarding the skill Armor Lore, the bonus "Regeneration Time Penalty from Armor -X%" is calculated in the following way: ValueOfBonus = 1000 * (1 - (1 / (1 + MasteryMultiplier * SkillLevel * (1 / CharacterLevel)))) Where: - MasteryMultiplier - equal to 1 if the skill is not mastered, or 1.5 if the skill is mastered. - SkillLevel - total skill points in the skill. TooltipValue = -0.1 * ValueOfBonus Notes: - The SkillValue is not used in this formula. The parameters mean_value and advanced_mean_value don't change anything. Examples: Spoiler CharacterLevel = 200 SkillLevel = 75 MasteryMultiplier = 1.5 (The skill is mastered) ValueOfBonus = 1000 * (1 - (1 / (1 + MasteryMultiplier * SkillLevel * (1 / CharacterLevel)))) ValueOfBonus = 1000 * (1 - (1 / (1 + 1.5 * 75 * (1 / 200)))) ValueOfBonus = 1000 * (1 - (1 / (1 + 0.5625))) ValueOfBonus = 1000 * (1 - (1 / 1.5625)) ValueOfBonus = 1000 * (1 - 0.64) ValueOfBonus = 1000 * 0.36 ValueOfBonus = 360 TooltipValue = -0.1 * ValueOfBonus TooltipValue = -0.1 * 360 TooltipValue = -36 (Reference value is -36.0%) Spoiler CharacterLevel = 200 SkillLevel = 200 MasteryMultiplier = 1.5 (The skill is mastered) ValueOfBonus = 1000 * (1 - (1 / (1 + MasteryMultiplier * SkillLevel * (1 / CharacterLevel)))) ValueOfBonus = 1000 * (1 - (1 / (1 + 1.5 * 200 * (1 / 200)))) ValueOfBonus = 1000 * (1 - (1 / (1 + 1.5))) ValueOfBonus = 1000 * (1 - (1 / 2.5)) ValueOfBonus = 1000 * (1 - 0.4) ValueOfBonus = 1000 * 0.6 ValueOfBonus = 600 TooltipValue = -0.1 * ValueOfBonus TooltipValue = -0.1 * 600 TooltipValue = -60 (Reference value is -60.0%) Spoiler CharacterLevel = 1 SkillLevel = 4 MasteryMultiplier = 1 (The skill is NOT mastered) ValueOfBonus = 1000 * (1 - (1 / (1 + MasteryMultiplier * SkillLevel * (1 / CharacterLevel)))) ValueOfBonus = 1000 * (1 - (1 / (1 + 1 * 4 * (1 / 1)))) ValueOfBonus = 1000 * (1 - (1 / (1 + 4))) ValueOfBonus = 1000 * (1 - (1 / 5)) ValueOfBonus = 1000 * (1 - 0.2) ValueOfBonus = 1000 * 0.8 ValueOfBonus = 800 TooltipValue = -0.1 * ValueOfBonus TooltipValue = -0.1 * 800 TooltipValue = -80 (Reference value is -80.0%) 1 Link to comment
Maneus 236 Share Posted December 1 (edited) Regarding the maximum usable item level. If we assume that the table here https://www.sacredwiki.org/index.php/Sacred_2:Items/Usable_Item_Levels is trustworthy, which seems to be the case, then the formula is: MaximumUsableItemLevel = 2 + FLOOR(CharacterLevel * 1.25) Armor Lore, Shield Lore and the various Weapon Lore skills raise the "Item Level without Penalty" up to a maximum. But this "maximum item level without penalty" is different from the "maximum usable item level". The formula for the "maximum item level without penalty" appears to be: MaximumItemLevelWithoutPenalty = FLOOR(CharacterLevel * 1.25) For example: At character level 200, the maximum usable item level is 252. If we have Armor Lore at level 200, then the "Item Level without Penalty" will be 250. At character level 1, the maximum usable item level is 3. If we have Armor Lore at level 200, then the "Item Level without Penalty" will be 1. So the MaximumItemLevelWithoutPenalty is always lower than the MaximumUsableItemLevel by 2. How the above-mentioned skills raise the "Item Level without Penalty" and how the penalty is calculated - I'll look into that later. Edited December 1 by Maneus 1 Link to comment
Lindor 548 Popular Post Share Posted Tuesday at 11:49 AM On 7/21/2024 at 3:20 AM, Maneus said: 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, Expand 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! Thanks! This was one of the few questions left in this topic. This is a huge help for modding! 1 1 Link to comment