depends.txt
Contents |
Introduction
The file depends.txt can be added in a mod folder. This, in the most basic way, makes sure that another mod must be run in order for that mod to be run. This is because some mods depend on another mod to run, for example, some mods rely on Mesecons (mod), so they want to be sure that their mod won't be running unless Mesecons is running, too.
Different types of dependencies
In depends.txt
, you'll see a mod folder name, followed by a line break to distinguish between two different mods. It is important that you only use the mod's folder names, not their actual names. The mod names are case-sensitive.
Each line with only the mod name means that this mod is a mandatory dependency. This means, your mod cannot be run correctly and becomes disabled automatically when this mod mentioned in depends.txt is not present.
If “?
” is put after the mod name, the mod is loaded first but it's optional. This means the mod will still run correctly if this dependency is missing, but it may lack some features. See Guide: Optional dependencies to learn how dependencies can be optional.
If the file is not present or empty, this means you mod declares that it has no dependencies whatsoever.
Examples
This depends.txt declares mandatory dependencies on default, wool and dye found in Minetest Game:
default wool dye
This depends.txt declares a mandatory dependency on Compass GPS; note that the folder name of this mod is “compassgps”:
compassgps
This depends.txt declares an optional dependency on default:
default?
This depends.txt declares a mandatory dependency on the fictive mod example and optional dependencies on the fictive mods awesome_mod and test_mod:
example awesome_mod? test_mod?