OOC:Places
This how-to describes a somewhat underused bit of code which can, nonetheless, be very useful. Namely, we shall walk through how to add places to a given room, edit them, and get rid of them when you're tired of them.
First, a bit of explanation as to what places really do, as well as what they don't. The place code creates one or more places or sub-rooms in a given room. Creating places does not count against your quota. When joining a given room, it will not be evident immediately who is in what places, and looking at a room or people outside from inside a place is not different from looking at it from outside. People outside a place will be able to look at a person inside the place as normal.
So, what's the point? The first and most obvious advantage to a place is that it allows for private conversations between two or more people, without having to whisper or page multiple recipients, which can be bothersome or cumbersome at times. Also, it can add atmosphere or flavor to a room, such as having various places in a restaurant for each table or booth, without the somewhat more involved task of creating objects for each table.
Setting Up Places
Unsurprisingly, to add places functionality to a room, you should own it, or at least have permission to edit it. Once you do, the following steps will allow you to create and edit your places. Note that, as with many more involved building practices, it may be useful to write out, either in a text editor or on a piece of paper, what you want your finished product to look like. Outlining can be helpful, rather than stringing things together on the fly.
First, we create our places:
create 5 places
This, obviously, will create five places in the room you are in. And indeed, if you were to look in the room, you would see a note to that effect, above the listing of exits. Further, typing places will list all the places, as well as how much room they have.
Table (1) has 4 empty places. Table (2) has 4 empty places. Table (3) has 4 empty places. Table (4) has 4 empty places. Table (5) has 4 empty places.
plook is similar, but does not give place names, instead using a generic place number. It also shows who is not at a place.
Place #1 4 empty places Place #2 4 empty places Place #3 4 empty places Place #4 4 empty places Place #5 4 empty places No place 1 at no places Fujiko
If we wish to take a closer look at a place, we can use plook and add the number of the place after it. plook 3 gives us:
Table: A table with 4 legs and some chairs around it.
Needless to say, this is pretty boring. We can spice this up, though it will involve altering the attributes for the room. Put simply, each place has a set of values which can be changed for it, and they take the general form of:
&PLACES`1`<OPTION>
For instance, Place #1 above is defined by the following set of variables (try examine here/places** if you want to see them for yourself):
&PLACES`1`DEPART here=You stand and leave &PLACES`1`DESCRIBE here=A table with 4 legs and some chairs around it. &PLACES`1`JOIN here=You sit down at &PLACES`1`MAXPLACES here=4 &PLACES`1`NAME here=Table &PLACES`1`ODEPART here=stands and leaves &PLACES`1`OJOIN here=sits down at &PLACES`1`PREFIX here=At your table
To customize this place, and all others, for your purposes, you'll have to edit the above variables as appropriate. DESCRIBE, naturally, behaves just like any other description. Substitutions require a double percent sign, however, i.e. %%N. Join and depart messages are automatically appended with the place name, so you don't have to worry about that.
Armed with the above knowledge, we can spruce things up a little. As always, it can be helpful to type everything out in a text editor and then copy back to your MUSH client afterward; copying the text you got from your examine command, for instance, can save you a bit of typing:
&PLACES`1`DEPART here=You slide out from &PLACES`1`DESCRIBE here=A cozy little booth with a long rectangular table of mahogany. Leather-covered benches are on either side, and a window lets light stream in from outside. &PLACES`1`JOIN here=You slide in and take a seat at &PLACES`1`MAXPLACES here=6 &PLACES`1`NAME here=Booth 1 &PLACES`1`ODEPART here=slides out and and leaves &PLACES`1`OJOIN here=slides in at &PLACES`1`PREFIX here=In your cozy booth
Doing this for all the places you have will be a bit time consuming, but on the bright side, you'll only have to do it once. Let's try places again:
Booth 1 (1) has 6 empty places. Booth 2 (2) has 10 empty places. Feeding Trough (3) has 100 empty places. Roundtable (4) has 5 empty places. Table for Two (5) has 2 empty places.
Notice the number in parentheses tells you what place number each is designated by. Also try plook 1 to check its description, as well as the descriptions for all the other places. It can be tedious to set five descriptions all at once, along with all their join and depart messages, so it's easy to make a mistake. As with all aspects of building, it's much better to catch your errors now, then have a visitor notice them later.
Should you decide at a later date that five places weren't enough, and you need six, or seven, then adding after the fact is done via a very similar method. The only difference is that you'll need to create the place via attribute first, then create its attribute tree:
&PLACES`6 here= &PLACES`6`DEPART here=You crawl out from &PLACES`6`DESCRIBE here=A lime green dome-style tent set rather incongruously in the center of the ballroom. &PLACES`6`JOIN here=You crawl into &PLACES`6`MAXPLACES here=3 &PLACES`6`NAME here=Party Tent &PLACES`6`ODEPART here=crawls out and and leaves &PLACES`6`OJOIN here=crawls into &PLACES`6`PREFIX here=In your garish tent
Using Places
Thankfully, for the end user, a place is much easier to deal with, and correspondingly more fun. As always, plook and places are your friends, and you may get in the habit of using them to see where people are when you enter a room, similarly to glance.
join 2 sit 2 join Yuriko
All of these commands will do the same thing: you'll be added to place #2. The last one assumes that Yuriko is a character already in the place you want to join, and so can be useful if you don't want to look up her number. If you attempt to join a place that does not have any empty places, you'll be told so. You'll also get a message if you attempt to join a place while you're already in another one. How, then, should you leave a place?
stand depart
Again, these two are identical. Either one will pull you out of a place. It's worth noting here that places do not respect the follow command; you can't follow someone into a place, nor can you lead them into one. They'll have to issue that command on their own.
Once in a place, you can use tt and ttooc to speak privately. Only those who are in your place will see the text. This is obviously one of the chief advantages of having a place. Follow them with a colon as necessary, and you have proper poses.
tt This is a cozy little booth. ttooc No, really, it's terribly cute. tt :giggles.
If you do not use tt or ttooc then all poses and spoken words will be passed and seen, both by yourself and others, normally. This is where the usefulness of the places command comes in; otherwise you may not know that someone is in a place at all.
Deleting Places
If, for some reason, you've decided you don't want to have five places, you can trim things down to four. Or three, or whatever you want. Erasing a single place is done by setting all its attributes to be blank, and then the place itself:
&places`5`depart here &places`5`describe here &places`5`join here &places`5`maxplaces here &places`5`name here &places`5`odepart here &places`5`ojoin here &places`5`prefix here &places`5 here
Alternately, if you want to get rid of places altogether (and undo all the work you put into making them, which may be sad but necessary), that can be done easily:
remove places
And that will do it for you. Places are quite useful for building an environment, and thus far are somewhat underutilized on the MUSH, but hopefully you have seen they're worth the work put into them. For further information, refer to '+help places,' '+help places-setup,' and 'help attributes' or just ask on the technical help channel (@chan/on techies, +t Hi! I need help on something or another!).