torgosaves Posted September 3, 2018 Share Posted September 3, 2018 Hi!I'm working on a mod where I have a Vendor that sells outfits. I nicely arranged a large number of outfits on shelves as decoration. I then realized, while testing, that the items I put on shelves appear in the Vendor's Inventory without me putting them in a Merchant Container. Then when I purchase that item, it disappears from the shelf.I then notice this is true of Vanilla shops as well. For example, there are cans of pork and beans on Chet's shelves. I bought all of them and they disappeared from the shelfSo now I'm wondering - will these items ever respawn like items in containers? I'm assuming the answer is no, but I want to make sure. I think that would be really cool to have shops visually restock. Link to comment Share on other sites More sharing options...
EPDGaffney Posted September 3, 2018 Share Posted September 3, 2018 That's a really great idea for a shop but unfortunately you'd need to script it yourself. You could do an OnActivate block on the door to the shop, and then have it count the days since the player was last there (GetGameDaysPassed), and restock the shelves if over a certain number of days. Then you'd have to have the exact location you want for each item. If it's a huge amount, I can try to think of a way to do it using arrays. Then I suppose the easiest way to check whether or not the stuff is there would be to count the number of references to each item you want to restock and check how many are owned by the merchant. The easiest way to implement this is to make sure only one of each saleable item is on display at any given time (or only restock them when there's none left). There are other ways to do this that I can think of as well, but I don't even know if you need help or want to do that much work. Link to comment Share on other sites More sharing options...
dubiousintent Posted September 4, 2018 Share Posted September 4, 2018 A shop interior is a "cell". The default cell respawn is 3 days. Have you waited somewhere else for 3 days to see if the shelves aren't automatically restocked after that period? The mod "Blackwolf Backpacks" includes a script to respawn them into certain vanilla vendor shops. You might find that of some help for guidance. -Dubious- Link to comment Share on other sites More sharing options...
EPDGaffney Posted September 4, 2018 Share Posted September 4, 2018 That's true, it may actually restock for you. I think that cell-respawning is mainly just for containers and for cleaning up bodies, but I could be wrong, and it could potentially be different if the cell is a merchant's editor cell. Link to comment Share on other sites More sharing options...
torgosaves Posted September 4, 2018 Author Share Posted September 4, 2018 Thanks! I will try some of this out and also hopefully they'll guide me in the right direction :smile: Link to comment Share on other sites More sharing options...
Mktavish Posted September 5, 2018 Share Posted September 5, 2018 Ya for some reason misc items ( world model ) don't have a respawn option . Wondering if setting ownership on the ref item and owner on the cell might respawn the shelf items ? Add edit : Oh ya and maybe this post can help ... ? http://gamesas.com/how-force-cells-reset-t45894.html Link to comment Share on other sites More sharing options...
Recommended Posts