Difference between revisions of "Modding Intro"

From Minetest Developer Wiki
Jump to navigation Jump to search
(rename modding book)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Minetest has a scripting '''API''', which is used to program games and mods, creating whole new experiences or extending existing ones.
+
Luanti has a scripting '''API''', which is used to program games and mods, creating whole new experiences or extending existing ones.
  
 
The API is accessed using Lua, an easy-to-use programming language.
 
The API is accessed using Lua, an easy-to-use programming language.
Line 9: Line 9:
  
 
=== Tutorials ===
 
=== Tutorials ===
The [https://rubenwardy.com/minetest_modding_book/ Minetest Modding Book] is a friendly introduction to Minetest modding and game creation, introducing you to various aspects of the API.
+
The [https://rubenwardy.com/minetest_modding_book/ Luanti Modding Book] is a friendly introduction to Luanti modding and game creation, introducing you to various aspects of the API.
  
It is recommended you start here, even if you are already apt at programming, to get a good understanding of how Minetest mods work and are structured.
+
It is recommended you start here, even if you are already apt at programming, to get a good understanding of how Luanti mods work and are structured.
  
 
=== Lua API Reference ===
 
=== Lua API Reference ===
The official Lua API documentation is <code>lua_api.txt</code>. It's available in [https://github.com/minetest/minetest/blob/master/doc/lua_api.txt plaintext] or [https://minetest.gitlab.io/minetest/ HTML]. You can find the plaintext version in your Minetest installation, in the <code>doc</code> directory.
+
The official Lua API documentation is <code>lua_api.md</code>. It's available as [https://github.com/minetest/minetest/blob/master/doc/lua_api.md markdown] or [https://api.minetest.net/ HTML]. You can find the plaintext version in your Luanti installation, in the <code>doc</code> directory.
  
This is a concise description of the entire API, explaining functions, data structures, registration templates & more. The core developers of minetest maintain it, changes going through a quality control process.
+
This is a concise description of the entire API, explaining functions, data structures, registration templates & more. The core developers of Luanti maintain it, changes going through a quality control process.
  
 
Any functions not listed here are subject to change and not guaranteed to be compatible across versions, though usually they are.
 
Any functions not listed here are subject to change and not guaranteed to be compatible across versions, though usually they are.
Line 25: Line 25:
  
 
== Useful tools ==
 
== Useful tools ==
Here are some useful tools that most modders use when making Minetest mods:
+
Here are some useful tools that most modders use when making Luanti mods:
  
 
* [https://code.visualstudio.com/ Visual Studio Code]/[https://vscodium.com/ VSCodium], powerful code editor with a [https://marketplace.visualstudio.com/items?itemName=GreenXenith.minetest-tools Minetest extension] available for code completion.
 
* [https://code.visualstudio.com/ Visual Studio Code]/[https://vscodium.com/ VSCodium], powerful code editor with a [https://marketplace.visualstudio.com/items?itemName=GreenXenith.minetest-tools Minetest extension] available for code completion.
* [https://github.com/lunarmodules/luacheck luacheck], static analysis tool for Lua. See [https://rubenwardy.com/minetest_modding_book/en/quality/luacheck.html this modding book chapter] for more information on how to use it with Minetest.
+
* [https://github.com/lunarmodules/luacheck luacheck], static analysis tool for Lua. See [https://rubenwardy.com/minetest_modding_book/en/quality/luacheck.html this modding book chapter] for more information on how to use it with Luanti.
  
 
== Other useful links ==
 
== Other useful links ==

Latest revision as of 21:14, 24 October 2024

Luanti has a scripting API, which is used to program games and mods, creating whole new experiences or extending existing ones.

The API is accessed using Lua, an easy-to-use programming language. Version 5.1 of Lua is used, but many people run LuaJIT for greater performance.

The only thing you will need is basic programming knowledge.

Documentation

Tutorials

The Luanti Modding Book is a friendly introduction to Luanti modding and game creation, introducing you to various aspects of the API.

It is recommended you start here, even if you are already apt at programming, to get a good understanding of how Luanti mods work and are structured.

Lua API Reference

The official Lua API documentation is lua_api.md. It's available as markdown or HTML. You can find the plaintext version in your Luanti installation, in the doc directory.

This is a concise description of the entire API, explaining functions, data structures, registration templates & more. The core developers of Luanti maintain it, changes going through a quality control process.

Any functions not listed here are subject to change and not guaranteed to be compatible across versions, though usually they are.

The Minetest-Docs Project

A work-in-progress project is underway to create new, more detailed, documentation. They can be read from its GitHub repo, contributions are greatly appreciated.


Useful tools

Here are some useful tools that most modders use when making Luanti mods:

Other useful links