WARNING: The client API is currently unstable, and may break/change without warning.
Content and functionality can be added to MultiCraft 0.4.15-dev+ by using Lua scripting in run-time loaded mods.
A mod is a self-contained bunch of scripts, textures and other related things that is loaded by and interfaces with MultiCraft.
Transferring client-sided mods from the server to the client is planned, but not implemented yet.
If you see a deficiency in the API, feel free to attempt to add the functionality in the engine and API. You can send such improvements as source code patches on GitHub (https://github.com/minetest/minetest).
Programming in Lua¶
If you have any difficulty in understanding this, please read Programming in Lua.
Startup¶
Mods are loaded during client startup from the mod load paths by running
the init.lua scripts in a shared environment.
In order to load client-side mods, the following conditions need to be satisfied:
1) $path_user/multicraft.conf contains the setting enable_client_modding = true
2) The client-side mod located in $path_user/clientmods/<modname> is added to
$path_user/clientmods/mods.conf as load_mod_<modname> = true.
Note: Depending on the remote server's settings, client-side mods might not
be loaded or have limited functionality. See setting csm_restriction_flags for reference.
Paths¶
RUN_IN_PLACE=1(Windows release, local build)$path_user:<build directory>$path_share:<build directory>
RUN_IN_PLACE=0: (Linux release)$path_share:- Linux:
/usr/share/minetest - Windows:
<install directory>/minetest-0.4.x
- Linux:
$path_user:- Linux:
$HOME/.minetest - Windows:
C:/users/<user>/AppData/minetest(maybe)
- Linux:
Mod load path¶
Generic:
$path_share/clientmods/$path_user/clientmods/(User-installed mods)
In a run-in-place version (e.g. the distributed windows version):
minetest-0.4.x/clientmods/(User-installed mods)
On an installed version on Linux:
/usr/share/minetest/clientmods/$HOME/.minetest/clientmods/(User-installed mods)
Modpack support¶
Mods can be put in a subdirectory, if the parent directory, which otherwise
should be a mod, contains a file named modpack.conf.
The file is a key-value store of modpack details.
name: The modpack name.description: Description of mod to be shown in the Mods tab of the main menu.