mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-25 16:53:46 +01:00
1.5 KiB
1.5 KiB
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
- 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: - Settings are loaded from
minetest.conf
and override configuration values
Locations
- Default configuration:
<modfolder>/conf.lua
- World configuration:
config/<modname>.<format>
- Mod configuration:
<modfolder>/conf.<format>
- Minetest configuration:
minetest.conf
Formats
- Lua, with the environment being the configuration object
field = value
works- Return new configuration object to replace
- Single Lua literal
- Booleans, numbers, strings and tables
- Minetest-like configuration files
- Not recommended