From f8a7f46fa05fcba89c2cbbd0bd6163f34994aae5 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Mon, 20 Apr 2026 20:36:07 -0700 Subject: [PATCH] Hints for the Glittering Glade --- commands/everyone.py | 5 +- typeclasses/tutorial.py | 7 +- world/hints.yaml | 32 ++++++++ world/test-run.exp | 10 ++- world/version1.ev | 165 +++++++++++++++++++++++++++++----------- 5 files changed, 166 insertions(+), 53 deletions(-) diff --git a/commands/everyone.py b/commands/everyone.py index 0283e80..fb71fe9 100755 --- a/commands/everyone.py +++ b/commands/everyone.py @@ -283,7 +283,10 @@ class CmdRead(Command): targets = reader.search(readable_str, quiet=True) if not targets: - reader.msg(f"You don't see {readable_str}.") + if reader.location.details and reader.location.get(readable_str): + reader.msg(f"You can't read {readable_str}.") + else: + reader.msg(f"You don't see {readable_str}.") return None label_targets = [t for t in targets if t.db.inside] diff --git a/typeclasses/tutorial.py b/typeclasses/tutorial.py index 82cbf55..d1f10f0 100755 --- a/typeclasses/tutorial.py +++ b/typeclasses/tutorial.py @@ -32,8 +32,9 @@ MSGS = { ], "LOOKAT": [ '"You seem to be getting the hang of this game," chirps the bird. "The game highlights some words, like |Yboulder|n, in yellow. This hints that you should look more closely at them. Also, you can |winteract|n with objects following the line: "You notice"', - "The bird continues, \"When you typed |glook|n before, you noticed exits. These are directions or places you can go. For instance, if you type |gsouth|n (or just |gs|n as a shortcut), you can check out the sea where you can catch obnoxious fish.\"", - "\"The path to the |geast|n is the meadow of the BHB, the Big Hairy Beast,\" the little bird on your shoulder says. \"It's adorable if you can find it. The path to the |gwest|n leads to Dabbler's place.\"", + "The bird continues, \"When you typed |glook|n before, you noticed exits. These are directions or places you can go. For instance, if you type |geast|n (or just |ge|n as a shortcut), we can follow a path to a meadow where you might encounter the BHB, the Big Hairy Beast.\"", + "\"It's adorable,\" the little bird on your shoulder says, \"So type |geast|n to follow the path there.\"", + # "\"It's adorable,\" the little bird on your shoulder says. \"The path to the |gwest|n leads to Dabbler's place, and to the |gsouth|n, you can check out the sea where you can catch obnoxious fish.\"", "\"Yes, I could fly myself,\" warbles the little bird, \"but I'm trying to help you get around.\"", "The bird looks at you expectantly.", "\"Shall we explore other places?\" asks the bird on your shoulder.", @@ -54,7 +55,7 @@ MSGS = { "Another useful command is |gpub|n which is a shortcut to sending messages to a public channel that everyone in the game receives |wout of character|n. That is, the message comes from your login account, not your character. The dad jokes go there without interrupting the role playing.", "The bird says, \"Typing |ghelp|n gives you a list of commands. That list changes depending on where you are and what you are carrying. For instance, you could type |gshoo|n for me to fly away, and then that command wouldn't be available again.\"", "The bird chirps, \"You can learn more about the individual commands. For instance, type |ghelp emote|n and you can see more options to that command. You can also see new commands, like |ghelp get|n.\"", - "\"If you get stuck solving a puzzle,\" it says, \"Check out |ghint|n, but type |ghelp hint|n first.\"" + "\"If you get stuck solving a puzzle,\" it says, \"Type |ghint|n, but type |ghelp hint|n to learn about it first.\"" "\"Type |ghelp start|n for a repeat of much of what we've talked about,\" says the bird.", "The bird says, \"Hrm. What else? The |ginv|n shows you what you are carrying. I see you picked up a letter. You can also type |gread letter|n.\"", "\"Since this game hosts many users,\" says the bird, \"you can show them what they see when they look at you, using the |gsetdesc|n command. Check out the help on it as well as |gsdesc|n and |gpose|n.", diff --git a/world/hints.yaml b/world/hints.yaml index b0b0a73..5c915fd 100644 --- a/world/hints.yaml +++ b/world/hints.yaml @@ -69,6 +69,38 @@ lair: Dust|n sign or something. |/|/Of course I will install a secret door here, but not yet. +glittering_glade: + narrative: >- + << Bubba Joe Washington ^ That cockatiel >> returns, and perches on your shoulder, + "Heya," it chirps. "<< Stuck on this puzzle? ^ >> Here's a << bit of ^ >> a hint. {0} Good luck << , again ^ >>." It flies off. + ;; + A << yellow ^ orange ^ large ^ >> butterfly lands on your + shoulder. "You look like you << could use some ^ need ^ would like + some >> help," it says, "{0}" As it flies away, it says, "Good + luck!" ;; + hints: + default: >- + To get through that |Ydoor|n, you'll need to figure out the |Ypassword|n. + password: >- + Don't abandon hope. The |Ytable|n contains a |Yriddle|n. + Don't forget to |glook|n at the |Yrunes|n around the outside. + table: >- + You could |gread|n the message in the middle of the table. + That is a good ol' fashion |Yriddle|n. + The answer to the riddle, is the |Ypassword|n. + Don't forget to |glook|n at the |Yrunes|n around the outside. + riddle: + You've |gread|n the message in the middle of the table, right? + Do you want the |Yanswer|n? + runes: >- + Those unreadable runes hint at the answer to the |Yriddle|n + you can see in the message in the middle of the |Ytable|n. + Think about combining two elements to get the answer. + door: >- + That door leads to |wWyldwood Tavern|n... + A lovely place that serves fascinating cocktails. + answer: mud + mellow_marsh: narrative: >- The << purple ^ large ^ >> heron diff --git a/world/test-run.exp b/world/test-run.exp index 948fda0..e1b504e 100755 --- a/world/test-run.exp +++ b/world/test-run.exp @@ -46,13 +46,13 @@ if {$there eq "there"} { expectit "enclose it in quotes" if {$create eq "true"} { - send "create robby backinqa\n" + send "create rob backinqa\n" expectit "Is this what you intended?" send "y\n" expectit "You can now log with the command" } -send "connect robby backinqa\n" +send "connect rob backinqa\n" if {$create eq "true"} { expectit "begin creating your character" @@ -414,6 +414,9 @@ expectit "Glittering Glade" send "get table\n" expectit "too big" +send "hint\n" +expectit "So try to talk to it." + send "blue door\n" expectit "The door seems locked" @@ -1026,7 +1029,8 @@ expectit "Grove of the Matriarchs" send "climb boulder\n" expectit "Boulder Top" -send "look mushrooms\n" +send "look mshrooms\n" + expectit "A vibrant patch of mushrooms bursts forth like a painter's palette, each cap shimmering with iridescent hues of violet, emerald, and gold" send "get mushroom\n" diff --git a/world/version1.ev b/world/version1.ev index 7b6a38b..37788f6 100644 --- a/world/version1.ev +++ b/world/version1.ev @@ -1163,7 +1163,7 @@ py me.search("squirrel").backstory("squirrel") # [[file:../../../projects/mud.org::*Stone Table][Stone Table:2]] -@desc table = Moss fills four |Yrunes|n carved along the edge of this weathered table. In the center, you can read a message:|/|/ Born of rain and earth combined,|/ No solid form, yet firm when dried.|/ Clinging to feet. Adored by boar.|/ Speak my name to open the door. +@desc table = Moss fills four |Yrunes|n carved along the edge of this weathered table. In the center, you can read a message:|/|/ Born of rain and ground combined,|/ No solid form, yet firm when dried.|/ Clinging to feet. Adored by boar.|/ Speak my name to open the door. # Stone Table:2 ends here @@ -1171,28 +1171,28 @@ py me.search("squirrel").backstory("squirrel") # And some flavor that offers a hint to the answer of the riddle, to combine Water and Earth: -# [[file:../../../projects/mud.org::*Stone Table][Stone Table:3]] +# [[file:../../../projects/mud.org::*Stone Table][Stone Table:4]] @detail runes;rune = While you've never before encountered these stanges runes, etched into the ancient stone, yet somehow you know that they represent the elements of |wEarth|n, |wAir|n, |wFire|n and |wWater|n. -# Stone Table:3 ends here +# Stone Table:4 ends here # The table shouldn’t be stealable: -# [[file:../../../projects/mud.org::*Stone Table][Stone Table:4]] +# [[file:../../../projects/mud.org::*Stone Table][Stone Table:5]] @lock table = get:false() # @set table/get_err_msg = "That table is much too big for you to lift." -# Stone Table:4 ends here +# Stone Table:5 ends here # Answer the riddle to be able to go to the Tavern: -# [[file:../../../projects/mud.org::*Stone Table][Stone Table:5]] +# [[file:../../../projects/mud.org::*Stone Table][Stone Table:6]] @set table/say = {r".*\bmud\b.*": "gm You hear an audible click, and find the blue door, that was closed before, now is ajar. ;; tag_all open_blue_door"} -# Stone Table:5 ends here +# Stone Table:6 ends here # This now needs to be transferred from the [[file:mud-rpg.org][mud-rpg]] file. @@ -1260,6 +1260,30 @@ py me.search("squirrel").backstory("squirrel") # Inside the Bar:8 ends here + +# As well as the automation: + +# [[file:../../../projects/mud.org::*Bartender][Bartender:8]] +py me.search("bartender").backstory("tavern") +# Bartender:8 ends here + +# [[file:../../../projects/mud.org::*Automated Responses][Automated Responses:2]] +@set bartender/arrive = "4 ;; say Welcome to the |wWyldwood Bar|n. Read the sign for a list of our cocktails, and let me know what you'd like to drink." +# Automated Responses:2 ends here + + + +# Need a channel to chat about the game: + + +# [[file:../../../projects/mud.org::*Hide and Seek][Hide and Seek:6]] +@channel/create Hide and Seek Game;hide;game = Messages to people playing the Hide and Seek game +# +# Others would type: +# channel/sub game +# Hide and Seek:6 ends here + + # The river from the flows into a marsh: @@ -2082,6 +2106,15 @@ py timed_script = evennia.create_script(key="Create Horns", # Trampoli the Witch:7 ends here + +# Perhaps … eventually, we can give her a gift, and she’ll allow the character to stay for tea. But then she would need to talk and interact. LLM? + + +# [[file:../../../projects/mud.org::*Trampoli the Witch][Trampoli the Witch:11]] +@script old lady = typeclasses.chatbots.TravelingNPC +# Trampoli the Witch:11 ends here + + # 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: @@ -3308,6 +3341,24 @@ pose gnome/default = smoking his pipe # Staff:2 ends here +# This /crystal ball/ can be used to see what is going on in any area of the realm. + +# [[file:../../../projects/mud.org::*Scrying Ball][Scrying Ball:1]] +@create scrying ball: typeclasses.things.Scryer +# Scrying Ball:1 ends here + + + +# And a description: + + +# [[file:../../../projects/mud.org::*Scrying Ball][Scrying Ball:2]] +@desc scrying ball = A crystal orb that shows what's abroad. +# +@give scrying ball = gnome +# Scrying Ball:2 ends here + + # The pipe is little more than messages to the smoker and everyone else in the room. @@ -3365,166 +3416,177 @@ pose gnome/default = smoking his pipe # Do I match the Big Hairy Beast, or do I create it as a puppet? -# [[file:../../../projects/mud.org::*Stoat][Stoat:1]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:1]] @create/drop wee beastie;Mochi;stoat: typeclasses.pets.WeeBeastie -# Stoat:1 ends here +# Stoat the Wee Beastie:1 ends here # And its description: -# [[file:../../../projects/mud.org::*Stoat][Stoat:2]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:2]] @desc stoat = A charming creature with a slender, elongated body covered in soft, white fur that glistens like freshly fallen snow. When open, its large, round eyes are a striking shade of lavender, and its bushy tail, tipped with a hint of violet. -# Stoat:2 ends here +# Stoat the Wee Beastie:2 ends here # Can’t get this guy: -# [[file:../../../projects/mud.org::*Stoat][Stoat:3]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:3]] @lock stoat = get:false() # @set stoat/get_err_msg = "Each time you try to pick it up, it serpentines it way back to the chair." -# Stoat:3 ends here +# Stoat the Wee Beastie:3 ends here # Let’s get a bit more interaction with this pet: -# [[file:../../../projects/mud.org::*Stoat][Stoat:4]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:4]] @set stoat/active_amount = 8 -# Stoat:4 ends here +# Stoat the Wee Beastie:4 ends here # It’s level doesn’t change much. :-D It is always less interested, just like a cat. -# [[file:../../../projects/mud.org::*Stoat][Stoat:5]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:5]] @set stoat/scared_msg = "Currently, coiled like a sleeping snake on one of the chairs." -# Stoat:5 ends here +# Stoat the Wee Beastie:5 ends here # And petting it when someone first comes in? -# [[file:../../../projects/mud.org::*Stoat][Stoat:6]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:6]] @set stoat/pet_scared_response = "While it doesn't stop $you() << from petting it ^ >>, the beastie flashes its long teeth." -# Stoat:6 ends here +# Stoat the Wee Beastie:6 ends here # And actions if a friendly person isn’t around: -# [[file:../../../projects/mud.org::*Stoat][Stoat:7]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:7]] @set stoat/scared_actions = "The wee beastie << asleep on the chair ^ >> let's out a yawn brandishing its large canines. ;; The wee beastie << asleep on the chair ^ >> uncoils itself, stretches, and recoils again. ;; You hear a deep throated rumbling from the wee beastie << asleep on the chair ^ >> . ;; The wee beastie twitches in its sleep, as if chasing down imaginary prey." -# Stoat:7 ends here +# Stoat the Wee Beastie:7 ends here # Concerned level: -# [[file:../../../projects/mud.org::*Stoat][Stoat:8]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:8]] @set stoat/concerned_msg = "Currently, curled into a ball on one of the chairs." -# Stoat:8 ends here +# Stoat the Wee Beastie:8 ends here # Pets? -# [[file:../../../projects/mud.org::*Stoat][Stoat:9]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:9]] @set stoat/pet_concerned_response = "$You() get little response from << your pets of ^ >> << the wee beastie ^ the beastie >>. " -# Stoat:9 ends here +# Stoat the Wee Beastie:9 ends here # And actions at this level are more cute than sinister: -# [[file:../../../projects/mud.org::*Stoat][Stoat:10]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:10]] @set stoat/concerned_actions = "The wee beastie << asleep on the chair ^ >> let's out an adorable yawn. ;; The wee beastie << asleep on the chair ^ >> uncurls itself, stretches, and recurls again. ;; You hear a deep purring sounds from the wee beastie << asleep on the chair ^ >>. ;; The wee beastie twitches in its sleep, as if playing with dream toys." -# Stoat:10 ends here +# Stoat the Wee Beastie:10 ends here # Interested level: -# [[file:../../../projects/mud.org::*Stoat][Stoat:11]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:11]] @set stoat/interested_msg = "<< Currently ^ It is >> curled into a ball asleep." -# Stoat:11 ends here +# Stoat the Wee Beastie:11 ends here # Pets -# [[file:../../../projects/mud.org::*Stoat][Stoat:12]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:12]] @set stoat/pet_interested_response = "The << wee ^ >> beastie adorably moves its head into $your() pets." -# Stoat:12 ends here +# Stoat the Wee Beastie:12 ends here # And actions at this level are about as cute as a cat can be: -# [[file:../../../projects/mud.org::*Stoat][Stoat:13]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:13]] @set stoat/interested_actions = "The << sleepy ^ wee >> beastie << on $your() lap ^ >> let's out an adorable yawn. ;; The << sleepy ^ wee >> beastie << on $your() lap ^ >> uncurls itself, stretches, and recurls again. ;; $You() $conj(pet) the << sleepy ^ wee >> beastie << on |p lap ^ >> as it snuggles << close ^ >>. ;; You hear a deep purring sounds from the << sleepy ^ wee >> beastie << on $your() lap ^ >>. ;; The << sleepy ^ wee >> beastie twitches in its sleep, as if playing with dream toys." -# Stoat:13 ends here +# Stoat the Wee Beastie:13 ends here # Friendly level: -# [[file:../../../projects/mud.org::*Stoat][Stoat:14]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:14]] @set stoat/friendly_msg = "<< Currently ^ It is >> purring while curled up sleep." -# Stoat:14 ends here +# Stoat the Wee Beastie:14 ends here # Pets -# [[file:../../../projects/mud.org::*Stoat][Stoat:15]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:15]] @set stoat/pet_friendly_response = "The << wee ^ >> beastie adorably moves its head into $your() pets. ;; $You() << $conj(rub) ^ $conj(pet) >> the stubby but soft ears of the << wee ^ >> beastie, as it lets out a little purr. ;; The << wee ^ >> beastie rolls onto its back while $you() $conj(rub) its tummy. It lets out a little purr. ;; $You() << $conj(scratch) ^ $conj(massage) >> the soft << back ^ rump >> of the << wee ^ >> beastie. It wriggles around trying to get the most of this attention." -# Stoat:15 ends here +# Stoat the Wee Beastie:15 ends here # And actions at this level are about as cute as a cat can be: -# [[file:../../../projects/mud.org::*Stoat][Stoat:16]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:16]] @set stoat/friendly_actions = "The << sleepy ^ wee >> beastie << on $your() lap ^ >> let's out an adorable yawn. ;; The << sleepy ^ wee >> beastie << on $your() lap ^ >> uncurls itself, stretches, and recurls again. ;; $You() $conj(pet) the << sleepy ^ wee >> beastie << on |p lap ^ >> as it snuggles << close ^ >>. ;; You hear a deep purring sounds from the << sleepy ^ wee >> beastie << on $your() lap ^ >>. ;; The << sleepy ^ wee >> beastie twitches in its sleep, as if playing with dream toys." -# Stoat:16 ends here +# Stoat the Wee Beastie:16 ends here # And this pet loves his gnome. -# [[file:../../../projects/mud.org::*Stoat][Stoat:17]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:17]] @set gnome/wee_beastie_friendly_level=500 -# Stoat:17 ends here +# Stoat the Wee Beastie:17 ends here # Trigger some events … which can’t work at the moment, since a Pet is not a Puppet … yet: -# [[file:../../../projects/mud.org::*Stoat][Stoat:18]] +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:18]] @set stoat/arrive = "5 ;; gma {0} = A sleeping << wee ^ >> beastie, opens one curious eye to look at $you()." # # @set stoat/sit = "3 ;; gm A sleeping << wee ^ >> beastie, opens one curious eye to see who arrived." -# Stoat:18 ends here +# Stoat the Wee Beastie:18 ends here + + + +# Let’s also hook it to our AI system: + + +# [[file:../../../projects/mud.org::*Stoat the Wee Beastie][Stoat the Wee Beastie:19]] +@set stoat/personality = "wee-beastie" +# +@set stoat/personality_file = "personalities/wee-beastie.md" +# Stoat the Wee Beastie:19 ends here # Better place to put the tea and scones. @@ -4425,13 +4487,15 @@ py bt = self.search('head'); bt.sdesc.add('curious figure'); bt.db.pose = 'sitti # [[file:../../../projects/mud.org::*Darol the Flamboyant Dragon][Darol the Flamboyant Dragon:1]] -@create/drop Darol: typeclasses.chatbots.Traveler +@create/drop Darol: typeclasses.chatbots.Dragon # @set Darol/gender = "him" # @set Darol/pose = "twirling a tendril like a mustache" # @set Darol/pose_sleep = "twirling a tendril like a mustache" +# +@set Darol/pose_default = "twirling a tendril like a mustache" # Darol the Flamboyant Dragon:1 ends here @@ -4447,13 +4511,22 @@ py darol = me.search("dragon") ; darol.sdesc.add("tiny, orange dragon") ; darol. -# And get it moving: +# Moving attributes: # [[file:../../../projects/mud.org::*Darol the Flamboyant Dragon][Darol the Flamboyant Dragon:3]] -@script Darol = typeclasses.chatbots.TravelingNPC +@set Darol/traveling_direction = "east" # Darol the Flamboyant Dragon:3 ends here + + +# And get it moving: + + +# [[file:../../../projects/mud.org::*Darol the Flamboyant Dragon][Darol the Flamboyant Dragon:4]] +@script Sir Roblees = typeclasses.chatbots.TravelingNPC +# Darol the Flamboyant Dragon:4 ends here + # [[file:../../../projects/mud.org::*Rick the Barbarian][Rick the Barbarian:1]] @create/drop Rick: typeclasses.chatbots.Traveler #