I want to start modding

Post Reply
Thyrrac
New member
Posts: 2
Joined: Thu Nov 07, 2013 20:08
Location: Germany

I want to start modding

by Thyrrac » Post

FIRST OF ALL
HEYHO FORUMS!!! :D
-------------------------
Yeah as the title says... I wanna start writing mods. I have good knowledge about Java but I think that wont help me here ;D The mods are written in lua, am I right? So I decided to learn LUA but I have the following questions:
1. How do I start creating mods?
2. Are there mods where I can look at to learn?
3. How about Multiplayer-mods... is there a difference between Single Player and Multiplayer mods?

I hope someone can answer me :P

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

Thyrrac wrote:FIRST OF ALL
HEYHO FORUMS!!! :D
-------------------------
Yeah as the title says... I wanna start writing mods. I have good knowledge about Java but I think that wont help me here ;D The mods are written in lua, am I right? So I decided to learn LUA but I have the following questions:
1. How do I start creating mods?
2. Are there mods where I can look at to learn?
3. How about Multiplayer-mods... is there a difference between Single Player and Multiplayer mods?

I hope someone can answer me :P
There is no difference between sp and mp mods.
Back from the dead!

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

https://github.com/Jordach/Minetest-Mod ... l/init.lua

This mod probably doesn't work anymore, but this shows how one should form basic nodes and crafting recipes.

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

by philipbenr » Post

Just take a look at nodes.lua in /minetest_dir/games/minetest_game/mods/default. That is if you have the latest, 0.4.7. You can look stuff up what you don't understand in the developer wiki: ex: http://dev.minetest.net/minetest.register_node

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

by philipbenr » Post

That is the best way to start. I think.

User avatar
general3214
Member
Posts: 122
Joined: Fri Oct 04, 2013 03:15

by general3214 » Post

Just like you, I started with Java (from Minecraft modding), but realized that Lua is quite similar to Java. After looking at the .lua files in minetest\games\minetest_game\mods\default, I started modding right away. Once you get started, you'll see the similarities and how easy it is to mod Minetest.
Avatar made by Annahstas

sfan5
Moderator
Posts: 4094
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

http://sfan5.duckdns.org/minetest-moddi ... ishEN.html
That is the english version of a modding tutorial Jeija wrote.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

I wrote most of that.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

jin_xi
Member
Posts: 165
Joined: Mon Jul 02, 2012 18:19

by jin_xi » Post

Evergreen wrote:There is no difference between sp and mp mods.
actually, it does take some care to make sure a mod you're developing in singleplayer mode does indeed work as intended when used on a server with many players, but this depends on what your mod does.

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

jin_xi wrote:
Evergreen wrote:There is no difference between sp and mp mods.
actually, it does take some care to make sure a mod you're developing in singleplayer mode does indeed work as intended when used on a server with many players, but this depends on what your mod does.
He is used to mod in minecraft, where they have to have entirely different versions just to work in mp
Back from the dead!

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

sfan5 wrote:http://sfan5.duckdns.org/minetest-moddi ... ishEN.html
That is the english version of a modding tutorial Jeija wrote.
Better use http://dev.minetest.net/Intro, its based on Jeijas tutorial but more up-to-date.

zackscottl
Member
Posts: 14
Joined: Sun Nov 03, 2013 01:46

by zackscottl » Post

Hey :) I just started modding too, but I can help. LUA is an OO (Object oriented language.) To make a node (block, tool, etc), type a code looking like this:

Code: Select all

minetest.register_node("mod:nodename_here", {
     description = "node",
     tiles = {"tile1.png"},
     groups = {cracky=3},
})
if you have any questions, ask me or anyone else :)

Thyrrac
New member
Posts: 2
Joined: Thu Nov 07, 2013 20:08
Location: Germany

by Thyrrac » Post

Hmmm yes registering a node is not that hard. But my aim is to write a mod which implements 3D Mobs. So I need models, textures and code to implement it. The only thing I still need is the code at the moment. Now I am trying to write a code for a simple block-mob but I am really bad :D I try to handle Lua Entitys and spawn them with minetest.add_entity() but it doesn't work. I have read the wiki and the only thing I found was a reference to item_entity.lua so I read the code and , as I said, tried that to code a block-mob. Result: Error Code :D So can anyone help me?
I don't want a "How To" Tutorial where I only have to copy and paste I want another reference or something similar like a mod or a Lua Script in the default game to analyze it on my own and find out how it works. Does anyone know something like that?

User avatar
fairiestoy
Member
Posts: 191
Joined: Sun Jun 09, 2013 19:25
Location: Germany

by fairiestoy » Post

What about using the forum search engine? There is a good amount of mob mods to analyze. So enough material to learn from.

Also would it be nice if you post the error code if you have any. Otherwise one cannot know what error you have and how to help you. Should be in the console and in debug.txt.
Last edited by fairiestoy on Sun Nov 10, 2013 12:25, edited 1 time in total.
Interesting about new things is, to figure out how it works ...

User avatar
SegFault22
Member
Posts: 872
Joined: Mon May 21, 2012 03:17
Location: NaN

by SegFault22 » Post

You could just steal code snippets from other mods, for blocks/items/etc., and repurpose them (for example, taking the code for a silver lump from MoreOres, and changing it to register a different lump for your mod). It is much better to use your time being creative and designing the mod's stuffs, than studying LUA and going through trial/error with scripts.
So long as you include no original content from the mods you got the code from, it is perfectly fine and you don't have to use a specific license or give specific credit to anyone - because that code you repurposed would be exactly the same as if you were to learn LUA and write it. And all code pieces, for example, item registry, in all mods that use it, have the same basic properties/parts, just different parameters.

Mobs are a different thing, and most of the code that registers and controls them is unique, so I suggest that you don't steal that from another mod, as there is no built-in registry for mobs/AI, only entities, and that would be original content from the mod you got it from.
Last edited by SegFault22 on Sun Nov 10, 2013 19:44, edited 1 time in total.
"All we need it the right major crisis and the nations will accept the new world order."

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

SegFault22 wrote:You could just steal code snippets from other mods, for blocks/items/etc., and repurpose them (for example, taking the code for a silver lump from MoreOres, and changing it to register a different lump for your mod). It is much better to use your time being creative and designing the mod's stuffs, than studying LUA and going through trial/error with scripts.
Plagiarism. But then again, I think that's the best way to do it.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 17 guests