Reversing Morrowind's formulas

Everything about development and the OpenMW source code.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Reversing Morrowind's formulas

Post by sirherrbatka »

If you could provide informations about marksman, please. It is probabbly very much like meele combat, but we need to check it… so 0.29.0 will have BOOOOWS, CROOOSBOWS, THROWING STAAAAAAAARS. 8-)
endorph
Posts: 20
Joined: 27 Feb 2012, 22:48

Re: Reversing Morrowind's formulas

Post by endorph »

Ok. (:
If somebody has any information that can speed up process -- please let me know.
(For example, IDA Pro database for MW binaries with smth already researched will be very helpful)
User avatar
potatoesmaster
Posts: 112
Joined: 26 Dec 2012, 17:01

Re: Reversing Morrowind's formulas

Post by potatoesmaster »

endorph wrote:What exact formulas do we need now?
it seems we don't have the formulae to calculate fatigue consumption when running, swimming and attacking neither.
wheybags
Posts: 207
Joined: 21 Dec 2012, 19:41

Re: Reversing Morrowind's formulas

Post by wheybags »

endorph wrote:Ok. (:
If somebody has any information that can speed up process -- please let me know.
(For example, IDA Pro database for MW binaries with smth already researched will be very helpful)
I think most of the investigation that has been done has been just observing things in-game, not actual disassembly.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Reversing Morrowind's formulas

Post by scrawl »

potatoesmaster wrote:
endorph wrote:What exact formulas do we need now?
it seems we don't have the formulae to calculate fatigue consumption when running, swimming and attacking neither.
Posted to http://bugs.openmw.org/issues/947
User avatar
Hrnchamd
Posts: 64
Joined: 11 Aug 2012, 00:48

Re: Reversing Morrowind's formulas

Post by Hrnchamd »

Scrawl and I managed to get auto-calculated spells working completely. Research is on the wiki.

Next up I'll figure out werewolf stuff and and all the melee formulas. If there's any more problems with important gameplay mechanics I want to hear about it.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Reversing Morrowind's formulas

Post by scrawl »

Since you asked what else still needs researching:

- Aggression due to Fight ratings. Implemented, but unconfirmed.

- Crime response based on Alarm and Fight ratings. Implemented, but mostly a guess. I have a feeling the crime response system is a huge clusterfuck, since I can't seem to make sense of it. We probably don't need a 100% compatible implementation. But it would be nice to at least handle the Alarm/Fight ratings correctly.

- Disposition changes in response to crime? I have no idea if that's actually the case, but there are some GMSTs for it: fDispAttacking, fDispStealing, iDispKilling...

- In general, unknown GMSTs. There are still a lot of them: https://wiki.openmw.org/index.php?title=GMSTs_(status)
Particularly interesting are the ones not described in MWSFD. Here we to know either where they are used or a confirmation that they are totally unused and can be removed.
User avatar
Hrnchamd
Posts: 64
Joined: 11 Aug 2012, 00:48

Re: Reversing Morrowind's formulas

Post by Hrnchamd »

Added hit chance and hit reactions (enchantments, elemental shields and disease transfer). I still have to isolate sources of damage, crits, etc.

I'll get to work on the fight/alarm/flee AI next weekend.
User avatar
Hrnchamd
Posts: 64
Joined: 11 Aug 2012, 00:48

Re: Reversing Morrowind's formulas

Post by Hrnchamd »

Added script globals and a large update to combat, including difficulty scaling.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Reversing Morrowind's formulas

Post by scrawl »

There is a problem with the magic resistance formula. Check the following test case. Creature Ash_Ghoul, has stats:

Code: Select all

Willpower: 73
Luck: 100
Take the following values:
resistance = 0
fatigueTerm = 1.25
spell cast chance = 50

Now cast the spell "soul trap" on it. The soul trap effect has the NoMagnitude flag. The formula according to the wiki will evaluate to:
x = 103.75
x *= 50 / castChance // x > 100, x > roll
effect will always be fully resisted

Ingame, I see something completely different. The effect is never resisted. Something is wrong here...
Post Reply