Internals

Constants and Random

When using a command that requires you to provide a numerical value, such as if and set, the following constants may be used.

Constant Description
scenery

Equals the number 100.

heavy Equals the number 99.
true Equals the number 1.
false
null
nowhere
All equal the number 0.

The word random can be used anywhere the above constants can be. The word random will be substituted for a random number between 0 and the current value of the variable MAX_RAND. By default, MAX_RAND is set to 100.

Commands

Listed here are the only in-game commands that are internal to the interpreter. All other commands to be interpreted during the course of the game must be defined as a grammar statement in the game code.

Command Description
restart This will cause the JACL interpreter to ask the user if they are sure, restarting the game from the beginning if they answer yes, returning to the game if they answer no.
save[ filename] This will cause the current game position to be saved to a file called bookmark. If a file name is specified following the word save, this will be used instead.
restore[ filename] This will cause the previously saved game bookmark to be loaded if it is found. If a file name is specified following the word restore, this will be used instead.
again This will cause the player's previous command to be repeated. This command is only available in the TACL interpreter.
undo This will cause all effects of the player's previous command to be undone. This command is only available in the TACL interpreter.
info This will display the version information of the JACL interpreter that you are running and the maximum number of items it was compiled to handle. Running the JACL interpreter with no game file specified will also display version information then prompt for the name of the game file to be executed. This limit may be increased by changing the MAX_OBJECTS define statement in the file jacl.h then re-compiling the interpreter.
When using the commands save and restore, be aware that all files will be stored in and retrieved from the directories specified in the file jacl.conf.

The Config File

When the TACL interpreter is started, it will search for a file called jacl.confin the current directory. If this does not exist, then it will attempt to read the default configuration file as specified by the DEFAULT_CONFIG define statement in the file jacl.h. The default for this is /etc/tacl.conf for Linux, or \etc\tacl.cfg for DOS.

When the JACL interpreter is started, it will attempt to read the default configuration file as specified by the DEFAULT_CONFIG define statement in the file jacl.h. The default for this is /etc/jacl.conf.

This configuration file may contain one or more of the following lines (please note that some directive are specific to one interpreter or the other):

Directive Description
bookmarks FilePath This indicates the directory to use when saving and restoring the current game state.
log LogFile This indicates the file that should be used to log all status and error messages. This is a JACL-only directive.
path GameDirectory This indicates the directory the interpreter should look in to find the game the player is attempting to execute if it is not in the current directory. This is a TACL-only directive.
debug This indicates that a trace of program execution should be written to the log file. It is best to keep this off on a production server to increase performance. This is a JACL-only directive.
echo This tells the interpreter to print the player's command before processing it. This is of use when piping a list of commands to the interpreter in order to regression test a game. This is a TACL-only command.
significance integer This indicates the number of letters in each word typed by the player to consider significant. For example, with a significance of 6, the words fingerprint and fingertip would be considered identical.
notify This indicates that notification should given of any score increase with a message such as:
    [YOUR SCORE JUST WENT UP BY 10 POINTS]

Below is an example JACL configuration file:

   ; "jacl.conf"
   ; JACL interpreter configuration file.

   significance    7
   log            "/usr/local/jacl-1.2/logs/jacl.log"
   bookmarks      "/usr/local/jacl-1.2/bookmarks/"
   notify

Below is an example TACL configuration file:

   ; "tacl.conf"
   ; TACL interpreter configuration file.

   significance    7
   bookmarks      "/usr/local/jacl-1.5/bookmarks/"
   path           "/usr/local/jacl-1.5/games/"
   notify
   echo
Be sure not to forget the trailing slash when using the bookmarks or path directives.