Difference between revisions of "Mods"

From Minetest Wiki
Jump to navigation Jump to search
(added mod-file structure tree and more places to find mods)
Line 20: Line 20:
 
* [http://forum.minetest.net/viewforum.php?f=11 “Mod Releases” forum]
 
* [http://forum.minetest.net/viewforum.php?f=11 “Mod Releases” forum]
 
* [[List of Mods]]
 
* [[List of Mods]]
* [http://nimg.pf-control.de/MTstuff/modSearch.php External mod searching service]
+
* [http://krock-works.16mb.com/MTstuff/modSearch.php External mod searching service]
 +
* [https://minetest-bower.herokuapp.com/ Minetest-Bower]
 +
* [https://github.com/minetest-mods Minetest-Mods team (Mod repository)]
  
 
== Creating mods ==  
 
== Creating mods ==  
  
 
Mods are created in Lua, a relativiely simple scripting/programming language. The Lua API documentation can be viewed [https://github.com/minetest/minetest/blob/master/doc/lua_api.txt here].
 
Mods are created in Lua, a relativiely simple scripting/programming language. The Lua API documentation can be viewed [https://github.com/minetest/minetest/blob/master/doc/lua_api.txt here].
 +
=== Example of file structures within a mod ===
 +
In this example the mods "carts" and "tnt" are installed as well as an example mod "modname" that features more components:
 +
<pre>
 +
    mods/
 +
    ├── carts/
 +
    │  ├── depends.txt
 +
    │  ├── init.lua
 +
    │  ├── functions.lua
 +
    │  ├── README.txt
 +
    │  ├── textures/
 +
    │  │  ├── carts_top.png
 +
    │  │  └── ...
 +
    │  └── models/
 +
    │      ├── cart.x
 +
    │      └── ...
 +
    ├── tnt/
 +
    │  ├── init.lua
 +
    │  ├── depends.txt
 +
    │  ├── README.txt
 +
    │  ├── textures/
 +
    │  │  ├── tnt_side.png
 +
    │  │  └── ...
 +
    │  └── sounds/
 +
    │      ├── tnt_explode.ogg
 +
    │      └── ...
 +
    └── modname/
 +
        ├── bower.json (used by the Minetest-Bower project)
 +
        ├── init.lua
 +
        ├── depends.txt
 +
        ├── description.txt
 +
        ├── mod.conf
 +
        ├── README.txt or README.md
 +
        ├── screenshot.png
 +
        ├── textures/
 +
        │  ├── modname_stuff.png
 +
        │  ├── modname_something_else.png
 +
        │  └── ...
 +
        ├── sounds/
 +
        │  ├── some_sound.ogg
 +
        │  └── ...
 +
        ├── media/
 +
        │  ├── some_media
 +
        │  └── ...
 +
        ├── models/
 +
        │  ├── some_model.x
 +
        │  └── ...
 +
        └── <custom data>/
 +
            ├── some_data
 +
            └── ...
 +
</pre>
 +
 +
Projects such as [https://forum.minetest.net/viewtopic.php?t=13012 Minetest-Bower] and [https://forum.minetest.net/viewtopic.php?f=47&t=13839 Minetest-Mods team (Mod repository)] or the [http://krock-works.16mb.com/MTstuff/modSearch.php Minetest Mods Searching Tool] may make use of some of the meta-data files to offer information in mod lists and overviews. Essential is only the init.lua that may even contain the license information in some comments. It is highly recommended though to add the other meta-info files for the mod to be well presented in the allready existing mod-managing and listing tools as well as in future built-in tools within Minetest.
  
 
Also take a look at our [http://dev.minetest.net/Main_Page Development Wiki].
 
Also take a look at our [http://dev.minetest.net/Main_Page Development Wiki].

Revision as of 12:35, 3 July 2016

Languages Language: English • Deutsch • español • français • italiano • 日本語 • Bahasa Melayu

What is a mod?

An example of a mod (here: Mesecons).

Mods (short for modifications or modules) are user-created modifications to the game in such a way that alters gameplay. Some larger mods may add a lot of content to the game, while other smaller mods may add more settings/customization options, or optimize the speed, gameplay, or graphics of Minetest. Server mods or plugins mainly give server admins more options and ease of use, and all mods for single-player can also be used in multiplayer.

While Minetest mods are generally safe to install, one should exercise caution with mods to prevent crashes, system instability, deletion of game/save data, or potential malware infections from a bad link or the mod itself. A good way to protect your game from such problems is to back up your Minetest folder if you choose to use mods. There are many mods or plugins available to complement the original Minetest game or give server admins more options and control over their servers.

Installation

See Installing Mods.

Finding mods

Mods can be currently be found in several places:

Creating mods

Mods are created in Lua, a relativiely simple scripting/programming language. The Lua API documentation can be viewed here.

Example of file structures within a mod

In this example the mods "carts" and "tnt" are installed as well as an example mod "modname" that features more components:

    mods/
    ├── carts/
    │   ├── depends.txt
    │   ├── init.lua
    │   ├── functions.lua
    │   ├── README.txt
    │   ├── textures/
    │   │   ├── carts_top.png
    │   │   └── ...
    │   └── models/
    │       ├── cart.x
    │       └── ...
    ├── tnt/
    │   ├── init.lua
    │   ├── depends.txt
    │   ├── README.txt
    │   ├── textures/
    │   │   ├── tnt_side.png
    │   │   └── ...
    │   └── sounds/
    │       ├── tnt_explode.ogg
    │       └── ...
    └── modname/
        ├── bower.json (used by the Minetest-Bower project)
        ├── init.lua
        ├── depends.txt
        ├── description.txt 
        ├── mod.conf
        ├── README.txt or README.md
        ├── screenshot.png
        ├── textures/
        │   ├── modname_stuff.png
        │   ├── modname_something_else.png
        │   └── ...
        ├── sounds/
        │   ├── some_sound.ogg
        │   └── ...
        ├── media/
        │   ├── some_media
        │   └── ...
        ├── models/
        │   ├── some_model.x
        │   └── ...
        └── <custom data>/
            ├── some_data
            └── ...

Projects such as Minetest-Bower and Minetest-Mods team (Mod repository) or the Minetest Mods Searching Tool may make use of some of the meta-data files to offer information in mod lists and overviews. Essential is only the init.lua that may even contain the license information in some comments. It is highly recommended though to add the other meta-info files for the mod to be well presented in the allready existing mod-managing and listing tools as well as in future built-in tools within Minetest.

Also take a look at our Development Wiki.

Listing server mods

If you’re on a server, you can issue the server command /mods to query the server to tell you the list of its installed mods.

Most popular mods used on public servers listed at servers.minetest.net as of April 2014