linking_rooms.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <html>
  2. <head>
  3. <link href="../tutorial.css" rel="stylesheet" type="text/css">
  4. </head>
  5. <body>
  6. <div class="header">
  7. The NakedMud Tutorial :: Linking rooms
  8. </div>
  9. <!-- content starts here -->
  10. <div class="content-wrap"><div class="content-body-wrap"><div class="content">
  11. <div class="head">dig</div>
  12. <div class="info">
  13. There are numerous ways to set up connections between rooms. Like most muds,
  14. NakedMud supports the four cardinal directions, up and down, northeast,
  15. southeast, southwest, and northwest. In addition, NakedMud also provides the
  16. ability to open-endedly define your own movement commands on a per-room basis.
  17. Dive, jump, enter, flee -- whatever you want.
  18. <p></p>
  19. The most basic way to link rooms is through the dig command. Dig allows you to
  20. connect your current room to another room, via a specified direction. Let us
  21. look at a basic example of dig:
  22. <pre class="mud">
  23. > <font class="cmd">look</font>
  24. [mainstreet03@moonhaven] [City] Main Street
  25. The street is nicely kept cobblestone. Buildings of various sizes dot the
  26. north and south sides of the street. The doors and windows on most are shut,
  27. suggesting the town has gone to bed for the night. Flames flicker at the tops
  28. of tall polls lining either side of the streeet. They give the street basic
  29. illumination. A large tavern can be seen on the north side of the street.
  30. Silhouettes of moving people are projected against the smoky windows of the
  31. tavern from inside lights. The sound of music emits from within.
  32. > <font class="cmd">dig mainstreet02 south</font>
  33. You link mainstreet03@moonhaven [south] to mainstreet02@moonhaven [north].
  34. > <font class="cmd">look</font>
  35. [mainstreet03@moonhaven] [City] Main Street
  36. The street is nicely kept cobblestone. Buildings of various sizes dot the
  37. north and south sides of the street. The doors and windows on most are shut,
  38. suggesting the town has gone to bed for the night. Flames flicker at the tops
  39. of tall polls lining either side of the streeet. They give the street basic
  40. illumination. A large tavern can be seen on the north side of the street.
  41. Silhouettes of moving people are projected against the smoky windows of the
  42. tavern from inside lights. The sound of music emits from within.
  43. <font class="highlight"> south :: [mainstreet02@moonhaven] Main Street</font>
  44. >
  45. </pre>
  46. The dig command will automatically attempt to re-link the destination room to
  47. the source room, by setting up a returning path in the opposite direction.
  48. However, if you provide a unique direction command, the destination room will
  49. not be re-linked to the source room because it is not obvious what the return
  50. direction would be. This can be made explicit by supplying a return direction
  51. at the end of the dig command.
  52. <pre class="mud">
  53. > <font class="cmd">dig tavern enter leave</font>
  54. You link mainstreet03@moonhaven [enter] to tavern@moonhaven [leave].
  55. </pre>
  56. In principle, any word can be used as a movement command. If a return direction
  57. is not supplied, a returning link is simply not added.
  58. </div>
  59. <div class="head">Fill</div>
  60. <div class="info">
  61. In addition to being able to dig exits, you can also fill exits. Fill will
  62. attempt to close off an exit in the specified direction, and the returning
  63. exit as well, if possible. For example:
  64. <pre class="mud">
  65. > <font class="cmd">fill north</font>
  66. You unlink mainstreet03@moonhaven [north] and mainstreet02@moonhaven [south].
  67. </pre>
  68. You can similarly fill exits with unique names by specifying the direction name
  69. (and a returning direction, if you want to fill that as well).
  70. </div>
  71. <div class="head">redit</div>
  72. <div class="info">
  73. Exits can also be created and deleted through the room edit interface. In the
  74. redit interface, there are two commands: E and F, for editing and filling exits.
  75. In addition, this method of working with exits allows builders to manipulate
  76. custom properties of the exit.
  77. <pre class="mud">
  78. > <font class="cmd">redit mainstreet03</font>
  79. [mainstreet03@moonhaven]
  80. 1) Abstract: no
  81. 2) Inherits from prototypes:
  82. mainstreet
  83. 3) Name
  84. 4) Description
  85. A large tavern can be seen on the west side of the street. [if is_evening()
  86. or is_night()] Silhouettes of moving people are projected against the smoky
  87. windows of the tavern from inside lights.[/if] The sound of music emits from
  88. within.
  89. L) Land type [leave unchanged]
  90. B) Set Bits:
  91. Z) Room can be reset: no
  92. R) Room reset menu
  93. X) Extra descriptions menu
  94. T) Trigger menu
  95. E) Edit exit
  96. F) Fill exit
  97. north : nowhere east : nowhere
  98. south : nowhere west : nowhere
  99. up : nowhere down : nowhere
  100. northeast : nowhere southeast : nowhere
  101. southwest : nowhere northwest : nowhere
  102. C) Extra code
  103. Enter choice, ? [topic] for help, or Q to quit: <font class="cmd">e</font>
  104. What is the name of the exit you wish to edit: <font class="cmd">north</font>
  105. </pre>
  106. Built-in exits can be specified by their aliases (n, w, s, e, u, d, nw, sw, se,
  107. ne) or their full names. Unique exits must, of course, have a full name
  108. provided. Specifying an exit to edit brings you to a new menu, where you can
  109. edit various properties of the exit, including the message it sends the room
  110. when a character leaves or enters through it, as well as descriptions when
  111. the exit is looked at, and keywords for interacting with it. For now, let us
  112. simply link the exit back to the other part of main street
  113. <pre class="mud">
  114. 1) Door name
  115. <NONE>
  116. 2) Door keywords
  117. <NONE>
  118. 3) Leave message
  119. <DEFAULT>
  120. 4) Enter message
  121. <DEFAULT>
  122. 5) Description
  123. 6) Exits to :
  124. 8) Key :
  125. 7) Closable : [ No]
  126. 9) Pick diff : [ 0]
  127. 0) Spot diff : [ 0]
  128. O) Opposite dir: <DEFAULT>
  129. Enter choice, ? [topic] for help, or Q to quit: <font class="cmd">6</font>
  130. Enter a new destination: <font class="cmd">mainstreet02</font>
  131. </pre>
  132. </div>
  133. <div class="head">Extra exit customization</div>
  134. <div class="info">
  135. You may have noticed that exits seem to support the ability to be closed,
  136. locked, picked, and hidden. Currently, exits can only be closed, opened, locked,
  137. or unlocked. The ability to pick or hide exits is not built in, but variables
  138. have been put in place so developers can implement this functionality as needed.
  139. If an exit has a key specified, a player must have that item in their inventory
  140. to lock or unlock that exit. The exit must also be closable to be (un)lockable.
  141. Here is an example:
  142. <pre class="mud">
  143. 1) Door name
  144. 2) Door keywords
  145. 3) Leave message
  146. 4) Enter message
  147. 5) Description
  148. 6) Exits to : mainstreet02
  149. 8) Key :
  150. 7) Closable : [ No]
  151. 9) Pick diff : [ 0]
  152. 0) Spot diff : [ 0]
  153. O) Opposite dir:
  154. Enter choice, ? [topic] for help, or Q to quit: <font class="cmd">7</font>
  155. 1) Door name
  156. 2) Door keywords
  157. 3) Leave message
  158. 4) Enter message
  159. 5) Description
  160. 6) Exits to : mainstreet02
  161. 8) Key :
  162. 7) Closable : [ <font class="highlight">Yes</font>]
  163. 9) Pick diff : [ 0]
  164. 0) Spot diff : [ 0]
  165. O) Opposite dir:
  166. Enter choice, ? [topic] for help, or Q to quit: <font class="cmd">8</font>
  167. Enter a new key name: <font class="cmd">iron_gate_key</font>
  168. </pre>
  169. <p></p>
  170. Custom enter and leave messages can be specified on exits. Player names are
  171. referenced with use of the $n symbol. This symbol will crop up over and over
  172. in scripting. Its relevance will be explained in scripting tutorials. Suffice
  173. to know for now, $n is a proxy for an acting character's name.
  174. <pre class="mud">
  175. 1) Door name
  176. 2) Door keywords
  177. 3) Leave message
  178. 4) Enter message
  179. 5) Description
  180. 6) Exits to : mainstreet02
  181. 8) Key : iron_gate_key
  182. 7) Closable : [ Yes]
  183. 9) Pick diff : [ 0]
  184. 0) Spot diff : [ 0]
  185. O) Opposite dir:
  186. Enter choice, ? [topic] for help, or Q to quit: <font class="cmd">3</font>
  187. Enter a new leave message: <font class="cmd">$n swaggers down the street.</font>
  188. </pre>
  189. </div>
  190. <!-- content ends here-->
  191. </div></div></div>
  192. <!-- navigation starts here -->
  193. <div class="nav-wrap"><div class="nav">
  194. <iframe src="nav.html" height="100%" width="100%" scrolling=no frameborder=0>
  195. </iframe>
  196. <!-- navigation ends here -->
  197. </div></div>
  198. <!--div class="footer">Edit Date: Nov 15, 2008. By Geoff Hollis</div-->
  199. </body>
  200. </html>