Lua API Documentation

From Minetest Developer Wiki
Revision as of 19:54, 26 June 2020 by Wuzzy (talk | contribs) (add category)
Jump to navigation Jump to search

The Lua API of Minetest is extensively documented. This page tells you which documentation exists, and where to find it.

Official documentation

lua_api.txt

This is the most important document you need during modding.

This is a text file containing the only (!) official reference documentation for the entire Lua API. You can find it in the doc directory of your Minetest installation. You can also read the latest (in-development) version of this file online here: lua_api.txt. But we strongly recommend you read the file installed on your computer so you read the correct version.

Note this assumes you are already familiar with Lua programming. If you aren't, take a look into the Minetest Modding Book first.

Other text files

In the doc directory of your Minetest installation, you will find a few other text files with related, but less important information and documentation.

Unofficial documentation

Minetest Modding Book

A very extensive introduction into Minetest modding, great for complete beginners. Written by rubenwardy, a long-time developer for Minetest.

https://rubenwardy.com/minetest_modding_book/en/index.html

lua_api.txt, but more readable

You can view a more readable version of this document here: https://rubenwardy.com/minetest_modding_book/lua_api.html It's the same content, just nicely formatted. Although it might not be the latest version.

Minetest Developer Wiki

The very wiki you are reading right now is not meant to document the Lua API itself, but instead to document common development practices, pitfalls and general advice or agreed-upon guidelines for engine, game and mod developers.

The wiki is useful to find some nice tips and tricks that would not belong into a reference documentation.

However, we have a bit of a mess right now: There is currently a large amount of pages that were copied from lua_api.txt ages ago which are all horribly outdated now. If you want to know what a specific function XYZ does, do NOT use this wiki, use lua_api.txt. See also: MinetestWiki:Lua API Wiki Documentation Cleanup