You can use the command line to start Chess in a customized way, without having to redo your settings every time you launch the game. You can use these command line options from a command line shell like Windows' cmd or Linux's bash, or from your OS's standard file explorer graphical interface.
Use these options by adding pairs of terms (not case-sensitive) to the launch command. The first term starts with an asterisk (" * ") and specifies which option you're setting (e.g., choosing a new folder for piece icons). The second term specifies your choice for that option (e.g. the name of the folder).
From the command line, simply start adding terms to the chess9.* command, separated by spaces. For example:
py chess9.py *size 600
The above command will start Chess with a board size of 600x600 pixels instead of the default 400x400.
You can combine as many options as you'd like, in any order (as long as chess9.exe or py chess9.py come first):
chess9.exe *size 600 *audio off
This will start Chess with a 600x600 board and audio turned off.
chess9.exe *AUdio oFF *Whiteui drAg *size 600
This will start Chess with audio turned off, White's UI mode set to Drag (see UI), and a 600x600 board.
You can save a set of your favorite options with a batch file or with a shortcut (the following instructions use a Windows system).
To create a batch file:
To create a custom shortcut:
Use the batch file or shortcut to launch your customized Chess.
Here is a full list of the switches and arguments you can use:
Switch |
Arguments |
Description |
*audio |
on off |
Start with the game's audio turned on or off. The default is on, so the on argument isn't strictly necessary. You can actually provide any argument other than off, such as 14 or apple, and the audio will be on. See On/off for more information. Example: *audio off |
*audiofolder |
<folderpath> |
Specify a folder other than the default (sfx) from which to load audio. See SFX Folder... for the files you'll need. It is okay to use paths with spaces. Examples: *audiofolder wildwestsfx *audiofolder C:\My Audio\chess\wildwestsfx |
*iconfolder |
<folderpath> |
Specify a folder other than the default (piece_icons) from which to load icons. See Icons... for the files you'll need. It is okay to use paths with spaces. Examples: *iconfolder wildwesticons *iconfolder C:\My Images\chess\wildwesticons |
*blackui |
click drag |
Specify whether Black's UI mode is set to click or drag. The default is click, so the click argument isn't strictly necessary. You can actually provide any argument other than drag, such as 14 or apple, and the UI will stay in click mode. See UI for more information. Examples: *blackui click *blackui drag |
*whiteui |
click drag |
Specify whether White's UI mode is set to click or drag. The default is click, so the click argument isn't strictly necessary. You can actually provide any argument other than drag, such as 14 or apple, and the UI will stay in click mode. See UI for more information. Examples: *whiteui click *whiteui drag |
*opponent |
easy hard human |
Specify whether to set an easy AI opponent, a hard AI opponent, or a human opponent. The default is easy, so the easy argument isn't strictly necessary. If you provide any argument other than easy or hard, such as 14 or apple, it will set the game to human mode. See Opponent for more information. Examples: *opponent easy *opponent hard *opponent human |
*size |
<number> |
Specify the height and width of the board, in pixels. If the number isn't between 200 and 2000, the default of 400 will be used. See Size... for more information. Examples: *size 200 *size 840 |
*light |
<color> |
Specify the color of the light squares. This can be the name of a color, like red, or a hash/pound sign followed by a six-character hex code, like #ff0000. See Light squares... for more information. Examples: *light red *light #ff0000 |
*dark |
<color> |
Specify the color of the dark squares. This can be the name of a color, like red, or a hash/pound sign followed by a six-character hex code, like #ff0000. See Dark Squares... for more information. Examples: *dark red *dark #ff0000 |
*savefile |
<filepath> |
Specify a save file to be loaded immediately. It is okay to use paths with spaces. Don't forget to include the extension (.txt). Examples: *savefile C:\My Documents\chess\semifinal.txt *savefile fun.txt |
*bg |
<filepath> |
Specify a background image. This automatically sets light and dark squares to clear. |