A vending machine is a device which sells dispenses items to buyers automatically on receipt of payment acting, in effect, as a sort of automated shop. These are a surprisingly old piece of technology, with the earliest on record created by Heron of Alexandria in the first century AD to sell consecrated water in a temple. In the modern era they are nearly ubiquitous and whilst the majority sell junk food, newspapers or cheap gadgets there are many that sell more advanced products - one English village has even had its long defunct general store replaced with a prototype vending machine which sells a range of foods and general groceries.
In general, vending machines are best suited to selling limited margin goods at a fairly stable demand level - too much re-stocking and they become uneconomic compared to having an employee on hand, and high value goods are liable to tie up a lot of money in the machine and attract criminals, but in some instances the machine may actually be more secure than a manned kiosk (the machine, after all, cannot be held at gunpoint and made to open the till - anyone who wishes to rob it must go to work with tools in a fairly public area). Their 24-hour character also makes them attractive in areas frequented by shift workers and some more advanced versions may include a microwave oven or similar device for heating food. Cooling systems are common features of vending machines, especially those that sell drinks or fresh(er) foods.
Historical - and most modern - vending machines require payment in coin. Sometimes very specific coin - although older machines were famously easily spoofed in various ways (and the newer, fussier machines are likely a reaction to that). More advanced versions can accept various forms of electronic currency or credit and are able to tell whether they have dispensed or not, allowing them to void failed transactions. Again, older machines could often be defrauded by tipping them to make product fall out - modern designs are extremely resistant to this, and some designs trigger an alarm siren and/or shut down if tilted. It is also entirely possible to bolt the machine to the walls and/or floor - which is particularly common with tobacco vending machines. Presumably enterprising criminals have already developed ways to persuade an electronic currency using machine that it has been paid when it actually hasn't. Some businesses also use non-payment vending machines to supply their staff - besides the cliche of the machine that makes dreadful coffee, there are also those that dispense stationary and frequent use consumables on presentation of staff ID to remove the requirement for their stores team to spend time issuing things like disposable gloves, pencils and spray lubricant.
Vending machine type things have also taken over money changing in some areas (normally they convert coins to notes or electronic currency), and the name is also used as a slang term for ATMs in some places.
Other common uses include the selling of tickets for various things (such as public transport) and, increasingly in the modern era "pay to play" charging for portable electronic devices.
Sci-fi vending machines frequently make use of nanotech construction systems or replicator technology to make a wide range of items on demand - these, of course, have the added benefits of a wider range of stock and being almost un-robbable (given that the product is only made once it has been paid for). Such a machine could potentially sell anything legal that doesn't require substantial manual assembly and might even "buy" suitable recylable wastes that it could dismantle for future use.
The ultimate expression of vending machine technology is probably the automat - essentially a fast-food restaurant entirely composed of vending machines which prepare and serve the food to order. The coffin hotel may also be fairly considered a descendant of the vending machine concept, as may gambling slot machines.
Game and Story Use
- Given the long life of much junk food, these are liable to be prime targets for post apocalyptic scavengers.
- They can also be useful sources of other parts such as lights, microprocessors, cooling (and/or heating) systems, pumps and mechanical actuators.
- The nano-factory type could also be very useful - either in its native state, or as a source for a constructor which can be removed, re-purposed and used to make things that it wasn't originally intended to make.
- Or, indeed, purely as a supply of nanomachines and/or whatever substrates they use for construction.
- An appropriate nanofactory could be a key mcguffin maintaining a community at a tech level far above their regional base, despite their complete lack of understanding of how it works: they perform the correct rituals, it provides the goods.
- Newspaper vending machines were common choices for use as dead drops during The Cold War - of course, someone who inadvertantly compromises one of these could find that buying a paper means stealing the bomb (literally in some cases).
- Fully automated commerce is a staple of cyberpunk.
- Given the 24h nature of many PCs lives, these things are liable to appear a lot.
- But they may yet be surprised to find them popping up in a Roman era campaign and may accuse you of cheese for adding them to a steampunk, pseudomedieval or spellpunk setting.