Updated https://wiki.openmw.org/index.php?title ... resistance with findings.scrawl wrote:There is a problem with the magic resistance formula.
...
Ingame, I see something completely different. The effect is never resisted. Something is wrong here...
Reversing Morrowind's formulas
Re: Reversing Morrowind's formulas
Re: Reversing Morrowind's formulas
Hi Hrnchamd, could you double check whether the use for iFightAttack/iFightAttacking on https://wiki.openmw.org/index.php?title ... _reactions is correct? It'd be more logical if they were swapped, the higher value iFightAttack should be used for the victim. From my game testing that is how MW is using them. And that would also make it consistent with iDispAttackMod/fDispAttacking.
Re: Reversing Morrowind's formulas
Merry Christmas!
You were right, I got the victim detection wrong; the wiki is updated. The GMST names aren't consistent in this part, it mixes Attack* and Attacking* freely.
You were right, I got the victim detection wrong; the wiki is updated. The GMST names aren't consistent in this part, it mixes Attack* and Attacking* freely.
Re: Reversing Morrowind's formulas
Thanks!
One other problem I noticed is with pickpocket victims that have an alarm of 0 (e.g. the orc next to the entrance in Caldera, Ghorak Manor).
According to the formula, fightTerm = alarmTerm * (fightTerm + x) this makes the fightTerm 0, so the orc should not be engaging combat with the player upon detecting a pickpocket attempt. But he does attack in the original engine.
One other problem I noticed is with pickpocket victims that have an alarm of 0 (e.g. the orc next to the entrance in Caldera, Ghorak Manor).
According to the formula, fightTerm = alarmTerm * (fightTerm + x) this makes the fightTerm 0, so the orc should not be engaging combat with the player upon detecting a pickpocket attempt. But he does attack in the original engine.
Re: Reversing Morrowind's formulas
It should set the alarmTerm to 1.0 if it's <= 0. Oops, another reversed test. Updated wiki.
Re: Reversing Morrowind's formulas
Thanks again, updated code.
Re: Reversing Morrowind's formulas
Updated enchanting and (minor change) spellmaking: https://wiki.openmw.org/index.php?title ... g_merchant and https://wiki.openmw.org/index.php?title ... enchanting
Unfortunately all the enchanting temporary variables were stored in Morrowind's UI layer, even in the cost calculation inner loop there was data exchange with the UI. That took a long time to figure out.
Unfortunately all the enchanting temporary variables were stored in Morrowind's UI layer, even in the cost calculation inner loop there was data exchange with the UI. That took a long time to figure out.
Re: Reversing Morrowind's formulas
Nice. One question, what should duration be set to for a constant effect enchantment? 1?
Do you know anything about the NPC idle voice logic? We're having some issues there, the current implementation uses fVoiceIdleOdds as a percentage and checks it each time an idle animation starts. In MW it seems to be checked much more often (every frame?), so it can't really be a percentage, I presume.
Code: Select all
x *= effect.duration
Re: Reversing Morrowind's formulas
For the duration, according to the formula here : http://uesp.net/wiki/Morrowind:Enchant (at the end)
The x duration of a constant effect seems to be 100.
The x duration of a constant effect seems to be 100.
Re: Reversing Morrowind's formulas
It's set by a GMST, updated the wiki page.scrawl wrote:Nice. One question, what should duration be set to for a constant effect enchantment? 1?Code: Select all
x *= effect.duration
I just researched it recently for an MCP patch on creature voiceovers. It's still early research. Voice wiki page. Note that creatures can't use this in vanilla, their audios sources are SoundGens.scrawl wrote: Do you know anything about the NPC idle voice logic? We're having some issues there, the current implementation uses fVoiceIdleOdds as a percentage and checks it each time an idle animation starts. In MW it seems to be checked much more often (every frame?), so it can't really be a percentage, I presume.