Gameplay Mechanics anolysis

Post » Wed Sep 15, 2010 4:34 am

This thread is a reference for the game mechanics of Morrowind. The information comes from a direct anolysis of the functions used, and includes all the weird rounding conventions and bugs, nothing is elided. It's all open for editing and clarification if anyone finds it unclear.

All calculations are done in floating point unless indicated otherwise.



Persuasion formulae

Persuasion options in the NPC dialogue menu.

Shared terms

persTerm = personality / fPersonalityModluckTerm = luck / fLuckModrepTerm = reputation * fReputationModlevelTerm = level * fLevelModfatigueTerm = fFatigueBase - fFatigueMult*(1 - normalisedFatigue)where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0Note fatigueTerm is normally 1.25 at full fatigue.using player stats:playerRating1 = (repTerm + luckTerm + persTerm + speechcraft) * fatigueTermplayerRating2 = playerRating1 + levelTermplayerRating3 = (mercantile + luckTerm + persTerm) * fatigueTermusing NPC stats (note differences):npcRating1 = (repTerm + luckTerm + persTerm + speechcraft) * fatigueTermnpcRating2 = (levelTerm + repTerm + luckTerm + persTerm + npcSpeechcraft) * fatigueTermnpcRating3 = (mercantile + repTerm + luckTerm + persTerm) * fatigueTermd = 1 - 0.02 * abs(npcDisposition - 50)target1 = d * (playerRating1 - npcRating1 + 50)target2 = d * (playerRating2 - npcRating2 + 50)target3 = d * (playerRating3 - npcRating3 + 50) + bribeModwhere bribeMod is fBribe10Mod, fBribe100Mod or fBribe1000Mod

Admire

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

Intimidate

target2 = max(iPerMinChance, target2)roll 100, win if roll <= target2if 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 = celse fail:    x = int(c * fPerTempMult), y = c

Taunt

target1 = max(iPerMinChance, target1)roll 100, win if roll <= target1c = 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 <= target3c = 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. This issue is fixed in MCP 1.8.




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 * fSneakBootMultelse:    sneakTerm = 0    fatigueTerm = fFatigueBase - fFatigueMult*(1 - normalisedFatigue)where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0Note fatigueTerm is normally 1.25 at full fatigue.distTerm = fSneakDistBase + fSneakDistMult*distx = sneakTerm * distTerm * fatigueTerm + chameleon (+ 100 if invisible)

NPC side

npcTerm = npcSneak + 0.2 * npcAgility + 0.1 * npcLuck - npcBlindnpcFatigueTerm = fFatigueBase - fFatigueMult*(1 - normalisedFatigue)using NPC normalisedFatigueif PC is behind NPC (180 degrees):    y = npcTerm * npcFatigueTerm * fSneakNoViewMultelse:    y = npcTerm * npcFatigueTerm * fSneakViewMult

Final check

target = x - yroll 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.




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.0Note fatigueTerm is normally 1.25 at full fatigue.checks the whole stack no matter how many you try to takenote: filled soulgems have the value of an empty soulgem due to a missing calculationstackValue = http://forums.bethsoft.com/index.php?/topic/1097214-gameplay-mechanics-analysis/itemValue * itemsInStackvalueTerm = 10 * fPickPocketMod * stackValuex = (0.2 * pcAgility + 0.1 * pcLuck + pcSneak) * fatigueTermy = (valueTerm + npcSneak + 0.2 * npcAgilityTerm + 0.1 * npcLuckTerm) * npcFatigueTermt = x - y + x       (yes, that's what it does)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.



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 = 0for 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.2final 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 = 1if skill is class minor: base = 15, k = 1if skill is miscellaneous: base = 5, k = 0.1if skill is in class specialization: base += 5, k += 0.5if skill has race bonus: base += racebonusfinal 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 = 0reputation = iAutoRepFacMod * rank + iAutoRepLevMod * (level - 1)where the entry level rank in the faction means rank = 1


Comment

Hnh. Stats.




Enchanted item recharge

Recharging with a filled soulgem from your inventory.

On recharge

fatigueTerm = fFatigueBase - fFatigueMult*(1 - normalisedFatigue)where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0enchantTerm = enchant skillluckTerm = 0.1 * luckif luckTerm < 1 or luckTerm > 10: luckTerm = 1intelligenceTerm = 0.2 * intelligenceif intelligenceTerm > 20: intelligenceTerm = 20if intelligenceTerm < 1: intelligenceTerm = 1x = (enchantTerm + intelligenceTerm + luckTerm) * fatigueTermroll 100, success if roll < xon 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.
User avatar
Naomi Lastname
 
Posts: 3390
Joined: Mon Sep 25, 2006 9:21 am

Post » Wed Sep 15, 2010 9:08 am

Thanks for this information, it looks really useful. :)
User avatar
krystal sowten
 
Posts: 3367
Joined: Fri Mar 09, 2007 6:25 pm

Post » Wed Sep 15, 2010 3:37 am

Hopefully someone could proofread it. I'll add pickpocket mechanics later on.
User avatar
Jessie
 
Posts: 3343
Joined: Sat Oct 14, 2006 2:54 am

Post » Wed Sep 15, 2010 2:03 am

Awesome! :ooo:

Do you know:
- formula for calculating spell cost (in gold)
- formula for determining cast cost on enchanted items (I know it relates to the player's Enchant skill somehow)
- formula (if it exists) for calculating the total item value (in gold) of a custom-enchanted item
- any other forumulae pertaining to enchanting, spell costs (in gold), cast costs (magicka, soul gem charge), armor/weapon damage, etc?
User avatar
Dezzeh
 
Posts: 3414
Joined: Sat Jun 16, 2007 2:49 am

Post » Wed Sep 15, 2010 10:19 am

I must say that you continue to impress Hrnchamd. You continue to unearth things people have been wondering about for years. =) (Solving the soulgem issue which has been bugging people since 2002 was simply awesome!)
User avatar
Lyndsey Bird
 
Posts: 3539
Joined: Sun Oct 22, 2006 2:57 am

Post » Wed Sep 15, 2010 9:01 am

Hrnchamd, do you think you might be able to send some of these special functions to, say, a global variable? One in particular that interests me:
where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0

This would be so helpful for some mod makers since there is no way to tell this through scripting without jumping through extreme, inaccurate hoops. There's a GetHealthGetRatio function, which does the same thing for health, but none for fatigue or magicka. And what you do is really something special.
User avatar
+++CAZZY
 
Posts: 3403
Joined: Wed Sep 13, 2006 1:04 pm

Post » Wed Sep 15, 2010 3:56 am

Thanks for the update on sneak, Hrnchamd.

Everything seems fine with persuasion formulae except for the following line.
d = 1 - 0.02 * (npcDisposition - 50)


There must be some mistake, because it would mean that with 100 disposition every persuasion attempt has 0 chances to succeed, while 0 disposition doubles player's chances. From my experience, extreme disposition values certainly drop persuasion chances, but not to zero and not only with extremely high values.

Everything looks normal with NPC awareness check except for the lack of fSneakSkillMult multiplier for NPC.
User avatar
katie TWAVA
 
Posts: 3452
Joined: Tue Jul 04, 2006 3:32 am

Post » Wed Sep 15, 2010 9:00 am

- formula for calculating spell cost (in gold)

Spell cost in magicka * fSpellValueMult = cost of puchasing existing spell.
Spell cost in magicka * fSpellMakingValueMult = cost of spellmaking.
Enchantment points * fEnchantmentValueMult = cost of enchanting service.
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.

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

Weapon damage:
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.
User avatar
Tiffany Castillo
 
Posts: 3429
Joined: Mon Oct 22, 2007 7:09 am

Post » Wed Sep 15, 2010 1:24 pm

Hrnchamd, do you think you might be able to send some of these special functions to, say, a global variable? One in particular that interests me:
where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0

This would be so helpful for some mod makers since there is no way to tell this through scripting without jumping through extreme, inaccurate hoops. There's a GetHealthGetRatio function, which does the same thing for health, but none for fatigue or magicka. And what you do is really something special.

You would have to ask the MWSE/MGE developers. I can't add things to the script engine in a simple way, it's very messy.

Everything seems fine with persuasion formulae except for the following line.

Yes, I forgot the abs before the brackets, it's updated.
User avatar
Jessica Nash
 
Posts: 3424
Joined: Tue Dec 19, 2006 10:18 pm

Post » Wed Sep 15, 2010 2:30 pm

Spell cost in magicka * fSpellValueMult = cost of puchasing existing spell.
Spell cost in magicka * fSpellMakingValueMult = cost of spellmaking.
Enchantment points * fEnchantmentValueMult = cost of enchanting service.
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.

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

Weapon damage:
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.

Thanks! :read:

I don't suppose someone has made a website or a wiki compendium of all the various knowledge about the nitty-gritty behind TESIII's gameplay mechanics? :unsure2:
User avatar
Cheville Thompson
 
Posts: 3404
Joined: Sun Mar 25, 2007 2:33 pm

Post » Wed Sep 15, 2010 1:22 am

Thanks for this. I was looking for the equations behind MW. Have you any equations for how the PC and NPCs level up? I need to write an NPC generator and have only estimated level ups thus far.
User avatar
ONLY ME!!!!
 
Posts: 3479
Joined: Tue Aug 28, 2007 12:16 pm

Post » Wed Sep 15, 2010 4:46 am

Pickpocketing information added. Broken. They didn't test that one either I guess.

When it comes to multiple effect spells and enchantments, remember enchantments stack differently. Even touch/ranged seemed to affect the stacking multiplier, it was weird.

Thanks for this. I was looking for the equations behind MW. Have you any equations for how the PC and NPCs level up? I need to write an NPC generator and have only estimated level ups thus far.

If you mean autocalc stats and skills, that's quite a long piece of code. It depends on level, race, class, faction and rank.
User avatar
Steve Fallon
 
Posts: 3503
Joined: Thu Aug 23, 2007 12:29 am

Post » Wed Sep 15, 2010 1:43 pm

Pickpocketing information added. Broken. They didn't test that one either I guess.

When it comes to multiple effect spells and enchantments, remember enchantments stack differently. Even touch/ranged seemed to affect the stacking multiplier, it was weird.


If you mean autocalc stats and skills, that's quite a long piece of code. It depends on level, race, class, faction and rank.


Yeah that's why I haven't done it precisely ha ha :).
User avatar
Melanie Steinberg
 
Posts: 3365
Joined: Fri Apr 20, 2007 11:25 pm

Post » Wed Sep 15, 2010 8:58 am

Okay, posted autocalc formulae. There might be differences in-game, I'm not completely sure it's all covered. Please check.
User avatar
Syaza Ramali
 
Posts: 3466
Joined: Wed Jan 24, 2007 10:46 am

Post » Wed Sep 15, 2010 12:54 pm

Hrnchamd, do you think you might be able to send some of these special functions to, say, a global variable? One in particular that interests me:
where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0

This would be so helpful for some mod makers since there is no way to tell this through scripting without jumping through extreme, inaccurate hoops. There's a GetHealthGetRatio function, which does the same thing for health, but none for fatigue or magicka. And what you do is really something special.

to get the normalized fatigue should be possible, since player->getfatigue returns the current fatigue. maximum fatigue is determined by strength+endurance+willpower+agility. thus the normalized fatigue is calculated by
fatigueratio = getfatigue/(getstrength+getendurance+getwillpower+getagility)

all these information are from SfD, this should be a guarantee for reliability(though I haven't tested this myself) ;)
User avatar
Sheila Esmailka
 
Posts: 3404
Joined: Wed Aug 22, 2007 2:31 am

Post » Wed Sep 15, 2010 6:15 am

to get the normalized fatigue should be possible, since player->getfatigue returns the current fatigue. maximum fatigue is determined by strength+endurance+willpower+agility. thus the normalized fatigue is calculated by
fatigueratio = getfatigue/(getstrength+getendurance+getwillpower+getagility)

all these information are from SfD, this should be a guarantee for reliability(though I haven't tested this myself) ;)

That's the code I borrowed from skaeps.

; fatigue is the sum of these attributes; bonuses (birthsigns, fortifications, etc.) are not accounted for here; so you may wish to clamp this value shadersideset totalFat to (playstr + playwil + playend + playagi)set fatRatio to (player->GetFatigue / totalFat)			; ratio is 0.0 - 1.0

And it is working.

The problem is magicka.

set playint to player->GetIntelligence; magicka is Intelligence times your Magicka Multiplier (default 1); but there is no function for this ;_;; bonuses (birthsigns, fortifications, etc.) are not accounted for here; so you may wish to clamp this value shadersideset magRatio to (player->GetMagicka / playint)			; ratio is 0.0 - 1.0

I got no change with this value. I half the magicka and it still looks the same suggesting, the value is over 1.
User avatar
Naomi Lastname
 
Posts: 3390
Joined: Mon Sep 25, 2006 9:21 am

Post » Wed Sep 15, 2010 11:26 am

The problem is magicka.

set playint to player->GetIntelligence; magicka is Intelligence times your Magicka Multiplier (default 1); but there is no function for this ;_;; bonuses (birthsigns, fortifications, etc.) are not accounted for here; so you may wish to clamp this value shadersideset magRatio to (player->GetMagicka / playint)			; ratio is 0.0 - 1.0

I got no change with this value. I half the magicka and it still looks the same suggesting, the value is over 1.


the problem with magicka is, that there are spells, which dramatically increase it. some birthsigns(like the atronach) provide a multiplier which doubles the magicka, so the the determination of magickaratio in the common way becomes useless...
but hey, there comes suddenly another way in my mind:
set currmagic to player->getmagickaplayer->modcurrentmagicka 10000 ;to assure, player has full magickaset maxmagic to player->getmagickaplayer->modcurrentmagicka ( currmagic - maxmagic ) ;set magicka back to the previous valueset magicratio to currmagic/maxmagic

this should also work for fatigue and is more accurate since it also takes fortify effects into account.
User avatar
The Time Car
 
Posts: 3435
Joined: Sat Oct 27, 2007 7:13 pm

Post » Wed Sep 15, 2010 9:09 am

the problem with magicka is, that there are spells, which dramatically increase it. some birthsigns(like the atronach) provide a multiplier which doubles the magicka, so the the determination of magickaratio in the common way becomes useless...
but hey, there comes suddenly another way in my mind:
set currmagic to player->getmagickaplayer->modcurrentmagicka 10000 ;to assure, player has full magickaset maxmagic to player->getmagickaplayer->modcurrentmagicka ( currmagic - maxmagic ) ;set magicka back to the previous valueset magicratio to currmagic/maxmagic

this should also work for fatigue and is more accurate since it also takes fortify effects into account.

Thanks, I hadn't thought of that. I'll work that in and see how it goes.
User avatar
Ymani Hood
 
Posts: 3514
Joined: Fri Oct 26, 2007 3:22 am

Post » Wed Sep 15, 2010 5:09 am

This thread is a reference for the game mechanics of Morrowind. The information comes from a direct anolysis of the functions used, and includes all the weird rounding conventions and bugs, nothing is elided. It's all open for editing and clarification if anyone finds it unclear.

All calculations are done in floating point unless indicated otherwise.



Persuasion formulae

Persuasion options in the NPC dialogue menu.

Shared terms

persTerm = personality / fPersonalityModluckTerm = luck / fLuckModrepTerm = reputation * fReputationModlevelTerm = level * fLevelModfatigueTerm = fFatigueBase - fFatigueMult*(1 - normalisedFatigue)where normalisedFatigue is a function of fatigue. empty fatigue bar -> 0.0, full fatigue bar -> 1.0using player stats:playerRating1 = (repTerm + luckTerm + persTerm + speechcraft) * fatigueTermplayerRating2 = playerRating1 + levelTermplayerRating3 = (mercantile + luckTerm + persTerm) * fatigueTermusing NPC stats (note differences):npcRating1 = (repTerm + luckTerm + persTerm + speechcraft) * fatigueTermnpcRating2 = (levelTerm + repTerm + luckTerm + persTerm + npcSpeechcraft) * fatigueTermnpcRating3 = (mercantile + repTerm + luckTerm + persTerm) * fatigueTermd = 1 - 0.02 * abs(npcDisposition - 50)target1 = d * (playerRating1 - npcRating1 + 50)target2 = d * (playerRating2 - npcRating2 + 50)target3 = d * (playerRating3 - npcRating3 + 50) + bribeModwhere bribeMod is fBribe10Mod, fBribe100Mod or fBribe1000Mod

Admire

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

Intimidate

target2 = max(iPerMinChance, target2)roll 100, win if roll <= target2if 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 = celse fail:    x = int(c * fPerTempMult), y = c

Taunt

target1 = max(iPerMinChance, target1)roll 100, win if roll <= target1c = 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 <= target3c = 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.

*snip*


Thanks for this - but isn't this data inaccessible in the CS?
User avatar
Latisha Fry
 
Posts: 3399
Joined: Sat Jun 24, 2006 6:42 am

Post » Wed Sep 15, 2010 1:29 pm

Thanks for this - but isn't this data inaccessible in the CS?

The variables in that start with f or i are GMSTs. There's quite a few of them as you can see.

Please don't full quote the top post, as it is subject to revision.
User avatar
keri seymour
 
Posts: 3361
Joined: Thu Oct 19, 2006 4:09 am

Post » Wed Sep 15, 2010 6:33 am

Thanks! :read:
Indeed, this is awesome stuff Hrnchamd! :thumbsup:

I don't suppose someone has made a website or a wiki compendium of all the various knowledge about the nitty-gritty behind TESIII's gameplay mechanics? :unsure2:
Sounds like stuff that could go on UESP? There's a http://www.uesp.net/wiki/Morrowind:NPCs#Characteristics for auto-calc of NPC stats there already...
User avatar
Esther Fernandez
 
Posts: 3415
Joined: Wed Sep 27, 2006 11:52 am

Post » Wed Sep 15, 2010 3:05 pm

I've reorganized my data regarding various GMST. With great pile of old information and some new testing I was able to add more or less useful comments with descriptions and/or formulae to almost every one of them. However, there are still some that do not react as expected, do not react at all, have some hidden mechanics behind, or simply have unknown effects.

Hrnchamd, if you can help with providing details on them, then luckily in a few days I will be able to post complete list of GMSTs, fully decrypted and commented (first one in a history, I think). With some help from community, it should be possible to test it, fix it and someday perfect it, thus providing modders with full awareness of their possibilities.

Here is the list:


iNumberCreatures:
There was information that it is somehow related to creature respawn or leveled lists, but I couldn't confirm it.

fSleepRestMod
Can you confirm that this one is unused?

iLevelupMajorMultAttribute
iLevelupMinorMultAttribute
iLevelupMiscMultAttriubte
I've tested these, and they do not have any effect on progress to levelup and to contribution to attribute.

iLevelupSpecialization
fFatigueSpellCostMult
Need confirmation to mark as unused.

fPotionT4BaseStrengthMult
fPotionT4EquipStrengthMult
These two do not affect potion price, magnitude or duration. What else could they do?

fPotionMinUsefulDuration
fIngredientMult
Couldn't make anything out of these two.

fSpellPriceMult
iMagicItemChargeConst
Unused?

iFightAlarmMult
Need exact effect and formula to write down.

fAIMeleeWeaponMult
fAIRangeMeleeWeaponMult
fAIMagicSpellMult
fAIRangeMagicSpellMult
fAIMeleeArmorMult
fAIMeleeSummWeaponMult
I assume, these govern enemy weapon or fighting style preference? Need more information.

fCombatForceSideAngle
fCombatTorsoSideAngle
No idea.

fCombatDistanceWerewolfMod
As I said before, I couldn't make my werewolf attacks reach any longer or shorter with this. Unused, broken?

iGreetDuration
I thought that it is amount of seconds before another greeting by the same NPC can occur after previous one. But I couldn't make it work like this.

fGreetDistanceReset
I've set this to 1 and NPC behavior didn't change at all, they still reset their greetings only when I go pretty far away. Unused/broken?

fAudioDefaultMinDistance
fAudioDefaultMaxDistance
fAudioVoiceDefaultMinDistance
fAudioVoiceDefaultMaxDistance
fAudioMinDistanceMult
fAudioMaxDistanceMult
I assume these govern a volume of audio playback. Need details.

fMagicDetectRefreshRate
Not sure I understand how it works.

fWaterReflectUpdateAlways
fWaterReflectUpdateSeldom
fStromWindSpeed
No idea.

iMonthsToRespawn
Organic ingredients and items in guild chests should respawn in iMonthsToRespawn months. I've tried to test it, but couldn't make items in my summoned by console flowers to respawn, even in 5 months, even with iMonthsToRespawn set to 1. Could you please look into the respawn code and provide some details on this?

fAutoPCSpellChance
iAutoPCSpellMax
How exactly these two behave?

fRepairAmountMult
Can you look into exact formula for determining chances and amount of repaired damage?

fSneakUseDist
fSneakUseDelay
Any details?

fBlockStillBonus
iBlockMinChance
iBlockMaxChance
Can you extract full formula for blocking aspect of combat?

fCombatInvisoMult
Should I assume that this is multiplied by chameleon effect and then act as a percentage penalty for attack chances?

fKnockDownMult
iKnockDownOddsBase
iKnockDownOddsMult
Can you provide details on KnockOuts?

fBargainOfferBase
fBargainOfferMulti
fDispositionMod
I understand that fBargainOfferBase is a basic price that merchant will ofer for an item. But I do not understand how the "haggle room" is calculated exactly - both while buying and selling.

fAIFleeHealthMult
fAIFleeFleeMult
Need formula for this.

iAutoSpellTimesCanCast
fAutoSpellChance
iAutoSpellAttSkillMin
iAutoSpellAlterationMax
iAutoSpellConjurationMax
iAutoSpellDestructionMax
iAutoSpellIllusionMax
iAutoSpellMysticismMax
iAutoSpellRestorationMax
Can you provide details?

fJumpEncumbranceBase
fJumpEncumbranceMultiplier
I would understand if there were just fJumpEncumbranceMultiplier, but with fJumpEncumbranceBase this confuses me.

fJumpMoveBase
fJumpMoveMult
Same thing.


I know that I am asking for a lot of your time and effort again, but as you can see, this information is very important and is required for complete GMST understanding. Please look into this when you have time. Thanks in advance.
User avatar
{Richies Mommy}
 
Posts: 3398
Joined: Wed Jun 21, 2006 2:40 pm

Post » Wed Sep 15, 2010 11:29 am

Is there a known formula to determine how long it takes between strikes based on a weapon's speed (which is a larger number the faster the weapon)? In http://cs.elderscrolls.com/constwiki/index.php/FPowerAttackDelay, it's:

weapon attack time = 2/(5*WeaponSpeed)

but the range of Weapon Speed values Oblivion uses is different from Morrowind.

UPDATE: I'm testing for the formula http://www.gamesas.com/index.php?/topic/1098826-weapon-attack-time-formula/; my results don't seem accurate enough to post here yet, though.
User avatar
Natalie Taylor
 
Posts: 3301
Joined: Mon Sep 11, 2006 7:54 pm

Post » Wed Sep 15, 2010 9:50 am

Methinks this thread deserves to be stickied.
User avatar
Kevan Olson
 
Posts: 3402
Joined: Tue Oct 16, 2007 1:09 am

Post » Wed Sep 15, 2010 3:49 pm

I've reorganized my data regarding various GMST. With great pile of old information and some new testing I was able to add more or less useful comments with descriptions and/or formulae to almost every one of them. However, there are still some that do not react as expected, do not react at all, have some hidden mechanics behind, or simply have unknown effects.....


on page 218 of Morrowind scripting for dummies 9 there is a list of the GMST though from what i have seen partial list with comments if you planning to build a list you could expand on that list and add to or edit the comments
User avatar
Hella Beast
 
Posts: 3434
Joined: Mon Jul 16, 2007 2:50 am

Next

Return to III - Morrowind