Can the number of items that a shop stocks per-shelf be altered?

Discuss modding questions and implementation details.
Post Reply
User avatar
Magicono43
Posts: 270
Joined: Tue Nov 06, 2018 7:06 am

Can the number of items that a shop stocks per-shelf be altered?

Post by Magicono43 » Sun Mar 29, 2020 3:49 pm

I ask this because I plan on eventually making items for a mod, that would basically exclusively be stocked in stores, basically like how bandages and other stuff are stocked. Now with this, I see the potential issue of "bloat" where shops would start to have less and less variety as more items are added to this list of stock-able items.

Is there something that determines how many items that one store shelf can stock at a time? I noticed that jewelers seems to have a lower maximum than most shops, and some have higher such as alchemy shops, but is this an attribute that is assigned to different shop types by default and is possible to edit?

User avatar
Hazelnut
Posts: 2189
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Can the number of items that a shop stocks per-shelf be altered?

Post by Hazelnut » Sun Mar 29, 2020 4:04 pm

This is not how it works. Allofich duplicated the classic algorithm which goes through all valid stockable items and rolls for a chance it's in stock and then for weapons/armor a chance on the material. The custom item system will enable items to appear in shops without reducing vanilla items, you just need to assign the item to a group and then shops which sell that grouping will auto-stock them. :)

The code is all there for you to see... in this case in DaggerfallLoot. I would always caution against assuming stuff works a certain way when it comes to Daggerfall!! Just look at the code.. :D
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Magicono43
Posts: 270
Joined: Tue Nov 06, 2018 7:06 am

Re: Can the number of items that a shop stocks per-shelf be altered?

Post by Magicono43 » Sun Mar 29, 2020 4:17 pm

That's good to know then, don't have to really be worried about stores not stocking the items I add then, thanks.

Post Reply