Phantasmal MUD Lib for DGD

Phantasmal Site > Phantasmal Operation > Help Entries

Making New Help Entries

Help entries are made using UNQ files. Each UNQ file contains a number of individual entries. There are a couple of interesting subtleties to creating entries. Let's look at one, shall we?

~name{~enUS{%write_log,%log, %log_write,%writelog}}
~keywords{admin}
~desc{
  ~enUS{

The @log (called %log and @write_log also, among others) command takes
a single string argument, much like "say".  However, it will log that
string along with your name to the system log.  In general, this is a
very poor way to send the equivalent of e-mail except on the most
excellently-run MUDs since most of the time the log gets briefly read
through (or not) and tossed out to make room for the next one.

See also:  %log_subscribe, logfile, log channel

}}
    

The "name" field tells the Help system what queries to return this entry for. We'll get to that soon. The "keywords" field gives a list of keywords -- the query supplies a corresponding list, and only a query with the keywords in the help entry will return this entry. For instance, this entry has the "admin" keyword, so only queries by admin characters will be returned.

The "desc" field is a standard UNQ Phrase structure. The one shown here is English-only. The description is what you get when you ask for help on an appropriate thing from the "name" field.

The "name" field here seems incomplete. If you asked for help on "log" or "write log", you'd hope it would give you help as well. As it turns out, it does.

The Help system ignores most non-alphanumeric characters, and it treats - and _ as being the same as spaces. That means that %write_log is the same as write_log is the same as write log is the same as @#$write@#$-log@#$#. They're all different from writelog, which is the same as %writelog, write@log, and @#$@#write#@#%log@#@#.

Soon, words will work in any order. That means that write log data would be the same as data write log would be the same as write_data-log and @#$#@log@#%#%-@#$#@$write_-data@#$@. So you see, the quite brief set of names above actually matches a surprising number of help queries, useful and otherwise.