From 471d2ecfc2a0375e2b1899cdc9ec9dac688d988e Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Sat, 6 Sep 2025 22:23:08 -0700 Subject: [PATCH] Fix the character list when looking at a room --- typeclasses/objects.py | 3 +- typeclasses/puppets.py | 1 + typeclasses/rooms.py | 18 ++- world/hints.yaml | 27 +++-- world/test-run.exp | 5 +- world/version1.ev | 268 +++++++++++++++++++++++++---------------- 6 files changed, 200 insertions(+), 122 deletions(-) diff --git a/typeclasses/objects.py b/typeclasses/objects.py index 9775386..0af38ae 100755 --- a/typeclasses/objects.py +++ b/typeclasses/objects.py @@ -33,8 +33,7 @@ class ObjectParent: take precedence. """ - appearance_template = """ -{desc} + appearance_template = """|/{desc} {exits} {characters} {things} diff --git a/typeclasses/puppets.py b/typeclasses/puppets.py index b24ae6e..ac9279a 100755 --- a/typeclasses/puppets.py +++ b/typeclasses/puppets.py @@ -81,6 +81,7 @@ class Puppet(Character, Listener): else: return self.db.desc_unpuppeted if self.db.desc_unpuppeted else self.db.desc + class CmdShrubSay(Command): """Erase and write on the shrub's chalkboard. """ diff --git a/typeclasses/rooms.py b/typeclasses/rooms.py index d3d9b86..8e7f443 100644 --- a/typeclasses/rooms.py +++ b/typeclasses/rooms.py @@ -35,7 +35,11 @@ def articlize_character(character, capitalize=False): else: article = "a" - logger.info(f"rooms: articlize_character({character})") + # Trim off any trailing periods that show up here. + if match(r".*\.$", character): + character = character[:-1] + + # logger.info(f"rooms: articlize_character({character})") if character == "" or match(r"^\|[A-z][A-Z]", character): return character elif match(r"^\|[A-z][aeiou]", character): @@ -44,6 +48,10 @@ def articlize_character(character, capitalize=False): return f"{article} " + character +def articlize_characters(characters): + return ", ".join([articlize_character(c) for c in characters]) + + def captialize_characters(characters): """ Capitalizes and prefixes an article on string of characters. @@ -51,7 +59,7 @@ def captialize_characters(characters): """ char_list = characters.split("\n") updated = [articlize_character(ch, True) for ch in char_list] - return "\n".join(updated) + return " " + ", ".join(updated) class Room(ObjectParent, ExtendedRoom, ContribRPRoom, Listener): @@ -124,7 +132,8 @@ class Room(ObjectParent, ExtendedRoom, ContribRPRoom, Listener): num_chars = len(vchars) char_list = iter_to_str( - char.get_display_name(looker, **kwargs) for char in vchars) + [articlize_character(char.get_display_name(looker, pose=True, **kwargs)) + for char in vchars]) # We add the word 'also' in case we showed there were objects: objs = self.contents_get(content_type="object") @@ -134,8 +143,7 @@ class Room(ObjectParent, ExtendedRoom, ContribRPRoom, Listener): also = '' if num_chars > 1: - return f"You {also}see the following characters:" + \ - captialize_characters(char_list) + return f"You {also}see the following characters: {char_list}." if num_chars > 0: character = char_list.strip() diff --git a/world/hints.yaml b/world/hints.yaml index 079beed..b0b0a73 100644 --- a/world/hints.yaml +++ b/world/hints.yaml @@ -11,13 +11,17 @@ grove_of_the_matriarchs: boulder_top: narrative: >- - A squirrel, looking for nuts within the vines that cascade over the - boulder, stops what it is doing to look up at you, and says, "{0}" + The squirrel opens her eyes and stares at you intently for some time. + She then looks up at you, and says, "{0}" hints: default: >- - How did you get up here? Mind grabbing some of these vines and - getting them out of my way? They make quite the rope mesh making - it hard to find my food. + Now that you are here, you should sit down an contemplate + the |Ymoss|n, the |Yivy|n, the |Ymushrooms|n, and all living beings. + moss: Please, |gsit|n down on that |gmoss|n. + ivy: As these vines can be used to bind us and others, so too, can our thoughts. + vines: Like these vines can be used to bind us, so too, can our thoughts. + mushrooms: >- + Beautiful and joyous creatures. Literally. They laugh when you pick them up. frog_meadow: narrative: >- @@ -139,10 +143,15 @@ shore: << mentions ^ says ^ croaks >>, "{0}" hints: default: >- - Are you looking for the palace beneath the waves? - You don't look like the sort of creature that can - travel under the water that far... at least, not - without the deep |Ykelp|n. + Are you looking for the palace beneath the waves? You don't look + like a |Ymermaid|n or the sort of creature that can travel under + the water that far... at least, not without the deep |Ykelp|n. + mermaids: >- + Those drama queens are always crying. Why do you think the sea + is so salty? Drying them, now that's a challenge. Only + |YTrampoli|n can do that. + trampoli: >- + Trampoli lives inland. I heard her house has legs! kelp: >- We call it deep kelp because it grows deep in the sea. Sure, sometimes it washes up on shore, but the last diff --git a/world/test-run.exp b/world/test-run.exp index 9b2e75d..25b74c9 100755 --- a/world/test-run.exp +++ b/world/test-run.exp @@ -192,7 +192,7 @@ expect { } send "look book\n" -expectit "The root from one of the colossal" +expectit "In a hollow recess underneath the boulder" send "look quill\n" expectit "The black feathered quill may once belonged to a raven" @@ -802,7 +802,7 @@ send "get teacup\n" expectit "You pick up a teacup." send "look teacup\n" -expectit "Teacup" +expectit "teacup" send "pour tea\n" expect -re "You pour some.*cup" @@ -826,6 +826,7 @@ expectit "A black iron sconce holding a single" send "look\n" expect -re "You notice.*sconce" +@desc here = Like the shadows that dance here, this oddly shaped room hugs its contents: a thick wooden framed |Ybed|n piled high with warm |Yblankets|n and fluffy |Ypillows|n, keep out the chill; a thick burgundy |Ycarpet|n sporting a pair of |Yslippers|n; and a |Ywardrobe|n decorated with ornate leaves and berries. send "get candle\n" expectit "You take the candle, but another magically appears in its place" diff --git a/world/version1.ev b/world/version1.ev index 677c145..9e09b3c 100644 --- a/world/version1.ev +++ b/world/version1.ev @@ -1,4 +1,4 @@ - +# Create an Avatar # The first character is special, as it can really /own/ the server. I don’t use it except to build the world, otherwise, I will puppet a creation. # An avatar in the original sense of a housing for a god-like entity. @@ -27,50 +27,47 @@ py self.db.pose = True pose looking awesome # Create an Avatar:4 ends here - +# The Grove of the Matriarchs # Rename the Limbo (or starting place) with the name *Grove of the Matriarchs*. Note the term =mp01= as a global label that matches my map. My original term for “forest” is too general, as it sounds like the place should be /named/ with some sort of title. -# [[file:../../../projects/mud.org::*The Forest][The Forest:1]] +# [[file:../../../projects/mud.org::*The Grove of the Matriarchs][The Grove of the Matriarchs:1]] @name here = Grove of the Matriarchs;mp01 -# The Forest:1 ends here +# The Grove of the Matriarchs:1 ends here # The description will take advantage of the /seasons/ and /times/ of the day: -# [[file:../../../projects/mud.org::*The Forest][The Forest:2]] -@desc here = A giant, moss-covered |Yboulder|n stands among immense |Ytrees|n that etch the sky and slice the clouds in the darkening twilightawakening dawnlazy afternoonnight sky. With the morning light, you can hear the dawn chorus of birdsThe afternoon breeze carries the buzzing of insects around giant colorful |Yflowers|nYou can't hear much now as most of the forest creatures are settling down for the nightIn the darkness, you can hear crickets and an occassional owl. A footpath winds around the giant, moss-covered tree roots to the East and West. To the south, a dock juts into a lavender sea. -# The Forest:2 ends here +# [[file:../../../projects/mud.org::*The Grove of the Matriarchs][The Grove of the Matriarchs:2]] +@desc here = A giant, moss-covered |Yboulder|n hides a |Yhollow recess|n as it stands among immense |Ytrees|n that etch the sky and slice the clouds in the darkening twilightawakening dawnlazy afternoonnight sky. With the morning light, you can hear the dawn chorus of birdsThe afternoon breeze carries the buzzing of insects around giant colorful |Yflowers|nYou can't hear much now as most of the forest creatures are settling down for the nightIn the darkness, you can hear crickets and an occassional owl. A footpath winds around the giant, moss-covered tree roots to the East and West. To the south, a dock juts into a lavender sea. +# The Grove of the Matriarchs:2 ends here # Need to add weather and time data to this: -# [[file:../../../projects/mud.org::*The Forest][The Forest:4]] +# [[file:../../../projects/mud.org::*The Grove of the Matriarchs][The Grove of the Matriarchs:4]] @update here = typeclasses.rooms_weather.TimeWeatherRoom -# The Forest:4 ends here +# The Grove of the Matriarchs:4 ends here # Derived from the original [[~/src/moss-n-puddles/.venv/lib/python3.12/site-packages/evennia/contrib/tutorials/tutorial_world/rooms.py][rooms.py]], but now stored in [[file:~/src/moss-n-puddles/typeclasses/rooms_weather.py][rooms_weather.py]]. -# Describe the trees: +# Describe the trees, flowers, and of course, the alcove: -# [[file:../../../projects/mud.org::*The Forest][The Forest:5]] + +# [[file:../../../projects/mud.org::*The Grove of the Matriarchs][The Grove of the Matriarchs:5]] @detail tree;trees = You feel dwarfed by colossal trees whose moss-covered roots are difficult to peer over. An occassional breeze often smells of flowers and at other times earthy. While the leafy canopy hides the sky, you certainly can |wfeel|n the weather. -# The Forest:5 ends here - - - -# And the flowers: - -# [[file:../../../projects/mud.org::*The Forest][The Forest:6]] +# @detail flower;flowers = Beautiful, but giant flowers look down on you and nod a friendly greeting. -# The Forest:6 ends here - +# +@detail hollow recess;recess;hollow;alcove = Underneath the boulder, you see a dry alcove full of mushrooms. On the largest, is a |Yleather-bound book|n. +# The Grove of the Matriarchs:5 ends here +# Puddle # With my name, I need to have an object to go with it. @@ -98,7 +95,7 @@ pose looking awesome @set puddle/get_err_msg = "As the water slips through your fingers, you realize the apt metaphor of attempting to grasp at your youth." # Puddle:3 ends here - +# Sticks # I will have a script auto generate the sticks on a regular basis, but for now, let’s just make one that I can drop. @@ -111,7 +108,7 @@ py timed_script = evennia.create_script(key="Create Sticks", attributes=[("destination", here)] ) # Sticks:1 ends here - +# Guest Book # Players can leave messages in this book. We’ll see how long I want to leave this. @@ -129,7 +126,7 @@ py timed_script = evennia.create_script(key="Create Sticks", # [[file:../../../projects/mud.org::*Guest Book][Guest Book:2]] -@desc guest book = The root from one of the colossal |Ytrees|n has erupted from the ground, forming a dry alcove that harbors a colony of mushroom caps. Jauntily perched on the largest of these, a leather-bound book, sports the title, |wGuest Book|n. Next to it, a feather |Yquill|n and an |Yink|n |Ywell|n invite you to read the register, and |gwrite|n a note for other travelers. +@desc guest book = In a hollow recess underneath the boulder, you find a leather-bound book entitled |wGuest Book|n perched atop a giant mushroom. Protected from the elements, this natural desk includes a feather |Yquill|n and an |Yink|n |Ywell|n inviting you to |gread|n and even |gwrite|n a note for other travelers. # Guest Book:2 ends here @@ -156,7 +153,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @detail well;ink well = The well appears to be little more than a depression on the back of the mushroom's cap. # Guest Book:4 ends here - +# Boulder # More details about the room that describes aspects of the boulder in the =desc= above. First, the symbol: # [[file:../../../projects/mud.org::*Boulder][Boulder:1]] @@ -230,7 +227,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @set boulder/traverse_msg = "You grab hold of some the |Yvines|n and ivy and pick your way up the boulder from one hold to another... Hrm, these vines would make a great rope." # Boulder:9 ends here - +# Lower Vines # In case they attempt to get vines here: # Let’s make a nice spot to sit down on: @@ -278,7 +275,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @set vines/push_msg = "That doesn't seem to do much." # Lower Vines:5 ends here - +# Top of Boulder # Let’s jump to the top of the boulder to proceed: @@ -318,7 +315,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @set climb/traverse_msg = "You crawl backwards, feeling with your foot for a hold. Got it! Then another one...hoping the vines and the moss' rhizoids hold..." # Top of Boulder:6 ends here - +# Moss # Let’s make a nice spot to sit down on: # [[file:../../../projects/mud.org::*Moss][Moss:1]] @@ -366,7 +363,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @set moss/pull_msg = "The moss is a bryophyte, and as such, has attached itself firmly to boulder by rhizoids. So pulling on it doesn't do much good." # Moss:6 ends here - +# Upper Vines # Let’s cover top of the boulder with rope-like vines. The vine can be a [[file:~/src/moss-n-puddles/typeclasses/consumables.py::class Producer(Object):][producer]] that makes ropes … needed to get into the hut. @@ -447,7 +444,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @set vines/push_msg = "You push the vines out of the way showing the rock boulder below. Perhaps you should |gget|n these and make something with them." # Upper Vines:9 ends here - +# Gigglecap Mushrooms # Part of the [[Potions and their Ingredients][Alchemist Path]], we use /gigglecaps/ to create a [[Laughing Potion]]. @@ -482,7 +479,36 @@ py timed_script = evennia.create_script(key="Create Sticks", @lock mushrooms = view:tag(alchemist) # Gigglecap Mushrooms:1 ends here +# Squirrel +# Currently, only here for hints … and a bit of a distraction. + +# [[file:../../../projects/mud.org::*Squirrel][Squirrel:1]] +@create/drop Squirrel;monk: typeclasses.puppets.Puppet +# +@desc squirrel = A handsome squirrel dressed in flowing orange robes. Sitting in quiet meditation on top of a compfortable patch of |Ymoss|n. +# +@set squirrel/gender = "female" +# +@set squirrel/pose_sleep = "deep in meditation" +# +@pose squirrel = deep in meditation +# Squirrel:1 ends here + +# [[file:../../../projects/mud.org::*Squirrel][Squirrel:2]] +@set me/arrive = "20 ;; emote briefly opens her eyes, nods an acknowledgement to you. ;; gm The small squirrel returns to her meditation." +# Squirrel:2 ends here + + + +# Ignore all talking. + + +# [[file:../../../projects/mud.org::*Squirrel][Squirrel:3]] +@set squirrel/say = "5 ;; gm The << small ^ robed ^ >> squirrel << opens her eyes ^ looks at {1} briefly ^ stares at {1} intently >> and << holds up an empty paw ^ places a paw on the moss ^ holds up a small flower ^ shakes its head ^ closes her eyes >>. ;; gm The << small ^ robed ^ >> squirrel << returns ^ goes back >> to her << meditation ^ reflection ^ rumination >>." +# Squirrel:3 ends here + +# Field # To the east, let’s make a nice meadow. Start at the Forest: # [[file:../../../projects/mud.org::*Field][Field:1]] @@ -566,7 +592,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @detail flowers;yellow flowers = "Aren't daffodils just flowers with big ol' schnozzes?" # Field:10 ends here - +# Waterfall # This is special, in that it should be hidden: @@ -601,7 +627,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @detail pool = A pool of cool, clear water. # Waterfall:5 ends here - +# Fizzy Water # The waterfall causes the water in the stream to be /fizzy/, to be part of the [[Potions and their Ingredients][Alchemist Path]] to create a [[Laughing Potion]]. @@ -623,7 +649,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @set stream/fill_msgs = ["$You() << $conj(get) ^ $conj(kneel) >> down, and $conj(fill) $pron(your) {2} with sparkling efforvesence.", "$You() << $conj(get) ^ $conj(kneel) >> down, and $conj(put) $pron(your) {2} in the cool water, filling it."] # Fizzy Water:1 ends here - +# Tickleweed # Part of the [[Potions and their Ingredients][Alchemist Path]], we use /tickleweed grass/ to create a [[Laughing Potion]]. @@ -656,7 +682,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @lock tickleweed = view:tag(alchemist) # Tickleweed:1 ends here - +# The Lair of the Beast # To create a place for our big, hairy beast to sleep, first jump to the Meadow: # [[file:../../../projects/mud.org::*The Lair of the Beast][The Lair of the Beast:1]] @@ -733,7 +759,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @set leave/traverse_msg = "You leave the dark cave and pass behind the waterfall for the meadow beyond." # The Lair of the Beast:9 ends here - +# Mattress # Create a mattress you can sit on (and maybe /push/ to get to a secret door): @@ -793,7 +819,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @set mattress/hidden_tag = "hidden_mattress" # Mattress:6 ends here - +# Dream Mushrooms # Part of the [[Potions and their Ingredients][Alchemist Path]], we use /dream mushrooms/ to create a [[Trippy Potion]]. # #+begin_quote @@ -824,7 +850,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @lock mushrooms = view:tag(alchemist) # Dream Mushrooms:1 ends here - +# Beast # And we create the Big, Hairy Beast: @@ -1017,7 +1043,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @set beast/pet_ecstatic_response = "While << excited ^ ecstatic ^ squirmy >>, the << big, ^ huge, ^ large, ^ tremendous, ^ >> << hairy ^ slobbery ^ horned ^ clawed ^ >> << brute ^ beast ^ monster>> << lays ^ gets >> down so $you() can << pet ^ scratch >> << the top of its head ^ the back of its neck ^ its nose ^ the sides of its face >>. It closes its eyes and purrs. ;; << The squirmy little devil. ^ >> $conj(You) << can ^ >> << barely ^ hardly >> scratch the << nose ^ ears ^ neck ^ top of the head >> of the << big, ^ huge, ^ large, ^ tremendous, ^ >> << hairy ^ slobbery ^ horned ^ clawed ^ >> << brute ^ beast ^ monster>> as it << squirms around ^ wriggles it backend >>. It << can hardly ^ can't >> contain its excitement. ;; The << big, ^ huge, ^ large, ^ tremendous, ^ >> << hairy ^ slobbery ^ horned ^ clawed ^ >> << brute ^ beast ^ monster>> wriggles around before << flopping ^ rolling >> over << in the grass ^>> as $you() $conj(give) it belly rubs. ;; The << big, ^ huge, ^ large, ^ tremendous, ^ >> << hairy ^ slobbery ^ horned ^ clawed ^ >> << brute ^ beast ^ monster>> wriggles and squirms excitedly before it << flops ^ rolls >> over << in the grass ^>> as $you() $conj(rub) its belly." # Beast:20 ends here - +# Mellow Marsh # The river from the [[Field]] flows into a marsh: @@ -1120,7 +1146,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @detail mud = Pretty brown and sticky. # Mellow Marsh:15 ends here - +# Muddy Water # As a future idea of making potions, we can collect /muddy water/, which needs to be turned to wine. @@ -1142,7 +1168,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @set river/fill_msgs = ["$You() << $conj(get) ^ $conj(kneel) >> down, and $conj(fill) $pron(your) {2} with the muddy water."] # Muddy Water:1 ends here - +# Purple Heron # Create a puppet of the bird hunting frogs and pixies. :-D @@ -1223,7 +1249,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @script heron = typeclasses.scripts.Muttering # Purple Heron:8 ends here - +# Ten-foot Poles # The reed can be a [[file:~/src/moss-n-puddles/typeclasses/consumables.py::class Producer(Object):][producer]] that makes ten foot poles … needed to get into the hut. @@ -1280,7 +1306,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @set reeds/make_amount = 1 # Ten-foot Poles:8 ends here - +# Pixie Dust # Part of the [[Potions and their Ingredients][Alchemist Path]], we use /pixie dust/ to create a [[Trippy Potion]]. # We put this quote in the book: @@ -1312,6 +1338,9 @@ py timed_script = evennia.create_script(key="Create Sticks", @lock pixie dust = view:tag(alchemist) # Pixie Dust:1 ends here +# Trampoli’s Hut on Stilts + + # [[file:../../../projects/mud.org::*Trampoli’s Hut on Stilts][Trampoli’s Hut on Stilts:1]] @teleport mp08 # @@ -1412,14 +1441,14 @@ py timed_script = evennia.create_script(key="Create Sticks", @teleport/tonone rope-bound hut # Trampoli’s Hut on Stilts:12 ends here - +# Inside Trampoli’s Hut # Let’s go inside to decorate: # [[file:../../../projects/mud.org::*Inside Trampoli’s Hut][Inside Trampoli’s Hut:1]] @teleport mp09 # -@desc here = A homey room cluttered with drying |Yherbs|n, |Yjars|n of preserves, and natural made |Ytalismans|n. Even the table and chairs, covered in jars, bags and boxes, indicate the owner doesn't entertain much. Stairs lead up to a spacious loft with a bed. +@desc here = A homey room cluttered with drying |Yherbs|n, |Yjars|n of preserves, and natural made |Ytalismans|n. Even the table and chairs, covered in jars, |Ybags|n and boxes, indicate the owner doesn't entertain much. Stairs lead up to a spacious loft with a bed. # Inside Trampoli’s Hut:1 ends here @@ -1448,7 +1477,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @detail jars = Sealed jars of fruits, vegetables, herbs and spices. # Inside Trampoli’s Hut:5 ends here - +# Jars # Every time we look at a jar, we see something else … that we can’t take. This creates ambiance without adding too much complexity? @@ -1490,7 +1519,6 @@ py timed_script = evennia.create_script(key="Create Sticks", # [[file:../../../projects/mud.org::*Jars][Jars:4]] @set jars/descs = ( "Dragon's Breath|n. A swirling mist of iridescent smoke that changes color, said to contain the essence of fire.", - "Mermaid Tears|n. Clear, crystalline droplets that shimmer with a hint of blue, believed to bring good fortune.", "Phoenix Ashes|n. A small jar filled with fine, red and gold ash, said to have the power of rebirth.", "Enchanted Rose Petals|n. Dried petals that change color with the phases of the moon, said to attract love.", "Eye of Newt|n. Filled with many small eyeballs.", @@ -1508,7 +1536,7 @@ py timed_script = evennia.create_script(key="Create Sticks", ) # Jars:4 ends here - +# Herbs # Like the [[*Jars][Jars]], the herbs return a different response each time they are viewed. @@ -1565,7 +1593,40 @@ py timed_script = evennia.create_script(key="Create Sticks", ) # Herbs:4 ends here +# Bag of Mermaid Tears + +# [[file:../../../projects/mud.org::*Bag of Mermaid Tears][Bag of Mermaid Tears:1]] +@create/drop couple of bags of dried Mermaid Tears;bags;bag: typeclasses.consumables.Producer +# Bag of Mermaid Tears:1 ends here + + + +# With a description: + +# [[file:../../../projects/mud.org::*Bag of Mermaid Tears][Bag of Mermaid Tears:2]] +@desc bags = The bags, tied with a string, has a paper tag that reads |wMermaid Tears, dried.|n. The back of the tag has a note, |wIf I have to listen to another sob story about a clueless prince who just doesn't understand...|n +# Bag of Mermaid Tears:2 ends here + + + +# We have to have the bush describe what it /makes/: + +# [[file:../../../projects/mud.org::*Bag of Mermaid Tears][Bag of Mermaid Tears:3]] +@set bags/make_name = "bag" +# +@set bags/make_verb = "$conj(pick up) a" +# +@set bags/make_class = "typeclasses.consumables.Herb" +# +@set bags/make_desc = "A burlap bag, full of clear, crystalline droplets that shimmer with a hint of blue." +# +@set bags/make_amount = 1 +# +@lock bags = view:tag(alchemist) +# Bag of Mermaid Tears:3 ends here + +# Talismans # To give some character, we create some interesting art that decorates this hut. @@ -1573,7 +1634,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @detail talismans;talisman = A wood |Ycarving|n, a painted |Yskull|n, and curiously shaped |Ysculpture|n made from bundles of reeds, give the impression of inducing luck while showing a level of respect for the land. # Talismans:1 ends here - +# Horned Wolf Skull # For each talisman, we could create an object, but it wouldn’t be able to be taken, and instead of “can’t find skull”, we could give a better error message. @@ -1591,7 +1652,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @lock skull = view:tag(hidden_wolf_skull) # Horned Wolf Skull:1 ends here - +# Demon Carving # Perhaps the carving is actually the maid or something that could give hints. @@ -1609,7 +1670,7 @@ py timed_script = evennia.create_script(key="Create Sticks", @lock carving = view:tag(hidden_demon_carving) # Demon Carving:1 ends here - +# Reed Sculpture # The reeds should give a subtle hint to something that could be /spoken/ aloud. @@ -1643,7 +1704,7 @@ py timed_script = evennia.create_script(key="Create Horns", attributes=[("destination", here)] ) # Reed Sculpture:3 ends here - +# Torches # The reed can be a [[file:~/src/moss-n-puddles/typeclasses/consumables.py::class Producer(Object):][producer]] that makes ten foot poles … needed to get into the hut. @@ -1712,7 +1773,7 @@ py timed_script = evennia.create_script(key="Create Horns", @set bucket/make_amount = 1 # Torches:8 ends here - +# Trampoli the Witch # Create a puppet of the lady that owns the hut. @@ -1771,7 +1832,7 @@ py timed_script = evennia.create_script(key="Create Horns", @set old lady/arrive = "45 ;; gm You hear someone in the loft up the stairs stirring in their bed. ;; 55 ;; pose looking confused ;; emote The /me wakes up and says, \"What's all this then?\" ;; 5 ;; say Who are you, dearie? ;; 10 ;; say I'd think I have an intruder in my home! ;; 1 ;; emote grabs her broom and with a sweeping motion from the stairs, sends her intruder flying out the door! ;; teleport {3} = Mellow Marsh ;; 3 ;; gm/#457 You hear a voice coming from the hut, \"Scat!\" ;; emote heads up the stairs to bed. ;; pose sleeping in a bed up in the loft" # Trampoli the Witch:8 ends here - +# Lazy Dock # The dock leads out into a strange sea. The break in the trees lets you see the sky. Looks like a nice place to relax. # Return to the Forest: @@ -1849,7 +1910,7 @@ Someone has set a nice |Ychair|n for viewing. @desc north = This path leads into the forest of collosal trees. # Lazy Dock:9 ends here - +# Lavender Sea # We’ll get ready for making potions by allowing one to collect water from _all_ the places, like the salty sea: @@ -1871,7 +1932,7 @@ Someone has set a nice |Ychair|n for viewing. @set sea/fill_msgs = ["$You() $conj(reach) down from the dock, and $conj(fill) $pron(your) {2} with the << salty ^ lavender ^ fragrant >> water."] # Lavender Sea:1 ends here - +# Chair # A nice chair to sit on the dock by the bay, watching the clouds as they drift away. # [[file:../../../projects/mud.org::*Chair][Chair:1]] @@ -1896,7 +1957,7 @@ Someone has set a nice |Ychair|n for viewing. @set chair/get_err_msg = "It's way too heavy for you to lift." # Chair:3 ends here - +# Fishing Pole # It we are going to sit on a chair by the dock, why not go fishing? # [[file:../../../projects/mud.org::*Fishing Pole][Fishing Pole:1]] @@ -1930,7 +1991,7 @@ Someone has set a nice |Ychair|n for viewing. @detail hook;bait = One of those shiny lures, made from gold coins. Curiouser. Seems you don't need to bait this hook. # Fishing Pole:5 ends here - +# Sign # Need to make the fishing pole “stay” at the Dock. Maybe with a message about sticking around for the next person. @@ -1964,7 +2025,7 @@ Someone has set a nice |Ychair|n for viewing. @set sign/get_err_msg = "This granny knot holding the sign to the chair is serious. You can't take it." # Sign:4 ends here - +# Sandy Shore # Could we extend the sea from the [[file:mud.org::*The Dock][The Dock]] down a shore: @@ -2036,7 +2097,7 @@ Someone has set a nice |Ychair|n for viewing. @detail shack = Standing crookedly at the edge of the sandy shore, this shack's weathered planks, bleached by the salty mist, imparts a ghostly appearance. The roof, adorned with seashells and driftwood, appears to be a patchwork of nature's treasures, inviting curious souls to uncover the secrets hidden within. # Sandy Shore:8 ends here - +# Sand # Part of the [[Potions and their Ingredients][Alchemist Path]], we use sand as an ingredient in a potion we want to make. @@ -2054,7 +2115,7 @@ Someone has set a nice |Ychair|n for viewing. @lock sand = view:tag(hidden_sand) # Sand:1 ends here - +# Pine Flowers # Part of the [[Potions and their Ingredients][Alchemist Path]], we use /pine flowers/ to create a potion TBD, and feed the stoat in Dabbler’s House. @@ -2074,7 +2135,7 @@ Someone has set a nice |Ychair|n for viewing. @lock pine = view:tag(alchemist) # We want the user to be able to "look pine" as a detail? # Pine Flowers:1 ends here - +# Sign # We make the sign as an “object” for others to read: @@ -2088,7 +2149,7 @@ Someone has set a nice |Ychair|n for viewing. @lock sign = get:false() # Sign:1 ends here - +# Salty Shack # Let’s keep this pretty empty. @@ -2142,7 +2203,7 @@ Someone has set a nice |Ychair|n for viewing. @set door/traverse_msg = "You open the door and step out on the sand, closing the door behind you." # Salty Shack:5 ends here - +# Grotto # Return to the forest: @@ -2235,7 +2296,7 @@ Someone has set a nice |Ychair|n for viewing. @detail fern;ferns = Sword ferns rattling sabers against the wards from the Maiden Hairs' flailing their fronds. # Grotto:11 ends here - +# Berry Bush # The berry bush is a [[file:~/src/moss-n-puddles/typeclasses/consumables.py::class Producer(Object):][producer]] that makes /berries/, which is something to eat and use to feed the wildlife. @@ -2323,7 +2384,7 @@ Someone has set a nice |Ychair|n for viewing. #"Those were <>." # Berry Bush:12 ends here - +# Spring Water # Part of the [[Potions and their Ingredients][Alchemist Path]], we use spring water to create a [[Trippy Potion]]. @@ -2345,7 +2406,7 @@ Someone has set a nice |Ychair|n for viewing. @set stream/fill_msgs = ["$You() << $conj(get) ^ $conj(kneel) >> down, and $conj(fill) $pron(your) {2} with the << spring ^ fresh ^ refreshing >> water.", "$You() << $conj(get) ^ $conj(kneel) >> down, and $conj(put) $pron(your) {2} in the cool water, filling it."] # Spring Water:1 ends here - +# Knocker # The knocker has the ability to make the door “open” using [[https://www.evennia.com/docs/latest/api/evennia.objects.objects.html][on_traverse]] hooks? # Most of the work of the /knocker/ is in the Python code: @@ -2416,7 +2477,7 @@ Someone has set a nice |Ychair|n for viewing. @set here/knock_err_msg = "This door knocker is defective, as it doesn't have a ring to...er, do the knockin'." # Knocker:8 ends here - +# Ring # Since we can remove the ring, let’s create it: @@ -2433,7 +2494,7 @@ Someone has set a nice |Ychair|n for viewing. # Ring:2 ends here - +# ]] # And a description: # [[file:../../../projects/mud.org::*Ring][Ring:3]] @@ -2478,7 +2539,7 @@ Someone has set a nice |Ychair|n for viewing. @teleport/quiet ring = knocker # Ring:7 ends here - +# Cozy House # Add the Python /special-ness/ for [[file:~/src/moss-n-puddles/typeclasses/rooms.py::class DabblersRoom(Room):][this room]]: @@ -2486,7 +2547,7 @@ Someone has set a nice |Ychair|n for viewing. @dig Cozy House;mp03: typeclasses.rooms.DabblersRoom = red door;door;inside,outside;leave # Cozy House:1 ends here - +# Red Door # The door description should match the artwork on the website: # [[file:../../../projects/mud.org::*Red Door][Red Door:1]] @@ -2525,7 +2586,7 @@ Someone has set a nice |Ychair|n for viewing. @set door/hidden_tag = "hidden_knocker" # Red Door:5 ends here - +# Inside # Fix the inside of the “House”: @@ -2596,7 +2657,7 @@ Someone has set a nice |Ychair|n for viewing. @set here/arrive = "45 ;; gm The rain << patters ^ chatters ^ drums >> against a window << sill ^ pane >>. Nice to be << indoors ^ inside >>." # Inside:6 ends here - +# Tapestry Story # The tapestry should tell our /creation myth/. # [[file:../../../projects/mud.org::*Tapestry Story][Tapestry Story:1]] @@ -2615,7 +2676,7 @@ Someone has set a nice |Ychair|n for viewing. @detail whispering = This curious aspect in the |Ytapestry|n seems ... odd. # Tapestry Story:1 ends here - +# Fireplace # And a fire in the fireplace is a type of /pet/, since we can feed it: # [[file:../../../projects/mud.org::*Fireplace][Fireplace:1]] @@ -2661,7 +2722,7 @@ Someone has set a nice |Ychair|n for viewing. @detail picture = Above the |Yfireplace|n is a large, somewhat abstract |Ypainting|n stretching its arm-like branches with shadowing that looks like a yawn. # Fireplace:6 ends here - +# Wood Rack # Need a way to produce wood for the fireplace. @@ -2736,7 +2797,7 @@ Someone has set a nice |Ychair|n for viewing. @lock wood rack = view:tag(hidden_woodrack) # Wood Rack:9 ends here - +# Knickknacks # What sort of non-books do we want to look at? @@ -2755,7 +2816,7 @@ Someone has set a nice |Ychair|n for viewing. @set trinkets/get_err_msg = "While interesting, perhaps you shouldn't steal Dabbler's personal collection." # Knickknacks:2 ends here - +# Magic 8 Ball # One trinket we might create to give to people as a souvenir. @@ -2785,7 +2846,7 @@ Someone has set a nice |Ychair|n for viewing. drop ball # Magic 8 Ball:3 ends here - +# Bookshelf # Since we mentioned shelves of books, we should create a Producer that makes a random book. @@ -2802,7 +2863,7 @@ drop ball @desc books = Shelves at various angles embellish the walls of this small, cozy room. Leatherbound books weigh down each shelf, while some stacks of books support other shelves. # Bookshelf:2 ends here - +# Chairs # And [[file:~/src/moss-n-puddles/typeclasses/sittables.py::class Sittables(Sittable):][the chairs]] is a /plural/ location to sit, allowing anyone to sit down. @@ -2848,7 +2909,7 @@ drop ball @set chairs/extra = "This feels << ^ very ^ quite>> <>.|n" # Chairs:5 ends here - +# Character: Dabbler # My characters should be NPCs, so they can stick around if I’m not logged in. @@ -2913,7 +2974,7 @@ pose gnome/default = smoking his pipe @give teacup = gnome # Character: Dabbler:8 ends here - +# Staff # And my staff: @@ -2938,7 +2999,7 @@ pose gnome/default = smoking his pipe @set gnome/magic_msg = "$You() << $conj(strike) ^ $conj(tap) ^ $conj(hit) ^ $conj(whack) >> the << floor ^ ground >> with $pron(your) << gnarled ^ old ^ magic ^ >> staff. ;; << Sparks ^ Colored lights ^ Flashes ^ Flares >> of |moctarine|n << appear ^ emerge ^ materialize >> as << the ^ >> magic << coalesces ^ blends >>..." # Staff:2 ends here - +# Pipe # The pipe is little more than messages to the smoker and everyone else in the room. @@ -2957,7 +3018,7 @@ pose gnome/default = smoking his pipe @give pipe = gnome # Pipe:2 ends here - +# Journal # The pipe is little more than messages to the smoker and everyone else in the room. @@ -2987,7 +3048,7 @@ pose gnome/default = smoking his pipe @give journal = gnome # Journal:3 ends here - +# Stoat # Need an interesting creature that likes to sleep by the fire, and perhaps give hints to the workings inside. # - feed :: ignores all food. @@ -3157,7 +3218,7 @@ pose gnome/default = smoking his pipe # @set stoat/sit = "3 ;; gm A sleeping << wee ^ >> beastie, opens one curious eye to see who arrived." # Stoat:18 ends here - +# Kitchen # Better place to put the tea and scones. @@ -3217,7 +3278,7 @@ pose gnome/default = smoking his pipe @detail scone;scones = A scones look tempting. Perhaps no one will miss one... # Kitchen:7 ends here - +# Cabinets and Counter-tops # The Trolley [[file:~/src/moss-n-puddles/typeclasses/consumables.py::class Producer(Object):][produces]] teacups and random scones, which, like the [[Berry Trolley][berries]] can be eaten or fed to the wildlife. @@ -3241,7 +3302,7 @@ pose gnome/default = smoking his pipe py here.search("cabinet").do_bake() # Cabinets and Counter-tops:3 ends here - +# Tea Service # The “room” gives the teacups, and the “teapot” fills the cups, so we just need descriptions: @@ -3272,7 +3333,7 @@ py here.search("cabinet").do_bake() @set teapot/get_err_msg = "You don't need to carry it around to make tea." # Tea Service:3 ends here - +# Secret Room # Pulling on a candle opens a secret staircase! @@ -3293,7 +3354,7 @@ py here.search("cabinet").do_bake() @set stairs/traverse_msg = "You carefully creep down the stairs behind the bookcase, lit by the candle in its holder. You hear the bookcase shut behind you." # Secret Room:2 ends here - +# Sconce # The Candle holder must be both an Opener (with a =do_pull= method) and a Producer (making long-lasting candles). @@ -3372,7 +3433,7 @@ py here.search("cabinet").do_bake() @set sconce/make_amount = 1 # Sconce:9 ends here - +# Pulling Sconce # Temporarily move the exit into the room. @@ -3389,7 +3450,7 @@ py here.search("cabinet").do_bake() @teleport/tonone stairs behind bookcase # Pulling Sconce:2 ends here - +# Inside the Secret Room # Time to create the secret lab, the *Secret Room*. @@ -3449,7 +3510,7 @@ py here.search("cabinet").do_bake() @detail tools = A set of finely crafted tools lies neatly arranged on a velvet cloth: a pair of tweezers for handling delicate ingredients, a small scalpel for precise cutting, and a set of measuring spoons made from silver, each engraved with different symbols representing the elements. # Inside the Secret Room:8 ends here - +# Jars # Can jars be a producer that returns a random jar with a “content”? # Every time we look at a jar, we see something else … that we can’t take. This creates ambiance without adding too much complexity? @@ -3498,7 +3559,6 @@ py here.search("cabinet").do_bake() "Moonstone Crystals|n. Iridescent stones that glow softly in the dark, casting a gentle light.", "Bottled Lightning|n. A swirling blue liquid that crackles with energy, contained within a glass jar.", "Dragon Scale Powder|n. A fine, metallic powder that shifts colors with the light, reminiscent of dragon scales.", - "Mermaid Tears|n. Tiny, glistening droplets that resemble diamonds, each one capturing a moment of sorrow.", "Essence of Shadow|n. A dark, swirling liquid that seems to absorb light, creating an eerie atmosphere.", "Shadow Essence|n. A dark, swirling liquid that absorbs light, said to grant invisibility.", "Starflower Petals|n. Delicate, translucent petals that shimmer like the night sky, layered in a glass jar.", @@ -3516,7 +3576,7 @@ py here.search("cabinet").do_bake() ) # Jars:4 ends here - +# Stool # A stool to sit while working # [[file:../../../projects/mud.org::*Stool][Stool:1]] @@ -3547,7 +3607,7 @@ py here.search("cabinet").do_bake() @set stool/get_err_msg = "Stop trying to steal everything not nailed down." # Stool:4 ends here - +# Grimoire # A mystic book of potions can add a new dimension to the game. @@ -3596,7 +3656,7 @@ py here.search("cabinet").do_bake() @set grimoire/prefix = "Undoing the brass clasp that bind the old leather book, you open to page one and begin reading the elegant calligraphy..." # Grimoire:5 ends here - +# Cauldron # The cauldron should have a special =look= so a character knows what ingredients they added, and the follow commands: # - =empty= … the imp will empty the contents @@ -3630,7 +3690,7 @@ py here.search("cabinet").do_bake() @lock cauldron = get:false() # Cauldron:3 ends here - +# Shelf of Bottles # The table is a producer of /bottles/. @@ -3669,7 +3729,7 @@ py here.search("cabinet").do_bake() @set shelf/make_amount = 1 # Shelf of Bottles:4 ends here - +# Imp # Every secret alchemical lab should have an Imp familiar. @@ -3712,7 +3772,7 @@ py bt = self.search('imp'); bt.sdesc.add('imp'); bt.db.pose = 'sitting on an orn -# When any one arrives, we assume that they are no longer a beginner, and have /graduated/ to see things in a different way, and the tag, =alchemist= is used as a view lock on all the ingredients. +# When any one arrives, we assume that they are no longer a beginner, and have /graduated/ to see the world in a different way, and we use the tag, =alchemist= as a view lock on all the ingredients. # [[file:../../../projects/mud.org::*Imp][Imp:7]] @@ -3728,7 +3788,7 @@ py bt = self.search('imp'); bt.sdesc.add('imp'); bt.db.pose = 'sitting on an orn @set imp/say = "1 ;; emote << nods ^ looks at you quizically ^ stares at you curiously ^ shrugs ^ investigates its fingerclaws ^ winks ^ smirks ^ raises an eyebrow ... well, if it had one, it would ^ stares at you ^ squints its eyes >>." # Imp:8 ends here - +# Bedroom # A bedroom with a wardrobe that goes to another land sounds great. @@ -3800,7 +3860,7 @@ py bt = self.search('imp'); bt.sdesc.add('imp'); bt.db.pose = 'sitting on an orn @set slippers/tethered_msg = "The slippers are having none of this adventuring outside of this cozy room, and walk back to the side of the bed." # Bedroom:6 ends here - +# Wardrobe # One needs to open it to go to another world. @@ -3870,7 +3930,7 @@ py bt = self.search('imp'); bt.sdesc.add('imp'); bt.db.pose = 'sitting on an orn @set wardrobe/get_err_msg = "The wardrobe is way too big to lift." # Wardrobe:6 ends here - +# Southwest Prairie # What am I doing here? @@ -3904,7 +3964,7 @@ py bt = self.search('imp'); bt.sdesc.add('imp'); bt.db.pose = 'sitting on an orn @detail campfire;fire = Only a thin wisp of smoke escapes to the skies; fragrating the air. # Southwest Prairie:3 ends here - +# Mare’s Head # Taken from [[https://en.wikipedia.org/wiki/Mare%27s_Head][Wikipedia]]. @@ -3966,10 +4026,10 @@ py bt = self.search('head'); bt.sdesc.add('curious figure'); bt.db.pose = 'sitti # [[file:../../../projects/mud.org::*Mare’s Head][Mare’s Head:8]] -@set mares head/say = "3 ;; emote << nods ^ shakes it head...er, skull ^ looks at you with its empty eye sockets ^ shrugs ^ pokes the fire with a stick ^ raises an eyebrow ... well, if it had one, it would ^ shifts from his log seat. As it does, its black cloak billows ^ squints its eyes ^ A fuzzy ear on the skull of the /me twitches >>." +@set mares head/say = "3 ;; emote << nods ^ shakes it head...er, skull ^ looks at you with its empty eye sockets ^ shrugs ^ pokes the fire with a stick ^ raises an eyebrow ... well, if it had one, it would ^ shifts from his log seat. As it does, its black cloak billows ^ squints its eyes...er, eye sockets? Best not think about it ^ A fuzzy ear on the skull of the /me twitches >>." # Mare’s Head:8 ends here - +# Pull up a Log # Let’s allow anyone here to sit on a log next to the campfire .. @@ -4006,7 +4066,7 @@ py bt = self.search('head'); bt.sdesc.add('curious figure'); bt.db.pose = 'sitti @set log/singular = "the log next to the campfire" # Pull up a Log:4 ends here - +# Bugs # And now that we are done, say it: