Dedicated server autopilot (current version: 2.0.4)
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 20
- Joined: 31 Aug 2006 15:28
My server runs Trustix. I write standard, portable Tcl code (it's hard not to) and it should run on any version of Tcl/Tk, although I don't have any versions older than 8 on which to test it.
The MySQL module requires a version of mysqltcl of at least 3.0.0, but since it doesn't tend to come bundled as standard most would go and grab the most recent.
The IRC module requires a fairly recent tcllib. Anything of the last 5 years should do it.
The MySQL module requires a version of mysqltcl of at least 3.0.0, but since it doesn't tend to come bundled as standard most would go and grab the most recent.
The IRC module requires a fairly recent tcllib. Anything of the last 5 years should do it.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
-
- Engineer
- Posts: 20
- Joined: 31 Aug 2006 15:28
I think it is not your script which prepares problems.
I think it is older? versions of expect, tcl or whatever on my server..
on my debian stable sarge I-Net Server runs:
on my Debain Sid workstation runs:
upgrading expect to 5.43.0 does not help..
Which tcl version runs on your server?
thx for help!
I think it is older? versions of expect, tcl or whatever on my server..
on my debian stable sarge I-Net Server runs:
Code: Select all
Sarge:
expect : 5.42.1
tcl8.3 : 8.3.5
tcl8.4 : 8.4.9
Code: Select all
SID:
expect : 5.43.0
tcl8.3 : 8.3.5
tcl8.4 : 8.4.12
Which tcl version runs on your server?
thx for help!
All those versions of Tcl and Expect work with Autopilot.
Instead of asking me what's on my server (even with the same version of software, it could easily be configured differently) why don't you try telling me what's going wrong for you?
Instead of asking me what's on my server (even with the same version of software, it could easily be configured differently) why don't you try telling me what's going wrong for you?
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
Well it's not like I have anything elsse to do at the moment.Brianetta wrote:Not sure what kind hand you could give, other than just writing them.Archonix wrote:If you need a hand with the PHP scripts I could help out.

Brignell’s law of consensus: At times of high scientific controversy, the consensus is always wrong.
-
- Engineer
- Posts: 20
- Joined: 31 Aug 2006 15:28
O.k. you know my Posts in this threadBrianetta wrote:All those versions of Tcl and Expect work with Autopilot.
nstead of asking me what's on my server (even with the same version of software, it could easily be configured differently) why don't you try telling me what's going wrong for you?

sice nightly -r5953 or MiniIN -r6028 work it not any more with exept on my Debian Stable I-Net Server.
On my home workstation with Debian Sid (developer version) work it.
You know the difference between Debain stable (sarge) and Debain unstable (Sid)?
http://www.debian.org/releases/
With version nightly-r5953/Miniin-r6028 or greater quit openttd after start from Expect.
on debian sarge:
Code: Select all
hur@debian:~/OTTD-dedicated-linux-i386-MiniIN-r6403-MiniIN$ /usr/local/bin/expect
expect1.1> exp_spawn ./openttd -D
exp_spawn ./openttd -D
1028
expect1.2>
Code: Select all
hur 1020 0.0 0.7 11492 1916 pts/5 S+ 16:06 0:00 /usr/local/bin/expect
hur 1028 0.1 0.0 0 0 ? Zs 16:07 0:00 [openttd] <defunct>
hur 1051 0.0 0.3 2500 852 pts/8 R+ 16:09 0:00 ps aux
hur 1052 0.0 0.3 2040 772 pts/8 S+ 16:09 0:00 grep bur
Code: Select all
rainer@paladin:~/OTTD-linux-i386-minniin$ expect
expect1.1> exp_spawn ./openttd -D -c openttd.cfg
exp_spawn ./openttd -D -c openttd.cfg
23443
expect1.2>
Code: Select all
rai 23435 0.0 0.3 12880 1904 pts/3 Sl+ 16:13 0:00 expect
rai 23443 15.8 1.9 23196 10284 pts/8 Rs+ 16:13 0:02 ./openttd -D -c openttd.cfg
rai 23450 0.0 0.1 3860 932 pts/5 R+ 16:13 0:00 ps aux
rai 23451 0.0 0.1 4952 964 pts/5 D+ 16:13 0:00 /bin/bash
Code: Select all
hur@debian:~/OTTD-dedicated-linux-i386-MiniIN-r6403-MiniIN$ /usr/local/bin/expect -d autopilot_172.txt
expect version 5.43.0
argv[0] = /usr/local/bin/expect argv[1] = -d argv[2] = autopilot_172.txt
set argc 0
set argv0 "autopilot_172.txt"
set argv ""
executing commands from command file autopilot_172.txt
Starting new game
exp_spawn ./openttd -c openttd.cfg -D
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {1082}
*** AUTOPILOT ENGAGED ***
send: sending "debug_level net=0\n" to { exp6 }
send: sending "net_frame_freq 2\n" to { exp6 }
send: sending "pause\n" to { exp6 }
expect: does "" (spawn_id exp6) match regular expression "\n\*\*\* .* has joined the game\r"? no
"\n\*\*\* .* has left the game"? no
"show autopilot version"? no
"recount clients"? no
dbg: [NET][Core] Starting network...
dbg: [NET][Core] Network online. Multiplayer available.
dbg: Detected broadcast addresses:
dbg: 0) 192.168.0.255
dbg: [NET] Listening on 0.0.0.0:3979
dbg: [NET][UDP] Listening on port 0.0.0.0:3979
dbg: Generating map, please wait...
dbg: Percent complete: 5
debug_level net=0
net_frame_freq 2
pause
expect: does "dbg: [NET][Core] Starting network...\r\ndbg: [NET][Core] Network online. Multiplayer available.\r\ndbg:
Detected broadcast addresses:\r\ndbg: 0) 192.168.0.255\r\ndbg: [NET] Listening on 0.0.0.0:3979\r\ndbg: [NET][UDP] Lis
tening on port 0.0.0.0:3979\r\ndbg: Generating map, please wait...\r\ndbg: Percent complete: 5\r\ndebug_level net=0\r\
nnet_frame_freq 2\r\npause\r\n" (spawn_id exp6) match regular expression "\n\*\*\* .* has joined the game\r"? no
"\n\*\*\* .* has left the game"? no
"show autopilot version"? no
"recount clients"? no
expect: read eof
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "dbg: [NET][Core] Starting network...\r\ndbg: [NET][Core] Network online. Multiplayer a
vailable.\r\ndbg: Detected broadcast addresses:\r\ndbg: 0) 192.168.0.255\r\ndbg: [NET] Listening on 0.0.0.0:3979\r\nd
bg: [NET][UDP] Listening on port 0.0.0.0:3979\r\ndbg: Generating map, please wait...\r\ndbg: Percent complete: 5\r\ndebug_level net=0\r\nnet_frame_freq 2\r\npause\r\n"
write() failed to write anything - will sleep(1) and retry...
expect: does "" (spawn_id exp0) match glob pattern "help\n"? no
"exit\n"? no
"save\n"? no
"version\n"? no
"license\n"? no
"recount clients\n"? no
"count .*\n"? no
".*\n"? no
expect: timed out
expect: spawn id exp6 not open
while executing
"expect -nobrace -re {
} {*\* .* has joined the game
exp_send "unpause\n"
set output $expect_out(0,string)
set output_sp..."
invoked from within
"expect {
-re "\n\\\*\\\*\\\* .* has joined the game\r" {
exp_send "unpause\n"
set output $expect_out(0,string)
set ou..."
("while" body line 7)
invoked from within
"while true {
if $recount_trigger {
set auto_flag 1
exp_send "echo recount clients\n"
set recount_trigger false
}
expect {
..."
(file "autopilot_172.txt" line 89)
hur@debian:~/OTTD-dedicated-linux-i386-MiniIN-r6403-MiniIN$
I do not know why it still goes.
thx for help. greetings Picknicker
-
- Engineer
- Posts: 20
- Joined: 31 Aug 2006 15:28
Sorry I think Im missing somthing with this!glx wrote:For windows users who don't want to apply my patch and compile, I made a little app that converts openttd.exe from GUI to console (and vice versa). Just run convert.exe in the same dir as openttd.exe. Works for all versions (nightlies and releases).
The source is included in the zip.
See http://www.tt-forums.net/viewtopic.php?p=489470#489470 for windows compatible autopilot script and how to use it.
If I run Open TTD 0.48 I get ---
Code: Select all
C:\Program Files\OpenTTD\OpenTTD-0.48>convert.exe
Unknown mode.
Code: Select all
C:\Program Files\OpenTTD\OpenTTD-r5993>convert.exe
GUI mode detected. Converting to console.
C:\Program Files\OpenTTD\OpenTTD-r5993>convert.exe
Console mode detected. Converting to GUI.
Sorry Ploes, I didn't try it with 0.4.8
It's now fixed. You can get the updated version here
Thanks for noticing.

It's now fixed. You can get the updated version here
Thanks for noticing.
-
- Engineer
- Posts: 20
- Joined: 31 Aug 2006 15:28
No problems, just when I'm hosting I like to use the latest stable version.glx wrote:Sorry Ploes, I didn't try it with 0.4.8![]()
It's now fixed. You can get the updated version here
Thanks for noticing.
I can now say AutoPoilot 2.02 is now running on Windows

Or make a shortcut to "tclsh autopilot.txt" to get the double-click ability!glx wrote:There is one UNSOLVABLE problem with it: a console popup and close before the game window if run from explorer (with double-click).
It's a bit annoying, but there's no other way if you want a "real" console.
To run it, install ActiveTcl and run "tclsh autopilot.txt" from a command shell (in openttd dir of course)
- Attachments
-
- auto.GIF (18.76 KiB) Viewed 10480 times
Anonymous SVN access for autopilot
Anonymous SVN access for autopilot
Access to the SVN server on ppcis.org is only available through ssh. The URL to check out the autopilot is in the code block below. Anonymous access is available by using one of the attached private keys. These keys are only useful for reaching the SVN server on ppcis.org. One is for users of OpenSSH, one is for users of PuTTY.
If you wish to have your own public key installed (for convenience, perhaps) please send it in openssh compatible format by PM or email.
Access to the SVN server on ppcis.org is only available through ssh. The URL to check out the autopilot is in the code block below. Anonymous access is available by using one of the attached private keys. These keys are only useful for reaching the SVN server on ppcis.org. One is for users of OpenSSH, one is for users of PuTTY.
If you wish to have your own public key installed (for convenience, perhaps) please send it in openssh compatible format by PM or email.
Code: Select all
svn+ssh://svn@ppcis.org/autopilot
- Attachments
-
- autopilot-svn.ppk.txt
- PuTTY private key file for anonymous autopilot SVN access (you can remove .txt extension for easier browsing, although this isn't essential)
- (1.4 KiB) Downloaded 456 times
-
- autopilot-svn.rsa.txt
- OpenSSH private key file for anonymous autopilot SVN access
- (1.63 KiB) Downloaded 475 times
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
Ok here is a (trying) window server admin. 
I got it to work but i have the funny feeling something is not ok.
It started and my server is in the server list but it is giving not the code in console where i was hoping for.
i have the feeling something is going wrong here cause normaly i can see its broadcasting. But now i cant see it.
Is this good or did i missed something?

I got it to work but i have the funny feeling something is not ok.
It started and my server is in the server list but it is giving not the code in console where i was hoping for.
Code: Select all
Autopilot engaged
Starting a new game named '<[NL]OpenTTDServer@Multisite.nl.tt>'
Landscape is normal
Map is 256 tiles north to south by 256 tiles east to west
Starting year is 1950
doneclientcount
Game paused.
ERROR: command or variable not found
doneclientcount
Game is already paused.

Is this good or did i missed something?
It's perfectly fine. The error is simply down to your using 0.4.8 or earlier, which doesn't implement the players command. The lack of network debugging info is because one of the first things that autopilot does is to turn of network debugging info. This helps with responsiveness, because autopilot has much less text to look at.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
Who is online
Users browsing this forum: Semrush [Bot] and 2 guests