Skip to content

Courage.Config#

Courage.Config reads Display, Audio, and Enhancements settings. Only keys listed in Config::*::entries() in pc/include/config/config.h are available. Path, Game, Cosmetics, Input, and Meta are not available to Luau mods.

Loading#

local Config = require("Courage.Config")
import * as Config from "Courage.Config"

API#

Config.Audio.xyz -> number | string | boolean#

Returns xyz audio property from the AudioConfig where xyz is a valid audio property.

Config.Display.xyz -> number | string | boolean#

Returns xyz display property from the DisplayConfig where xyz is a valid display property.

Config.Enhancements.xyz -> number | string | boolean#

Returns xyz enhancement property from the EnhancementConfig where xyz is a valid enhancement property.

Example#

local Config = require("Courage.Config")
local ConfigurationViewer = mod("ConfigurationViewer")

function ConfigurationViewer:init()
    self.log(Levels.INFO,Config.Audio.music_vol)
    self.log(Levels.INFO,Config.Enhancements.gallop_everywhere)
    self.log(Levels.INFO,Config.Display.width)
end

Notes#

  • Config values are read-only from mods. Change them in the game menus.
  • Each property is a getter, so reads pick up menu changes immediately.