Mod directory structure¶
clientmods
├── modname
│ ├── mod.conf
│ ├── init.lua
└── another
modname¶
The location of this directory.
mod.conf¶
An (optional) settings file that provides meta information about the mod.
name: The mod name. Allows MultiCraft to determine the mod name even if the folder is wrongly named.description: Description of mod to be shown in the Mods tab of the main menu.depends: A comma separated list of dependencies. These are mods that must be loaded before this mod.optional_depends: A comma separated list of optional dependencies. Like a dependency, but no error if the mod doesn't exist.
init.lua¶
The main Lua script. Running this script should register everything it wants to register. Subsequent execution depends on minetest calling the registered callbacks.
NOTE: Client mods currently can't provide textures, sounds, or models by themselves. Any media referenced in function calls must already be loaded (provided by mods that exist on the server).
Naming convention for registered textual names¶
Registered names should generally be in this format:
"modname:<whatever>" (<whatever> can have characters a-zA-Z0-9_)
This is to prevent conflicting names from corrupting maps and is enforced by the mod loader.
Example¶
In the mod experimental, there is the ideal item/node/entity name tnt.
So the name should be experimental:tnt.
Enforcement can be overridden by prefixing the name with :. This can
be used for overriding the registrations of some other mod.
Example: Any mod can redefine experimental:tnt by using the name
:experimental:tnt
when registering it.
(also that mod is required to have experimental as a dependency)
The : prefix can also be used for maintaining backwards compatibility.