You should the print function so you know how far Minetest gets in a program. LUA has a function called "print" and it displays a message to the console. The Console is the black window with writing in that appears when Minetest runs. Pos.y=pos.y+1 -This line increases the position's y axis by 1 Seperated by commas )Īlso you should check your work and put comments in tile_images: Sets the texture of the block You can use only 1 texture or multiple textures,.It takes 2 Parameters: The name of the new block ("tutorial:decowood", the string before : MUST be the name of the mod folder) and a table with several properties of the block. The function minetest.register_node(name, table) is responsible for adding new blocks to the game (node=block, but also torches, rails. To grant yourself the "give" privilage, go to worlds/gamename/auth.txt and open it.Īdd ",give" after "shout,interact" to make it "shout,interact,give" Client-seitige Modifikationen erfordern mindestens Minetest 0.4.15-dev aus den Quellen, das nach dem 1.April 2017 kompiliert wurde. The "give" privilage is required for the /giveme command to work This will add 99 blocks of the decorative wood to your inventory! Let's try out our first mod! Open the chat window ingame (press t) and enter "/giveme tutorial:decowood 99" (Without "" of course). This means when changing the code you simply have to 'Exit to Menu' and 'Start Game/Connect' again to try out the changes. Decoration 140 Minetest Game improved 7 Mini-game 29 Mobs / Animals / NPCs 90 Multiplayer-focused 158 One-of-a-kind / Original 16 Plants and Farming 82. Try it) Launch the game now, and notice that the mods are automatically loaded and compiled. So for example, default:dirt is the unique name for dirt.Ģ) Copy the file 'tutorial_decowood.png' supplied with this Document to the textures folder in the mod. In this case, the mod is called 'modname' (name is preset by the folder name)Īnd the block is called 'itemname', so it's tutorial:decowood. In minetest, each node, tool and item needs a unique name to identify it in the api. The type of the object is important as it plays a part in the properties of that object.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |