modlib/doc/minetest/conf.md
2022-09-09 20:03:51 +02:00

1.2 KiB

Configuration

Legacy

  1. Configuration is loaded from <worldpath>/config/<modname>.<extension>, the following extensions are supported and loaded (in the given order), with loaded configurations overriding properties of previous ones:
    1. json
    2. lua
    3. luon, Lua but without the return
    4. conf
  2. Settings are loaded from minetest.conf and override configuration values

Locations

  1. Default configuration: <modfolder>/conf.lua
  2. World configuration: config/<modname>.<format>
  3. Mod configuration: <modfolder>/conf.<format>
  4. Minetest configuration: minetest.conf

Formats

  1. lua
    • Lua, with the environment being the configuration object
    • field = value works
    • Return new configuration object to replace
  2. luon
    • Single Lua literal
    • Booleans, numbers, strings and tables
  3. conf
    • Minetest-like configuration files
  4. json
    • Not recommended