|
GC-Xiaix Newbie
Joined: 24 Jan 2006 Posts: 4
|
Posted: 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. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: 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 |
|
|
|
GC-Xiaix Newbie
Joined: 24 Jan 2006 Posts: 4
|
Posted: Wed Jan 25, 2006 3:05 am |
The \b is sent from the engine to zmud.
|
|
|
|
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: 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? |
|
|
|
GC-Xiaix Newbie
Joined: 24 Jan 2006 Posts: 4
|
Posted: 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. |
|
|
|
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: 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. |
|
|
|
GC-Xiaix Newbie
Joined: 24 Jan 2006 Posts: 4
|
Posted: 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. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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.) |
|
|
|
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: 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. |
|
|
|
|
|