View unanswered posts | View active topics It is currently Thu May 21, 2026 6:13 pm



Reply to topic  [ 2 posts ] 
 Tradewars API/Protocol 
Author Message
Gunnery Sergeant

Joined: Mon Jun 14, 2004 2:00 am
Posts: 26
Location: USA
Unread post Tradewars API/Protocol
I posted the following in another forum before I realized that this one might be more appropriate.

I am writing a Tradewars helper. Pretty new to the environment.

My approach for the moment consists of making a socket connection to the TW server. When data from the server is sent to my socket object I parse all the text.

One of the things I implemented was sending all comm-link messages to a separate screen thus keeping the main terminal screen clean.

What I would like to know is there a document that describes all the possible characters that occur when something happens in the game?

Right now it is very much trial and error to see what will show up in the socket object buffer.

As an example when someone sends a Fed-Comm message I look for 'F '.

It would be nice if Tradewars had a separate port that expected some type of an API like the Telnet protocol for developers like me. Parsing text is prone to error and I already see major difference between version 3.11.55 and 3.12.

Thank you.


Last edited by pcunite on Sat Mar 27, 2010 9:11 am, edited 1 time in total.



Mon Jun 14, 2004 10:14 pm
Profile
Lieutenant J.G.

Joined: Wed Feb 06, 2002 3:00 am
Posts: 322
Location: United Kingdom
Unread post 
quote:Originally posted by pcunite

I posted the following in another forum before I
realized that this one might be more appropriate.

I am writing a Tradewars helper.
Pretty new to the environment.

My approach for the moment consists of making a socket connection
to the TW server. When data from the server is sent to my
socket object I parse all the text.

One of the things I implemented was sending all comm-link
messages to a separate screen thus keeping the main terminal
screen clean.

What I would like to know is there a document that describes all
the possible characters that occur when something happens in the
game?

Right now it is very much trial and error to see what
will show up in the socket object buffer.

As an example when someone sends a Fed-Comm message I
look for 'F '.

It would be nice if Tradewars had a separate port that
expected some type of an API like the Telnet protocol
for developers like me. Parsing
text is prone to error and I already see major difference
between version 3.11.55 and 3.12.

Thank you.
Jason



This is the same problem that all helpers have to deal with and I doubt you'll get much more than that back from the rest of the community.

there are only 3 times that "incoming" text really changes
CN1 on
w/ Long Messages CNA
w/ Short Messages CNA
CN2 off
(long messages default, not changable)

Parsing isnt a big deal HOWEVER if your going to use it with TWXProxy then ask xide about special characters that he sends back to the terminal. He sends special characters (I may be wrong but I dont belive so) that surround all text coming from twxproxy (allowing you to parse those and know it's not part of the game)

I would say to build your parser around "Halted" displays so you'll know what the MINIMUM amount of text is you'll receive. Then expand the parser to catch the rest as you go.

_________________
<<Doctor Who>>


Tue Jun 15, 2004 11:05 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 136 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.