Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Apr 01, 2009 6:58 pm   

This should be an implemented feature!
 
With the advent of the new mapper, and the ability to create class folders with special keys that will enable that folder once in a certain zone or room, we desperately need the ability to add the keys in on the command line.

Perhaps it can be set up as one of the options, considering that the current way is:

#CLASS classname state/options

At least, it'd be very handy so that scripts could do this automatically instead of having to type it in. It can get a bit tedious when one has 255 zones to go through, and individual scripts for each one. *sigh*

Charneus
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Apr 01, 2009 8:51 pm   
 
Good idea, and simple to implement. The syntax will be:

#CLASS classname options

where "options" already could be a string list with the values: "menu", "setdef", "enable", "disable", "remove", "hidden" (from zMUD...enable and disable refer to the enable on init and disable on init options).

To this list of options, the *new* option is called "key" and has the syntax key=value. For example, to create a class with the keyword "zone1" you would do:

#CLASS Zone1 "key=zone1"
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Apr 02, 2009 3:15 pm   
 
What if you wanted multiple keys. Would it be:
#CLASS ZoneSwamp "key='zone1|zone2'"

#CLASS ZoneSwamp "key={zone1|zone2}"

#CLASS ZoneSwamp "key=zone1|key=zone2"

or something else?
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Apr 02, 2009 5:09 pm   
 
Right now, CMUD only supports a single keyword value for a class. Supporting multiple keywords is still on the to-do list. The problem is that the current implementation performs an indexed database scan for any class with a matching keyword field.

However, in the future when this is fixed, you will actually specify multiple keywords for a class separated by a comma and not a | character. So the syntax will be:

#CLASS ZoneSwamp "key=zone1,zone2"

Hoping to have the multiple keyword issue sorted out in the next version, but it gets a bit complicated.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Apr 02, 2009 8:25 pm   
 
Excellent!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net