DARKOVER 2.0 This isn't a Darkover specific file, I just grabbed this from the building.doc file for Circle 3.00. All credit goes to Jeff Fink who submitted the documentation and the code for the shops to Circle 3.00. And of course, mucho credit to Jeremet Elson, who put all the junk together. Once this works well, I'll write a doc file. Probably going to make several modifications to this stuff anyways. -- Eldritch (7/21/95) 7. Shop Files CircleMUD v3.0 now has a new shop file format. Since the old format is still supported, both formats will be documented. If you'd like to convert shop files in the old format to that of the new format, compile and run the utility shopconv. When writing new files, you need to tell CircleMUD that the shopfile is in the new format by including the following line BEFORE any shops in the file: CircleMUD v3.0 Shop File~ 7.1. CircleMUD v3.0 Shop Format #<num>~ Shop Number (Used only for display purposes) <num 1> <num 2> <num 3> . . . <num n> -1 An arbitrarily long list of the virtual numbers of objects that the shop produces (i.e., items which will always be available). The list must be terminated with -1. <Profit when selling> The object value is multiplied by this value when sold. This is a floating point value. Must be >= 1.0 <Profit when buying> The object value is multiplied by this value when bought. This is a floating point value. Must be <= 1.0 <type 1> [namelist 1] <type 2> [namelist 2] <type 3> [namelist 3] . . . <type n> [namelist n] -1 These lines contain the types of items that the shop will buy. The first argument, called "type" is the Type Flag of items the shop will buy (see "Type Flag" under "Format of an Object" in this document). Numerical or English forms are valid (5 or WEAPON, 9 or ARMOR, etc.). In addition, you can provide optional keywords to define specific keywords that must be present on the item for the shopkeeper to trade it. For further details on these expressions, see the section "Item Name Lists" below. This list must be terminated by a -1. <Message When Item to buy is non existing>~ <Message When item trying to sell is non existing>~ <Message When shop does not buy offered item>~ <Message when shop can't afford item>~ <Message when player can't afford item>~ <Message when successfully buying an item>~ Price is represented by %d. <Message when selling an item>~ Price is represented by %d. <Temper> When player can't afford an item, the shopkeeper tells them they can't afford the item and then: 0 - The shopkeeper pukes on the player. 1 - The shopkeeper smokes his joint. other - No action besides message above. <Shop Bitvector> A bitvector (see "Using Bitvectors" above) with the following values: 1 a WILL_START_FIGHT Players can to try to kill this shopkeeper. 2 b WILL_BANK_MONEY Shopkeeper will put money over 15000 coins in the bank. A brief note: Shopkeepers should be hard (if even possible) to kill. The benefits players can receive from killing them is enough to unbalance most non monty-haul campaigns. <Shop Keeper Mobile Number> Virtual number of the shopkeeper mobile. <With Who Bitvector> A bitvector (see "Using Bitvectors" above) used to designate certain alignments or classes that the shop will not trade with, with the following values: 1 a NOGOOD Keeper won't trade with positively-aligned players. 2 b NOEVIL Keeper won't trade with evilly-aligned players. 4 c NONEUTRAL Keeper won't trade with neutrally-aligned players. 8 d NOMAGIC_USER Keeper won't trade with the Mage class. 16 e NOCLERIC Keeper won't trade with the Cleric class. 32 f NOTHIEF Keeper won't trade with the Thief class. 64 g NOWARRIOR Keeper won't trade with the Warrior class. <Shop Room 1> <Shop Room 2> <Shop Room 3> . . . <Shop Room n> -1 The virtual numbers the mobile must be in for the shop to be effective. (So trans'ed shopkeepers can't sell in the desert). The list must be terminated by a -1. <Time when open start 1> <Time when open end 1> The hours between which the shop is open. <Time when open start 2> <Time when open end 2> The hours between which the shop is open. 7.2. Item Name Lists for 3.0 Shops Name lists are formed by boolean expressions. The following operators are available: ',^ = Not *, & = And +, | = Or The precedence is Parenthesis, Not, And, Or. For example, look at the following line: WEAPON [sword & long|short | warhammer | ^golden & bow] & magic This shop will buy the following items of type WEAPON: 1) sword long magic 2) short magic (the first & is done before the first | ) 3) warhammer magic 4) ^golden bow magic Note that the ^ in front of golden affects ONLY golden, and nothing else in the listing. Basically, the above expression could be written in English as: [(sword and long) or short or warhammer or (not golden and bow)] and magic If you want the shop to only buy "short magic" only if they were also swords, you could change the expression to: WEAPON [sword & (long|short) | warhammer | ^golden & bow] & magic ^-Changes--^ You can also include object extra flags (listed in the section "Format of an Object" above). The previous example used "magic" as a keyword that had to be on the object. If we wanted to make it so that the MAGIC flag had to be set on the item, we would change "magic" to "MAGIC." Similar changes could be made to add other flags such as "HUM" or "GLOW." It should be noted that these expressions are case sensitive and that all keywords should appear in lower-case, while the flag names should be in all caps. 7.3. The DikuMUD Gamma and CircleMUD 2.20 Shop Format This format is obsolete but is presented because it is still supported by CircleMUD 3.0. The 'shopconv' utility shipped with Circle will convert shop files of this type to v3.0 shop files described above. #<num>~ Shop Number (Used only for display purposes) <num1> <num2> <num3> <num4> <num5> Virtual numbers of the objects that the shop produces. -1's should be inserted in unused slots. <Profit when selling> The object value is multiplied by this value when sold. This is a floating point value. Must be >= 1.0 <Profit when buying> The object value is multiplied by this value when bought. This is a floating point value. Must be <= 1.0 <num1> <num2> <num3> <num4> <num5> These five numbers are the item-types traded with by the shop (i.e. valid Type Flags of objects that the shopkeeper will buy). <Message When Item to buy is non existing>~ <Message When item trying to sell is non existing>~ <Message When wrong item-type sold>~ <Message when shop can't afford item>~ <Message when player can't afford item>~ <Message when buying an item>~ Price is represented by %d. <Message when selling an item>~ Price is represented by %d. <Temper> When player can't afford an item, the shopkeeper tells them they can't afford the item and then: 0 - The shopkeeper pukes on the player. 1 - The shopkeeper smokes his joint. other - No action besides message above. <Shop Bitvector> A bitvector (see "Using Bitvectors" above) with the following values: 1 a WILL_START_FIGHT Players can to try to kill this shopkeeper. 2 b WILL_BANK_MONEY Shopkeeper will put money over 15000 coins in the bank. A brief note: Shopkeepers should be hard (if even possible) to kill. The benefits players can receive from killing them is enough to unbalance most non monty-haul campaigns. <Shop Keeper Mobile Number> Virtual number of the shopkeeper mobile. <With Who Bitvector> A bitvector (see "Using Bitvectors" above) used to designate certain alignments or classes that the shop will not trade with, with the following values: 1 a NOGOOD Keeper won't trade with positively-aligned players. 2 b NOEVIL Keeper won't trade with evilly-aligned players. 4 c NONEUTRAL Keeper won't trade with neutrally-aligned players. 8 d NOMAGIC_USER Keeper won't trade with the Mage class. 16 e NOCLERIC Keeper won't trade with the Cleric class. 32 f NOTHIEF Keeper won't trade with the Thief class. 64 g NOWARRIOR Keeper won't trade with the Warrior class. <Shop Room Number> The virtual number the mobile must be in for the shop to be effective. (So trans'ed shopkeepers can't sell in the desert). <Time when open start 1> <Time when open end 1> The hours between which the shop is open. <Time when open start 2> <Time when open end 2> The hours between which the shop is open.