Code Monkey home page Code Monkey logo

yadloom's Introduction

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

Usage:

yadloom PROFILENAME [GZDOOM_ARGS]
  • PROFILENAME: The name of the configuration profile to use.
  • GZDOOM_ARGS: Additional command-line arguments to pass to GZDoom.

Configuration:

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 specified file 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, where VARIABLE_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. The wadList 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:

  1. Parses the configuration file and stores the values in a dictionary.
  2. Resolves the WAD files and stores the resolved values in the configuration dictionary.
  3. Parses the specified profile and generates a command-line string from the profile options.
  4. 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

yadloom's People

Contributors

neonnyan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.