Shop definition

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.

Shop options

  • use_all. If true, and items have been specified, all items specified will be placed in the shop, without using random selection to determine a number of items from the list.
  • name: If provided, this is apostrophised and becomes the shop-keeper's name. For example, name:Plog would result in “Plog's <X shop>”.
  • type: If provided, this is used as the “type” name for the shop. For example, 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: If provided, this is used instead of “Emporium”, “Shop”, etc, in the shop name. For example, suffix:Bazaar results in “X's x Bazaar”.
  • count: If specified, this restricts the number of items placed in the shop to this number. For example, 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.
  • greed: If specified, this defines a modifier of the cost of items for sale in the shop. By default, shops use the following greed formula:
    • food shops: greed = 10 + rnd(5)
    • antique shops: greed = 15 + rnd(19) + rnd(dlevel)
    • other shops: greed = 10 + rnd(5) + rnd(dlevel/2)
    • Shops in bazaars get a discount of 5 to 40%.
    • All of the above will be overridden by the greed parameter. In particular, this means that if you want depth and bazaars to have any effect on pricing, you'll have to set the value accordingly.

Shop items

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.

Examples

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
Logged in as: Anonymous (VIEWER)
dcss/help/maps/syntax/shop_info.txt · Last modified: 2014-01-12 10:35 by nicolae
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki