Page 1 of 13

Reversing Morrowind's formulas

Posted: 22 May 2012, 10:23
by jvoisin
A few tips about reversing Morowind's formulas :
  • The dedicated wiki page is here. Be careful, not all formulas written here are exacts.
  • The dedicated topic on bethsoft forum is here
  • The uesp wiki is a great place to find stuffs.
  • We can try to contact Hrnchamd and Psyringe, respectively developer and test of the MPC
  • We can also try to contact Fliggerty, who might also know a thing or two about formulas
  • I don't think it's really relevant, but we can try to contact timeslip too (MGE and many Morrowind's internal related work)
  • When trying to get a formula, only change one parameter at a time
If you find something, don't forget to put it here

For contacts, we should coordinate our efforts, in order to avoid spamming : please state here who you are contacting.

Re: Reversing Morrowind

Posted: 22 May 2012, 11:52
by natirips
A few days in bed (picked up some virus) and so many posts about this.

Anyway, from page 142 (156 physically) of MMM_Manual ( http://min.us/mChxB3o1o ):
In many cases where you see Base and Mult game settings, the formula they're involved in is a standard linear equation in the form y = mx + b, where m is the mult, b is the base, and x is some attribute, skill, or other value.
This may save a little bit of work for someone.

I've uploaded MMM Manual to minus.com (link again: http://min.us/mChxB3o1o ) because this forum says "The file is too big, maximum allowed size is 512 KiB.". Anyway, MMM Manual is free for non-profitable use so it should be okay to use it for OpenMW.

Re: Reversing Morrowind's formulas

Posted: 30 May 2012, 14:04
by Sadler
After few hours of inventing the empiric buy price formula for items:

Code: Select all

Buy_Price = Base_Price * (210 + Merchant_Mercantile - Player_Mercantile - Relation) / 161
Please check this. It seems to be fairly accurate.

Re: Reversing Morrowind's formulas

Posted: 30 May 2012, 14:11
by scrawl
Wow, nice. I will add that right away. Do you have any idea about the chance that the NPC accepts your offer? (if you leave the price at default, they always accept, i think)

Re: Reversing Morrowind's formulas

Posted: 30 May 2012, 14:26
by Sadler
scrawl wrote:Wow, nice. I will add that right away. Do you have any idea about the chance that the NPC accepts your offer? (if you leave the price at default, they always accept, i think)
It will require much more trade tries for model with strong correlation. If I will have a huge amount of free time I'll do that work :D .

Re: Reversing Morrowind's formulas

Posted: 30 May 2012, 14:28
by Necrod
Sadler wrote:After few hours of inventing the empiric buy price formula for items:

Code: Select all

Buy_Price = Base_Price * (210 + Merchant_Mercantile - Player_Mercantile - Relation) / 161
Please check this. It seems to be fairly accurate.
Seems pretty accurate, but shouldn't it involve "luck" as well?

Re: Reversing Morrowind's formulas

Posted: 30 May 2012, 14:31
by Sadler
Necrod wrote:Seems pretty accurate, but shouldn't it involve "luck" as well?
Oh, maybe. Give me a a few minutes, I'll check this.

Re: Reversing Morrowind's formulas

Posted: 30 May 2012, 14:37
by Sadler
Player-merchant luck difference changes the cost. About 10-15% for luck change from 0 to 100.

We may simply add the correction:

Code: Select all

Buy_Price = 26 - 0.6077*Player_Luck + Base_Price * (210 + Merchant_Mercantile - Player_Mercantile - Relation) / 161
Not so straight as first formula, but must work.

Re: Reversing Morrowind's formulas

Posted: 31 May 2012, 05:21
by heilkitty
I reckon, some of the numbers should be GMSTs and not hardcoded. I don't have access to Morrowind right now, so I can't help with that, but you could use some mod that changes trading significantly (e.g. BTB GI Settings) for reference.

Re: Reversing Morrowind's formulas

Posted: 31 May 2012, 08:21
by natirips
MMM Manual has most (if not all) game settings' default values and descriptions on page 142 (156).