moss-n-puddles/world/help_entries.py
Howard Abrams 7955d99a76 Have commands match the help system
That is, make everything green.
2025-04-16 09:25:38 -07:00

180 lines
6.4 KiB
Python

"""
File-based help entries. These complements command-based help and help entries
added in the database using the `sethelp` command in-game.
Control where Evennia reads these entries with `settings.FILE_HELP_ENTRY_MODULES`,
which is a list of python-paths to modules to read.
A module like this should hold a global `HELP_ENTRY_DICTS` list, containing
dicts that each represent a help entry. If no `HELP_ENTRY_DICTS` variable is
given, all top-level variables that are dicts in the module are read as help
entries.
Each dict is on the form
::
{'key': <str>,
'text': <str>}`` # the actual help text. Can contain # subtopic sections
'category': <str>, # optional, otherwise settings.DEFAULT_HELP_CATEGORY
'aliases': <list>, # optional
'locks': <str> # optional, 'view' controls seeing in help index, 'read'
# if the entry can be read. If 'view' is unset,
# 'read' is used for the index. If unset, everyone
# can read/view the entry.
"""
# """
# },
# {
# "key": "commands",
# "alias": ["command"],
# "locks": "read:all()",
# "text": """
HELP_ENTRY_DICTS = [
{
"key": "start",
"aliases": ["intro"],
"locks": "read:all()",
"text": """Again, welcome to my cozy little game.
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 |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 |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:
|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:
|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 |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 |ghelp start/commands|n to get a list of typical commands, or just start playing this game.
Enjoy!
# Subtopics
## Commands
A command is typically a 'verb'. The most common ones in this game are:
- 'look' to look around at your surroundings
- 'look <thing>' to look at something particular
- 'get <thing>' to pick up something
- 'inventory' (or 'inv' or just 'i') for a list of what you carry
- 'drop <thing>' to leave the thing in this area (but don't litter)
- 'say' to talk to the characters and object in your current location
- 'pose' to state a fact about yourself.
### Say
We often want to chat in these sorts of games, so instead of typing:
|gsay Good evening!|n
You can simply type:
|g"Good evening!
Or:
|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 |gsay|ning it), you can |gpose|n, as in:
|gpose smiles.|n
We do this a lot, so use this shortcut:
|g: smiles.|n
What about abbreviating "is" statements? Yeah, this works:
|g:'s happy, and wants you to know it.|n
Your "pose" can be anything, for instance, you can pretend to be a wizard:
|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 |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 |glook|n for them (but that is part of the exploratory game, like this).
"""
},
{
"key": "charrename",
"aliases": ["renaming characters"],
"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 |gburn|n command:
|gburn letter|n
Next, leave your current character by typing:
|gooc|n
Then delete your old character with:
|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:
|gcharcreate Rambler = A frumpy, but spry person with large ears and dark blue cloak.|n
And now, assume that character by typing:
|gic Rambler|n"""
},
{
"key": "evennia",
"aliases": ["ev"],
"category": "General",
"locks": "read:perm(Developer)",
"text": """
Evennia is a MU-game server and framework written in Python. You can read more
on https://www.evennia.com.
# subtopics
## Installation
You'll find installation instructions on https://www.evennia.com.
## Community
There are many ways to get help and communicate with other devs!
### Discussions
The Discussions forum is found at https://github.com/evennia/evennia/discussions.
### Discord
There is also a discord channel for chatting - connect using the
following link: https://discord.gg/AJJpcRUhtF
""",
},
]