Research:Magic: Difference between revisions

From OpenMW Wiki
Jump to navigation Jump to search
(Migrated magic and item charge from Formulae page. Filled in item charge section.)
 
(→‎Item Charge: Cleanup + redirect soulgem charging to player skill page.)
Line 51: Line 51:


==Item Charge==
==Item Charge==
====Using enchanted items====
{{Formula
{{Formula
|On enchanted item use
|On enchanted item use
Line 64: Line 66:




====Natural recharge====
{{Formula
{{Formula
|On game tick
|On game tick
|Natural recharge.
|Enchanted items may gain charge over time.
|
|
|{{StatusCol|green|Verified}}}}
|{{StatusCol|green|Verified}}}}
Line 72: Line 75:




{{Formula
====Soulgem charging====
|On soulgem use
Refer to [[Research:Player Craft Skills#Enchanting|Player Craft Skills]].
|Recharging with a filled soulgem. Uses common term [[Research:Common_Terms#fatigueTerm|fatigueTerm]].
|
|{{StatusCol|green|Verified}}}}
<syntaxhighlight lang="python">
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)
</syntaxhighlight>
 
 
====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.

Revision as of 18:05, 3 September 2012

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

Using enchanted items

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).


Natural recharge

Actions affected On game tick
Description Enchanted items may gain charge over time.
Implementation status
Analysis status Verified

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


Soulgem charging

Refer to Player Craft Skills.