From 44dac2ae5eda65a1489c7906660943082106be1b Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Sun, 6 Oct 2024 11:07:14 -0400 Subject: [PATCH] Document -additionaldir --- USAGE.md | 70 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/USAGE.md b/USAGE.md index f084f6302..baff3ae2a 100644 --- a/USAGE.md +++ b/USAGE.md @@ -35,6 +35,37 @@ Descent 3 Message(Error: Couldn't find the string table.) This error means that game data could not be found. Make sure you copied all game files to the `D3-open-source` folder, and that you're running the game from this same folder. +## Base directories + +A base directory is a directory that Descent 3 expects game files to be in. When you run Descent 3, it will try to access many different files. Most of those files need to be stored in a base directory. There are two different types of files that are stored in base directories: + +- Read-write files are files that can change while you play Descent 3. Examples: `.plt` and files in the `savegame/` directory. +- Read-only files are files that do not change while you play Descent 3. Examples: `d3.hog` and files in the `movies/` directory. + +Descent 3 has two types of base directories: + +- The writable base directory can contain both read-write files and read-only files. There is only one writeable base directory. By default, the writable base directory gets set to the current working directory. +- The read-only base directories can only contain read-only files. There can be any number of read-only base directories. By default, Descent 3 uses zero read-only base directories. + +You can set the writable base directory and the list of read-only base directories using the `-setdir`, `-useexedir` and `-additionaldir` command-line options (see [the next section](#command-line-options)). + +When Descent 3 tries to find a read-only file, then it will look through the list of base directories in this order: + +- the last read-only base directory that was specified on the command-line, +- the second-to-last read-only base directory that was specified on the command-line, +- the third-to-last read-only base directory that was specified on the command-line, +- … +- the first read-only base directory that was specified on the command-line and, finally, +- the writable base directory. + +Files that are in base directories that are higher on that list will override files that are in base directories that are lower on that list. For example, lets say that you run Descent 3 like this: + +``` +Descent3 -setdir /home/user/my-writable-base-directory -additionaldir /home/user/my-read-only-base-directory +``` + +Let’s also say that both `my-writable-base-directory` and `my-read-only-base-directory` contain a file named `d3.hog`. In this example, Descent 3 will load `/home/user/my-read-only-base-directory/d3.hog` because read-only directories have a higher precedence than the writable base directory. Descent 3 will ignore `/home/user/my-writable-base-directory/d3.hog`. + ## Command-Line Options The following command-line options are available in Descent 3. You can set command-line options on the Misc. tab of the Setup section of the Descent 3 launcher or by creating a shortcut to `Descent3.exe`. Case is not significant in command-line options, and `-`, `--`, and `+` are all accepted. @@ -318,6 +349,31 @@ The following command-line options are available in Descent 3. You can set comma Enables code to smooth the interpolation for fast-moving objects. This will fix "skipping" problems with fast weapons, such as the Phoenix. This option applies to clients only; using it on the server has no effect. + + Base Directory Options + + + -additionaldir <path> + path + None + all + Adds a directory to the list of read-only base directories. This options can be used multiple times to add multiple directories to the list. + + + -setdir <path> + path + . + all + Sets the writable base directory. + + + -useexedir + boolean + Off + all + Tells Descent 3 to use the directory in which the executable is located as the writable base directory. + + Other Options @@ -363,20 +419,6 @@ The following command-line options are available in Descent 3. You can set comma all Run game in service mode. - - -setdir <path> - path - . - all - Specifies the working directory for Descent 3. - - - -useexedir - boolean - Off - all - Tells Descent 3 to use the directory in which the executable is located as the working directory. - -winconsole boolean