The AutoHost Client is a program to automate the interactions with the Stars! AutoHost web site, as well as some other common actions such as making backups of turn files, launching Stars!, and dumping fleet and planet reports.
- download ahclient.jar v2.2 180kb
- offsite download at sourceforge
- requires Sun's Java Runtime Environment v1.4 or higher
- homepage: Stars! Autohost Client
- author: jchoyt
- note: v2.2 program incorrectly reports v2.11
New in AHClient 2.0:
- new and improved display - shows everyone's status
- Easier to setup - you still have to use / instead of \ for directory separators, but the rest is much easier
- Thanks to Ron's generousity, the polling is faster and much more complete
- The feedback when you upload, download, and screw up is much better
- Last, and definitely best, fleet analyzing! The client now has built in analysis tools to get fantastic amounts of information out of those pesky .F files. Included are: Lists of all cloaked fleets, total visible ship counts by type and owner, a listing of the top 20 or so war fleets, a listing of the top 20 or so bomber fleets. (Since these analyses are based on the f-files, the results shown are only for those fleets you can actually see. This is a double-edged sword. If you have public player scores, you can tell how much is hiding. If you don't have public player scores, while you can judge the local strength of an enemy (or ally), you won't konw their full strength and may assume an enemy has less than he does. WARNING If you used more than one f-file to generate these reports, some fleets may be double counted. This occurs when a fleet is known by two different names in the two or more f-files. For instance, if you've named your fleet \Killer 1\, an ally's f-file will not reflect this naming and there is no way to reliably make the connection between the two f-files. In these cases, I have taken the easy way out by including the fleet count twice and warning you.)
As Good As Ever Features:
- one click turn downloads
- one click turn uploads (mulitple x-files per game!)
- launches Stars! turns with one mouse click
- checks game status every 10 minutes
- creates .FXX and .PXX files for all files downloaded
- creates backups of every m-file downloaded
- Install Java 1.4 JRE (or the SDK, but that's a lot bigger) (you can get this from Sun here).
- Put the jar file in the same directory as your stars.exe file.
- On Windows double click on the jar file.
- Make sure your path to stars.exe is correct.
- Fill in the game parameters
- You should be ready.
- If you are behind a proxy there is no automatic installation step for that. Just follow the instructions above then go to the options pane and add your proxy host and port.
Here I'm assuming that:
- Sun Java JRE v1.5.0+ or Sun JDK v1.5.0+ is installed correctly
- ie ahclient.jar runs when you double click it or when you type java -jar ahclient.jar at the command prompt
- ahclient.jar is located at c:\ahclient
- stars.exe is located at c:\stars
- game.m#, game.h# etc are located at c:\stars\mygame - you may not have these files yet, this is OK
These locations are neither where I have them nor the most likely places but they will serve. You may assume that whenever I use a location for any other file eg (c:\ahclient\ahclient.props) that you can safely replace the file's path exactly as you did for the corresponding path above.
(probably not needed - but a clean slate is easier to work with)
- Close AHClient
- Close Stars!
- Delete c:\ahclient\ahclient.props
- Delete c:\ahclient\*.userprops - be careful of c:\ahclient\.userprops
Running AHClient for the first time
- Double click ahclient.jar or type java -jar ahclient.jar at the command prompt
- AHClient should display:
- "The AutoHost Client doesn't appear to be set up yet. Click OK and we'll get the client and a game set up."
- Click OK.
- AHClient then displays a file dialog titled "Use this Stars! executable"
- Use the dialog to select the Stars!2.6jRC4 .exe file and click "Use this Stars! executable"
- You may need to change the file type to *.exe
- You may need to travel to another directory
- AHClient then displays the "Add a new game" dialog
- Enter the game name *as it appears on AH*
- if the url for the game's page is "http://starsautohost.org/games/pqf2h.htm" then enter "pqf2h" (without the ""s)
- this is also the filename of the game files, ie pqf2h.m# pqf2h.x# etc
- this is case-sensitive
- Edit the game files location to match c:/stars/mygame - note the direction of the / (or c:/stars/pqf2h if you're like me)
- if you already have the game files you can enter the location where they are already
- if you don't yet have the game files or what AHClient to use a different location, AHClient will create the directory you specify and get the game files from AH for you.
- the name of the directory doesn't have to be the same as the game name.
- Enter your player number - this is the same number that appears in the extension of your game files (ie 5 for game.m5)
- Enter your Stars password - this is the password that Stars! asks for when you open this game (not your stars serial code)
- If this is your player ID (as opposed to your ally's who has given you his AH upload password so you can view his turn) and you wish to use AHClient to upload your turns(why wouldn't you?) then check the box "upload turn"
- by setting up other players (later) and *not* checking this box, hosts or allies can easily keep an eye on games.
- Enter your AH upload/download password
- this should have been sent to you by email from AH, if not you can get it from your game host. They can also change it for you if you wish.
- Click "Add game"
- If you wish to set up additional players, now would be the time to do it via the Options tab and selecting the game in the dropbox. But I digress...
- If you use a proxy to access the web, go to the Options tab, Global Options and enter the proxy Host and port #.
On the Games tab:
- Clicking "Download Turns" will fetch your game.m# file from AH (probably do this first)
- Clicking "Launch Stars!" will open the Stars! game it is beside.
- Clicking "Upload Turns" will upload your game.x#
(from AHClient homepage)
Q: I can't get it to launch the stars exe. It may be something to do with the fact that the '\' characters are disappearing from the path string. I have tried entering them pairwise '\\', but that doesn't seem to help either. Could you give me an example path so I can see what it should look like. i.e., I don't know if I should have a trailing '\', whether i should append Stars!.exe, etc...
A: Java defaults to Unix-style path names. Try using '/' instead of '\'. Alternately, try '\\' instead of '\'. I prefer for former, but it's up to you - either should work.
Location of stars.exe examples:
D:/Jeff's~1/stars/stars.exe * D:\\Jeff's~1\\stars\\stars.exe
Game File Location examples:
- note the DOS 8.3 name. If you have spaces in your path, it may give you trouble. Try using the first 6 letters and "~1" for the directory name. Also note that case DOES matter.
Q: I know I'm an incredible geek, and selfish too, for wanting a superior OS while still running excellent games, but I want to run this on Linux. Will it work?
A: I'm a selfish geek, too. Of course it'll run under Linux. When setting up your "stars.exe" location, use something like "wine -- c:\stars\stars". Of course you have to have your paths set up properly. For more help in setting things up with wine, I can help if I have time. Email me.
Update: I use a simple bash script to run Stars! under Linux. For my Stars! executable, I point to this file:
#! /bin/bash wine -- /c/stars/stars.exe "$@"
Mark Montgomery gracefully provided these scripts for running AHC (bash) and Stars! (Perl). Pick yer poison :o):
#Lauch Stars Auto Host Client cd ~/.wine/fake_windows/stars java -jar ahclient.jar
#!/usr/bin/perl -w # Launch stars! in wine. # Script takes 3 arguments so you can have stars load a game and send # the password if you like. # The Stars! command for this is "stars.exe gamefile -p gamepass." # This script will work properly with the Stars! AutoHost Client. # Just point the stars! executable configuration option of SAHC to this # script instead of directly to the stars! exe. # If you need more command line options, just add more $arg# variables. # Mark D. Montgomery II # 08/16/2004 # email@example.com use POSIX; my ($arg0, $arg1, $arg2, $arg3) = @ARGV; system "cd ~/.wine/fake_windows"; my $cmd = "wine -- c:/stars/stars.exe $arg0 $arg1 $arg2 $arg3"; my $ret = system $cmd; exit $ret;
Q: AHC doesn't work (anymore). Why not?
A: Ron moved his hosting to a new location. Make sure you get AHC version 2.1 or later.
Q: How do I make those .f files mentioned so I can analyze them?
A: AHC should automatically make the files when you download an m-file. Check the directory where your m-files are - you are lookinng for files of the form <gamename>.F<player number> (e.g., buguni3.F11). If you can't find them, you can create them from within Stars!. Use the Reports->Dump to Text File->Fleets (or ->Planets for planet info) menu item. The .Fxx files are the Fleet reports. The .Pxx reports are for planets.
FUQ (Follow-up Question) It didn't make them automatically. I found the reports option. It makes a gamename.fle file. If I rename it to gamename.f<playernumber> AHC tries to open it but gives a bunch of java errors in the log.
A Ah - it needs the NewReports. If the reports are creating .fle files instead of .Fxx files, you need to add this line in your Stars.ini file (in the Windows director). From http://www.starsfaq.com/fileinfo.htm:
- "Adding newreports=1 to the [misc] section will give increased information in your text dumps and change the name of the dump files from gamename.pla to gamename.p## (## being the player number)"
- AutoHost Client was written by jchoyt. At the AHClient website he gives the following credit which we applaud and echo:
- Thanks to Michael Auwers, Jeff McBride, and especially Ron Miller. Without their help, this would not have been possible.