ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/doc/Developers/shops
Revision: 1.2
Committed: Thu Sep 7 21:42:51 2006 UTC (17 years, 8 months ago) by pippijn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Log Message:
Moved documents to doc/historic

File Contents

# Content
1 This guide explains how to implement shop headers on maps.
2
3 There are 5 headers related to shops that can be present in a map. Any given map may have some, all or none of them (although in the later case, it isn't considered to be a shop).
4
5 The headers are.
6
7 shopitems.
8
9 this is a semi-colon deliminated list of item types and values.
10 each entry is a name of an item type (from the array in common/item.c)
11 followed by an optional colon then a value in the range -100 to 100.
12 (if this is missing, the default value of 0 is used.
13 This value is a measure of how much items of that type are preffered.
14 Neutrality is represented by 0 (so a theoretical 'general' store would
15 have 0 for everything), a positive preference for certain item types
16 is a positive value, and negative preference for item types is a negative value.
17
18 As a special note, the character * may be used once to set a preference for
19 everything not explicitly listed otherwise (this value would in most cases be negative)
20
21 for example, a typical magic shop might have the string:
22 shopitems amulet:25;ring:40;potion:40;book:35;scroll:40;spellbook:40;skillscroll:50;wand:40;*:-50
23
24 and an armour shop might have the string:
25 shopitems armour:50;shield:50;helmet:40;cloak:40;boots:40;gloves:40;bracers:50;girdle:50;*:-50
26
27 all possible name values for items are listed in common/item.c, however there are only some
28 that are likely to be used (doors are not sold very often....) this list is not definitive or
29 neccesarily up-to-date, but is a reasonable starting point for constructing a new shop.
30
31 rod
32 book
33 horn
34 amulet
35 potion
36 ring
37 inorganic
38 spellbook
39 wand
40 scroll
41 power_crystal
42
43 arrow
44 bow
45 weapon
46
47 armour
48 shield
49 helmet
50 cloak
51 boots
52 gloves
53 bracers
54 girdle
55
56 flesh
57 food
58 drink
59 treasure
60 gem
61 skill tool
62 lighter
63 light source
64 lamp
65 tool
66 container
67 item_transformer
68
69 armour improver
70 weapon improver
71 skillscroll
72
73 building material
74
75
76 shopmin
77 This is an integer value. It is the minimum value that the object must have in
78 order to be considered by purchase for a shop. This is not the same as the price
79 offered, which can be substantially below shopmin.
80
81
82 shopmax
83 This is an integer value. It uses value like shopmin does, however it is not a
84 fixed upper limit.
85
86 The value is adjusted downwards if it is in excess of one half of shopmax. The
87 output value is the minimum of shopmax and one half of shopmax plus the square root
88 of one half of shopmax
89
90 Note that the value is only an aspect of the final price, and the actual price offered for an item
91 can be substantially less than shopmax, even when the item's value in in excess of that.
92
93
94 shoprace
95 if the player matches shoprace, this has no effect, if they do not, the price offered
96 is only 80% of what it would otherwise be.
97
98
99 shopgreed
100 This is a multiplier on all prices offered, items brought from the player are done
101 so at a price divided by the greed, items sold to a player are overcharged by a factor of shopgreed.
102
103
104 Recognising different types of shops:
105
106 Whilst a hit and miss approach will work if there are items of known value to measure
107 prices with, it is possible to also guage the manner in which a shop will trade with
108 the bargaining skill. Merely use_skill bargaining on an appropriate shop, and the
109 details about the shop will be displayed.
110
111
112 Value estimation:
113 no longer does examining an item display the exact sale price you will get (not least
114 because there /is/ no exact sale price anymore...). Instead an estimate is given, the
115 quality of this estimate is based on your knowledge of any skills that could identify
116 the item, and the bargaining skill, as well as a fair degree of luck. Remember, just
117 because you think an item is worth a lot, doesn't mean any shopkeepers do.
118
119 The estimate given can be improved by leveling skills related to the class of item in question,
120 and the bargaining skill. Also, by acquiring other objects that are similar, and comparing and
121 merging them, your evaluation of the value of the objects can change. This does not always mean
122 greater accuracy however.
123