yadloom
script is a Python program that launches the GZDoom game engine with a specified configuration profile. It allows the user to define multiple profiles, each with its own set of options, and easily switch between them.
Requirements:
- Python 3.6 or later
- GZDoom game engine
yadloom PROFILENAME [GZDOOM_ARGS]
PROFILENAME
: The name of the configuration profile to use.GZDOOM_ARGS
: Additional command-line arguments to pass to GZDoom.
The script expects a configuration file located at ~/.yadloom.json
. The configuration file should be in JSON format and contain the following keys:
.wadDir
: The directory where the game WAD files are located..profiles
: A dictionary of configuration profiles, where each profile is defined as a key-value pair. The key is the name of the profile, and the value is a dictionary of options to be passed to GZDoom. The options should be specified as key-value pairs, where the key is the option name and the value is the option value. WAD files can be specifiedfile
option, which can be either a single file or a list of files. Lists of files can also be defined using variables, which are specified using the syntax$VARIABLE_NAME
, whereVARIABLE_NAME
is the name of the variable defined in the.wadLists
property..wadLists
: A named set of wads that can be referenced by a profile. ThewadList
value should be a list of file names.
Example configuration file:
{
"wadDir": "~/games/doom",
"profiles": {
"default": {
"iwad": "doom2.wad",
"file": ["mods/mymod.wad", "maps/map01.wad"],
"skill": "3"
},
"vanilla": {
"iwad": "doom.wad",
"file": ["doom1.wad", "doomu.wad"],
"skill": "4"
},
"custom": {
"iwad": "doom2.wad",
"file": ["$EXTRA_WADS"],
"skill": "5"
}
},
"wadLists": {
"MODS": ["mods/mymod.wad", "mods/mymod2.wad"],
"EXTRA_WADS": ["extra/map01.wad", "extra/map02.wad"]
}
}
Functionality:
- Parses the configuration file and stores the values in a dictionary.
- Resolves the WAD files and stores the resolved values in the configuration dictionary.
- Parses the specified profile and generates a command-line string from the profile options.
- Executes GZDoom with the generated command-line string and any additional arguments specified by the user.
Note: This script is provided "as is" and without warranty of any kind. Use at your own risk.
this document is based on output generated by ChatGPT Feb 13 2023 version