Research:Magic

From OpenMW Wiki
Revision as of 17:44, 3 September 2012 by Hrnchamd (talk | contribs) (Migrated magic and item charge from Formulae page. Filled in item charge section.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Spell Casting

Chance of successful Spell Cast

Actions affected On cast attempt
Description
Implementation status
Analysis status Accurate, but requires more work; spell skill depends on dominant school for multi effect spells, but is unspecified; Sound spell effect is not accounted for
chance = (Spells Skill * 2 + Willpower / 5 + Luck / 10 - SpellCost + CastPenalty) * (CurrentFatigue + MaximumFatigue * 1.5) / (MaximumFatigue * 2)


Cast cost

Actions affected On cast attempt
Description
Implementation status
Analysis status Does not account for multiple effect spells, non-duration spells or fixed magnitude spells
cost = 0.1 + ((min effect value / 20) + (max effect value / 20)) * ((duration - 1) / 2) + (range / 40).

x1.5 for ranged spell. Constant effect enchantments use fEnchantmentConstantDurationMult as their duration values (default 100).

  • Touch/Self
cost = base cost * ((max + min) * duration * 0.025 + area * 0.0125)
  • Target
cost = base cost * ((max + min) * duration * 0.3125 + area * 0.0125)
  • Constant effect
cost = base cost * ((max + min) * 2.5 + area * 0.025)

The base cost are here


Magic Damage and Mitigation

Actions affected On magic hit
Description
Implementation status
Analysis status Ignores willpower resists; which effects magic resistance apply to; reflection and absorption
Spell Damage = Damage - Damage * ( Resistance - Weakness ) / 100


Item Charge

Actions affected On enchanted item use
Description Charge consumed on use depends on skill.
Implementation status
Analysis status Verified; but a poorly scaling mechanic
x = 0.01 * (110 - pcEnchant)
charge used = int(x * enchant base charge cost)

This makes items last 10 times longer at 100 enchant compared to 10 enchant, making it scale a little too well. MCP uses x = 0.025 * (400 - pcEnchant).


Actions affected On game tick
Description Natural recharge.
Implementation status
Analysis status Verified

Every item in the player's inventory charges by tickTime * fMagicItemRechargePerSecond. Items anywhere else do not charge.


Actions affected On soulgem use
Description Recharging with a filled soulgem. Uses common term fatigueTerm.
Implementation status
Analysis status Verified
luckTerm = 0.1 * luck
if luckTerm < 1 or luckTerm > 10: luckTerm = 1

intelligenceTerm = 0.2 * intelligence
if intelligenceTerm > 20: intelligenceTerm = 20
if intelligenceTerm < 1: intelligenceTerm = 1

x = (pcEnchant + intelligenceTerm + luckTerm) * fatigueTerm
roll 100, success if roll < x
on success restore charge: soulgem charge * (roll / x)


Comments

Recharging for most characters has a good chance of wasting a soul gem, as the enchant skill is the dominant term used for success. You would require enchant skill of over 65 with average stats to have a 100% success rate. The amount restored is a uniform random percentage of the soul gem, except if you have over a 100% success rate, in which case you will never get the full charge range out of a gem. The missing range increases as your skill does, but the lost charge is no more than 25% at the natural stat limit. Finally, note the strange luck term capping behaviour.