Skip to content

Configuration Reference

TruDev edited this page Sep 14, 2022 · 1 revision

The vlib_conf.lua file allows you to configure many aspects of VeritaLib.
They should be documented here.

Debug

  • debug: table
    • enable: boolean - Whether to enable debug mode.
    • input_commands: table - Debug-specific inputs (like showing the debug UI).

General

  • default_config: table - The default configuration that your game uses.
    If config.json is missing, it loads defaults from this table.
    If config.json is missing some keys, or some keys are the wrong type, then it fills them in from this table.

Resources

  • texpage_size: integer - The size of a single texture page.

Input

  • input_commands: table - List of input contexts, inputs, and defaults.
    • <context name>: table
      • <input name>: table
        • type: string - Can be one of "button", "directional", or "analog".
        • keyboard: string|table|nil - If type == "button", then it is the key name (see lstg.Input.Keyboard), else, it is a table.
          In directional and analog input modes, the table consists of one entry per direction (up, down, left, right), each containing a key name.
          To disable keyboard input for this input binding, do not set it (not recommended).
        • gamepad: string|table|nil - Same as keyboard, but takes reference from the xinput module instead.
        • joystick: string|nil - Only valid for directional or analog inputs. For analog inputs, it can be "left" or "right". For directional inputs, it can be "left", "right", or "both".

Source Result

  • no_comments: boolean - Whether to remove comments from the resulting source. Implied by minify.
  • minify: boolean - Whether to minify the Lua files (removes comments + insignificant whitespace)

Screen

  • target_res: { width: integer, height: integer } - The game's target resolution.
    It will be scaled up or down to match the window size.

Clone this wiki locally