Formulae: Difference between revisions

From OpenMW Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 155: Line 155:
   x = max(iPerMinChange, c) on success, c on fail
   x = max(iPerMinChange, c) on success, c on fail
</syntaxhighlight>
</syntaxhighlight>
===Intimidate===
<syntaxhighlight lang="cpp">
  target2 = max(iPerMinChance, target2)
  roll 100, win if roll <= target2
  if roll != target2:
    r = int(target2 - roll)
  else:
    r = 1
if roll <= target2:
    s = int(r * fPerDieRollMult * fPerTempMult)
    flee = max(iPerMinChange, s)
    fight = min(-iPerMinChange, -s)
c = -abs(int(r * fPerDieRollMult))
if success:
    if abs(c) < iPerMinChange:
        x = 0
        y = -iPerMinChange
    else:
        x = -int(c * fPerTempMult)
        y = c
else fail:
    x = int(c * fPerTempMult)
    y = c
</syntaxhighlight>
===Taunt===
<syntaxhighlight lang="cpp">
target1 = max(iPerMinChance, target1)
roll 100, win if roll <= target1
c = abs(int(target1 - roll))
if roll <= target1:
    s = c * fPerDieRollMult * fPerTempMult
    flee = min(-iPerMinChange, int(-s))
    fight = max(iPerMinChange, int(s))
  x = int(-c * fPerDieRollMult)
if success and abs(x) < iPerMinChange:
    x = -iPerMinChange
</syntaxhighlight>
===Bribe===
<syntaxhighlight lang="cpp">
target3 = max(iPerMinChance, target3)
roll 100, win if roll <= target3
c = int((target3 - roll) * fPerDieRollMult)
x = max(iPerMinChange, c) on success, c on fail
</syntaxhighlight>
===Disposition===
For all persuasion actions there is a temporary and a permanent disposition change. The temporary one applies to the disposition meter you see in the dialogue window.
The permanent one is applied when you say goodbye to the NPC; the NPC's disposition is reset to the disposition they had when you initiated the conversation,
then the permanent disposition change is applied. You can see these values in the console by using ToggleDialogStats before persuading.
For all methods:
<syntaxhighlight lang="cpp">
Temporary disposition change = int(x * fPerTempMult)
</syntaxhighlight>
except for Intimidate:
<syntaxhighlight lang="cpp">
change = x
</syntaxhighlight>
This may attempt to change actual disposition below/above 0/100. Disposition changes are clamped so as not to go past the caps, and the actual amount the disposition moved is used in the next function.
<syntaxhighlight lang="cpp">
Permanent disposition change = int(cappedDispositionchange / fPerTempMult)
</syntaxhighlight>
except for Intimidate
<syntaxhighlight lang="cpp">
change = -int(cappedDispositionchange/ fPerTempMult) on success
y on fail
</syntaxhighlight>
There may also be modifications to the NPC's flee and fight ratings. The flee and fight variables hold the amount those ratings are changed. They are also capped at 0 and 100.
===Comments===
The function is long and highly redundant, much of the same formulas are repeatedly calculated many times for no reason.
It's just another poorly coded part of Morrowind. There is at least one bug with Intimidate where you can see if the calculated
change is under iPerMinChange, it fails to set x correctly (it should have the value y does). This is responsible for the disposition
meter not moving on some Intimidate Success results.
==NPC Behavior==
===NPC Awareness Check===
This check runs every 5 seconds for each NPC. It occurs whether you are sneaking or not, but isn't the same as the combat distance check.
====Player side====
<syntaxhighlight lang="cpp">
if sneaking:
    sneakTerm = fSneakSkillMult * sneak + 0.2 * agility + 0.1 * luck + bootWeight * fSneakBootMult
  else:
    sneakTerm = 0
fatigueTerm = fFatigueBase - fFatigueMult*(1 - normalisedFatigue)
where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0
distTerm = fSneakDistBase + fSneakDistMult*dist
x = sneakTerm * distTerm * fatigueTerm + chameleon (+ 100 if invisible)
</syntaxhighlight>
====NPC side====
<syntaxhighlight lang="cpp">
npcTerm = npcSneak + 0.2 * npcAgility + 0.1 * npcLuck - npcBlind
npcFatigueTerm = fFatigueBase - fFatigueMult * (1 - normalisedFatigue)
using NPC normalisedFatigue
if PC is behind NPC (180 degrees):
    y = npcTerm * npcFatigueTerm * fSneakNoViewMult
  else:
    y = npcTerm * npcFatigueTerm * fSneakViewMult
</syntaxhighlight>
====Final check====
<syntaxhighlight lang="cpp">
target = x - y
roll 100, win if roll < target
</syntaxhighlight>
====Comments====
Appears straightforward and bug-free. NPCs can take up to five seconds to notice you even if you are not sneaking. This function precedes the combat distance check.
I have not identified if there is a line of sight check occuring before or after.
===Combat Behavior===
====Combat AI====
====What Calm Does====
====What Demoralize Does====
====What Frenzy Does====
====What Rally Does====
==Pickpocketing==
Pickpocketing is a multi-stage process. Not all items in the NPC's inventory are available, depending on the initial rolls. There are checks on a steal attempt, and when the window is closed.
===On initiating===
<syntaxhighlight lang="cpp">
for each item stack:
roll 100, stack is visible if roll <= pcSneak
</syntaxhighlight>
===On picking an item===
<syntaxhighlight lang="cpp">
fatigueTerm = fFatigueBase - fFatigueMult * (1 - normalisedFatigue)
</syntaxhighlight>
where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0
checks the whole stack no matter how many you try to take note: filled soulgems have the value of an empty soulgem due to a missing calculation
<syntaxhighlight lang="cpp">
stackValue = itemValue * itemsInStack
valueTerm = 10 * fPickPocketMod * stackValue
x = (0.2 * pcAgility + 0.1 * pcLuck + pcSneak) * fatigueTerm
y = (valueTerm + npcSneak + 0.2 * npcAgilityTerm + 0.1 * npcLuckTerm) * npcFatigueTerm
t = 2x - y
if t < pcSneak / iPickMinChance:
    roll 100, win if roll <= int(pcSneak / iPickMinChance)
else:
    t = min(iPickMaxChance, t)
    roll 100, win if roll <= int(t)
</syntaxhighlight>
===On closing the pickpocket window===
Same calculation as taking an item, but with valueTerm = 0
===Comments===
The stealing process is highly broken for most items; any item or stack of items worth over 100 septims has such a negative result that it is picked at minimum chance, and this is at maximum all stats. A player with stats around 50 is picking at minimum for anything valuable. The available items window is not reset after every successful steal, only when you close the window and retry the pickpocket.
==Factions==
===Favored Attributes===
===Favored Skills===
===Ranks===
===Faction vs. Faction Modifiers===
===Effect on Disposition===
===Effect on Behavior===
==PC's leveling==
How to achieve new level and what happens then
===Achieving===
When player receive point in the skill:
<syntaxhighlight lang="cpp">
int total # global counter of skill increases
int attribCounter[8] #counter of attribute bonuses
if skill in Major:
    total += iLevelUpMajorMult
    attribCounter [skill->basicAttribute] += iLevelUpMajorMultAttribute
if skill in Minor:
    total += iLevelUpMinorMult
    attribCounter [skill->basicAttribute] += iLevelUpMinorMultAttribute
if skill in Misc:
    attribCounter [skill->basicAttribute] += iLevelUpMinorMultAttriubte #note: game setting name has a typo
if ( total >= iLevelUpTotal )
    LevelUp()
</syntaxhighlight>
On level-up PC get 3 points to redistribute, bonus will be this:
<syntaxhighlight lang="cpp">
if attribCounter !=0
    bonus = iLevelUp$$Mult
else
    bonus = 1
</syntaxhighlight>
where $$ is value of attribute counter
===Skill increases===
How to achieve increase in skill
==PC's dynamic stats==
Health point's, magic, stamina...
===HP===
Initial HP
<syntaxhighlight lang="cpp">
health = 0.5 * (strength + endurance)
</syntaxhighlight>
Every level add
<syntaxhighlight lang="cpp">
bonusHP = fLevelUPHealthEndMult * endurance
</syntaxhighlight>
===Magic points===
<syntaxhighlight lang="cpp">
Magic = intelligence + M * intelligence
</syntaxhighlight>
M = magic bonus from race, item or sign.
===Fatigue===
<syntaxhighlight lang="cpp">
Fatigue = Strength + Willpower + Agility + Endurance
</syntaxhighlight>
==NPC Auto-calculate stats==
NPCs' auto-calculated stats. Affected by race, class, faction and rank.
===Attributes===
<syntaxhighlight lang="cpp">
for each attribute:
base = race base attribute (+ 10 if a class primary attribute)
k = 0
for each skill with this governing attribute:
    if skill is class major: k += 1
    if skill is class minor: k += 0.5
    if skill is miscellaneous: k += 0.2
final attribute = base + k * (level - 1)
</syntaxhighlight>
round attribute to nearest, half to nearest even (standard IEEE 754 rounding mode)
===Health===
<syntaxhighlight lang="cpp">
health = 0.5 * (strength + endurance) + 5 * (level - 1)
</syntaxhighlight>
===Skills===
<syntaxhighlight lang="cpp">
for each skill:
if skill is class major: base = 30, k = 1
if skill is class minor: base = 15, k = 1
if skill is miscellaneous: base = 5, k = 0.1
if skill is in class specialization: base += 5, k += 0.5
if skill has race bonus: base += racebonus
final skill = base + k * (level - 1)
</syntaxhighlight>
Round skill to nearest, half to nearest even (standard IEEE 754 rounding mode)
===Reputation===
<syntaxhighlight lang="cpp">
if not in a faction:
    reputation = 0
else:
    reputation = iAutoRepFacMod * rank + iAutoRepLevMod * (level - 1)
</syntaxhighlight>
where the entry level rank in the faction means rank = 1
===Spells===
==Skills==
===Enchanting===
* Percent chance to self-enchant a Constant Effect item
<syntaxhighlight lang="cpp">
chance = Enchant + 0.25 * Intelligence + 0.125 * Luck - 5 * [enchantment points]
</syntaxhighlight>
===Armorer===
Chance to repair item:
<syntaxhighlight lang="cpp">
chance = 0.8 * Armorer + 0.1 * Strength + 0.05 * Luck
</syntaxhighlight>
Restored health of item:
<syntaxhighlight lang="cpp">
maxPossible = ( 2.4 * Armorer + 0.25 * Strength + 0.2 * Luck ) * hammerQuality
restoredHealth = random(maxPossible)
</syntaxhighlight>
===Alchemy===
<syntaxhighlight lang="cpp">
duration = [(Alchemy + [(Intelligence + Luck) / 10]) / Cost] * quality_of_the_mortar
power = duration / 3
</syntaxhighlight>
The cost is related to basic cost of effect.
* Alembic reduces the time of negative effects:
<syntaxhighlight lang="cpp">
duration_with_alembic = duration_without_alembic / ( 1 + quality_of_alembic)
</syntaxhighlight>
* Power of negative effects:
<syntaxhighlight lang="cpp">
power = duration_with_alembic / 3
</syntaxhighlight>
===Security===
<syntaxhighlight lang="cpp">
Picklock chance = ((Security Skill * 1.25 + intelligence * 0.25 + luck * 0.1) * Lockpick Quality Multiplier - (Lock Difficulty * fPickLockMult)).
</syntaxhighlight>
===Acrobatics===
==Basic OpenMW Changes==
==Sources==
* [http://forums.bethsoft.com/index.php?/topic/1097214-gameplay-mechanics-analysis/ bethsoft forum]
* [http://www.uesp.net/wiki/Morrowind:Combat Uesp's wiki: Combat section]

Revision as of 19:04, 7 August 2011

Combat Formulae

Melee

Hit Chance

  hit chance = Attackers weapon skill * 1.25 + Attackers Attack - Defenders Sanctuary + (Attackers Agility - Defenders Agility) * 0.25 + (Attackers Luck - Defenders Luck) * 0.125

Example:

  • Warrior's Attack = 10
  • Thief's Sanctuary = 10

Bodypart Hit Chance

Damage

  Damages dealt = (Damage * Damage) / (Damage + Opponent Armor Rating)

Melee Mitigation

Magic

Chance of Successful Spell Cast

  chance = (Spells Skill * 2 + Willpower / 5 + Luck / 10 - SpellCost + CastPenalty) * (CurrentFatigue + MaximumFatigue * 1.5) / (MaximumFatigue * 2)

The value for CastPenalty can be accessed with the function GetCastPenalty.

Cast cost

  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

Comments

They are more than one formulae on internet, witch one is the real?

Magic Mitigation

Magic Damage

Ranged

Item Values

Spell cost in gold

  cost of puchasing existing spell = spell cost in magicka * fSpellValueMult

  cost of spellmaking = spell cost in magicka * fSpellMakingValueMult

  cost of enchanting service = Enchantment points * fEnchantmentValueMult

This is adjusted as follows: 0.5% per point of disposition (base 50). 0.5% per point of mercantile skill difference. 0.05% per point of personality value difference. 0.05% per point of luck value difference.

Item costs in Gold

Travel Costs in Gold

Item Durability, Item Charge

Damages

With every successful hit a weapon takes fWeaponDamageMult: (default 0.1) percentage of damage rounded down. Minimum damage to weapon = 1 With weapon health going down, its damage is also going down, thus in turn slowing the rate of damaging weapon. Armor takes an amount of damage that it stopped. Only armor part that took a hit takes any damage, while each armor part equipped contributes to the armor rating.

Charge

Armor Rating and Armor Class

Determining armor class

Armor class (in case of helm) is determined by these code:

  if (iHelmWeight * fLightMaxMod <= helm. weight):
    return LIGHT
  else if (iHelmWeight * fMedMaxMod <= helm. weight):
     return MEDIUM
  else:
     return HEAVY

For other armor types another variable should be used:

  • iHelmWeight
  • iPauldronWeight
  • iGauntletWeight
  • iCuirassWeight
  • iGreavesWeight
  • iBootsWeight

Armor rating

  rating = armor. rating * ArmorSkill / iBaseArmorSkill

if player don't have armor piece unarmored skill is used instead:

  rating = UnarmoredSkill * UnarmoredSkill * 0.0065

Total armor rating determined by these formula:

  totalRating = Cuirass * 0.3 + (Shield + Helm + Greaves + Boots + RPauldron + LPauldron) * 0.1 + (RGauntlet + LGauntlet) * 0.05

How Unarmored Works

Persuasion Formulae

Persuasion options in the NPC dialogue menu.

Shared terms

  persTerm = personality / fPersonalityMod

  luckTerm = luck / fLuckMod

  repTerm = reputation * fReputationMod

  levelTerm = level * fLevelMod

  fatigueTerm = fFatigueBase - fFatigueMult * (1 - normalisedFatigue)

where normalisedFatigue is a function of fatigue: empty fatigue bar -> 0.0, full fatigue bar -> 1.0

  //using player stats
  playerRating1 = (repTerm + luckTerm + persTerm + speechcraft) * fatigueTerm
  playerRating2 = playerRating1 + levelTerm
  playerRating3 = (mercantile + luckTerm + persTerm) * fatigueTerm
 

  //using NPC stats (note differences)
  npcRating1 = (repTerm + luckTerm + persTerm + speechcraft) * fatigueTerm
  npcRating2 = (levelTerm + repTerm + luckTerm + persTerm + npcSpeechcraft) * fatigueTerm
  npcRating3 = (mercantile + repTerm + luckTerm + persTerm) * fatigueTerm
 
  d = 1 - 0.02 * abs(npcDisposition - 50)
  target1 = d * (playerRating1 - npcRating1 + 50)
  target2 = d * (playerRating2 - npcRating2 + 50)
  target3 = d * (playerRating3 - npcRating3 + 50) + bribeMod

where bribeMod is fBribe10Mod, fBribe100Mod or fBribe1000Mod

Admire

  target1 = max(iPerMinChance, target1)
  roll 100, win if roll <= target1
  c = int(fPerDieRollMult * (target1 - roll))
  x = max(iPerMinChange, c) on success, c on fail

Intimidate

  target2 = max(iPerMinChance, target2)
  roll 100, win if roll <= target2
 
  if roll != target2:
     r = int(target2 - roll)
  else:
     r = 1

 if roll <= target2:
     s = int(r * fPerDieRollMult * fPerTempMult)
 
     flee = max(iPerMinChange, s)
     fight = min(-iPerMinChange, -s)
 
 c = -abs(int(r * fPerDieRollMult))
 
 if success:
     if abs(c) < iPerMinChange:
         x = 0
         y = -iPerMinChange
     else:
         x = -int(c * fPerTempMult)
 
         y = c
 else fail:
     x = int(c * fPerTempMult)
     y = c

Taunt

 target1 = max(iPerMinChance, target1)
 roll 100, win if roll <= target1

 c = abs(int(target1 - roll))
 
 if roll <= target1:
     s = c * fPerDieRollMult * fPerTempMult
     flee = min(-iPerMinChange, int(-s))
     fight = max(iPerMinChange, int(s))
 
  x = int(-c * fPerDieRollMult)
 
 if success and abs(x) < iPerMinChange:
     x = -iPerMinChange

Bribe

 target3 = max(iPerMinChance, target3)
 roll 100, win if roll <= target3
 c = int((target3 - roll) * fPerDieRollMult)
 
 x = max(iPerMinChange, c) on success, c on fail

Disposition

For all persuasion actions there is a temporary and a permanent disposition change. The temporary one applies to the disposition meter you see in the dialogue window. The permanent one is applied when you say goodbye to the NPC; the NPC's disposition is reset to the disposition they had when you initiated the conversation, then the permanent disposition change is applied. You can see these values in the console by using ToggleDialogStats before persuading.

For all methods:

 Temporary disposition change = int(x * fPerTempMult)

except for Intimidate:

 change = x

This may attempt to change actual disposition below/above 0/100. Disposition changes are clamped so as not to go past the caps, and the actual amount the disposition moved is used in the next function.

 Permanent disposition change = int(cappedDispositionchange / fPerTempMult)

except for Intimidate

 change = -int(cappedDispositionchange/ fPerTempMult) on success
 y on fail

There may also be modifications to the NPC's flee and fight ratings. The flee and fight variables hold the amount those ratings are changed. They are also capped at 0 and 100.

Comments

The function is long and highly redundant, much of the same formulas are repeatedly calculated many times for no reason. It's just another poorly coded part of Morrowind. There is at least one bug with Intimidate where you can see if the calculated change is under iPerMinChange, it fails to set x correctly (it should have the value y does). This is responsible for the disposition meter not moving on some Intimidate Success results.

NPC Behavior

NPC Awareness Check

This check runs every 5 seconds for each NPC. It occurs whether you are sneaking or not, but isn't the same as the combat distance check.

Player side

 if sneaking:
     sneakTerm = fSneakSkillMult * sneak + 0.2 * agility + 0.1 * luck + bootWeight * fSneakBootMult
  else:
     sneakTerm = 0

 fatigueTerm = fFatigueBase - fFatigueMult*(1 - normalisedFatigue)
 where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0
 
 distTerm = fSneakDistBase + fSneakDistMult*dist
 x = sneakTerm * distTerm * fatigueTerm + chameleon (+ 100 if invisible)

NPC side

 npcTerm = npcSneak + 0.2 * npcAgility + 0.1 * npcLuck - npcBlind
 npcFatigueTerm = fFatigueBase - fFatigueMult * (1 - normalisedFatigue)
 
 using NPC normalisedFatigue

 if PC is behind NPC (180 degrees):
     y = npcTerm * npcFatigueTerm * fSneakNoViewMult
  else:
     y = npcTerm * npcFatigueTerm * fSneakViewMult

Final check

 target = x - y
 roll 100, win if roll < target

Comments

Appears straightforward and bug-free. NPCs can take up to five seconds to notice you even if you are not sneaking. This function precedes the combat distance check. I have not identified if there is a line of sight check occuring before or after.

Combat Behavior

Combat AI

What Calm Does

What Demoralize Does

What Frenzy Does

What Rally Does

Pickpocketing

Pickpocketing is a multi-stage process. Not all items in the NPC's inventory are available, depending on the initial rolls. There are checks on a steal attempt, and when the window is closed.

On initiating

 for each item stack:
 roll 100, stack is visible if roll <= pcSneak

On picking an item

 fatigueTerm = fFatigueBase - fFatigueMult * (1 - normalisedFatigue)

where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0

checks the whole stack no matter how many you try to take note: filled soulgems have the value of an empty soulgem due to a missing calculation

 stackValue = itemValue * itemsInStack
 valueTerm = 10 * fPickPocketMod * stackValue
 
 x = (0.2 * pcAgility + 0.1 * pcLuck + pcSneak) * fatigueTerm
 y = (valueTerm + npcSneak + 0.2 * npcAgilityTerm + 0.1 * npcLuckTerm) * npcFatigueTerm
 t = 2x - y
 
 
 if t < pcSneak / iPickMinChance:
     roll 100, win if roll <= int(pcSneak / iPickMinChance)
 else:
     t = min(iPickMaxChance, t)
 
     roll 100, win if roll <= int(t)

On closing the pickpocket window

Same calculation as taking an item, but with valueTerm = 0

Comments

The stealing process is highly broken for most items; any item or stack of items worth over 100 septims has such a negative result that it is picked at minimum chance, and this is at maximum all stats. A player with stats around 50 is picking at minimum for anything valuable. The available items window is not reset after every successful steal, only when you close the window and retry the pickpocket.

Factions

Favored Attributes

Favored Skills

Ranks

Faction vs. Faction Modifiers

Effect on Disposition

Effect on Behavior

PC's leveling

How to achieve new level and what happens then

Achieving

When player receive point in the skill:

 int total # global counter of skill increases
 int attribCounter[8] #counter of attribute bonuses
 
 if skill in Major:
     total += iLevelUpMajorMult
     attribCounter [skill->basicAttribute] += iLevelUpMajorMultAttribute

 if skill in Minor:
     total += iLevelUpMinorMult
     attribCounter [skill->basicAttribute] += iLevelUpMinorMultAttribute
 
 if skill in Misc:
     attribCounter [skill->basicAttribute] += iLevelUpMinorMultAttriubte #note: game setting name has a typo
 
 if ( total >= iLevelUpTotal )
     LevelUp()

On level-up PC get 3 points to redistribute, bonus will be this:

 if attribCounter !=0
     bonus = iLevelUp$$Mult
 else
     bonus = 1

where $$ is value of attribute counter

Skill increases

How to achieve increase in skill

PC's dynamic stats

Health point's, magic, stamina...

HP

Initial HP

 health = 0.5 * (strength + endurance)

Every level add

 bonusHP = fLevelUPHealthEndMult * endurance

Magic points

 Magic = intelligence + M * intelligence

M = magic bonus from race, item or sign.

Fatigue

 Fatigue = Strength + Willpower + Agility + Endurance

NPC Auto-calculate stats

NPCs' auto-calculated stats. Affected by race, class, faction and rank.

Attributes

for each attribute:
 base = race base attribute (+ 10 if a class primary attribute)
 
 k = 0
 for each skill with this governing attribute:
    if skill is class major: k += 1
 
    if skill is class minor: k += 0.5
    if skill is miscellaneous: k += 0.2
 
 
 final attribute = base + k * (level - 1)

round attribute to nearest, half to nearest even (standard IEEE 754 rounding mode)


Health

 health = 0.5 * (strength + endurance) + 5 * (level - 1)

Skills

for each skill:

 if skill is class major: base = 30, k = 1
 
 if skill is class minor: base = 15, k = 1
 if skill is miscellaneous: base = 5, k = 0.1
 
 if skill is in class specialization: base += 5, k += 0.5
 if skill has race bonus: base += racebonus
 
 final skill = base + k * (level - 1)

Round skill to nearest, half to nearest even (standard IEEE 754 rounding mode)

Reputation

 if not in a faction:
     reputation = 0
 else:
     reputation = iAutoRepFacMod * rank + iAutoRepLevMod * (level - 1)

where the entry level rank in the faction means rank = 1

Spells

Skills

Enchanting

  • Percent chance to self-enchant a Constant Effect item
 chance = Enchant + 0.25 * Intelligence + 0.125 * Luck - 5 * [enchantment points]

Armorer

Chance to repair item:

 chance = 0.8 * Armorer + 0.1 * Strength + 0.05 * Luck

Restored health of item:

 maxPossible = ( 2.4 * Armorer + 0.25 * Strength + 0.2 * Luck ) * hammerQuality
 restoredHealth = random(maxPossible)

Alchemy

 duration = [(Alchemy + [(Intelligence + Luck) / 10]) / Cost] * quality_of_the_mortar
 power = duration / 3

The cost is related to basic cost of effect.

  • Alembic reduces the time of negative effects:
 duration_with_alembic = duration_without_alembic / ( 1 + quality_of_alembic)
  • Power of negative effects:
 power = duration_with_alembic / 3

Security

 Picklock chance = ((Security Skill * 1.25 + intelligence * 0.25 + luck * 0.1) * Lockpick Quality Multiplier - (Lock Difficulty * fPickLockMult)).

Acrobatics

Basic OpenMW Changes

Sources