Bug #3684

Merchants do not restock empty soul gems if they acquire filled ones.

Added by Michael Papageorgiou over 1 year ago. Updated 10 months ago.

Game Mechanics
Target version:
Start date:
% Done:


Operating system:


Merchants that restock soul gems (Fadase Selvayn in Tel Branora and Elbert Nermarc in Craftsmen's Hall in Godsreach) limit their restocking supply every time they obtain a soul gem of the same type as the one they restock. For example Fadase Selvayn has 5 common soul gems for sale, but if she acquires a common soul gem with a scamp soul, her restocking supply drops to 4. If she is acquires 5 or more she will stop restocking empty ones entirely until the filled ones are sold. The issue is also referenced in a reddit thread here along with another possible bug.
I've attached a save file that makes it easy to reproduce.

test3.tar.gz (183 KB) Michael Papageorgiou, 12/20/2016 08:19 PM

Screen Shot 2016-12-20 at 2.44.12 PM.png View (213 KB) Jeffrey Haines, 12/20/2016 08:49 PM

Associated revisions

Revision b277bd78 (diff)
Added by Jordan Ayers 10 months ago

Adjust restock calculations to ignore filled soul gems.

Bug #3684

Revision 73fbaae9
Added by scrawl . 10 months ago

Merge pull request #1325 from jordan-ayers/bugfix/3684-restock-soul-gems

Adjust restock calculations to ignore filled soul gems. (Bug #3684)


#1 Updated by Jeffrey Haines over 1 year ago

I couldn't get your attached save to load btw, refer to attached image for specific error

I made a recording of the issue:

I do confirm the issue, restocking is reduced by 1. In the video I buy 6 common soul gems from a stock of 10. I sell the merchant 1 soul gem with a rat soul. She then restocks up to 9 soul gems.

I also notice another potential issue. Are merchants supposed to restock soul gems as soon as you talk to them again? I thought you have to wait some time. This issue is potentially a regression!

On another note, the not restocking issue may be expected behavior. I mean if a merchant has 10 (9 empty + 1 full) why does she need to restock her empties to 10? She has 10 soul gems.

#2 Updated by Michael Papageorgiou over 1 year ago

I can't imagine why the save doesn't work for you.
Regarding instant the restocking, this is how vanilla works for better or worst. Vanilla has even worse exploit potential on this. See #2473
I imagine the source of the problem being that internally the difference between an empty and full soul gem is not taken into account at least by the restocking algorithm.
The problem with this issue is that you may want to sell soul gems to the merchant, without them clogging your supply of empty ones, which is a pretty rare service.

#3 Updated by Michael Papageorgiou over 1 year ago

Ok, I overlooked the screenshot with the error.
I think the issue is that I have a newer openmw version than you.
I'm using the daily ppa.

#4 Updated by Jeffrey Haines over 1 year ago

I hesitate to comment on the issue of the save file. AFAIK all saves should be transferable between at least the latest and last two versions. I could be wrong though.

I guess this bug is a matter at how you look at it. I hope others can weigh in.

I do think there exists an issue where items are being restocked every time you speak to the merchant. This would definitely be counter to the behavior anyone expects in Morrowind.

How does vanilla Morrowind handle the soul gem situation?

#5 Updated by Jeffrey Haines over 1 year ago

Once we have a good idea of the exact problem and the expected behavior, we can mark this confirmed and a developer can go to town on it :)

#6 Updated by Michael Papageorgiou over 1 year ago

I can't easily test vanilla at the moment, but even if the bug is present in vanilla I don't think it's worth reproducing.

Regarding the save file, this report looks familiar: #3525

#7 Updated by Jeffrey Haines over 1 year ago

  • Target version set to openmw-0.42

#8 Updated by Jeffrey Haines over 1 year ago

  • Status changed from New to Confirmed

I tested vanilla and it does in fact to be a bug in OpenMW. We should be restocking the gems in full.

Restocking should not take into account items sold by the player.

#9 Updated by Marc Zinnschlag about 1 year ago

  • Target version changed from openmw-0.42 to openmw-0.43

#10 Updated by Jordan Ayers 10 months ago

I'll put a fix together for this one, affecting the restocking only. There might be related issues with the containerstore's count method and soul gems, but I'm not familiar enough with the other calls to suggest affecting them as well.

#11 Updated by Alexei Dobrohotov 10 months ago

  • Category set to Game Mechanics
  • Status changed from Confirmed to Closed
  • Assignee set to Jordan Ayers

Also available in: Atom PDF