Advertisement
Kovitikus

Room Description Examples

Feb 22nd, 2021
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. #### Short Desc
  2. `at_after_move` is set on the Character typeclass. It tells the character what to do immediately upon entering a new location.
  3.  
  4. ```python
  5. def at_after_move(self, source_location):
  6. """
  7. This hook's default behavior is to look at the room after it moves to it.
  8. """
  9. # Force the character to be greeted with the room's short description.
  10. if not source_location:
  11. return
  12. self.msg(f"{self.location.short_desc(self)}")
  13. ```
  14.  
  15. **Example String:**
  16. ```
  17. You arrive at Hoff's Bar. Hoff and basic supplies merchant are here. You see a dimly lit hallway to the north, a supply shop to the west, a well kept garden to the east, and alley to the south.
  18. ```
  19.  
  20. **Short Description's String Formatting**
  21. 1. You arrive at `{room_name}`.
  22. 2. `{list_of_occupants}` are here.
  23. 3. You see `{list_of_exits}`.
  24.  
  25.  
  26. #### Long Desc
  27.  
  28. **Alley**
  29. ```
  30. a cramped alley
  31.  
  32. Return Description
  33. ------------------
  34. You see a cramped alley. This alley runs behind residential buildings. The spacing here is tight, leaving only enough room for two people to brush past each other.
  35. You see a cramped alley to the west, and a cramped alley to the east.
  36. a pile of gold coins, a pile of silver coins, and a stave lie upon the ground.
  37. Bob, Jerry, and Kate are here. This area is devoid of a crowd.
  38. ```
  39.  
  40. **Description Format**
  41. * `room_name` - `a cramped alley`
  42. * Return Description - What returns to the looker when looking at this room.
  43. 1. `You see <room_name>.`
  44. 2. Short generalized description of the room.
  45. 3. Short generalization of the room's activity status.
  46. 4. New line with `You see {list_of_exits}.`
  47. 5. New Line: `{list_of_items} lie upon the ground.`
  48. 6. New Line: `{list_of_occupants} are here. {crowd description}`
  49.  
  50. ```python
  51. string = f"{location_name}"
  52. if self.db.desc:
  53. string = f"{string} {self.db.desc}"
  54. if exits:
  55. string = f"{string}\n{exits_string}"
  56. if things:
  57. string = f"{string}\n {list_to_string(thing_strings)} |nlie upon the ground."
  58. if characters:
  59. string = f"{string}\n {list_to_string(characters)} {'is' if len(characters) == 1 else 'are'} here."
  60. if self.db.crowd and not characters:
  61. string = f"{string}\n {self.db.crowd_short_desc}"
  62. if self.db.crowd and characters:
  63. string = f"{string} {self.db.crowd_short_desc}"
  64.  
  65. return string
  66. ```
  67.  
  68.  
  69.  
  70. Examples of various floor types that could be utilized.
  71. `<adjective>` `<floor_type>` floor
  72.  
  73. **Floor Adjectives**
  74. make-shift
  75. highly-polished
  76. crumbling
  77. rocky
  78. slippery
  79. dirty
  80. rough
  81. solid
  82. smooth
  83. uneven
  84. filthy
  85. misshapen
  86. deformed
  87.  
  88. **Floor Types**
  89. wood
  90. marble
  91. stone
  92. dirt
  93. mud
  94. cobblestone
  95. tiled
  96. straw
  97.  
  98.  
  99.  
  100. Example sentences of how the floor could be presented within the appearance.
  101. **Sand**
  102. * The floor is comprised of white sand.
  103. * This floor is nothing but plain beach sand. You can occasionally spot little lifeforms crawling all over the pebbles and seashells.
  104. * This floor's pale-grey sand is dotted with dark patches.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement