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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
GC-Xiaix
Newbie


Joined: 24 Jan 2006
Posts: 4

PostPosted: Tue Jan 24, 2006 6:09 pm   

backspace escape \b
 
The XIAIX Game Engine (XGE) uses the backspace escape code:

\b

This escape code is not recognized by zMUD (ver 7.21).

Would anyone be able to tell me what I need to do to get zMUD to handle this escape code to function properly (as a backspace)?

Thanks for any and all suggestions.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Jan 24, 2006 10:47 pm   
 
I can't even imagine why you'd need to send a backspace to the client or vice versa, but more than likely you will need to use triggers and fake it using #sub or #psub. As far as I know there's no backspace type of ability built into ZMud or any of the protocols it supports.
_________________
EDIT: I didn't like my old signature
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Tue Jan 24, 2006 11:12 pm   
 
We'll need more information:
1. Is this to be done using character mode, line mode, or both?
2. Will the \b be sent from the engine to zmud?
3. Will the \b be sent from zmud to the engine?
4. What is currently being sent? and to where?
If you want to see what is being sent by the engine, you can see the control codes by using:
View->Preferences->General->Uncheck emulate control codes
Reply with quote
GC-Xiaix
Newbie


Joined: 24 Jan 2006
Posts: 4

PostPosted: Wed Jan 25, 2006 3:05 am   
 
The \b is sent from the engine to zmud.
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Wed Jan 25, 2006 3:56 am   
 
Is this character being used to erase typos made on the server or in a looped sequence to remove lines of text?
If it is being used in a looped sequence, is the client or the server handling the end of line wrapping?
Reply with quote
GC-Xiaix
Newbie


Joined: 24 Jan 2006
Posts: 4

PostPosted: Wed Jan 25, 2006 4:30 am   
 
Code:

   send_to_char(ch, "%s%s%s", C_C, world[IN_ROOM(ch)].name, C_N);

   send_to_char(ch, "%s\r\n", C_N);

   if (!IS_NPC(ch))
      send_to_char(ch, "%s", world[IN_ROOM(ch)].description);
   
   send_to_char(ch, "\b");

   // Now list objects, if any
   object_also_here(world[IN_ROOM(ch)].contents, ch);      

   // Now list NPC's, if any
   npc_also_here(world[IN_ROOM(ch)].pc_npc, ch);

   // Now list PC's, if any
   pc_also_here(world[IN_ROOM(ch)].pc_npc, ch);   



The \b takes care of an issue that I need to raise a line break up one notch. I have all my staff members and players right now using the "ALClient" (the ashavar client) which works beautifully, but I'm a large fan/advocate of zMUD and would like to recommend to all my future staff/players zMUD, but only if zMUD can properly handle the \b escape code that my game engine uses.
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Wed Jan 25, 2006 4:09 pm   
 
I would suggest looking at the #GAG command for your needs.
For instance:
Code:
#TRIGGER {~\b} {#GAG -1}

This will remove the line prior to any line containing the string "\b".
OR
Code:
 #TRIGGER {~\b} {#GAG 1}

This will remove the line containing the string "\b".
Note: While the ~ is not required using the default zMud special characters, I would recommend it as some users do use the \ as a personalized special character.
Reply with quote
GC-Xiaix
Newbie


Joined: 24 Jan 2006
Posts: 4

PostPosted: Wed Jan 25, 2006 5:24 pm   
 
Neither of your suggestions worked.

#TRIGGER {~\b} {#GAG -1} --- failed.
#TRIGGER {~\b} {#GAG 1} --- failed.


I sincerely appreciate your help and willingness to solve my issue. It appears that I'm ultimately going to cease recommending zMUD as a game client to use for XIAIX. Unfortunate, yes, however there are literally hundreds of MUD clients to choose from most of which can handle a simple escape code written into a game engine.

Again, thank you for everyone's help and input.
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jan 25, 2006 6:21 pm   
 
Is there an official specification for XIAIX? If there is then I might be able to support it in CMUD.

As far as the backspace character, zMUD is an ANSI-compliant telnet client. So, sending a Control-H (character 8) from the MUD to zMUD will perform a backspace operation.

The #GAG command will only remove entire lines. It cannot be used to remove individual characters.

You might look at the various ESC[ ANSI and VT100 control sequences. There is probably a sequence to delete characters that you can send to the screen using the #SHOW command to accomplish this.

Or, you can write a simple plugin that replaces any \b in the MUD input stream with the char-8 or ESC sequence that is needed.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Jan 25, 2006 6:38 pm   
 
Edit: ah Zugg answered at the same time. Snipped!
(He probably means ASCII 2 (control-b) to move the cursor to the beginning of the second line.)
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Wed Jan 25, 2006 6:39 pm   
 
The telnet RFC as defined in RFC-854 is
http://www.ietf.org/rfc/rfc854.txt
Erase character IAC-247 The function EC.
Erase Line IAC-248 The function EL.

Per his standards, he requested the client handle the deletion.
Can zMud send IAC commands to itself?
Though I do agree that a plugin is probably the best route. He could distribute it on his website as a download for all game users.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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