View unanswered posts | View active topics It is currently Mon Apr 20, 2026 5:51 pm



Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
 TWX port report question. 
Author Message
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1410
Location: Boo! inc. Ireland
Unread post TWX port report question.
I've just started using twx with a pre twgs version of tw, 2.02 beta 6. Mostly seems to work fine, but when I try the upgraded port listing, it tells me I havent done a cim, even though the following shows I have:

4913 -1100 100% -3010 100% 2760 100%
4944 -2220 100% 1320 100% 850 100%
4978 -2430 100% 2040 100% -1500 100%

: ENDINTERROG


Computer command [TL=2009:04:00]:[316] (?=Help)? Q

<Computer deactivated>

Command [TL=2009:03:02]:[316] (?=Help)? :
Port>
Sector Class Fuel Ore Organics Equipment Updated
-------------------------------------------------------------


No port CIM check has taken place.
You can do port/warp CIM checks by pressing ^ inside the game


Now, the caret character means squat pre twgs, you have to send ÈÉÊËÌÍ at the computer prompt to get cim. I tried fooling twx by typing ^, as ÈÉÊËÌÍ does not appear when it is sent to the game although ^ does even tho it does nothing, but same result as above. Any suggestions?


Tue Aug 31, 2010 5:58 am
Profile
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: TWX port report question.
Hrm. My thought would be the formatting of the CIM lines.

In a TWGS CIM it looks like:
Code:
19966 - 2180 100% - 2320 100%   1390 100%
19977 - 2810 100% - 2490 100%   2300 100%
19980   2360 100% - 2840 100% -  800 100%
19985 - 2040 100%   2460 100% - 2530 100%


Notice the spacing between the - and the number, etc.

Additionally, when you do the old string, does it print a single
":" (colon) by itself as the prompt? Maybe it triggers off the
prompt.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Tue Aug 31, 2010 8:44 am
Profile ICQ WWW
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1410
Location: Boo! inc. Ireland
Unread post Re: TWX port report question.
Singularity wrote:
Hrm. My thought would be the formatting of the CIM lines.

In a TWGS CIM it looks like:
Code:
19966 - 2180 100% - 2320 100%   1390 100%
19977 - 2810 100% - 2490 100%   2300 100%
19980   2360 100% - 2840 100% -  800 100%
19985 - 2040 100%   2460 100% - 2530 100%


Notice the spacing between the - and the number, etc.

Additionally, when you do the old string, does it print a single
":" (colon) by itself as the prompt? Maybe it triggers off the
prompt.



Thanks Sing. Re: old string, you have to type 'C" for Computer, then send the string which results in the : prompt, then RI for ports and sectors, so yes, it does see the colon.

Almost certainly its the spacing. TWGS does course plots differently too, it drove me up the wall until I figured out the difference, as it used bring twassist to a crashing halt. Difference there is that if the plot is more than one line, all lines after the first have a leading space. Twassist doesnt read it as whitespace and stops.

I could easily parse it, anyway to read it into twx?


Tue Aug 31, 2010 9:09 am
Profile
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: TWX port report question.
Kavanagh wrote:
Almost certainly its the spacing. TWGS does course plots differently too, it drove me up the wall until I figured out the difference, as it used bring twassist to a crashing halt. Difference there is that if the plot is more than one line, all lines after the first have a leading space. Twassist doesnt read it as whitespace and stops.

I could easily parse it, anyway to read it into twx?


Ah, the old ver uses a hanging indent for subsequent plot lines.

There's no way I know of to directly import a portspec. You can do
a CR port report, if that option is available in the old version, since
TWWproxy is supposed to update from that too. Provided, of course,
the format is compatible.

Failing that, my thought would be to create a proxy to reformat the
lines and connect TWXproxy to that. Like...

Client -> TWXproxy -> translator -> server

Could probably do something like that pretty easily in python or C.
Since TWXproxy doesn't feed script output thru the database parser
you can't just make a script echo, but you could do...

Client -> TWXproxy -> twxproxy -> server

And have a script in the first TWXproxy read the parsed file and then
echo it back, so that the 2nd TWXproxy (the one closer to the client)
could then interpret it.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Tue Aug 31, 2010 10:19 am
Profile ICQ WWW
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1410
Location: Boo! inc. Ireland
Unread post Re: TWX port report question.
Offhand cant think of anything significant missing in the old version. Am not in any new ones right now, will give it a shot tomorrow, quitting time this side of the pond and no connection at home. Here is the old port report, looks the same as I remember twgs but who knows?

Sector : 1 in The Federation
Beacon : FedSpace, FedLaw Enforced
Ports : Sol, Class 0 (Special)
Planets : (M) Terra
Warps to Sector(s) : 2 - 3 - 4 - 5 - 6 - 7

Command [TL=2007:21:01]:[1] (?=Help)? : C
<Computer>

<Computer activated>

Computer command [TL=2007:21:01]:[1] (?=Help)? R
What sector is the port in? [1] 3372

Commerce report for Sirius: 11:26:06 AM Fri Aug 31, 2022

Items Status Trading % of max OnBoard
----- ------ ------- -------- -------
Fuel Ore Buying 1260 100% 48
Organics Selling 3000 100% 0
Equipment Buying 2920 100% 0

Computer command [TL=2007:21:00]:[1] (?=Help)? Q

<Computer deactivated>

Command [TL=2007:20:02]:[1] (?=Help)? :


If that is compatible, I'll just write a script to write the CIM R to file and then read that to ask for individual CR ports. Great suggestion, thanks. I have a maxedports with user selected cutoffs in SALT I wrote years ago, but I liked the detail I remembered from twx, tracking changes etc.


Tue Aug 31, 2010 10:33 am
Profile
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: TWX port report question.
Kavanagh wrote:
Commerce report for Sirius: 11:26:06 AM Fri Aug 31, 2022

Items Status Trading % of max OnBoard
----- ------ ------- -------- -------
Fuel Ore Buying 1260 100% 48
Organics Selling 3000 100% 0
Equipment Buying 2920 100% 0


That looks like it should work, but then again we're talking about
rather minute details so I might be missing something.

Kavanagh wrote:
If that is compatible, I'll just write a script to write the CIM R to file and then read that to ask for individual CR ports. Great suggestion, thanks. I have a maxedports with user selected cutoffs in SALT I wrote years ago, but I liked the detail I remembered from twx, tracking changes etc.


TWXproxy keeps a database, and since 2.04, updates that DB off CR
reports. Ex: I use it in my planet trader to check the port before I
pwarp there to make sure it hasn't already been hit by someone else.

If it does work, you can easily find out by using $pd. $, p, d, then the
sector number of the port you want to test. That will show you how
the port looks in the DB. If it's updated properly, you can use the
database w/o needing a file. If you cr an upgraded port, $pu will show
it too.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Tue Aug 31, 2010 12:05 pm
Profile ICQ WWW
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post Re: TWX port report question.
use vid CR script (on navhaz,com) this will update Swath and twx.

_________________
Coconut Telegraph (ICQ)#586137616
Team Speak3@ 220.244.125.70:9987
Founding Member -=[Team Kraaken]=- Winner of Gridwars 2010 - Ka Pla
Image
Jesus wounldn't Subspace Crawl


Tue Aug 31, 2010 10:05 pm
Profile ICQ YIM
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1410
Location: Boo! inc. Ireland
Unread post Re: TWX port report question.
Singularity wrote:
Kavanagh wrote:
Commerce report for Sirius: 11:26:06 AM Fri Aug 31, 2022

Items Status Trading % of max OnBoard
----- ------ ------- -------- -------
Fuel Ore Buying 1260 100% 48
Organics Selling 3000 100% 0
Equipment Buying 2920 100% 0


That looks like it should work, but then again we're talking about
rather minute details so I might be missing something.


Drat, doesnt work. Like you said, probably something trivial. Oh well, back to the SALT salt mine. Thanks for trying.

EDIT:
Yep, its different, TWGS has the columns aligned.


Wed Sep 01, 2010 6:45 am
Profile
Immortal Op

Joined: Thu May 29, 2008 9:04 am
Posts: 143
Location: Kitchener, Ontario, Canada
Unread post Re: TWX port report question.
Kavanagh wrote:
Yep, its different,


:D

_________________
Stoneslinger
http://theswampbbs.net
telnet://theswampbbs.net


Tue Sep 07, 2010 5:23 am
Profile WWW
Chief Warrant Officer
User avatar

Joined: Sun Jan 20, 2008 5:15 am
Posts: 142
Unread post Re: TWX port report question.
Seems to me like you should be able to read each line of the CIM, parse it, and then update the database directly. Am I missing something?


Tue Sep 07, 2010 8:29 am
Profile
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1410
Location: Boo! inc. Ireland
Unread post Re: TWX port report question.
Scrat wrote:
Seems to me like you should be able to read each line of the CIM, parse it, and then update the database directly. Am I missing something?


I can easily read it and parse it, but havent a clue how to get it into twx. Normally, twx is in the background when you go cim and grab the port data, you dont have to do anything to cause twx to take note of the report. I would be just writing a text file with the same format as the twgs 'R" report, and dont know how to get that into twx database.


Tue Sep 07, 2010 9:36 am
Profile
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: TWX port report question.
Scrat wrote:
Seems to me like you should be able to read each line of the CIM, parse it, and then update the database directly. Am I missing something?


There's no way to update TWXproxy directly like that.

The only way to do this would be to try the bridge I was talking about earlier...

telnet -> twxproxy -> twxproxy -> server.

Basically instead of 1 TWXproxy, you have 2. Write a script in the second one
that reads the CIM to a file, then spits it out as a format that the first can
understand.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Tue Sep 07, 2010 2:35 pm
Profile ICQ WWW
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1838
Location: Guam USA
Unread post Re: TWX port report question.
Quote:
upgraded port listing


Humm . first you need upgraded ports , now if the carrot doesn't work because you are using an old outdated tw server , you can always write a script
that would make a file that would read in your port sector numbers and
have a second part of script read to array that list
then do a while loop on each in a

readtoarray $filename $loop
setvar $i 1
While ($i <= $loop)
send "cr"& $loop[$i] &"*q"
waiton "<Computer deactivated>"
Add $i 1
end

the best you can get with both new and old tw servers if salt wont help ya.
give it a try and let us all know.

And if you care to join the new generation , we'de all love to see ya again
in a real game.

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://vkworld.ddns.net:2002
Discord @ DiverDave#8374
Vid's World Discord

Founding Member -=[Team Kraaken]=- Ka Pla

Image
Winners of Gridwars 2010
MBN Fall Tournament 2011 winners Team Kraaken
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Tue Sep 07, 2010 4:45 pm
Profile WWW
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: TWX port report question.
Vid Kid wrote:
then do a while loop on each in a


Wouldn't it be faster/easier to just parse the old format CIM?

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Tue Sep 07, 2010 4:47 pm
Profile ICQ WWW
Ambassador

Joined: Wed Feb 28, 2001 3:00 am
Posts: 1410
Location: Boo! inc. Ireland
Unread post Re: TWX port report question.
Vid Kid wrote:
Quote:
upgraded port listing


Humm . first you need upgraded ports , now if the carrot doesn't work because you are using an old outdated tw server , you can always write a script
that would make a file that would read in your port sector numbers and
have a second part of script read to array that list
then do a while loop on each in a

readtoarray $filename $loop
setvar $i 1
While ($i <= $loop)
send "cr"& $loop[$i] &"*q"
waiton "<Computer deactivated>"
Add $i 1
end

the best you can get with both new and old tw servers if salt wont help ya.
give it a try and let us all know.

And if you care to join the new generation , we'de all love to see ya again
in a real game.


I have a SALT script that sorts for maxedports above a user selected threshold:

main()
{
//extract maxed ports. .

#STACK 32768
int value;str svalue[5]; int i;
prints("Cutoff ? "); getS(svalue);prints(); value=stoi(svalue);
dos("del c:\tfw\tempcap.txt",0) ;
Capture("c:\tfw\tempcap.txt");
cPutS("CÈÉÊËÌÍ");
if (waitFor(":",50)) cPutC('R');
if (waitFor(":",500)) cPutC('Q');
if (waitFor("(?=Help)? :",50))capture("*CLOSE*");
clear_scr();
prints("");
dos("del c:\tfw\maxports.txt",0) ;
int f;
int g;
str s[80];
str ore[10];str org[10];str equip[10];
str blank[80];
f = fopen("c:\tfw\tempcap.txt", "r"); //EDIT TO PATH,CAPFILENAME.
g = fopen("c:\tfw\maxports.txt", "a"); //EDIT TO PATH
while (!feof(f)) {
fgets(s, 80, f);// read line of text from capture log
subchrs(s,6,5,ore);subchrs(s,18,5,org);subchrs(s,30,5,equip); //was 6,18,30
if((stoi(ore)>value||stoi(org)>value||stoi(equip)>value)&&subchr(s,15)=="%"){fputs(s,g);
fputs("^M^J",g);prints(s);}
}
fclose(g);
}

"ÈÉÊËÌÍ" works in the old version instead of the caret. I was hoping to use twx as I like the way it tracks the ports that are fig blocked, and Sing's method would probably be beyond my ability to use, writing SALT twists the brain.


Wed Sep 08, 2010 4:17 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 17 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 9 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.