Modular Multipurpose Minetest Modding Library
Go to file
2020-12-22 10:29:03 +01:00
conf.lua Clean configuration system 2020-12-20 14:39:01 +01:00
data.lua Structure overhaul 2020-02-09 01:39:54 +01:00
file.lua Structure overhaul 2020-02-09 01:39:54 +01:00
func.lua Functional helpers, table.deep_add_all 2020-12-20 15:21:03 +01:00
init.lua Use vector utils in MT utils, fix load order 2020-12-22 10:16:30 +01:00
log.lua rolling-8 2020-03-13 18:13:45 +01:00
math.lua Replace math.pow by ^ 2020-12-19 15:31:37 +01:00
minetest.lua Use vector utils in MT utils, fix load order 2020-12-22 10:16:30 +01:00
mod.conf Large configuration improvements, text helpers 2020-06-02 23:07:33 +02:00
mod.lua Init cleanup 2020-12-21 18:23:30 +01:00
player.lua Additional configuration formats, experimental vector library, other utilities 2020-06-28 22:42:24 +02:00
Readme.md Clean configuration system 2020-12-20 14:39:01 +01:00
schema.lua Clean configuration system 2020-12-20 14:39:01 +01:00
screenshot.png Large configuration improvements, text helpers 2020-06-02 23:07:33 +02:00
table.lua Functional helpers, table.deep_add_all 2020-12-20 15:21:03 +01:00
test.lua Use vector utils in MT utils, fix load order 2020-12-22 10:16:30 +01:00
text.lua Replace math.pow by ^ 2020-12-19 15:31:37 +01:00
trie.lua Add trie 2020-12-19 15:13:03 +01:00
vector.lua Vector: Param renames for consistency 2020-12-22 10:29:03 +01:00

Modding Library (modlib)

Multipurpose Minetest Modding Library

About

No dependencies. Licensed under the MIT License. Written by Lars Mueller aka LMD or appguru(eu).

API

Mostly self-documenting code. Mod namespace is modlib or _ml, containing all variables & functions.

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
  1. luon
  • Single Lua literal
  • Booleans, numbers, strings and tables
  1. conf
  • Minetest-like configuration files
  1. json
  • Not recommended