minetest.conf

From Minetest Developer Wiki
Jump to: navigation, search
Mbox warning.png This page has been proposed for deletion for the following reason: "redundant with https://wiki.minetest.net/Minetest.conf"
If you don't think that this page should be deleted, please explain why on the talk page.
Mbox warning.png This page contains unofficial Lua API documentation and is likely to be outdated or wrong.
For the official and up-to-date documentation, refer to lua_api.txt found in your Minetest installation directory under doc.

Contents

Description

minetest.conf is a file that is saved after each shutdown and read at startup if existing. It contains a list of settings. If settings that are needed in the engine are not present in this file, the values that are stored in src/defaultsettings.cpp are used.

This file is read by default from ../minetest.conf or ../../minetest.conf. Any other path can be chosen by passing the path as a parameter to the program, e.g:

minetest.exe --config path/to/my-minetest.conf

A list of settings used by minetest is stored at minetest.conf.example.

File Format

The file is saved as a plain text file, containing a list of key = value pairs.

Blank lines are ignored. Comments may be inserted by starting the line with the pound (#) symbol and continue to the end of the line, and are effectively ignored by the config parser.

Access

The API contains several functions to access the settings:

Read

  • minetest.settings:get("name")
  • minetest.settings:get_pos("name")
  • minetest.settings:get_bool("name")

Write

  • minetest.settings:set("name", "value")
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox