

DependenciesĪ dependency occurs when a mod requires another mod to be loaded before itself. There is also a texture in textures/ for the node. There’s a single dependency, the default mod, which is usually found in Minetest Game. The script prints a message and then registers a node and a craft recipe – these will be explained later on. The a file is the entrypoint to a mod, and runs when the mod is loaded. Print ( "This file will be run at load time!" ) minetest. To find out if a mod name is available, try searching for it on. A good name should describe what the mod does, and the directory that contains the components of a mod must have the same name as the mod name. Mod names can include letters, numbers, and underscores. mymod is the mod name.Įach mod should have a unique mod name, a technical identifier (id) used to refer to the mod.
MINETEST MODS MODS
Go to the global mods directory (About > Open user data directory > mods) and create a new folder called “mymod”. This means that you can override game mods by placing a mod with the same name in the global mod location. If it encounters a mod with a name the same as one found previously, the later mod will be loaded in place of the earlier mod. When loading mods, Minetest will check each of the above locations in order. You can find the location of the user-data directory by opening up Minetest and clicking “Open User Data Directory” in the Credits tab. World mods, the location to store mods which are specific to a particular world.Global mods, the location to which mods are nearly always installed to.

Eg: minetest/games/minetest_game/mods/, /usr/share/minetest/games/minetest/ These are the mods that form the game that the world is running. These locations are commonly called mod load paths.įor a given world/save game, three mod locations are checked. Minetest checks in several different locations for mods. Where are mods stored?Įach mod has its own directory where its Lua code, textures, models, and sounds are placed. This book will cover the main parts of the Minetest API, and is applicable for both game developers and modders. These mods adjust or extend the features of a game.īoth the mods contained in a game and third-party mods use the same API. It’s also possible to distribute mods outside of a game, in which case they are also mods in the more traditional sense - modifications. It’s possible to make a game using only one mod, but this is rarely done because it reduces the ease by which parts of the game can be adjusted and replaced independently of others. A module, commonly known as a mod, is a collection of scripts and resources. In Minetest, a game is a collection of modules which work together to provide the content and behaviour of a game. The power of Minetest is the ability to easily develop games without the need to create your own voxel graphics, voxel algorithms, or fancy networking code. In this chapter, you’ll learn about how modding in Minetest works and create your first mod. Understanding the basic structure of a mod’s folder is an essential skill when creating mods.
