The idea is to have a basic lib that can be used to emulate a client for OpenTTD. This lib can then be used to track certain things, emulate a chat bridge or do other non-playing related things.
What is currently working:
- python client can join the game as spectator
- IRC chat bridge
- client has a very nice plugin interface (thanks to yorick)
- idle timer plugin (detects and displays when players idle and reports when they are back)
- timeleft plugin (warns the users how much time is left for playing)
- webserver plugin (experimental)
Also, we have coded some general tools, like a server information tool or some program that generates statistics for all OTTD servers online.
example output from the server stat tool:
Code: Select all
# python ottd-serverstats.py
###############################################################################
OpenTTD Server statistics (Mon Jun 28 23:12:02 2010):
the master server currently knows 193 servers, 193 are up, 193 could be queried
client: 197 / 6789 (2.90%)
companies: 722 / 2195 (32.89%)
spectators: 16 / 4237 (0.38%)
41 / 193 servers have a password (21.24%)
181 / 193 servers are dedicated (93.78%)
57 / 193 servers have newgrfs (29.53%)
65 / 197 players are playing on newgrf servers (32.99%)
used versions:
1.0.2: 76 ( 39.4%), 120 clients
1.0.1: 68 ( 35.2%), 61 clients
1.0.0: 18 ( 9.3%), 6 clients
0.7.5: 10 ( 5.2%), 5 clients
1.0.0-RC3: 3 ( 1.6%), 0 clients
0.6.2: 2 ( 1.0%), 1 clients
0.7.2: 2 ( 1.0%), 0 clients
1.0.0-RC2: 2 ( 1.0%), 0 clients
r19891M: 1 ( 0.5%), 2 clients
r13019M: 1 ( 0.5%), 2 clients
r20001: 1 ( 0.5%), 0 clients
0.6.3: 1 ( 0.5%), 0 clients
0.7.4: 1 ( 0.5%), 0 clients
0.7.3: 1 ( 0.5%), 0 clients
0.7.0: 1 ( 0.5%), 0 clients
0.7.1: 1 ( 0.5%), 0 clients
IS2.1.1: 1 ( 0.5%), 0 clients
IS2.0-beta5: 1 ( 0.5%), 0 clients
1.0.0-RC1: 1 ( 0.5%), 0 clients
mio v0.5 (r198: 1 ( 0.5%), 0 clients
used map sizes:
1024 x 1024 : 57 ( 29.5%), 44 clients
512 x 512 : 47 ( 24.4%), 67 clients
1024 x 512 : 18 ( 9.3%), 26 clients
2048 x 2048 : 17 ( 8.8%), 14 clients
256 x 256 : 16 ( 8.3%), 6 clients
512 x 1024 : 8 ( 4.1%), 19 clients
512 x 256 : 7 ( 3.6%), 15 clients
2048 x 512 : 4 ( 2.1%), 3 clients
1024 x 2048 : 3 ( 1.6%), 1 clients
128 x 128 : 3 ( 1.6%), 1 clients
2048 x 256 : 3 ( 1.6%), 0 clients
512 x 2048 : 3 ( 1.6%), 0 clients
512 x 128 : 3 ( 1.6%), 0 clients
256 x 1024 : 2 ( 1.0%), 1 clients
128 x 2048 : 1 ( 0.5%), 0 clients
1024 x 128 : 1 ( 0.5%), 0 clients
used languages:
ANY: 132 ( 68.4%), 160 clients
GERMAN: 22 ( 11.4%), 12 clients
ENGLISH: 16 ( 8.3%), 9 clients
POLISH: 11 ( 5.7%), 8 clients
FRENCH: 5 ( 2.6%), 1 clients
SPANISH: 2 ( 1.0%), 3 clients
RUSSIAN: 1 ( 0.5%), 2 clients
CZECH: 1 ( 0.5%), 1 clients
KOREAN: 1 ( 0.5%), 1 clients
DUTCH: 1 ( 0.5%), 0 clients
ITALIAN: 1 ( 0.5%), 0 clients
used landscapes:
normal: 141 ( 73.1%), 140 clients
tropic: 33 ( 17.1%), 42 clients
arctic: 17 ( 8.8%), 12 clients
toyland: 2 ( 1.0%), 3 clients
used maps:
Random Map: 149 ( 77.2%), 167 clients
(Loaded game): 25 ( 13.0%), 11 clients
Mega Transport, 14. Feb 1992.sav (Loaded game): 1 ( 0.5%), 3 clients
Plunthill City Transport, 4. Okt 1960.sav (Loaded game): 1 ( 0.5%), 2 clients
Simplewick Transport, 15ty Kwi 2003.sav (Loaded game): 1 ( 0.5%), 2 clients
DetailHG2 (Loaded game): 1 ( 0.5%), 2 clients
Kongo Müller Transport, 29. Sep 2014.sav (Loaded game): 1 ( 0.5%), 2 clients
Deutsche Demokr. Logistik, 28. Jan 2042.sav (Loaded game): 1 ( 0.5%), 2 clients
Cheel Transport, 23--¦ -+-¦-Ç 1962 -¦..sav (Loaded game): 1 ( 0.5%), 2 clients
template2.sav (Loaded game): 1 ( 0.5%), 1 clients
Weri & beenie Transport AG, 15. Aug 2154.sav (Loaded game): 1 ( 0.5%), 1 clients
USA.scn (Loaded scenario): 1 ( 0.5%), 1 clients
Jan.sav (Loaded game): 1 ( 0.5%), 1 clients
bark.sav (Loaded game): 1 ( 0.5%), 0 clients
6 newgrf.sav (Loaded game): 1 ( 0.5%), 0 clients
HU.sav (Loaded game): 1 ( 0.5%), 0 clients
1.sav (Loaded game): 1 ( 0.5%), 0 clients
filip1.sav (Loaded game): 1 ( 0.5%), 0 clients
Agora_1923.sav.sav (Loaded game): 1 ( 0.5%), 0 clients
FixingAI.sav (Loaded game): 1 ( 0.5%), 0 clients
start.sav (Loaded game): 1 ( 0.5%), 0 clients
used GRFs (431 used, 164 unique, 532 in database):
Generic Tram Set v0.4: 35 ( 8.1%), 26 clients
eGRVTS v1.0: 24 ( 5.6%), 17 clients
Industrial Stations Renewal v0.8.0: 17 ( 3.9%), 8 clients
Aviators Aircraft (av8) v1.7: 11 ( 2.6%), 7 clients
Total Town Replacement Set v3.02a: 10 ( 2.3%), 5 clients
FISH 0.5: 8 ( 1.9%), 6 clients
Temperate Trainset: 7 ( 1.6%), 26 clients
Disable Monorail and Maglev: 7 ( 1.6%), 26 clients
North American Renewal Set (NARS) 2.03: 7 ( 1.6%), 7 clients
Experts servers - industries (v0.4): 7 ( 1.6%), 9 clients
HEQS (Heavy Equipment Set) 0.6: 6 ( 1.4%), 0 clients
BaseCosts Mod 3.0: 6 ( 1.4%), 6 clients
BaseCosts Mod Presets 1.4: 6 ( 1.4%), 28 clients
Temperate Oil Wells only_decrease neutraliser: 6 ( 1.4%), 6 clients
NewShips: 6 ( 1.4%), 2 clients
City Stations: 5 ( 1.2%), 5 clients
Metro Track Set: 5 ( 1.2%), 5 clients
station's name from nearby industries v1.2.3: 5 ( 1.2%), 26 clients
Luukland's City Builder v1.3: 5 ( 1.2%), 16 clients
Stolen Trees: 5 ( 1.2%), 5 clients
Polish PKP Set v1.6: 5 ( 1.2%), 3 clients
Surburban Stations: 5 ( 1.2%), 5 clients
<54630002>: 4 ( 0.9%), 3 clients
NewStations V0.42 05.09.05: 4 ( 0.9%), 4 clients
Ex's - City Builder: 4 ( 0.9%), 7 clients
ECS. Wood vector beta 5 (25 Nov 2009): 4 ( 0.9%), 4 clients
DB Double Deck Coaches: 4 ( 0.9%), 3 clients
Rural Stations: 4 ( 0.9%), 3 clients
ECS. Chemicals vector II beta 5 (25 Nov 2009): 4 ( 0.9%), 4 clients
Very large ships 0.1: 4 ( 0.9%), 2 clients
ECS. Machinery vector beta 5 (25 Nov 2009): 4 ( 0.9%), 4 clients
ECS. Town vector beta 5 (25 Nov 2009): 4 ( 0.9%), 4 clients
ECS. Construction vector beta 5 (25 Nov 2009): 4 ( 0.9%), 4 clients
ECS. Agricultural vector beta 5 (25 Nov 2009): 4 ( 0.9%), 4 clients
Long vehicles v4 (07 Sep 2007): 4 ( 0.9%), 1 clients
ECS. Basic vector beta 5 (25 Nov 2009): 4 ( 0.9%), 4 clients
UK Renewal Train Set v3.04: 4 ( 0.9%), 2 clients
Bigger Train Depot: 3 ( 0.7%), 3 clients
TransRapid Track Set BETA 1.1: 3 ( 0.7%), 2 clients
German Signals v0.4: 3 ( 0.7%), 1 clients
Total Bridge Renewal Set Version 1.12: 3 ( 0.7%), 3 clients
Light-rail/Tramtracks: 3 ( 0.7%), 2 clients
UK Renewal Train Set v3 Add-ons .04: 3 ( 0.7%), 2 clients
2cc Train Set 1.0.1: 3 ( 0.7%), 4 clients
Hover Bus 1.0: 3 ( 0.7%), 1 clients
Generic buffer-stops v0.1: 3 ( 0.7%), 3 clients
ECS. Houses beta 5 (13 Dec 2009): 3 ( 0.7%), 4 clients
German Road Vehicle Set v0.11b: 2 ( 0.5%), 2 clients
Modern Suburban Stations: 2 ( 0.5%), 2 clients
World Airliners Set Alpha Release: 2 ( 0.5%), 1 clients
CS Stations Set - Buildings: 2 ( 0.5%), 0 clients
Dutch Trainset Alpha 1.1: 2 ( 0.5%), 0 clients
OpenGFX - newTerrain v0.4: 2 ( 0.5%), 2 clients
Aviators Aircraft (av8) v1.501: 2 ( 0.5%), 2 clients
Japanese Stations v2.0a: 2 ( 0.5%), 2 clients
CS Stations Set - Platforms & Stops v0.3 alfa: 2 ( 0.5%), 0 clients
Canadian Stations Set v0.3d: 2 ( 0.5%), 2 clients
Aviators Aircraft (av8) v1.501 extra aircraft: 2 ( 0.5%), 2 clients
FIRS Industry Replacement Set 0.1.2: 2 ( 0.5%), 0 clients
Japanese Stations v2.0: 2 ( 0.5%), 1 clients
New Tram Tracks v0.4.1: 2 ( 0.5%), 2 clients
US Train Set version 0.87.4 (27 Apr 2007): 2 ( 0.5%), 0 clients
Refit Default RVs: 2 ( 0.5%), 0 clients
BK Enhanced Tunnels v1.0: 2 ( 0.5%), 1 clients
North American City Set v0.1c: 2 ( 0.5%), 2 clients
US Stations set v0.86 (09 Jan 2006): 2 ( 0.5%), 2 clients
Rivers v0.1 13.06.07: 2 ( 0.5%), 1 clients
Better Vehicle Names: 2 ( 0.5%), 0 clients
Modern Tram Set r3: 2 ( 0.5%), 1 clients
North American Roads Set v1.0: 2 ( 0.5%), 0 clients
Aviators Aircraft (av8) v1.331: 2 ( 0.5%), 2 clients
CS railroad tracks [-îS koleje] v1.4: 2 ( 0.5%), 0 clients
Dutch Tram Set - Release Candidate 1 (r26): 2 ( 0.5%), 2 clients
<5463c402>: 1 ( 0.2%), 0 clients
UK Tram Set TASTER r39M: 1 ( 0.2%), 2 clients
Generic Cars v0.4: 1 ( 0.2%), 2 clients
New water v0,7 .New Water Style for All climates by : 1 ( 0.2%), 1 clients
Beriev Be-200: 1 ( 0.2%), 2 clients
2cc Trainset v2.0 Beta1M: 1 ( 0.2%), 0 clients
FISH nightly-r245M: 1 ( 0.2%), 1 clients
Industrial Stations Renewal v0.5.0: 1 ( 0.2%), 2 clients
German Road Vehicle Set v0.11b: 1 ( 0.2%), 1 clients
BK Tunnel Set v0.3b: 1 ( 0.2%), 2 clients
Logic engine 0.6: 1 ( 0.2%), 0 clients
Old Wagons with New Cargos 1.1: 1 ( 0.2%), 0 clients
New Coal Mine: 1 ( 0.2%), 0 clients
New Ship Depot: 1 ( 0.2%), 2 clients
2cc Trainset v2.0 2.0-Beta2: 1 ( 0.2%), 1 clients
Base Costs Mod 2.0beta3: 1 ( 0.2%), 0 clients
Dutch station set: 1 ( 0.2%), 0 clients
AlpineClimate V0.21 18.05.06: 1 ( 0.2%), 0 clients
German Road Vehicle Set v0.22: 1 ( 0.2%), 1 clients
Combined North American Signals v1.1: 1 ( 0.2%), 2 clients
CSD set v. 1.5.Beta : 1 ( 0.2%), 0 clients
TD DP+ A set of trains designed to complement the de: 1 ( 0.2%), 0 clients
Road Vehicles in Romania 0.5.0: 1 ( 0.2%), 2 clients
Reduced Passenger Payment v1.0: 1 ( 0.2%), 2 clients
New fences: 1 ( 0.2%), 0 clients
Japanese Train Set v2.1: 1 ( 0.2%), 0 clients
North American City Set v1.0 : 1 ( 0.2%), 2 clients
DB Set V0.82 ECS extesion 09.10.07: 1 ( 0.2%), 2 clients
Modern Suburban Stations: 1 ( 0.2%), 1 clients
Dutch Catenary: 1 ( 0.2%), 0 clients
Junkers Ju-52: 1 ( 0.2%), 2 clients
CSTramSet v0.1: 1 ( 0.2%), 0 clients
Dutch station set: 1 ( 0.2%), 1 clients
DB Set V0.82 (XL) 05.05.05: 1 ( 0.2%), 2 clients
Foundations replacement: 1 ( 0.2%), 2 clients
Sears Tower: 1 ( 0.2%), 1 clients
VAST: VAST Assortment of Station Tiles - with extras: 1 ( 0.2%), 1 clients
NH Train depot v0.1: 1 ( 0.2%), 1 clients
Dutch Tram Set r15: 1 ( 0.2%), 0 clients
Aviators Aircraft (av8) v1.5: 1 ( 0.2%), 0 clients
New Factory for TTD: 1 ( 0.2%), 1 clients
Tropic Refurbishment Set v0.3.1: 1 ( 0.2%), 0 clients
CSD SignalSet v2.01: 1 ( 0.2%), 0 clients
Canadian Stations Set v0.3d: 1 ( 0.2%), 1 clients
Brick Freight Stations: 1 ( 0.2%), 2 clients
Main HQ: 1 ( 0.2%), 0 clients
CSTramSet v0.2: 1 ( 0.2%), 0 clients
North American Renewal Set (NARS) 2.0: 1 ( 0.2%), 2 clients
Norwegian Trainset v0.4b [Jan 2006] for TTDPatch: 1 ( 0.2%), 2 clients
YARRS: 1 ( 0.2%), 0 clients
Aviators Aircraft (av8) v1.6: 1 ( 0.2%), 0 clients
Dutch Tram Set - BETA 2.1 (r20): 1 ( 0.2%), 2 clients
Original vehicle names: 1 ( 0.2%), 2 clients
McDonald's: 1 ( 0.2%), 1 clients
Sukhoi SuperJet-100: 1 ( 0.2%), 2 clients
Town Growth Challenge (Industry) alpha: 1 ( 0.2%), 0 clients
Canadian Stations Set v1.0 : 1 ( 0.2%), 2 clients
Smooth snow transition: 1 ( 0.2%), 2 clients
2cc Chimaera: 1 ( 0.2%), 0 clients
New Iron Ore Mine: 1 ( 0.2%), 0 clients
Platforms: 1 ( 0.2%), 2 clients
HOVS UK Bus Set: 1 ( 0.2%), 2 clients
Basic Platforms Set: 1 ( 0.2%), 0 clients
North American City Set v0.1c: 1 ( 0.2%), 1 clients
Serbian Tram set - OTTD Remix.: 1 ( 0.2%), 2 clients
Combined Airport Set V0.5: 1 ( 0.2%), 1 clients
A New Monorail Set nightly-r15: 1 ( 0.2%), 0 clients
Aviators Aircraft (av8) v1.5 extra aircraft: 1 ( 0.2%), 0 clients
Universal fonts v0.9: 1 ( 0.2%), 0 clients
Oil-fired Power Station: 1 ( 0.2%), 1 clients
NewStations V0.42 05.09.05: 1 ( 0.2%), 1 clients
German Tram Set V0.4.2: 1 ( 0.2%), 2 clients
US Stations set v0.86 (09 Jan 2006): 1 ( 0.2%), 1 clients
New Depots: 1 ( 0.2%), 2 clients
Raise landscaping costs: 1 ( 0.2%), 0 clients
Base Costs Mod 2.0beta2: 1 ( 0.2%), 0 clients
Town Growth Challenge (Cargo) alpha: 1 ( 0.2%), 0 clients
Japanese Train Set v2.1a: 1 ( 0.2%), 0 clients
NewShips: 1 ( 0.2%), 1 clients
North American Roads Set v1.0a: 1 ( 0.2%), 1 clients
newterrain.grf: 1 ( 0.2%), 1 clients
Lumber Mill 1.1: 1 ( 0.2%), 1 clients
pb_viaduct.grf: 1 ( 0.2%), 2 clients
Platforms: 1 ( 0.2%), 1 clients
NZR Class DE v1.2: 1 ( 0.2%), 0 clients
Serbian road vehicles. Trucks and buses.: 1 ( 0.2%), 2 clients
Dutch Catenary: 1 ( 0.2%), 1 clients
Monolev Replacement Set v0.3.7: 1 ( 0.2%), 0 clients
Banks and Watertowers can close down: 1 ( 0.2%), 0 clients
General av8ion v0.1: 1 ( 0.2%), 0 clients
Paper on temperate: 1 ( 0.2%), 1 clients
Generated by openttd-python serverstats r288
see also: http://code.google.com/p/openttd-python ... ingStarted