Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUDs
➜ MUD Design Concepts
➜ Dash-style argument parsing for commands
Dash-style argument parsing for commands
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Sat 06 Sep 2008 06:17 AM (UTC) |
Message
| I posted this to MudBytes, and instead of copy/pasting the whole thing I'll just provide the link:
http://mudbytes.net/index.php?a=topic&t=837&p=11769
I'm very interested in people's feedback on this, either here or there. I think it's a nice way to handle argument parsing for relatively complex functions. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sun 07 Sep 2008 07:33 AM (UTC) |
Message
| My initial reaction is that using dash-style arguments totally removes any latent immersion you might have, that you are dealing with a fantasy world. eg.
kill -mob kobold -weapon sword
Having said that, there are probably situations where you want to do something like amend the privileges of a clan, where using dashes is much less ambiguous or confusing that trying to make up lengthy commands with keywords.
An alternative might be some more friendly interface (eg. MXP) which - underneath - sends the dash commands, but to the player the interface is much more intuitive.
For example, the inventory plugin I am working on, when buying something from a shop, might usefully send something like:
buy -id 12347546 -qty 5 -put bag4321
However, that could be triggered by drag-and-drop, so the player doesn't see the ugliness of it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #2 on Sun 07 Sep 2008 12:05 PM (UTC) |
Message
| Oh, yes, it would probably be bad to do this for player commands. I should have mentioned that I had this in mind primarily for administrative commands, or things that are totally OOC to begin with. Actually, the only commands I've ever seen that are really complicated enough to warrant this are these kinds of commands: most character-action commands are pretty simple.
Even for player actions, I think you can use a simple natural language system like CLIP -- remember that? :-) -- to say things like "kill the kobold with the sword". Natural language of this form frees you from remembering the position, but I'm not sure how to use natural language practically for big administrative commands. "list the issues assigned to Fred with open status and high priority" vs. "issues list -assigned fred -status open -priority high" -- the latter seems much more expedient to me.
In the occasional case where it actually is useful to have complex syntax for player commands, I agree that hiding it behind MXP or the miniwindows solves the issue entirely. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Sun 07 Sep 2008 09:00 PM (UTC) |
Message
| Ah yes, well I agree that for administrative commands, which newbies wouldn't use, it is probably very sensible. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,263 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top