Go to file
Lars Mueller 155ab6deb7 Add simple k-d-tree 2021-02-07 00:40:25 +01:00
.gitignore B3D test utility 2021-02-01 16:27:21 +01:00
Readme.md Clean configuration system 2020-12-20 14:39:01 +01:00
b3d.lua Fix syntax error 2021-02-06 12:03:35 +01:00
b3d_specification.txt Experimental Blitz3D .b3d file reader 2021-01-31 21:41:42 +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 Neatify heap 2021-01-19 15:29:39 +01:00
init.lua Add simple k-d-tree 2021-02-07 00:40:25 +01:00
kdtree.lua Add simple k-d-tree 2021-02-07 00:40:25 +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 Add objects_inside_- radius and area iterators 2021-01-30 14:27:30 +01:00
mod.conf Large configuration improvements, text helpers 2020-06-02 23:07:33 +02:00
mod.lua Fix mod.extend_string triggering a warning 2021-02-01 16:23:11 +01:00
player.lua Deprecate player.get_color_int, beautification 2021-01-30 11:50:05 +01:00
quaternion.lua Add quaternion.from_euler_rotation 2021-02-06 12:01:47 +01:00
ranked_set.lua Add ranked set 2021-01-25 21:18:56 +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 Make table.find return nil if not found 2021-02-06 11:48:00 +01:00
test.lua Improve tests 2021-02-02 23:12:55 +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 Add vector.distance 2021-02-06 18:07:50 +01:00

Readme.md

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