Jump to content

Sacred 2 DownloadsSacred 2-calc-spells


Recommended Posts

  • The title was changed to Sacred 2 Downloads Sacred 2-calc-spells
7 hours ago, Maneus said:

Sacred 2-calc-spells

View File

A damage calculator for spell-based combat arts. Original thread and post https://darkmatters.org/forums/index.php?/topic/18511-how-is-sacred-2-weapon-damage-calculated/&do=findComment&comment=7144732

 

 

You input:

- The character's level.

- The value of the intelligence attribute.

- The base combat art level (before the penalty). Add toghether the runes used and equipment bonuses.

- The final combat art level (after the penalty). Note: When dealing with partial levels, be aware that the displayed number in-game is not the entire number!

- The combat art damage values from spells.txt .

- The relevant percentage bonuses - from the combat art itself; from skills like Aspect Lore, Ancient Magic, Combat Discipline; from equipment. Note: The displayed value in-game is not always correct.

 

The calculator outputs:

- Final damage - The combat art damage shown in the inventory screen or in the tooltip when hovering over the combat art itself.

- Intelligence bonus -  The value shown in the tooltip when you hover over the intelligence attribute (Combat Art Damage +X).

- Base damage - Not shown directly in-game, but it is basically the final damage minus the intelligence bonus.

 

You can also:

- Specify one or multiple damage elements (Physical, Magic, Fire, Poison, Ice).

- Adjust the relevant parameters from balance.txt .

- Input expected values (the values seen in-game) for easy comparisons.

 


 

Thanks for putting this together for the community, Maneus!! 

:)

 

gogo

  • Appreciation 1
Link to comment
8 hours ago, Maneus said:

- The base combat art level

8 hours ago, Maneus said:

- The final combat art level (after the penalty).

Why not just ask for the "Focus Skill"-level and Calculate the after penalty value automatically? You already have char level and base CA level before penalty. Would remove one more potential inaccuracy as you said:

8 hours ago, Maneus said:

Note: When dealing with partial levels, be aware that the displayed number in-game is not the entire number!

Just an Idea for further improvement... You could also add a function to import the numbers from a specific spells.txt and balance.txt so we only have to be able to select the correct spell. An ability we already need to fetch the numbers ourselves. Would be compatible with every mod as well... I know I'm dreaming again :)

Thank you for all the work in figuring out the complex nature of Sacred 2 damage calculations and now sharing a tool so we don't have to run those calculations ourselves.

  • Thanks! 1
Link to comment
18 hours ago, SLD said:

Why not just ask for the "Focus Skill"-level and Calculate the after penalty value automatically? You already have char level and base CA level before penalty.

 

It is because we don't yet know the formula for the final combat art level. https://www.sacredwiki.org/index.php/Sacred_2:Highest_Combat_Art_Level_Without_Penalty

 

But, I just figured out what the formula is when there is no focus skill involved!

 

FinalCombatArtLevel = MIN(BaseCombatArtLevel, ((3.5 + CharacterLevel * 0.5) * BaseCombatArtLevel) / (1.75 + CharacterLevel * 0.25 + BaseCombatArtLevel))

 

For a level 1 character, the formula becomes:

FinalCombatArtLevel = MIN(BaseCombatArtLevel, (4 * BaseCombatArtLevel) / (2 + BaseCombatArtLevel))

 

And for a level 200 character, the formula becomes:

FinalCombatArtLevel = MIN(BaseCombatArtLevel, (103.5 * BaseCombatArtLevel) / (51.75 + BaseCombatArtLevel))

 

So given a combat art of level 51, the result becomes:

FinalCombatArtLevel = MIN(BaseCombatArtLevel, (103.5 * BaseCombatArtLevel) / (51.75 + BaseCombatArtLevel))

FinalCombatArtLevel = MIN(51, (103.5 * 51) / (51.75 + 51))

FinalCombatArtLevel = MIN(51, 5278.5 / 102.75)

FinalCombatArtLevel = MIN(51, 51.37226277372263)

FinalCombatArtLevel = 51

 

And given a combat art of level 52, the result becomes:

FinalCombatArtLevel = MIN(BaseCombatArtLevel, (103.5 * BaseCombatArtLevel) / (51.75 + BaseCombatArtLevel))

FinalCombatArtLevel = MIN(52, (103.5 * 52) / (51.75 + 52))

FinalCombatArtLevel = MIN(52, 5382 / 103.75)

FinalCombatArtLevel = MIN(52, 51.87469879518072)

FinalCombatArtLevel = 51.87469879518072

 

Now I'll have to see what happens when the focus skill is involved... :schot:

 

  • Appreciation 1
Link to comment
Posted (edited)

I think I have a suitable formula for the pre-mastery part, but the mastery part is giving me trouble. I don't know how long it will take or if I'll ever be able to find the formula, so I'll just post the setup I use to get the FinalCombatArtLevel:

Choose a spell-based combat art and edit it in spells.txt so that it has an initial damage of 0 and a damage per level of 10000. Remove any other entries that might interfere.
SpellBaseDamage = 1000 (This removes the division by 40)
attrSdam_fact = 0 (This removes the intelligence bonus)
Set the character level, combat art level, and focus skill to the desired amount (using character editor and/or items).
Observe the damage shown in the inventory screen or in the tooltip of the combat art.

For example:
Shadow Warrior, level 1
Astral Lord Focus, level 100, HCALWP is 32
Skeletal Fortification, level 37
Final combat art level in tooltip is 34.5
Damage in inventory screen is 345972
The actual combat art level is 34.5972...

For higher precision, you could further increase the combat art damage (per-level), but be aware that the value is stored as a 32-bit floating point number. The highest whole number that can be represented without losing precision is 16777216. For higher values you will get a loss of precision. For example: 16777217 becomes 16777216. And 2147480000 becomes 2147480064.

Edited by Maneus
  • Like! 1
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...
Please Sign In or Sign Up