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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Jul 23, 2008 1:36 pm   

Ideas for scripted questions and answers
 
Branched from this thread. [EDIT: Use that thread for mapper-related replies.] I'm afraid I pretty much cut and pasted my posts from that thread since I felt this might deserve it's own thread but didn't feel like rewriting my posts.

Zugg wrote:
There isn't any way to *automatically* create a loop direction like this. So you have to manually edit the map using one of these methods (Matt's method works well).

So yes, the mapper will always initially create a new room in that direction...there is no way for it to know that you are really back in the same room. You have to edit the map manually and then delete the extra room.

Yeah, but the mapper _could_ prompt you, asking if you want to loop back to the original room if it detects that the new room appears to be identical. I don't like enforced pop-ups, but maybe it could optionally echo a warning to the MUD window (perhaps by calling an overridable alias, or with a place to put in a script in the mapper config) and say something like 'The mapper has detected that the new room is identical to the old one. Do you wish to merge the newly mapped room with the old one? This will create the last exit as a loopback exit. Enter #ANSWERYES on the command line if you do, before entering any other direction commands.' The #ANSWERYES command would be a generic command to answer Yes to some kind of question that does not display graphically. Or maybe even one that does? E.g. #YESNO. BTW, #YESNO, #PROMPT and #PICK could probably use an optional timeout (like #MESSAGE) to close the window with a default (which might need adding), and they should be non-modal (don't know if they are).

#ANSWERYES and #ANSWERNO might be responses to a #QUESTION:
Syntax: #QUESTION question {commands} {commands} {expiry time} {name}
{expiry time} might be a timeout when the question would cease to be valid, or you could use a name for the question, which would be the parameter for an #EXPIREQUESTION command (which could be called from an #ONINPUT or #ALIAS or whatever to detect you have entered some command like a direction).

Any thoughts / suggestions / better ideas?


Last edited by Seb on Wed Jul 23, 2008 9:36 pm; edited 1 time in total
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Wed Jul 23, 2008 5:46 pm   
 
I have visited several muds with large areas of identical room name and even descriptions. If something like this is implemented, I'd hope for a toggle as well. Maybe a checkbox in (mapper?) preferences like "Roomnames are unique".
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jul 23, 2008 6:22 pm   
 
Please see the separate post about the mapper stuff. This post is for the #ANSWERxxx ideas.

Interesting ideas, although not easy to implement, so I'll need to think about this a bit more. Coming up with a better syntax for this is really needed though. I really dislike commands with lots of obscure arguments like that (not that the current #PICK or #YESNO syntax is any better). Also, I wouldn't want to have separate commands for #ANSWERYES and #ANSWERNO since that isn't very extensible. Adding expiration timers is possible, but that could have a lot of un-forseen side-effects if someone is just slow at selecting an answer or gets busy with something else.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Jul 23, 2008 10:03 pm   
 
Yes, you could have:
#ANSWER {question name (or id number - could be auto generated if not specified)} {answer, e.g. yes, no, something-else}.
{question name} would default to the last question name/id number. If the answer could be something-else, that makes it a non-graphical equivalent of #PICK, e.g.
#PICKTEXT {action} {p:Select an action:} {o:1} {1:kill @mob} {2:kick @mob} {*3:stun @mob}
< Displays:
Select an action: 1:kill @mob (perhaps expanded?); 2:kick @mob; 3:stun @mob
#ANSWER action 1
> sends kill @mob
#ANSWER action
> sends the default answer, which is 3.
You could add formatting to #PICKTEXT... Hmm, I suppose you could do all this using existing commands though: triggers that #ECHO the question, create an alias that you can call with the answer - perhaps this already exists but the question and answers are added to a DB record variable, process the answer (including executing the script associated with it), remove the question from the variable; another alias to expire questions; triggers (or even #ALARMS) that call this alias. However, if it is not integrated into CMUD, then CMUD can't use this facility to prompt the user like in the mapper case above.

Yeah, I prefer expiry via name, but it's also more work to set-up the means to expire the question.

Maybe the biggest enhancement would be (optionally) making the existing graphical #YESNO and #PICK non-modal and perhaps take co-ordinates so they don't get too much in the way of what you are doing and can be answered when you have a moment.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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