Random or specialised shops are placed with KFEAT lines likes
KFEAT: A = any shop KFEAT: B = book shop KFEAT: C = wand shop KFEAT: D = armour shop / antique armour shop KFEAT: E = weapon shop / antique weapon shop KFEAT: F = general shop / antiques shop KFEAT: G = scroll shop KFEAT: H = jewellery shop KFEAT: I = distillery shop
(where you could also use random shop
instead of any shop
).
As indicated above, you can specify antique shops as well, for the item types
where it makes sense. If you define a custom inventory for an antique shop, the
items in it will be unidentified, as with a regular antique shop.
It's possible to customise shops further than simply specifying the type of shop to place. There are a number of options, which are enumerated below. Note that even for custom shops the actual base type is used for random item generation and for deciding the shop tile, so try to pick the base type that comes closest to the shop's actual stock.
name:Plog
would result in “Plog's <X shop>”.type:Wand
would result in “X's Wand shop”. Please note: this is not the type of shop, simply the name. Setting this will not change the content of the shop. You will still need to specify the type in the definition, i.e., antique armour shop
.suffix:Bazaar
results in “X's x Bazaar”.any shop count:1
results in a single shop with a single item in it. If both use_all and count are used and count is greater than the number of specified items, the difference is filled with random items matching the shop type.It's possible to also specify a list of items that should be placed in a shop. This syntax specifies a number of items separated with |, which is further separated from the individual shop specification using the ; symbol. Individual shop items are parsed as per standard item definitions, identical to those used for monster items and generic item placement.
KFEAT: a = wand shop name:Plog type:Wand suffix:Emporium count:3 use_all greed:10 ; any wand | any wand | any wand
This will create a wand shop called “Plog's Wand Emporium”, which has exactly three items, each of which is a randomly chosen wand.
Here's an example map you can use to play around with the parameters.
# Custom shop test entry vault. # Once the antique general store bug has been fixed, replace the first shop type # with "antiques shop". NAME: shop_test WEIGHT: 10000 TAGS: entry no_monster_gen ORIENT: float SHUFFLE: stuvw KFEAT: s = antique armour shop type:Gambling count:8 ; \ w:20 deck of destruction | w:20 deck of summoning | deck of escape | \ w:1 deck of wonders | any deck | w:1 legendary deck KFEAT: t = food shop name:Ratz type:Cheese suffix:Factory count:9 ; \ w:20 cheese | w:1 cloak unrand:ratskin_cloak KFEAT: u = scroll shop type:The_Augury suffix:Shoppe use_all ; \ scroll of identify | scroll of detect curse | scroll of remove curse |\ scroll of magic mapping | scroll of detect curse q:2 | \ scroll of remove curse q:2 KFEAT: v = general shop type:Eternal_Flame suffix:Boutique count:6 ; \ w:2 ring of fire | any weapon ego:flaming | w:5 wand of fireball | \ wand of flame | wand of fire | scroll of immolation | \ w:2 ring of protection from fire | w:5 book of Flames | \ w:5 book of Fire | randbook disc:fire KFEAT: w = general shop name:Xom type:Realm_of_Chaos suffix:Emporium count:7 ; \ wand of random effects | wand of polymorph other | potion of mutation | \ w:20 any weapon ego:chaos | any MAP s.t [u{ v(w ENDMAP