Modular Multipurpose Minetest Modding Library
Go to file
2021-01-17 18:19:46 +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 Add file.ensure_content 2020-12-22 11:36:58 +01:00
func.lua Functional helpers, table.deep_add_all 2020-12-20 15:21:03 +01:00
heap.lua Add min-heap 2021-01-16 17:17:29 +01:00
init.lua Unsilence builtin/strict.lua 2021-01-17 18:19:46 +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 Unsilence builtin/strict.lua 2021-01-17 18:19:46 +01:00
mod.conf Large configuration improvements, text helpers 2020-06-02 23:07:33 +02:00
mod.lua Unsilence builtin/strict.lua 2021-01-17 18:19:46 +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 Schema: Improved MD gen: Newline after headings 2020-12-28 18:26:28 +01:00
screenshot.png Large configuration improvements, text helpers 2020-06-02 23:07:33 +02:00
table.lua Add table.deep_to_add 2021-01-02 17:06:26 +01:00
test.lua Additional tests 2021-01-16 17:20:12 +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 extension: Unary minus, pow 2020-12-27 23:22:28 +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