I'm looking for a plugin like this as we don't want to mess with the items that sell for scrap as that can be a bit game breaking, however things like trading wood for stone doesn't really need an "out of stock" function as all it does it make it tedious to stand there while you do it.
Possible to make this configurable so it only restocks certain things (ie things that don't sell for scrap)?Solved
I am looking for this customization as well.
I want the resource vendors (stone, wood, metal) to have unlimited stock, but I don't want people getting 100k scrap a day just because they had a bunch of horses shit in a bucket..
what about trading HQM for scrap? something like this at line 17 would work when buying scrap
if (soldItem.ToString().Contains("Item.scrap"))
return;
@Xinouth @simonk83 please update plugin and using this configuration.
{
"Disable native refill": false,
"Do not refill items": [],
"Do not refill vendings": [
"Bandit_ProduceExchange"
]
}This configuration disable refill items in only "Produce Exchange" vending.
OR
{
"Disable native refill": false,
"Do not refill items": [
"scrap"
],
"Do not refill vendings": []
}Disable refill "scrap" all vendings.
If anyone is using Custom Vending Setup, this update will not work at the moment. All items will be instantly restocked. I will need to release a fix to CVS, which I will try to do this week.
The reason for this is that CVS automatically restocks everything if VendingInStock is detected (as of CVS v.2.3.0), without checking the item or vending machine. The context for why CVS does that is, I recently learned that people were configuring CVS to restock some items to ridiculously high limits, which would cause the internal vending machine storage to max out on a single item, therefore preventing stocking of other items. To address that, CVS now keeps a single big stack of every item in each vending machine, rather than many small stacks. A compatibility issue was then identified where VendingInStock would still add new items to the internal vending container, meaning the container could still fill up with one type of item, so CVS was updated to replace the VendingInStock refill behavior, which didn't take into account that VendingInStock would have the logic added in this update.
Right ok, I am actually using your Custom Vending plug-in, purely so I can make some things restock immediately (wood/stone) and others not. I did think it was working for just those items but maybe I need to check again 😄. I just set "Seconds between refills" to 0 on those items.
Oh, I forgot to mention that this VendingInStock update will work fine for vending machines not edited by CVS. Any vending machine edited by CVS will have instant restock for all items as long as VendingInStock is loaded. That behavior is too aggressive because it doesn't respect the VendingInStock config, so I will fix it soon.
Oh. sorry. If necessary, I can make API methods in order to know which Itens or VMs is normal refill.
No worries. I think I can fix it as-is. This plugin already calls a hook when going to refill, and it does it only after the checks you added, so I should be able to simply use that to determine when to refill.
WhiteThunder, just to confirm, if I only use CV (and set certain items to restock instantly) and don't use this plugin at all, does it still work properly? As in I can use CV alone to change the restock of one item in a machine without affecting the rest?
simonk83WhiteThunder, just to confirm, if I only use CV (and set certain items to restock instantly) and don't use this plugin at all, does it still work properly? As in I can use CV alone to change the restock of one item in a machine without affecting the rest?
Yes, the restock settings in Custom Vending Setup (CVS) work standalone even when VendingInStock (VIS) is not installed.
My posts above, and the most recent update to CVS, were addressing the use case where someone has both CVS and VIS installed.
- If you have VIS installed and configured to apply to all items, then VIS will instantly restock all items, so the refill delay settings in CVS will be ignored. That is the intended behavior, as opposed to making CVS override VIS, because it allows you to avoid having to set the refill delay for every item (in every vending machine that you customize) since that can be tedious.
- If you have VIS installed and configured to ignore certain items (or certain vending machines), VIS won't be restocking those items, so the refill delay settings in CVS will apply. This behavior is in the latest CVS update. Prior to that update, CVS would instantly restock all items if VIS was loaded, without respecting whether VIS actually wanted to restock them, hence why I originally posted on this thread.
Behind the scenes, CVS is actually detecting when VIS wants to restock, and CVS is overriding the behavior to restock the way it wants, meaning there is one large stack per unique sale offer, which takes into account properties such as blueprint, skin, custom name, and numeric data (plant genetics, key id).
In the future, I'm considering allowing CVS to apply a set of default settings to all vending machines, not just the ones that have been explicitly customized with the Edit button. That could possibly make VIS redundant, which is what people want so that they can have one less plugin installed. If/when I go that route, I may drop compatibility for VIS.
Awesome, thanks :)
Locked automatically