[MUD-Dev] Magnetic Scrolls' magical parser

Adam Wiggins nightfall at inficad.com
Mon Apr 28 21:53:46 CEST 1997


> adjective, IIRC the input was actually:
> 
> 	> plant pot plant in plant pot
> 
> This sort of complexity seems to be lacking from the current mud 
> 'mainstream' in its entirety. Most of which I have come across seems to 
> be parsing such as:
> 
> 	*  First word of input is the command, look it up in our hash 
> 	   table of commands
> 
> 	*  Call the function corresponding to the command, passing the 
> 	   rest of the input (ie everything after the first word) as 
>            parameters to the function
> 
> So, you might have function prototypes for your command functions as: 
> 
> 	void function (Player player, String parameters);
>   
> All command functions would have their own parameter parsing algorithms; 
> so, for the above example, function 'plant' would be passed 'pot plant in 
> plant pot' as its parameters.
> 
> This is utterly simplistic, and although quite easy to implement, does 
> not make me happy in any way! I've looked about the web for things on 

See, I consider this a strength.  I would *never* type a command like
"plant pot plant in plant pot", and if I did, I would hate to think
that the parser would try to interpret it.  Of course, I generally
like descently fast-pased muds...this would fit into more of a MUSH-style
situation where you could spend more time crafting your commands.
I like a simple set of tools with which to interact with the environment,
that are never ambiguous and always easy for me to type.  The 'plant pot..'
stuff is confusing for everyone, player and coder alike, so I'm not sure
what the advantage is.
On the other hand, NLP has come of interest to me of late as we've tried
to make NPCs respond to communications from players.  Most muds have
a simple keyword thing, ie:

You say, 'Could you cast fly on me, please?'
>
The mage guildmaster says, 'Get out of here!  Quit wasting our time and go
buy a horse or something!'

One of my favorites from a mud I've played over the years...anyhow, this
is obviously quite stupid, as it just searches your say string for the
word fly, and would also respond to 'Someone kill that fly!'

We've done some basic stuff with trying to break the sentence into major
parts, which allows the mob scripts to easily determine insults, inquiries,
statements, etc.  Still all very basic; I'm wondering if any of you have
played with this at all?




More information about the mud-dev-archive mailing list