11/25/2023 0 Comments Minetest modding apiIt's purely a logical grouping and is done mostly for convenience and to group closely-related mods together. Basically, a modpack is just special directory containing the actual mod directories. minetest.A modpack (short: “MP”) is a collection of mods to group them together. Lets create a second node, it will be similar to the first in it's features. You should be able to put two dirt blocks side by side at any point in the grid and get the output of our node. Let's launch Minetest and our world again to make sure the recipe is working. Just like node registrations there is a lot things that we can change with recipes and we'll look into them more in a future lesson. We need to define a texture, and we do that with, tiles = We're going add a description to the node and to do that we'll just type description equals "our very first node ever!", and hit enter to go to the next line. Move over one space, hit a comma, add in an opening squiggly brace, and hit enter to start the second line. Add an opening parenthesis and then double quotes, then type the mod name followed by a colon and the node name. Everything that follows this is information about the node. To create a node we start with minetest.register_node. lua extension, rather then ending up with something like .Īlright, so we have things ready, lets start with some code. Doing this ensures that we get a file ends up with the. Now if you not using Atom just open your code editor and save a file a in the mod directory. Then right click in the side panel and new file, which we will call a. We could create an a file directly by right clicking and creating a new file, but that might not be an option on all operating systems, so what we'll do instead is open our code editor, and add a project folder, we'll select our mod folder and click okay. It should be noted that only characters a-z, 0-9, and _ are allowed in the mod name, if you try using anything else, such as a dash or capital letters you'll get an error when you try to load the mod. Find your mod directory and create a new folder, we'll be calling our fist mod mod_1. This picture should be in a 3:2 aspect ratio, recommended 300x200px. Lastly we have screenshot.png If the mod adds blocks or items you can take a picture of them ingame. readme.md This file is similar to the description, but can contain more information and instructions on how to enable or disable specific parts of the mod if applicable, or how to use the API, if the mod creates one. In the future this will likely be expanded to take over some of the previous files we looked at. mod.conf currently has only one line, name = modname. I cover license some in the appendix, and list resources for further information. If you ever plan on releasing the mod you'll need to select a license. If you aren't planning on releasing the mod publicly, you could skip this. License.txt contains the license for your code and media. The code can be broken down into multiple files, and we'll cover that in detail when we get further along with modding. The description.txt file just has a short description of what the mod is or does. If the mod name had a question mark behind it it's optional, meaning that the mod will run without it, but will have more, or different features if that mod is enabled. This file lists the mods that our mod requires to run. Looking at the files we have the depends.txt file. In this lesson we'll just need the textures folder, as you'd probably already figured out this is where we place the textures that our mod will be using. There can be a slew of different subfolders, and we'll cover those more in the future when we get to actually needing them. The mod resides in a directory that usually has the same name as the mod, there are time when this might not be the case, but you should always name the folder the same as your mod name. A mod requires a few things more than just the code let's take a look at a basic mod and cover the what we have. Before we can start coding we need to create the required file structure for the mod.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |