Have commands match the help system

That is, make everything green.
This commit is contained in:
Howard Abrams 2025-04-16 09:25:38 -07:00
parent 97c0178cea
commit 7955d99a76
8 changed files with 70 additions and 61 deletions

View file

@ -31,6 +31,15 @@ READ_LETTER = """You read a letter with an oddly familiar penmanship:
If you are reading this, you've found the world I was overly excited in relaying to you over drinks in Marsivan. Most excellent. Enjoy this halcyon world, unspoiled and idyllic.
I would suggest seeing/doing these:
- Jump in a puddle
- Sit on some moss
- Feed the beast until it is friendly
- Catch an obnoxious fish
- Get and read a book
- Have some tea and scones
I'm here, so join me in a cup of tea and we can reconnect and reminisce of glorious days gone by, and the utter curiosity that surrounds us.
Your friend,

View file

@ -41,7 +41,7 @@ DRINK_MSGS = [
]
EMPTY_MSGS = [
"Your [teacup|cup] is empty. Perhaps you can |bmake|n some |btea|n?",
"Your [teacup|cup] is empty. Perhaps you can |gmake|n some |gtea|n?",
"Your cup certainly doesn't runneth over, as it be quite empty.",
"Alas, you find your cup devoid of any sort of watery infusion.",
"You notice your cup is empty.",

View file

@ -115,7 +115,7 @@ class Fish(CarriableNPC):
elif self.db.spoken == 61:
self.at_say("Because we have are own scales.")
elif self.db.spoken == 70:
self.at_say("I suppose you could |bthrow|n me back in the water at any time.")
self.at_say("I suppose you could |gthrow|n me back in the water at any time.")
elif self.db.spoken == 120:
self.at_say("I suppose I should pay you back for helping me out with that hook thing. I guess you know I keep all my money at ... the riverbank.")
elif self.db.spoken == 200:
@ -212,7 +212,7 @@ class FishingPole(Object):
def do_reel(self, fisher):
if fisher.db.fishing != Fishing.CAST:
fisher.msg("You need to |bcast|n before you can reel the line back in.")
fisher.msg("You need to |gcast|n before you can reel the line back in.")
else:
fisher.db.fishing = Fishing.REEL
if random.randint(1, 100) < 35:

View file

@ -174,7 +174,7 @@ class Letter(Readable):
self.cmdset.add_default(CmdSetBook)
def at_pre_drop(self, dropper):
dropper.msg("Hrm ... you don't want to litter in such an idyllic location. But you can |bthrow|n it away.")
dropper.msg("Hrm ... you don't want to litter in such an idyllic location. But you can |gburn|n it.")
return False
def do_burn(self, thrower, drop=False):
@ -188,7 +188,7 @@ class Letter(Readable):
class Book(Readable):
def do_read(self, reader):
super().do_read(reader)
reader.location.msg_contents(routput(f"{reader.name} reads a book. You notice the title, |b{self.db.title}|n."),
reader.location.msg_contents(routput(f"{reader.name} reads a book. You notice the title, |w{self.db.title}|n."),
exclude=reader)
def do_burn(self, reader, drop=False):
@ -224,12 +224,12 @@ class Books(Object):
return (
title,
routput("""a [worn|barely read|pristine copy of a|]
[leather-bound|] book, titled, |b{0}|n
[leather-bound|] book, titled, |w{0}|n
""".format(title)),
routput(
"""
You [open|open up|crack open] your book, entitled,
|b{0}|n, and read the {1} {2} of {3}.
|w{0}|n, and read the {1} {2} of {3}.
""".format(
title,
random.choice(BOOK_EMOTIONS),
@ -258,4 +258,4 @@ class Books(Object):
self.db.last_desc = None
self.db.last_inside = None
else:
reader.msg("Which book do you want to take. The shelves are full of them. Perhaps you want to |blook|n at the |bbooks|n, first.")
reader.msg("Which book do you want to take. The shelves are full of them. Perhaps you want to |glook|n at a |gbook|n?")

View file

@ -181,10 +181,10 @@ class Knocker(Object):
"Of course this door is protected by a super complicated encrypted password.",
"If I tell you, it wouldn't be a secret now.",
"The password? You just have to guess...unless you want a hint?",
"Well, I suppose I could give you a |bhint|n.",
"Well, I suppose I could give you a |mhint|n.",
]
hint_responses = [
"A hint does sound fair. [Should I|I should] come up with a |briddle|n[|, huh]?"
"A hint does sound fair. [Should I|I should] come up with a |mriddle|n[|, huh]?"
]
riddle_responses = [
"Aged in barrels, smooth and neat, in a glass by the fire, I'm a treat.",
@ -251,7 +251,7 @@ class Knocker(Object):
"""
I shouldn['t|be quiet, and not] be telling you this,
but I like the cut of your [suit|cloak|jib].
So, you see, if you speak the |bpassword|n, wait, I've said too much.
So, you see, if you speak the |mpassword|n, wait, I've said too much.
"""
], Knocker_Convo.DOOR],
@ -294,8 +294,8 @@ class Knocker(Object):
"""
We could [feign|pretend|play make-believe] and
[carry on|continue|persist] this [conversation|charade],
but we both know that |byou|n know the [password|secret|secret word|magic],
and can go through the |bdoor|n now.
but we both know that |wyou|n know the [password|secret|secret word|magic],
and can go through the |gdoor|n now.
""",
"""
[Sure|Why not|Why yes], let's [feign|pretend|play make-believe that] you
@ -307,7 +307,7 @@ class Knocker(Object):
cant_hear_responses = [
"[Sorry.|What was that?|Did you say something?] I'm hard of hearing on account of the brass ears.",
"Brass ears. Yeah, not the best at hearing.",
"Yeah, These brass ears don't hear much except for the |b[secret|magic|] password|n.",
"Yeah, These brass ears don't hear much except for the |m[secret|magic|] password|n.",
]
unknown_responses = [

View file

@ -19,48 +19,48 @@ import random
MSGS = {
"START": [
"A small bird flies over to you, and perches on your shoulder. \"Hello,\" it says in your ear. \"Im the Tutorial Bird,\" it chirps, \"and Im here to break the fourth wall, and help you figure out this game. Feel free to |bshoo|n me away, and Ill leave you alone to explore.\"",
"The bird says, \"In this story game, you type commands (verbs) to do things. For instance, type the word |blook|n, and press the |wReturn|n key to look around at your surroundings and to see where you are, what you can do, and where you can go.\"",
"A small bird flies over to you, and perches on your shoulder. \"Hello,\" it says in your ear. \"Im the Tutorial Bird,\" it chirps, \"and Im here to break the fourth wall, and help you figure out this game. Feel free to |gshoo|n me away, and Ill leave you alone to explore.\"",
"The bird says, \"In this story game, you type commands (verbs) to do things. For instance, type the word |glook|n, and press the |wReturn|n key to look around at your surroundings and to see where you are, what you can do, and where you can go.\"",
"The bird perched on your shoulder looks at you expectantly.",
"\"Go ahead,\" says the bird, \"Type |blook|n. If you are on the web site, you may need to click in the box in the lower part of the screen.\"",
"\"Go ahead,\" says the bird, \"Type |glook|n. If you are on the web site, you may need to click in the box in the lower part of the screen.\"",
"The bird preens itself.",
"The bird says, \"Would you like me to stay and help you out?\"",
"\"If so,\" says the bird, \"type |blook|n to look around at your surroundings.\"",
"\"If so,\" says the bird, \"type |glook|n to look around at your surroundings.\"",
],
"LOOK": [
"\"Thats great,\" says the little blue bird. \"From that, you know you are standing in a grove of trees near a puddle. You can now type |blook puddle|n to examine it.\"",
"\"You can also |blook trees|n, |blook moss|n, or … well, you get the idea,\" it says.",
"\"Thats great,\" says the little blue bird. \"From that, you know you are standing in a grove of trees near a puddle. You can now type |glook puddle|n to examine it.\"",
"\"You can also |glook trees|n, |glook moss|n, or … well, you get the idea,\" it says.",
],
"LOOKAT": [
"\"You seem to be getting the hang of this game,\" chirps the bird. \"When you typed |blook|n before, you noticed exits. These are directions or places you can go. For instance, if you type |bsouth|n (or just |bs|n as a shortcut), you can check out our pond where you can catch obnoxious fish.\"",
"\"The path to the |beast|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 |bwest|n leads to Dabblers place.\"",
"\"You seem to be getting the hang of this game,\" chirps the bird. \"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 our pond 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 Dabblers place.\"",
"\"Yes, I could fly myself,\" warbles the little bird, \"but Im trying to help you get around.\"",
"The bird looks at you expectantly.",
"\"Shall we explore other places?\" asks the bird on your shoulder.",
"\"I hope Im not rushing you,\" the bird mentions, \"as you can always come back to explore more.\"",
],
"MOVE": [
"\"Thanks for lift. This is a nice place,\" says the bird on your shoulder. \"When you come to a new area, the game shows you what you are seeing, so you dont have to type |blook|n … even though you still can.\"",
"\"Another interesting command,\" it chirps, \"is the |bsay|n command, that lets you talk to anyone in the area. Usually, we use this command for talking to other players in the game, but some creatures listen to what you say.\"",
"\"Go ahead, just typing |bsay Hello.|n\"",
"\"Thanks for lift. This is a nice place,\" says the bird on your shoulder. \"When you come to a new area, the game shows you what you are seeing, so you dont have to type |glook|n … even though you still can.\"",
"\"Another interesting command,\" it chirps, \"is the |gsay|n command, that lets you talk to anyone in the area. Usually, we use this command for talking to other players in the game, but some creatures listen to what you say.\"",
"\"Go ahead, just typing |gsay Hello.|n\"",
],
"SAY": [
"\"Hows it going?\" the bird asks, \"Are you enjoying this game so far?\"",
"The bird says, \"This place has been a respite from the outside turbulence.\"",
"\"A shortcut to |bsay|n is to type either a double or single quote, and then your message.\"",
"\"You can also use |bpose|n to state something about yourself, \" it says. \" For instance, type |bpose smiles.|n\"",
"\"A shortcut to |gsay|n is to type either a double or single quote, and then your message.\"",
"\"You can also use |gpose|n to state something about yourself, \" it says. \" For instance, type |gpose smiles.|n\"",
# POSE:
"The bird stands on one leg.",
"\"See,\" says the bird, \"I spose I can pose too.\"",
"\"A shortcut to that command is typing |b:|n (a colon character).\"",
"The bird says, \"The game has more commands. Typing |bhelp|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 |bshoo|n for me to fly away, and then that command wouldnt be available again.\"",
"\"A shortcut to that command is typing |g:|n (a colon character).\"",
"The bird says, \"The game has more commands. 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 wouldnt be available again.\"",
# ],
# "HELP": [
"The bird chirps, \"You can learn more about the individual commands. For instance, type |bhelp say|n and you would see about the shortcuts I told you about. You can also see new commands, like |bhelp get|n.\"",
"\"Type |bhelp start|n for a repeat of much of what weve talked about,\" says the bird.",
"The bird says, \"The |binv|n shows you what you are carrying. I see you picked up a letter. You can also type |bread 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 |b@setdesc|n command. Check out the help, |bhelp @setdesc|n, or just type: |w@setdesc A pixie with a shock of blue hair and a gold chain.|n\"",
"The bird chirps, \"You can learn more about the individual commands. For instance, type |ghelp say|n and you would see about the shortcuts I told you about. You can also see new commands, like |ghelp get|n.\"",
"\"Type |ghelp start|n for a repeat of much of what weve talked about,\" says the bird.",
"The bird says, \"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 |g@setdesc|n command. Check out the help, |ghelp @setdesc|n, or just type: |w@setdesc A pixie with a shock of blue hair and a gold chain.|n\"",
"\"Im guessing your last question,\" chirps the little bird on your shoulder, \"is the goal of this game.\"",
"\"That is a good question,\" says the bird, \"and Im not sure what to say. This game has no goal, nor point. I guess you could look at it as a philosophical metaphor for existential existence in a post-modern world in the death throes of capitalism, but…\"",
"The bird says, \"This is a cozy little game about role playing a storybook character and maybe exploring and looking for eggs… no, thats not right. Something about eggs. Easter eggs? Something like that.\"",
@ -142,7 +142,7 @@ class TutorBird(CarriableNPC):
"""
A visual way to stop the tutorial
"""
character.msg("\"Have fun, and Ill leave you here,\" chirps the bird, as it flies away.")
character.msg("\"Have fun, and Ill leave you here,\" chirps the bird, \"and remember to check out the letter you picked up!\" It flies away.")
self.delete()
def get_msg_level(self, character, level):

View file

@ -39,25 +39,25 @@ HELP_ENTRY_DICTS = [
"locks": "read:all()",
"text": """Again, welcome to my cozy little game.
To |wplay this game|n, you typically type a |w<verb>|b for an action, or |w<verb> <object>|b combinations. For instance, type |blook|n to look around the area, and |blook tree|n to examine the trees in particular. The more you look, the more you explore.
To |wplay this game|n, you typically type a |w<verb>|n for an action, or |w<verb> <object>|n combinations. For instance, type |glook|n to look around the area, and |glook tree|n to examine the trees in particular. The more you look, the more you explore.
What verbs are available depends on where you are and what you might be holding. Type |bhelp|n with no other option to get a list of those commands. Then type |bhelp look|n to get details on how to use the |wlook|n verb.
What verbs are available depends on where you are and what you might be holding. Type |ghelp|n with no other option to get a list of those commands. Then type |ghelp look|n to get details on how to use the |wlook|n verb.
A bit about this |bhelp|n system. This document is longer, and you'll see at the end of this paragraph, some _transient commands_, for instance, you can type |bnext|n to see the next page. However, you can ignore that list, and type |blook puddle|n to skip this and gander at the puddle that might be at your feet. For now, type |bnext|n to keep reading...
A bit about this |ghelp|n system. This document is longer, and you'll see at the end of this paragraph, some _transient commands_, for instance, you can type |gnext|n to see the next page. However, you can ignore that list, and type |glook puddle|n to skip this and gander at the puddle that might be at your feet. For now, type |gnext|n to keep reading...
\f
This is a multi-user game, you might run into other characters, and they may look at you, so let's type the following to tell others what they see when they look at you:
|w@setdesc A frumpy, but spry person with large ears and a dark blue cloak.|n
|g@setdesc A frumpy, but spry person with large ears and a dark blue cloak.|n
While it can be quite long and descriptive, you are limited to a single paragraph, since when you hit the 'Return' key, you submit your description.
To see what people see when they look at you, type:
|wlook self|n
|glook self|n
What is the goal of this game? Just to escape the chaos of the world and explore an idyllic setting. I call it my |gegg hunt game|n, as the game is full odd stuff to discover. Feel free to find me to chat, but good luck finding me, as I may be hiding.
What is the goal of this game? Just to escape the chaos of the world and explore an idyllic setting. I call it my |yegg hunt game|n, as the game is full odd stuff to discover. Feel free to find me to chat, but good luck finding me, as I may be hiding.
This is the end of this help section, but I have some related topics to this intro, so you can type |bhelp start/commands|n to get a list of typical commands, or just start playing this game.
This is the end of this help section, but I have some related topics to this intro, so you can type |ghelp start/commands|n to get a list of typical commands, or just start playing this game.
Enjoy!
@ -79,43 +79,43 @@ Enjoy!
We often want to chat in these sorts of games, so instead of typing:
|wsay Good evening!|n
|gsay Good evening!|n
You can simply type:
|w"Good evening!
|g"Good evening!
Or:
|w'Good evening!
|g'Good evening!
Creatures and objects in this game can sometimes respond to what you say.
### Pose
To tell others what you are doing (without |bsay|ning it), you can |bpose|n, as in:
To tell others what you are doing (without |gsay|ning it), you can |gpose|n, as in:
|wpose smiles.|n
|gpose smiles.|n
We do this a lot, so use this shortcut:
|w: smiles.|n
|g: smiles.|n
What about abbreviating "is" statements? Yeah, this works:
|w:'s happy, and wants you to know it.|n
|g:'s happy, and wants you to know it.|n
Your "pose" can be anything, for instance, you can pretend to be a wizard:
|w: casts a fireball, exploding the bush behind you!|n
|g: casts a fireball, exploding the bush behind you!|n
But you may find staying in character more 'escape-y'.
## Exits
Exits are special commands, and move you to a new location. So typing |bsouth|n will move you to a new location (assuming that exit is available). Some exits can be abbreviated, so typing |bs|n alone is the same as 'south'.
Exits are special commands, and move you to a new location. So typing |gsouth|n will move you to a new location (assuming that exit is available). Some exits can be abbreviated, so typing |gs|n alone is the same as 'south'.
Keep in mind that some exits may not be available until you |blook|n for them (but that is part of the exploratory game, like this).
Keep in mind that some exits may not be available until you |glook|n for them (but that is part of the exploratory game, like this).
"""
},
{
@ -124,27 +124,27 @@ Keep in mind that some exits may not be available until you |blook|n for them (b
"locks": "read:all()",
"text": """When you created your account, my game creates a character with the same name. If you want to rename yourself, you create a new character. Follow these steps.
First, delete your introductory letter, using the |bburn|n command:
First, delete your introductory letter, using the |gburn|n command:
|wburn letter|n
|gburn letter|n
Next, leave your current character by typing:
|wooc|n
|gooc|n
Then delete your old character with:
|wchardelete <original-name>|n
|gchardelete <original-name>|n
This only deletes the character of that name, not your account with that name.
Next, create a new character by typing:
|wcharcreate Rambler = A frumpy, but spry person with large ears and dark blue cloak.|n
|gcharcreate Rambler = A frumpy, but spry person with large ears and dark blue cloak.|n
And now, assume that character by typing:
|wic Rambler|n"""
|gic Rambler|n"""
},
{
"key": "evennia",

View file

@ -194,7 +194,7 @@ Maybe, by sticky, we mean, wizardly-sticky...an absolutely amazing looking stick
# [[file:../../../Dropbox/org/projects/mud.org::*Boulder][Boulder:6]]
@desc boulder = A boulder with patches of moss and delicate clover. A carved symbol and even some runes try to hide behind tendrils of ivy as if keeping a secret.
Wait! You notice a foot hold, and then another. You can |bclimb|n this boulder!
Wait! You notice a foot hold, and then another. You can |gclimb|n this boulder!
# Boulder:6 ends here
@ -728,7 +728,7 @@ lair
# And a description:
# [[file:../../../Dropbox/org/projects/mud.org::*The Dock][The Dock:4]]
@desc south = You see a dock on a large pond... Is that a comfortable-looking chair you can |bsit|n on?
@desc south = You see a dock on a large pond... Is that a comfortable-looking chair you can |gsit|n on?
# The Dock:4 ends here
@ -1409,7 +1409,7 @@ west
# With a good description:
# [[file:../../../Dropbox/org/projects/mud.org::*Books][Books:4]]
@desc books = Books of different sizes and colors. So many books. Perhaps you want to simply |blook|n at a |bbook|n at random?
@desc books = Books of different sizes and colors. So many books. Perhaps you want to simply |glook|n at a |gbook|n at random?
# Books:4 ends here
@ -1464,7 +1464,7 @@ py here.search("trolley").do_bake()
# [[file:../../../Dropbox/org/projects/mud.org::*Tea Service][Tea Service:2]]
@create/drop teapot;pot;tea pot:typeclasses.drinkables.Teapot
#
@desc teapot = An adorable brown teapot, waiting for you to |bmake|n some tea.
@desc teapot = An adorable brown teapot, waiting for you to |gmake|n some tea.
# Tea Service:2 ends here