|
|
|
|
Now that you've successfully created a room, how do you make them come to life? In this tutorial, we will look at ways in which you can specify the basic description of any room. Once we've seen the basics, we will look at more sophisticated room classes which allow the owner to create `details' such as windows, furniture, paintings and the like. Setting the description of a room is very much like setting the description of a player. You can change the name of your room, or add aliases, using the @rename command. Syntax: @rename <room> to <name-and-alias,alias2,alias3,...> Examples: @rename here to Mike's Pie Shop,mps @rename #1381 to Fiddler's Green The first form changes the name of the room currently occupied to `Mike's Pie Shop' with alias `mps'. The second form changes the name of the room #1381 to `Fiddler's Green'. Actually, there is no need for #1381 to be a room. *Any* object can be renamed using this command. The names (and therefore the *directions*) of exits can also be changed using @rename. In the same way that your own description could be set or changed using the @describe command, so can the descriptions of rooms and exits. The description of an exit is typically set to be what a player would see if it looked in the direction(s) of the exit. Syntax: @describe <any-object> as <description> Examples: @describe here as A very boring place. @describe east as You see a door made of glass and steel. Whenever a player types `look' in your room, it would see the description A very boring place. If it types `look east', the following phrase would be displayed: You see a door made of glass and steel. If you want to write a description which runs to more than one paragraph, or which has a particular format, then you should not use @describe. Instead, as when you set your own description (cf the `First Things First' tutorial), you can edit the description of rooms and exits (and any other object you own) using the @edit command: Syntax: @edit <object>.description Examples: @edit here.description @edit east.description For both @edit and @describe, object numbers can be used instead of names. The introduction to this tutorial mentioned the possibility of designing furniture, windows, paintings, etc to add character to your room. One of the simplest ways in which this can be done is by the addition of *details* to your room. Ordinary rooms do not allow you to add such details. However, there have been many rooms developed on many MOOs which do. One of them, developed at Diversity University, is available here at Hippo Campus: the Generic All-In-One Room (#1899). To change your room into an All-In-One Room, go to your room and type: @chparent here to #1899 The @chparent command changes the parent of an object in the heirarchy of objects. Syntax: @chparent <object> to <parent-object> As a result, the object inherits all the properties and verbs (variables and functions) of the new parent, and all its ancestors in the heirarchy of objects. In effect, it inherits the *functionality* of the parent. Once the parent of your room has been changed to the Generic All-In-One Room, you can begin to add details to your room. A detail of an All-In-One Room is a fragment of description which has its own name, its own identity. Details are NOT objects. If a player looks at a detail, its description is displayed, but no other interaction with it is possible. For example, the description of a room may specify that it has a window. If a detail named `window' is added, and a description is provided for it, then by the command look window players can `see' what's on the `other side'. To add a detail, the following command is used: Syntax: @add-d <name,alias1,alias2,...> Example: @add-d window @add-d window,outside In the second example, the names `window' and `outside' can both be used to get the description of the scene through the window. When you use the @add-d command, you are automatically prompted for the description to be associated with the detail. Some of the other commands affecting details are: @details Prints a list of the details on the room. @rm-d <detail-name> Removes a detail from the room. @clear-d Removes ALL details from the room. @more-d <detail-name> Allows you to add more lines to the specified detail description. Like the @add-d command, the @mored command prompts you for the additional lines of description. To construct furniture details which can be used to a limited extent, the All-In-One Room provides *seats*. Again, seats are NOT objects. If a player looks at a seat, its description is displayed. If a player sits in a seat, the result of that action is displayed to the occupants of the room. No other interaction with a seat is possible. Before adding a seat, the intended seat must first be added as a detail. Failing to do so will cause problems! To add a seat, the following command is used: Syntax: @add-s <name,alias1,alias2,...> Example: @add-s comfy chair,chair When you use the @add-s command, you are automatically prompted for the text that people see when someone sits in the seat. Some of the other commands affecting seats are: @seats Prints a list of the seats defined on the room. @rm-s <detail-name> Removes a seat from the room. It is NOT removed from the set of details for the room. @clear-s Removes ALL seats from the room. None of the seats are removed from the set of details. If your room has details and seats specified, no-one will know unless they are mentioned in the main description of the room. One way for you to do this is to edit the main description yourself. Another way is to *integrate* the detail automatically into the room description. If you wish to experiment with this, then type `help #1899', and check out the commands @integrate-det <detail-name> @unintegrate-det <detail-name> @integration <integration-level> All-In-One Rooms have more features than just those mentioned on the previous pages. You can also: * Add smells, tastes, sounds, and textures to your details. * Control the security of the room to a limited extent. To find out more about these features, type `help #1899', and experiment with the commands you find there. Some of the features of All-In-One Rooms (namely those pertaining to events) do not work at Hippo Campus. |
|
This site is best viewed in 800 x 600, or 1024 x 768. If you find any faults in our page on certain browsers, please report them so we may fix the problem.Copyright © NJO
2001.
|