I want to start modding

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

I want to start modding

by Thyrrac » Thu Nov 07, 2013 20:14

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
Location: A forest in the midwest
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Thu Nov 07, 2013 20:25

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!
 

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

by Jordach » Thu Nov 07, 2013 20:38

https://github.com/Jordach/Minetest-Mods/blob/master/wool/init.lua

This mod probably doesn't work anymore, but this shows how one should form basic nodes and crafting recipes.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

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

by philipbenr » Thu Nov 07, 2013 23:52

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
“Would it save you a lot of time if I just gave up and went mad now?”

“I'd far rather be happy than right any day.”

“What, are you, crazy?" "It's a possibility I haven't ruled out yet"
 

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

by philipbenr » Thu Nov 07, 2013 23:52

That is the best way to start. I think.
“Would it save you a lot of time if I just gave up and went mad now?”

“I'd far rather be happy than right any day.”

“What, are you, crazy?" "It's a possibility I haven't ruled out yet"
 

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

by general3214 » Fri Nov 08, 2013 00:31

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
 

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

by sfan5 » Fri Nov 08, 2013 13:25

http://sfan5.duckdns.org/minetest-modding-tutorial/html/englishEN.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: 5759
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

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

by jin_xi » Fri Nov 08, 2013 15:18

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
Location: A forest in the midwest
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Fri Nov 08, 2013 15:29

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
Location: Germany
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Nov 08, 2013 18:21

sfan5 wrote:http://sfan5.duckdns.org/minetest-modding-tutorial/html/englishEN.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 » Sat Nov 09, 2013 20:27

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 » Sun Nov 10, 2013 11:40

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 » Sun Nov 10, 2013 11:57

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: 870
Joined: Mon May 21, 2012 03:17
Location: NaN

by SegFault22 » Sun Nov 10, 2013 19:35

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.
Resources are abundant; only money is scarce. People should not have to work hard and remain poor just to pay for the needs of survival.
Society can thrive without money - but only if productive members of society are rewarded for being productive.
 

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

by hoodedice » Mon Nov 11, 2013 02:24

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
 


Return to WIP Mods



Who is online

Users browsing this forum: duane, Nathan.S and 1 guest