on August 25, 2010 by Austin in News, Comments (0)
You, Too, Can Create Souvenirs
People organizing souvenir giveaways for the SpinDizzy Fair, or for other purposes, may want to make it easy for guests to get some souvenir of their experience. There is now a MUF which makes it easy to create a fake object to specification.
Fake objects appear in the possession of someone; while they can be looked at, felt, smelled, even tasted, they are not independent database objects and so are in some way a bit less demanding on the server. We have had for a long while the fakemunchies.muf program, and its associated makefood.muf and makedrink.muf, but not something to generate non-edible items, until now.
To set this up you need an object or room you own on which the vending action is set. We will call this the ‘Vending Machine’ for convenience. And you need an action which does the actual vending; we’ll call this ‘buy-t’, as in Buy T-Shirt.
This program is set up to allow the creation of one object per action, by the way. It would be more database-efficient to have a single action able to buy a range of objects, but that’s harder to program, so let’s forego that.
So, to set up the buying of a T-shirt:
@action buy-t = Vending Machine
@link buy-t = $nothing.muf
@succ buy-t = {muf:#11609,A Floyd R Turbo T-Shirt;The T-shirt shows Floyd R Turbo with his eyes staring in different directions.;The T-shirt smells like cotton.;The T-shirt feels pretty soft and lean.;The T-shirt really shouldn't be eaten.} You buy a T-shirt.
@osucc buy-t = buys a Floyd R Turbo T-Shirt.
The @succ calls the MUF program #11609, makeFakeSouvenir.muf. The second argument of this is one long string, with properties separated by semicolons. Before the first semicolon is the only mandatory argument, the name of the souvenir. This must be present.
After the first semicolon goes the description; after the second, the scent; after the third the feel; after the fourth, the taste. These do not need to be non-empty; if you do not mind using a generic look, scent, feel, or taste, then just omit the text there. ‘@succ buy-t = {muf:#11609,Generic Souvenir;;;;}
‘ will produce a valid fake object. So will ‘@succ buy-t = {muf:#11609,Less Generic Souvenir;;It feels like it's coming for you!;}
‘.
Commas and semicolons in the {muf: } argument need to be properly escaped (that is, preceded with a backslash) in order to work. This makes your @succ a pain to read and edit. Make it easy on yourself and don’t use commas or semicolons in your fake object properties.
This code is similar to that used by fakemunchies.muf, which will be separately explained. The code does not give any notice to the user when it has succeeded; thus the inclusion of a comment to that effect in the @succ. The @osucc is provided so that others in the room know what has happened. @osucc messages for actions, just as for exits, automatically prepend the name of the person using the action and so the @osucc message begins without naming the successful person.
Tags: explanations, fair, fake objects, food, muf, souvenirs, vending machine
No Comments
Leave a comment
Login