19 May, 2010, JohnnyStarr wrote in the 1st comment:
Votes: 0
I'm wanting to add vt100 commands to my OLC, but I'm having a little trouble understanding what to look for.
I know that Putty is a vt100 emulator client, but how should things look on the server side? I've figured out
that when you press a key like "left arrow" it will send this ascii code "\eI'm wanting to add vt100 commands to my OLC, but I'm having a little trouble understanding what to look for.
I know that Putty is a vt100 emulator client, but how should things look on the server side? I've figured out
that when you press a key like "left arrow" it will send this ascii code "\e[D" which is fine because then I can work with that.

The issue is; I want the pressing of the key to send without a carriage return. I take it that I need to send a command to
putty once the user enters a menu that allows these types of commands? If anyone could point me in the right direction that
would be splendid! :)
20 May, 2010, Cratylus wrote in the 2nd comment:
Votes: 0
JohnnyStarr said:
I'm wanting to add vt100 commands to my OLC, but I'm having a little trouble understanding what to look for.
I know that Putty is a vt100 emulator client, but how should things look on the server side? I've figured out
that when you press a key like "left arrow" it will send this ascii code "\eI'm wanting to add vt100 commands to my OLC, but I'm having a little trouble understanding what to look for.
I know that Putty is a vt100 emulator client, but how should things look on the server side? I've figured out
that when you press a key like "left arrow" it will send this ascii code "\e[D" which is fine because then I can work with that.

The issue is; I want the pressing of the key to send without a carriage return. I take it that I need to send a command to
putty once the user enters a menu that allows these types of commands? If anyone could point me in the right direction that
would be splendid! :)[/quote]

Your mud will need character mode.

Fortunately you appear to be using Dead Souls 3.0, which happens to have character mode already.

Type: [b]charmode on[/b]

and: [b]help charmode[/b]

-Crat
http://lpmuds.net
20 May, 2010, Cratylus wrote in the 3rd comment:
Votes: 0
20 May, 2010, JohnnyStarr wrote in the 4th comment:
Votes: 0
:) this is for an alternate project in Ruby crat.
20 May, 2010, Cratylus wrote in the 5th comment:
Votes: 0
JohnnyStarr said:
:) this is for an alternate project in Ruby crat.


twSs
20 May, 2010, Runter wrote in the 6th comment:
Votes: 0
Just negotiate character mode with the client.
20 May, 2010, quixadhal wrote in the 7th comment:
Votes: 0
Actually, it's more accurate to say Putty *can be* a vt100 emulator. It can also be an ANSI emulator, a linux console emulator, and about 4 or 5 other terminal types. Some of those (the most commonly used) will use vt100-compatible escape sequences.

Basically, you can guess and be wrong sometimes, or you can use the telnet negotiation codes to ask the client what kind of terminal it is and hope it doesn't lie. :)

Relying on the client to do it is probably not a good idea. If you use the telnet opts, at least you can assume things are working if the client responds properly. If you expect the client side to do it right first, you'll be waiting a long time for users to know how to do ctrl-] and then type in the commands to put the client in character mode.
20 May, 2010, Scandum wrote in the 8th comment:
Votes: 0
To enable character mode you need to use telnet negotiations to disable client side local echo, as well as enable Suppress Go Ahead. Additionally you can send \e= to the client to have it enable the keypad application mode.
20 May, 2010, JohnnyStarr wrote in the 9th comment:
Votes: 0
# telnet support
SGACH = 3 # suppress go ahead
IAC = 255 # interpret as command:
WONT = 252 # I won't use option
WILL = 251 # I will use option
DO = 253 # Do option
DONT = 254 # Dont do option
TELOPT_ECHO = 1 # echo
DO_ECHO = IAC.chr + WONT.chr + TELOPT_ECHO.chr
DONT_ECHO = IAC.chr + WILL.chr + TELOPT_ECHO.chr
SGA = IAC.chr + WILL.chr + SGACH.chr
USGA = IAC.chr + WONT.chr + SGACH.chr


So, I looked at RocketMud and borrowed some practice code to play around with.
I've sent SGA and DONT_ECHO and it works, but theres the whole issue in getting out of character mode, which I can't figure out.
Sending USGA for "un suppress go ahead" and DO_ECHO dont change it back?
20 May, 2010, Kaz wrote in the 10th comment:
Votes: 0
Some terminals (PuTTY does this) start off in character mode and switch to line mode when you enable the Suppress Go-Ahead option. So if you want character mode, don't do this.
20 May, 2010, Scandum wrote in the 11th comment:
Votes: 0
Sending IAC WONT ECHO ought to turn character mode off.
20 May, 2010, JohnnyStarr wrote in the 12th comment:
Votes: 0
Scandum said:
Sending IAC WONT ECHO ought to turn character mode off.

It does indeed.

What I'm really looking for is a menu API of some sort. What I would like is a line based / text menu based system.
Much like the way Vim uses menus for autocomplete and tab menus. I suppose the Vim guys and gals created their own
system, but it would help to not reinvent the wheel here.
20 May, 2010, JohnnyStarr wrote in the 13th comment:
Votes: 0
Well, what I figured I was looking for is a GUI for ruby.
I found this just in case anyone is interested in it too.
20 May, 2010, quixadhal wrote in the 14th comment:
Votes: 0
Not saying it doesn't… but why SHOULD toggling ECHO have any impact on LINEMODE? I wouldn't expect it to… I'd expect one to toggle LINEMODE (RFC1184) if you want character or line mode, and I'd expect ECHO to control whether characters are echoed locally or by the remote host.
20 May, 2010, JohnnyStarr wrote in the 15th comment:
Votes: 0
I don't think that it impacts line mode, other than the fact that if have ECHO on when you press a key it will display
the character which is probably not desired when you are using F* keys or arrow keys.
20 May, 2010, JohnnyStarr wrote in the 16th comment:
Votes: 0
This is sort of what I want:


I've played games on BBS before that allowed you to use TAB and enter text into "fields".
What kind of telnet / ansi commands are needed to do this? Also, when the screen changes, instead of
outputting new text on the client like a mud, it just changes the text, how is that done?

A good example is one of the telnet Rouge type games Runter put a link to about 4 months ago.

EDIT: I found This, but it's sort of cryptic to me.
Has anyone used this before?
21 May, 2010, Scandum wrote in the 17th comment:
Votes: 0
I'm planning to write a decent article one day, but I can give you the basics for vt100.

First step is setting the scrolling region, by default the entire screen scrolls. Changing the scrolling region is done sending "\eI'm planning to write a decent article one day, but I can give you the basics for vt100.

First step is setting the scrolling region, by default the entire screen scrolls. Changing the scrolling region is done sending "\e[<top row>;<bottom row>r" The highest row is number 1, second highest 2, all the way down to the bottom row. The top row can't be lower or equal to the bottom row. To reset the scrolling region to default use "\e[r". Downside is that there's no way to make the entire screen non scrolling (at least not that I know of) but you can work around it by avoiding newlines when printing text inside a scrolling region, or using \e[1;2r as the scrolling region and putting a status bar at the top like many text editors do.

Next thing is moving the cursor around. Use \e7 to save your cursor position, next use \e[<row number>;<column number>H to move the cursor, and use \e8 to move the cursor back to where you last were.
21 May, 2010, JohnnyStarr wrote in the 18th comment:
Votes: 0
When you say \eWhen you say \e[<row number> are you saying to send \e[<20;80> or \e[20;80, as in are the < > being sent?
21 May, 2010, JohnnyStarr wrote in the 19th comment:
Votes: 0
Nevermind the last post. Thanks a lot Scandum, this is really going to be fun.
About your whole making a tutorial thing, I would love that! Now, what about data fields?

I would imagine that you could designate coordinates, send the entire screen and parse it to retrieve values?
Is that the wrong way to do it? What I really want is to learn enough to create sort of a GUI that could lead to
a sophisticated menu driven OLC. If you don't have time to spell it out, could you please refer me to some resources?
I've searched google all day on this stuff and I guess I'm just not looking in the right places.
21 May, 2010, Kaz wrote in the 20th comment:
Votes: 0
JohnnyStarr, what you're looking for is a page like this: http://invisible-island.net/xterm/ctlseq...

It says Xterm control sequences, but this overlaps greatly with VT100, and many terminal programs (including PuTTY) support some of the more advanced controls. For example, I found out just the other day that it's possible to get mouse clicks via PuTTY…

I'm working on an building a UI component framework that outputs itself using these sequences, but alas it's not at the stage where I have anything to demonstrate. I'll get back to you when I have that.
0.0/36