Options for Launching Stars!

From Stars!wiki
Revision as of 19:08, 28 June 2009 by Gible (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Game Setup and Hosting Topics

Stars! can be launched from a DOS or Windows prompt, using the stars! command only or with a variety of options. When you use an option, you must also supply either a player or host file name as an argument. You can also supply only the player or host file name without any other options.

player_file, custom_race_file, or host_file -- Load the specified file. With or without options, supplying the file name causes Stars! to start without displaying the splash screen (startup bitmap).

-a game.def
Create a new game/universe based on the contents of the game.def. This allows you to create new games from the command line.


-b gamelist_file
Generate turns for each game listed in the supplied file name.


-d[p | f | m] [player_file]
Dumps PLA (planets), FLE (fleet), and MAP (universe definition) files associated with a player's game. You can specify any combo of p, f, or m as arguments.


-g[# turns] host_file
generate the specified number of turns and exit. This option forces Stars! to generate the specified number of turns, then exits. You cannot load a player file when you use this option.

Warning: Using -g to generate numerous turns will chew up CPU cycles like nobody's business. Use it judiciously.


-h
Causes Stars! to always ask you for a password when you open a turn file. This helps keep the wimps who can't play without cheating out of your turn files. This is especially useful for hot seat play.


-l
Turn on logging of turn generation status and any errors that occur. Enabling logging will prevent any dialogs, alerts or other user interface elements from halting an automatic turn server. Logging is ignored if the host dialog or player interface is visible. It is only meaningful for command line actions such as turn generation and game creation via a .def file. A .log file looks like this:
  Stars! Version 2.60j
  09/28/98 12:01:17 - Generating year 2400
  09/29/98 12:01:22 - Succeeded
  09/29/98 15:55:41 - Generating year 2401
  09/29/98 15:55:44 - Succeeded
  09/30/98 15:48:37 - Generating year 2402
  09/30/98 15:48:41 - Succeeded
There are a large number of possible things that might get recorded in a log file including any error message that could normaly pop up during turn generation. You can turn on logging for all command line actions by adding Logging=1 in the [MISC] section of the stars.ini file.
  • (Version j or higher only)


-m
start with game music turned off (2.7 only)


-p password
supplies the password on the command line. You can use this with a host file or a password-protected player file.


-s
start with battle sound effects turned off (2.7 only)


-t
try, then exit. If you specify a player file, this opens the newly generated turn. If the turn hasn't been generated yet, then Stars! exits. If you specify a host file, this checks to see if all players have submitted their changes for the turn. If they have, Stars! generates the new turn and exits. Otherwise, it just exits.
-v
verify .x# files. For verification of .x# files by automated turn servers. "stars! -v gamename.hst" generates a gamename.chk file and then quits. A .chk file looks like this:
  Stars! Version 2.60j
  05/15/99 23:34:39 - 1: still out
  05/15/99 23:34:39 - 2: turned in
  05/15/99 23:34:39 - ERROR - 3: x file corrupt
  • (Version j or higher only)
-w [host_file]
wait. If you specify a host file, this auto-generates the new turn as soon as all players have submitted their changes. If you specify a player file, this waits for the new turn to be generated. This option does not cause Stars! to exit.


-x
Exit Windows when Stars! exits. This is a good match with the -b option if you wish to create a script that automatically starts Windows, generates the new turn, then exits Windows. The -x flag is for 16-bit Windows only (3.1 or 3.11). Behavior of the -x option on OS/2, Windows NT, or Windows 95 is undefined and probably not what you want.


Examples

stars! filename Load a player, custom race, or host file, starting the game without loading the splash screen.

stars! -w gamename.hst Load the host file and enter Auto Generate mode.

stars! -w gamename.m# Load the specified player file and wait for the host to generate a new turn.

stars! -t gamename.m# Load the specified player file; quit if the host has not yet generated a new turn.

stars! -g gamename.hst Load the host file, generate 1 turn and quit.

stars! -g10 gamename.hst Load the host file, generate 10 turns and quit.

stars! -w -g gamename.hst Load the host file, wait for all players to submit turns, generate and quit.

stars! -t -g gamename.hst Load the host file, generate a new turn only if all players have submitted turns, then quit. If it generates the turn the return value is 1; if the turn is not generated the return value is 0.

stars! -t -b gamelist_file Conditionally generate turns for a list of games.

stars! -x -b gamelist_file Generate turns for each game listed in the supplied file name, then exit Windows. Useful for BBS play.

stars! -df gamename.m1 Dump player 1's fleets to a file and exits.

stars! -dm gamename.m1 Dump the universe definition to a file and exit.

stars! -dfmp gamename.m1 Dump everything player 1 knows to a file and exit.


For example if your BBS is OS/2, NT or Windows-based you can launch Stars! with the -b gamelist_file parameter to batch generate turns for multiple games. Stars! will automatically exit when the last turn has been generated. The file listing the games must contain one game name per line including the full path:

c:\games\stars!\play\frenzy.hst 
c:\games\stars!\play\game.hst 
c:\user\jeff\stars!\killer.hst 

You can name this games list file anything you want. If you are running a DOS-based BBS but have Windows installed on the machine, you can launch Windows and Stars! from a nightly maintenance script similar to this: win c:\games\stars!\stars!.exe -x -b c:\games\stars!\gamelist.txt This will launch Windows and Stars!, generate a turn for each game listed in gamelist.txt, then exit Stars! and Windows. This method is optimal for Windows 3.1.

If you have Windows for Workgroups installed (Windows 3.11) you need to use the win /n option: win /n c:\games\stars!\stars!.exe -x -b c:\games\stars!\gamelist.txt This will prevent Windows from loading any of its network drivers and suppress its login prompt. If you only need to generate a turn for a single game you can still use the -g gamename.hst parameter with or without -x (use -x with Windows 3.1 or 3.11only).


Notes

A common use of the command line features of Stars is for creating a .bat file to open up multiple turn files at once, which is useful if you are playing a team game and want to have all your allies turns open while you play each turn without having to remember all their passwords. A .bat file is simply a text file with the extension changed from .txt to .bat and this file can be run in the same way as a program. Here is an example of what the contents of such a .bat file should be (edit to suit your own directory structure and file names)

C:\Stars!\Stars!-jrc3 -p Password1 C:\Stars!\pbem\gamename\gamename.m1
C:\Stars!\Stars!-jrc3 -p Password2 C:\Stars!\pbem\gamename\gamename.m2
C:\Stars!\Stars!-jrc3 -p Password3 C:\Stars!\pbem\gamename\gamename.m3
C:\Stars!\Stars!-jrc3 -p Password4 C:\Stars!\pbem\gamename\gamename.m4

This is a Frequently Asked Question