Water well vendors unexpectedly rotating stock [Fixed in v2.14.2]Fixed

This plugin doesnt seem to edit the inventory properly for the rotating vendors

Any fix possible to support ?

I tried to reproduce this issue but could not find the vendors. I generated maps with water well a and b variants, but there are 3 more variants which I will try this weekend.

In the meantime, can you elaborate on what the issue is? You can save the customizations but they are not recalled when the vendor respawns?

while I can't give any info on the issue directly. Wells A, and B don't have the vendor, only the other 3😄

I'm curious to know with this and the traveling vendor if we will be able to add a bunch of items and have it pick random 6 similar to how the game is doing it?

Currently the plugin doesn't support rotating stock. When you customize the traveling vendor, the sale offers you configure will always be the same.

To feasibly support rotating stock, I will probably need to look into adding some sort of pagination to the edit panel. I would also like to add pagination to the shop UI itself, so I might try to tackle those two things together, not sure.

I would also like to edit the water well npc if possible. hes being weird. player tried to buy a pistol bullet and got a chainsaw - prob not at all related to this plugin but if this supported it id love that :D

Unfortunately it does seem to be this plugin causing the random items being sold. If you compare the item you end up getting with what is on the page for editing the vending machine it will correlate.

I haven't been able to reproduce the issue described above, where the water well vendor sells different items that what is displayed on the shop UI. Testing at water_well_a, I first customized the vendor, then bought multiple items, then reloaded the plugin and bought items, then restarted the server and bought items, then killed/respawned the vendor and bought items. Every time, I received exactly the items I intended to purchase.

I believe the issue occurs after a refresh interval.  Unmodded, the vendor will rotate its stock once per hour by default (controlled by server.waterwellnpcsalesrefreshfrequency -- defaults to '1').  So I believe what's happening is the plugin is correctly overriding the stock at plugin init time, but after one of these refreshes, a desync occurs.  This may explain why it's not happening in isolated test scenarios, but is happening in practice: the difference is time.

I haven't tried it myself, but there appears to be a `InvisibleVendingMachine.canRefreshOrders` flag on each instance that might help here.

 

Edit: It may also be necessary to cancel the repeated invoke of "CheckSellOrderRefresh," which is also started at server init.

Thanks for the info. That makes sense. I will look more into it and resolve it in the next update, sometime this week.

Merged post

I've pushed an update to the plugin's GitHub repository. This update disables the rotating stock refresh. Please download and test it.

https://github.com/WheteThunger/CustomVendingSetup

Thank you I will test!

Merged post

It shows some items being out of stock just after configuring it.  crossbow & nailgun

KingSizeKevin

It shows some items being out of stock just after configuring it.  crossbow & nailgun

I assume you mean, right after clicking "Save". I just tested but was not able to reproduce this issue. Every time I click "Save", all configured items are in stock immediately. For what it's worth, the latest update I provided does not affect stocking logic and should not cause this. This update only disables a scheduled function to rotate which items are being sold. As the scheduled function runs only every 60 minutes (by default), canceling that function cannot impact what happens when you click the "Save" button.

Locked automatically