[MUD-Dev] Re: darkness/visibility

Katrina McClelan kitkat at the486.bradley.edu
Mon Jun 15 17:20:25 New Zealand Standard Time 1998


On Sun, 14 Jun 1998, Ben Greear wrote:

> On Sun, 14 Jun 1998, Chris Gray wrote:

> I probably have the most sparse command language of any mud out there.
> 

not likely....

> I don't even allow adjetives or prepositions.  For instance, this is
> the command to get the third sword from the second bag:
> 
> get 3.sword 2.bag
> 

Looks very much like mine....

> get 3 sword 2 bag    also works.
> 

I don't allow this though.

> What's worse, (almost) every command and name can be abbreviated, so this
> will work, unless other completions get in the way (it may still work,
> just not what you expected.):
> 
> ge 3.sw 2.b
> 

Beat ya...

R:[37][139] I:0+ ->g 3.s 2.b
You get a broad sword from a backpack.

And it'll work unless other items get in the way, in which case it'll work
as not intended.  It will only fail if fewer than 3 items in "2.b" match
"s", or if "2.b" does not exist.  My parser does have some extra needed
frills though.  For instance, try loading "an elf":

R:[37][139] I:0+ ->load m elf
You summon a drow elf from nowhere.

R:[37][139] I:0+ ->load m an
You summon Anubis from nowhere.

Well that didn't work.  Fortunately, this does:

R:[37][139] I:0+ ->load m "an elf"
You summon an elf from nowhere.

> I did this because I'm lame at parsing, and I grew up on a Diku typing
> commands this way.
> 

Well I did it because I was most familiar with diku parsing rather than
not being able to.  Having watched logs the player that actually typed out
phrases with prepositions and such was rare indeed.

> But you know what, I have never heard anyone complain, and I haven't even
> gotten any suggestions to change it, although I've got an incredible load
> of other suggestions and complaints!
> 

Actually, on the old downloaded code that I learned on, the most common
complaint I had was that remove did not allow object abbrieviations like
everything else did.

> So, maybe it doesn't matter.  If you are already down to interfacing
> through a keyboard, why would you want to type more than you had to.  It
> doesn't take to long to learn to leave out modifiers prepositions...
> 

No, on the other hand it would be kind of neat.  The thing I'd worry about
is less the pronouns and such but more how to cleanly interpret more than
one command on a line; 

Method one: look for command verbs

1) ]get the axe and sword from the bag and equip them
    ^                                      ^

2) ]get the axe and hide armor from the bag and equip them
    ^               ^                           ^

3) ]get the purple and light green cloak from the bag and equip it
    ^                  ^                                  ^

4) ]get the sword and shield from the bag and equip them
    ^                 ^                       ^ 

Score: 1/3 right, it catches hide as a command instead of the adjective
and light as an action (light torch) instead of an adjective.  It also
catches shield as a command (as in "shield Bubba from arrows")

Method two: Look for the "and" directive

1) ]get the axe and sword from the bag and equip them
    ^                                  ^

2) ]get the axe and hide armor from the bag and equip them
    ^           ^                           ^

3) ]get the purple and light green cloak from the bag and equip it
    ^              ^                                  ^

4) ]get the sword and shield from the bag and equip them
    ^             ^                       ^ 

Score: 1/4 right.  It catches the leading get in all cases, and the equip
following the "and" in 1), but tries to "hide armor from the bag"
(wouldn't want the bag to find that armor  :) and "light cloak from bag"
(which makes little sense).  It also tries "shield from the bag" (which
makes little sense.)

Method 3: Look for and followed by a command.

This is really method 1 and 2 thrown together, and it still only gets 1 of
4 right since in all the examples above the adjective or noun confused
followed an and anyway.

Obviously you've had better luck coming up with ways to parse the commands
out of this than me?  Or have you just not run into English being dumb
yet?

Now that I'm done playing skeptic, do you have the following working?

]get all swords from the backpack except the Sword of Tibit

(similarly "not", "but", etc)

-Kat





More information about the MUD-Dev mailing list