2.7 Setting up SourcesDefining objects, as discussed on the last several pages, makes
entries in the Argo database, but does not in itself make the
objects available to players. This is done through a separate command,
Like As an example, let's say we are configuring a room called Old Ned's
Shop as a source location for a few different types of weapons,
including hatchets. We will set it up so that players can both buy and
sell hatchets at the shop. Note that in this case as with all
sources players are not really buying from or selling to an actual
player... There does not have to be an Old Ned character running the
shop, though we might want to create a puppet object named Ned or Old
Ned that can be controlled by staff, or by both staff and players, to
make the shopping experience more interactive... Or we could be setting
up a shop for an actual merchant player character named Ned. Regardless
of these choices, though, when players use the Typing ==================================== >> Do you want to add or remove an object from Old Ned's Shop's source list ? >> [Enter 'add', 'remove', or .q to quit] >> Do you want to add information for players to buy or sell objects? >> [Enter 'buy', 'sell', or .q to quit] ==================================== When setting up the source, we would enter `add' at the first prompt. To make an object no longer available, we would enter `remove'. You can abbreviate this entry to a leading portion of the word, including just `a' and `r'. Then we specify whether we are setting up configuration for buying or selling objects at this source. We can set up a source as a location where an object can be both bought and sold; to do this, we configure the source twice, entering `buy' one time and `sell' the other. Again, you can abbreviate your entry at this prompt. Let's do `buy' first, entering the information that will be necessary for characters to be able to buy hatchets at Ned's shop. ==================================== >> What object to buy do you want to add for Old Ned's Shop? >> [Enter the name of an object, .l to list choices, or .q to quit] ==================================== This prompt is pretty self explanatory: enter the name of an object
that has already been set up in the database with the
==================================== >> The book price for Hatchet is 15 coppers. >> Is this the price to be charged at Old Ned's Shop? (y/n) >> How much should Hatchet cost at this source? >> [Enter price in coppers, or .q to quit] ==================================== The system will then display the `book price' of the object the standard price set when the object was defined and ask if you want to charge this price at the current source. Let's say that Ned's is a small shop: he doesn't have very many different kinds of weapons, but his prices are pretty good on those he does have. Hatchets are a little cheaper here than elsewhere: we enter `14' at this prompt. Note that the price is in small coins. Multiply large coin prices by 100 to convert to small coins: a suit of nice armor that costs 3 silver and 50 copper would be entered as `350'. ==================================== >> Is this object always available at this source? (y/n) >> What is the percent chance that Hatchet will be at this source? >> [Enter a number between 1 and 100, or .q to quit] >> How often can Hatchet be obtained at this source? >> [Enter a time, or .h for help, or .q to quit] ==================================== You can specify that objects are always available at the source, or
are only available on an intermittent basis. If you say `no', the object
is not always available here, then you will be prompted for a percentage
chance that it will be available at any given time, and an amount of
time that has to pass between transactions. If we wanted to set it up so
that Ned usually, but not always, has a hatchet to sell players, and has
to replenish his stock when he sells one (goes down to his friend the
armorer and gets another one), we could enter values such as `90' and
`1 hour' here. In the discussion of Defining
Objects, we gave the example of Faerie Dew, which perhaps could be
perchased somewhere, but more likely would be collected by enterprising
characters who go to the Hidden Dell on misty mornings and see if they
can find some drops of dew glistening on grass where the faeries danced.
To set up a source like this, we might use values such as 80% (the
faeries dance most nights), and a time window of `1 day' (you can only
collect dew once a day... in the morning, actually; but we won't make
people log on at a specific time; limiting dew collection to once per
day is realistic enough). The ==================================== >> What message should be shown to players when they successfully obtain Hatchet from this source? >> [Enter message, or .n for none, or .q to quit] >> What message should be shown to other players when someone obtains Hatchet from this source? >> [Player's name will be prepended to message] >> [Enter message, or .n for none, or .q to quit] >> What message should be shown to players when they fail to obtain Hatchet from this source? >> [Enter message, or .n for none, or .q to quit] >> What message should be shown to other players when someone fails to obtain Hatchet from this source? >> [Player's name will be prepended to message] >> [Enter message, or .n for none, or .q to quit] ==================================== The final step is to set messages to be shown, to the player and to
other players, when they successfully purchase or unsuccessfully attempt
to purchase objects at this source... equivalents, in other words, of
As with
You pay Ned and pick up a new hatchet. ==================================== >> Hatchet added to Old Ned's Shop's source list. ====================================At this point, the shop has been configured as a source for buying hatchets. If players type +buy or +browse ,
they will be shown a list of objects available for purchase at the shop,
including the hatchet. If they type +buy hatchet , the
system checks to make sure they have enough money, checks to make sure
that enough time has passed since the last hatchet was sold, and rolls
to see if Ned has one in stock... If the result in all three cases is
`yes', then 14 small coins will be deducted from the amount they are
carrying, and Argo will emit a notice and put a hatchet object
in the player's inventory. If the player cannot afford a hatchet, the
system will tell him so. If no hatchets are available, Ned will just
say he's sorry, he's out.
==================================== >> Do you want to add or remove something else for Old Ned's Shop? (y/n) ==================================== After one object has been configured, a prompt asks if you want to
configure another. Type `no' to exit the ==================================== >> Do you want to add or remove an object from Old Ned's Shop's source list ? >> [Enter 'add', 'remove', or .q to quit] >> Do you want to add information for players to buy or sell objects? >> [Enter 'buy', 'sell', or .q to quit] >> What object can be sold here? >> [Enter name of object, .l to list choices, or .q to quit] ==================================== This time we will say that we are going to `add' information that allows users to `sell' objects here... a `hatchet' in this case. If characters come into funds, or increase their strength to the point where it makes sense to move up to a larger weapon, or find a hatchet that they don't need in their adventures, they can come to Ned's shop and sell the weapon. ==================================== >> The book price for Hatchet is 15 coppers. >> What is the *most* that will be paid for Hatchet at this source? >> [Enter an amount in coppers, or .q to quit] >> What is the *least* that will be paid for Hatchet at this source? >> [Enter an amount in coppers, or .q to quit] ==================================== You can enter a range of prices that will be offered for a given object... to reflect the proprietor's varying moods and reaction, or to reflect the fact that different instances of an object will be in varying condition... or, for that matter, just because. For ordinary second-tier objects, a range from just under half the new price to just under the new price is suggested. For rare third-tier objects, the price offered should stay close to `book price'. The hatchets Ned sells (and soon will buy) are ordinary weapons... he sells them at 14 small coins. Something like `6' for the minimum and `13' for the maximum would be good here. If you want the source to offer a fixed price for an object, just enter the same amount for minimum and maximum. ==================================== >> With different maximum and minimum prices, players could keep trying the command until they get a higher price. Do you want to configure a time period for which the price is frozen? (y/n) >> For how long should the price stay the same? >> [Enter a time, or .h for help, or .q to quit] ==================================== As the prompt indicates, if you do enter a range of prices, players
could just keep entering ==================================== >> What message should be shown to players when they sell Hatchet at this source? >> [Include the string '%price' where you want the price paid to appear. >> [Enter message, or .n for none, or .q to quit] >> What message should be shown to other players when someone sells Hatchet at this source? >> [Player's name will be prepended to message] >> [Include the string '%price' where you want the price paid to appear. >> [Enter message, or .n for none, or .q to quit] >> Hatchet added to Old Ned's Shop's source list. >> Do you want to add or remove something else for Old Ned's Shop? (y/n) >> Done. ==================================== Again, the last step is to set messages. Here no Setting up a location as a source for multiple objects is a fairly time consuming affair. Two scripts, ascr-comsup and ascr-magesup, are available to set up a well stocked weapons & armor shop and magical supplies shop. Both have fairly terse, generic, but serviceable messages. Both offer most of the standard objects mentioned in the discussions of combat and spells, though some `high end' items (larger weapons, plate mail, components for very powerful spells) are either available only occassionally or not at all. Both scripts work by setting properties on `here', so go to the room that will be the source object before uploading them. |