From 6fb38fbb26e189934595518f5a029f94e6d6491f Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Sat, 30 Mar 2019 21:30:07 -0400 Subject: [PATCH] improve Modding in Getting Started --- webapp/views/pages/getting-started.ejs | 71 ++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/webapp/views/pages/getting-started.ejs b/webapp/views/pages/getting-started.ejs index c619493..ddab9e4 100644 --- a/webapp/views/pages/getting-started.ejs +++ b/webapp/views/pages/getting-started.ejs @@ -229,13 +229,20 @@ modpacks) each time you connect to a server, so you don't have to install anything yourself. Automatic "game" downloading also means that each server can be very different, but load quickly, offering you many experiences to try easily.
+Anyone can make a "game" using Minetest by +writing mods or combining existing mods. Most "games" are based on +games that are included in the Minetest/games directory--however, some +games that differ drastically in gameplay can be made if one heavily +edits or replaces mods that provide core functionality. Must of +Minetest's core functionality is written in Lua. +
Examples are the best way to get started. Since mods are scripted in Lua, every mod is open source. Almost every one is released under some sort of public license as well, which usually allows you to modify, reuse, and redistribute the code (usually under the condition that you credit the original author). The license file sometimes has no file extension, so you may have to pick a program to open it in Windows. -You can open it (or any other text file) in Notepad. However, Notepad++ +You can open it (or any other text file) in Notepad. However, Geany is recommended since there is more than one undo step. For Lua programming, you can install ZeroBrane Studio (which is free) then install @@ -243,6 +250,25 @@ install which patches ZeroBrane Studio to provide code completion (a form of autocomplete with API usage tips for coding).
+Every mod, at minimum, must have a file called init.lua. You +should also add a description.txt describing it, a README.md or other +readme file explaining more, and a LICENSE.md or other license file +MIT License is used for Minetest itself, that is recommended. Some +people consider using GPL v3 to prevent the program from being used +on popular mobile devices, since the GPL v3 specifies that a user must +be able to not only reprogram but also replace the program with their +recompiled version--this may not be possible if your version shares a +namespace and key with the application you are changing, and you may not +have the same connectivity or functionality without using the same key. +Therefore, components or mods using GPL v3 may prevent their inclusion +into future version of Minetest "games", as several versions of +Minetest (often by other names) are on Google Play and the iOS App +Store. +You can find the MIT License online and paste it into Notepad or Geany. +Be sure to fill +in your name and the year you created the mod. Having a license will +make sure others feel safe using your mod and redistributing it if +that's what you want.
API means application programming interface. It is just the set of
classes and/or functions you use to change the behavior of an existing
@@ -253,7 +279,8 @@ conventions and placed public features there. In addition, many mods
have a api.txt or similarly named files. You can start by opening up
your minetest directory on your computer (after installing or otherwise
installing Minetest) and doing a search for api, or just open the
-following files depending on what you want to do:
+following files depending on what you want to do:
+
Remember, you can always look at examples as well. You can find a mod that does something similar to what you want, looking at all of the .lua files in a mod like that may help. @@ -300,7 +328,44 @@ putting the mod in depends.txt, clearing crafting recipes, and other similar steps--see github.com/poikilos/homedecor_ua for an example.
- +