diff --git a/File-paths.md b/File-paths.md new file mode 100644 index 0000000..ed2b52a --- /dev/null +++ b/File-paths.md @@ -0,0 +1,39 @@ +## Paths + +The game makes use of several kinds of directories that are often referred to in this wiki. +Note that in any context where you have to specify a path, you can use the `$X` shorthands specified below for these. +For example, if you want to refer to a directory called `dir` that sits right next to `pd.exe`, you can write `--basedir $E/dir` instead of `--basedir C:/Games/PD/dir`. + +### Environment paths + +#### Working directory (`.`) +Directory where you ran the game from. +If you didn't run it from the command line, normally it will be the same as the executable directory. + +#### Executable directory (`$E`) +Directory where the game executable (i.e. `pd.exe` or `pd`) is. + +#### Home directory (`$H`) +Writable directory that's used for configs and saves in case the working directory and the executable directory are not writable. +On Windows: `%APPDATA%/perfectdark` +On Linux: `~/.local/share/perfectdark` + +### Game paths + +#### Base directory (`$B`) +Directory where your ROM file is. +If this is not overridden with `--basedir` or `--portable`, the game will try to find a directory called `data` in the following locations in that order: +1. Working directory +2. Home directory. +3. Executable directory. + +#### Save directory (`$S`) +Directory where the game stores your config and EEPROM save file. +If this is not overridden with `--savedir` or `--portable`, defaults depend on the OS. +**On Windows**: working directory if it's writable, home directory otherwise. +**On Linux**: working directory if a config file is already present in it, home directory otherwise. + +#### Mod directory (`$M`) +Directory that contains modded files. +Will override anything in the base directory and in the ROM on a file-by-file basis, i.e. the game will try to load a file from the mod directory first, but if it isn't present it will load it from the base directory or the ROM. +Not set by default. Set with `--moddir`.