Vending Defaults

Hey WhiteThunder, 

I was wondering if you could explain to me how the defaults for the vending machines are worked out.
Max stock, refill amount and seconds between refills.

For example. Scrap to Fertilizer shows as 10, but this list shows 93 as being the default.
https://www.corrosionhour.com/rust-bandit-camp-vendors-loot-tables/

Just trying to get an understanding so i can adjust accordingly where needed.

Many Thanks!

The Max Stock and Refill Amount options in the plugin refer to the number of distinct sales possible, not the total number of the item that can be purchased. For example, when specifying Max Stock 10 for a sale of 3 scrap, when the vending machine is fully stocked, it guarantees that it will have at least 30 scrap available. The reason the farming vending machine has more than 30 scrap stocked is that there are other sales of scrap with higher payouts. For example, corn and cloth sell for 10 scrap, so the vending machine should have at least 100 scrap in stock. I don't know why that page says 93, but I can look into that.

When you open the edit interface for a vending machine that is not currently controlled by the plugin, the plugin generates configuration that matches vanilla. Max Stock and Refill Amount are hard coded at 10 and 1 because vanilla hard codes them, but Refill Delay is dynamic, which the plugin detects from the vending machine.

There is one minor difference in how the plugin restocks compared to vanilla. This difference only applies to vending machines that sell the same item (e.g., scrap) for multiple amounts. The issue is basically that vanilla will allow some overstock due to an obvious oversight in the logic, which causes inconsistency in the max stock. CVS-controlled VMs don't have that problem. More detail about it here:
https://umod.org/community/custom-vending-setup/38040-modified-vendors-greatly-increasing-supply-on-its-own?page=1#post-9

Thanks WhiteThunder, really appreciate that level of detail. 

The 93 thing is a bit odd, after this post i went and created a local brand new procgen map and saw different results even compared to officials i'd jumped on.

Fresh local
ENMnmJflOi8mqKr.png 

Official Vanillas (we have to assume stock had been bought so not a good reference)

WX8oa3mr01dYTJ3.png

It's not necessarily a problem. But the question was highlighted when a player told me things weren't vanilla and i took a deeper look.

If you ever want to see fresh vanilla stock, simply spawn a new vending machine of the same prefab, or press the Reset button.

There have been other cases where players have reported to server owners that stock is not vanilla when using this plugin, due to the quirks I mentioned. One of the challenges in making plugins is that I have to adhere and close to vanilla as possible, even when vanilla has bugs, or players will consider it an issue. At this point, I will probably update the plugin to reintroduce the vanilla quirks, with a config option to opt back into the plugin's current behavior. I'm sure players will still report some issues, due to the fact that the vanilla behavior is inconsistent, but all I can do in that case is provide documentation to server owners.

No worries WhiteThunder, again appreciate you taking the time to explain. Fully appreciate the quirks and bugs that come with Rust and the endless combination of plugins. 
Just knowing and understanding is generally enough to settle things down with players and stop my curiosity :)
Thanks again.