Command line arguments - TheXTech/TheXTech GitHub Wiki

The executable of the TheXTech engine has support for command-line arguments to get a bit more control over the game:

   thextech  [-abefghikmpsx] [--bg-input] [--export-lang] [--lang-no-blank]
             [--lang-update] [--no-frameskip] [--show-controls]
             [--speed-run-semitransparent] [--verbose] [--version]
             [--vsync] [-1 <c1;s2;m0;t0>] [-2 <c1;s2;m0;t0>] [-c <directory
             path>] [-l <file path>] [-n <number 1 or 2>] [-r <render
             type>] [-u <directory path>] [-w <start warp index>]
             [--compat-level <modern, smbx2, smbx3>] [--game-dirname
             <directory name>] [--lang <en, ru, zh-cn, etc.>]
             [--lang-output <path to directory>] [--save-slot <number from
             1 to 3>] [--show-battery-status <0, 1, 2, 3, or 4>]
             [--speed-run-blink-mode <opaque, always, never>]
             [--speed-run-mode <0, 1, 2, or 3>] [levelpath ...]

General

  • --, --ignore_rest - Ignores the rest of the labelled arguments following this flag.
  • --version - Displays version information and exits.
  • -h, --help - Displays usage information and exits.

Setup

  • -m, --show-fps - Show FPS counter on the screen.
  • -x, --max-fps - Run FPS as fast as possible (when vertical synchronization is active, this option has no effect).
  • -s, --no-sound - Disable sound and play the game in silence.
  • -f, --frameskip - Enable frame skipping mode.
  • --bg-input - Allow background input for joysticks
  • -p, --never-pause - Keep game always active even window have no focus (useful for debugging and testing).
  • -r <render type>, --render <render type> Render mode:
    • sw - Software render (used as a fallback when hardware doesn't works).
    • hw - Hardware accelerated render (currently SDL2). [Working by default]
    • sdl - Hardware accelerated SDL2 render.
    • opengl^1 - Hardware OpenGL 2.1+ render.
    • opengles^1 - Hardware accelerated OpenGL ES (mobile) 2.0+ render.
    • opengl11^1 - Hardware accelerated OpenGL 1.1~2.0 render (legacy).
    • opengles11^1 - Hardware accelerated OpenGL ES 1.1 (legacy).
  • --vsync - Limit the framerate to the screen refresh rate. Therefore, game speed is 12/13 multiplier due to the framerate of SMBX64 is 65 FPS.
  • --show-battery-status - Display the battery status indicator (if available)
    • 0 - Never show (Default)
    • 1 - Show on fullscreen only when the battery low
    • 2 - Show when battery low
    • 3 - Show always on fullscreen only
    • 4 - Always show
  • --show-controls - Display the current controller state while the game process
  • --lang <en, ru, zh-cn, etc.> - Run the game with the selected language by code.
  • -c <directory path>, --assets-root <directory path> Specify the different assets root directory to play (Note: The user directory will stay the same as without this option, the assets root gets never written)
  • -u <directory path>, --user-directory <directory path> Specify the different writable user directory to store settings, gamesaves, logs, screenshots, etc.
  • --game-dirname <directory name> - Specify the game directory name for default locations.

^1: Maybe unavailable on some platforms.

Gameplay

  • --compat-level - Enforce the specific gameplay compatibility level
    • modern - TheXTech native, all features and fixes enabled (Default)
    • smbx2 - Disables all features and bugfixes except fixed at SMBX2
    • smbx13 - Enforces the full compatibility with the SMBX 1.3 behaviour

Note: If speed-run mode is set, the compatibility level will be overridden by the speed-run mode.

Speed-Running mode

It's a special feature that was added to The X-Tech 1.3.4. It enables the playthrough stopwatch that shows how long was passed since the level and episode started.

  • --speed-run-mode <mode> - Enable the Speed-Running mode:
    • Mode 0 - Disable the Speed-Running, default behaviour.
    • Mode 1 - Enable the X-Tech native mode, the timer will be shown, no special limits will be enabled. Can be used for The X-Tech exclusive episodes (those episodes that were designed for The X-Tech engine originally and are intended to work on The X-Tech).
    • Mode 2 - Shows the timer and simulates the physics of SMBX2, see here for the details.
    • Mode 3 - Simulates vanilla SMBX 1.3 physics, the timer will be shown and all gameplay bugfixes will be disabled to reproduce the original game's behavior.
  • --speed-run-semitransparent - Make the stopwatch be shown in a semi-transparent form.
  • --speed-run-blink-mode <opaque, always, never> - Choose the speed-run timer blinking effect for a level/episode completion.
    • opaque - Blink effect works when semi-transparent mode is not enabled.
    • always - Blink effect will work always.
    • never - Disable blink effect completely.

Mode 2 or Mode 3 is required to speedrun SMBX Episodes.

Level testing

  • <path to file> - Path to level file to run the level test.
  • -e, --editor - Open a level file in the editor.
  • -a, --grab-all - Enable ability to grab everything while level testing.
  • -g, --god-mode - Enable god mode in level testing.
  • -k, --magic-hand - Enable magic hand functionality while level test running (allows you to pick-up, place, and remove elements from a scene while playing a level test).
  • -n <number 1 or 2>, --num-players <number 1 or 2> - Count of players.
  • -b, --battle - Test level in battle mode.
  • -1 <setup>, --player1 "<setup>" - Setup of playable character for player 1 with a given setup string in following format:
    • "c1;s2;m0;t0" - a semicolon separated arguments. Note: The whole string must be quoted.
      • cX (X = 1 to 5) - character
      • sX (X = 1 to 7) - state
      • mX (X = 0 to 3) - mount
      • tX (X = 0 to 10) - mount type
  • -2 <setup>, --player2 "<setup>" - Setup of playable character for player 2 with a given setup string (same as for -1/--player1).

Episode testing

  • --save-slot <number from 1 to 3> - Save slot to use for the world play. If selected save slot is 0, the game will never been saved.
  • <path to file> - Path to world file to run the world test.

Special

  • -i, --interprocessing - Run level testing in the interprocess mode. After using this option, the game starts in a level test mode and will start waiting for raw level file data to run it. A Moondust Engine compatible IPC protocol is used to communicate.

Language tools

  • --export-lang - Action to exports the default language template and prints it into stdout.
  • --lang-update - Action to updated all language of assets package: missing lines will be added.
  • --lang-output <path to directory> - Set the path to the languages directory that needs to be updated (Works in combination with --lang-update only).
  • --lang-no-blank - Don't put blank lines into translation files (Works in combination with --lang-update only).

Deprecated

  • -r/--render vsync - Use --vsync instead. Hardware accelerated with the v-sync enabled.
  • -l <file path>, --leveltest <file path> - Start a level test on a given level file. OBSOLETE OPTION: now you able to specify the file path without -l or --leveltest argument.
⚠️ **GitHub.com Fallback** ⚠️