How to learn minetest moding?

leeminer
Member
 
Posts: 90
Joined: Mon Aug 11, 2014 21:29

How to learn minetest moding?

by leeminer » Tue Dec 09, 2014 17:39

I'm a beginner programmer, I know a little c++, javascript, python etc. I've been to the dev page on objects and methods etc. It feels like putting together a puzzle, it took me awhile just to figure out how to change the gravity, jump height etc.

My question is this. Is there an easier way to learn how to mod minetest? How did you learn? I've only found one tutorial and this was very basic, on how to create notes and create a craft recipe. I really want to dig in and make some cool stuff but I feel like I'm stuck.

Any ideas or feedback or personal experience would help me greatly.
Last edited by leeminer on Tue Dec 09, 2014 18:35, edited 1 time in total.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: How to learn minecraft moding?

by rubenwardy » Tue Dec 09, 2014 17:54

Lua API is the main reference. It, in theory, documents the whole API.

Read existing mods to see how they work - but be wary that their code might be low quality, take it with a pinch of salt.

It depends on what you want to create. Come up with an idea, and try and research how to implement it. Start small. If you want to make nodes, tools and craftitems, look here in LuaAPI for descriptions of the stuff in {} in minetest.register_node.

I started writing a book on making mods for Minetest - learn in 24 hours style thing - but I stopped due to low interest (it isn't requested much)
 

leeminer
Member
 
Posts: 90
Joined: Mon Aug 11, 2014 21:29

Re: How to learn minecraft moding?

by leeminer » Tue Dec 09, 2014 18:00

rubenwardy wrote:Lua API is the main reference. It, in theory, documents the whole API.

Read existing mods to see how they work - but be wary that their code might be low quality, take it with a pinch of salt.

It depends on what you want to create. Come up with an idea, and try and research how to implement it. Start small. If you want to make nodes, tools and craftitems, look here in LuaAPI for descriptions of the stuff in {} in minetest.register_node.




I may be looking at it the wrong way but to me looking at the API interfaces via the LUA API is like learning Russian from a Russian dictionary. I guess what I really want is more of an instructional book on how components work and examples.

For example, I want to add a script to add 10 items to my inventory. Where would I look in the API. How would I logically figure this out without digging through other mod examples etc?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: How to learn minecraft moding?

by rubenwardy » Tue Dec 09, 2014 18:12

Then you need the invref of the player: inv = player:get_inventory()Lua API

or inv = minetest.get_inventory({type="player", name="celeron55"})
InvRef documentation

Use inv:add_item(listname, ItemStack("default:dirt"))
(I am just looking up listname, there is no explanation)

The documentation could be a lot better.
Last edited by rubenwardy on Tue Dec 09, 2014 18:15, edited 1 time in total.
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: How to learn minecraft moding?

by Don » Tue Dec 09, 2014 18:15

rubenwardy wrote:I started writing a book on making mods for Minetest - learn in 24 hours style thing - but I stopped due to low interest (it isn't requested much)

I would be interested in a book like that.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: How to learn minecraft moding?

by Don » Tue Dec 09, 2014 18:16

Might I suggest that you change the title to minetest instead of minecraft?
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: How to learn minecraft moding?

by Krock » Tue Dec 09, 2014 18:23

Don wrote:Might I suggest that you change the title to minetest instead of minecraft?

Eww. I almost wanted to say

I don't know how to mod minecraft. Go to the minecraft forums and ask there

before I saw your message :)
rubenwardy already said good sites and there's one more: Dev wiki
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

leeminer
Member
 
Posts: 90
Joined: Mon Aug 11, 2014 21:29

Re: How to learn minetest moding?

by leeminer » Tue Dec 09, 2014 18:39

Thanks, yeah, confused since my kid wants minecraft and my nephew so its on my brain too. But I love Minetest for the modding. Well, once I become an expert I will write some tutorials. Makes no sense to have everyone learn scripting as if it were a detective movie. Find this function, how does it work? Look for examples in other mods etc etc. Minetest mods for dummies anyone ;) lol
 

User avatar
pandaro
Member
 
Posts: 266
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro

Re: How to learn minetest moding?

by pandaro » Tue Dec 09, 2014 19:22

A good tutorial, in my opinion, is the best idea.
If it'll make accessible via github I could contribute, too.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: How to learn minetest moding?

by Krock » Tue Dec 09, 2014 19:28

leeminer wrote:Look for examples in other mods etc etc.

It was a great help for me to look at the source of some simple mods. If they are good coded, it's easy to understand what the single functions do.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: How to learn minetest moding?

by Don » Tue Dec 09, 2014 19:44

Krock wrote:
leeminer wrote:Look for examples in other mods etc etc.

It was a great help for me to look at the source of some simple mods. If they are good coded, it's easy to understand what the single functions do.

Problem is how do people know what mods have good code. My mods might not be good at all but I don't know. I tried my best but I am no programmer. That's why we need good documentation
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: How to learn minetest moding?

by Evergreen » Tue Dec 09, 2014 19:49

Like I suggested in another topic, we NEED a better introduction/tutorial. The current one just doesn't cut it. Also, if it becomes a thing, it should come with the mintest source so that it is necessary to update it when new functions are added. Take django's documentation for example.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

leeminer
Member
 
Posts: 90
Joined: Mon Aug 11, 2014 21:29

Re: How to learn minetest moding?

by leeminer » Wed Dec 10, 2014 03:47

Evergreen wrote:Like I suggested in another topic, we NEED a better introduction/tutorial. The current one just doesn't cut it. Also, if it becomes a thing, it should come with the mintest source so that it is necessary to update it when new functions are added. Take django's documentation for example.



So what is the next step? What resources do we have? Do we even have a place to host the tutorial?

There is obviously a lot of knowledge spread amongst the community. This is definitely doable. It would make Minetest more accessable and make Minetest even more popular, in my opinion.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: How to learn minetest moding?

by rubenwardy » Wed Dec 10, 2014 06:37

I am going to kick start the documentation writing. It will be done in markdown. GitHub can host markdown websites using jekyll, so it could be available at rubenwardy.GitHub.io/minetest_doc etc.

I'll start this tomorrow using stuff I have already written.
 

leeminer
Member
 
Posts: 90
Joined: Mon Aug 11, 2014 21:29

Re: How to learn minetest moding?

by leeminer » Wed Dec 10, 2014 07:49

Found this for list name, seems cryptic to me.

"listname — The inventory list to which the item or items are being moved (e.g. "fuel", "dst", or "src" for a furnace in the default game). "

http://dev.minetest.net/Player

So far I understand that ItemStack is an object that can create a stack of items. This is used in the invRef object. The invRef object is created by the player object method like player:get_inventory()

Its a bit like legos except I don't know where part A fits into part B or even where part B is... but sometimes I like a good challenge ;) Thanks goes to Rubenwardy for lending a helping hand on this.

I think what I've learned from this is follow the rabbit... start with the big object like player and work your way down... after all the player is what interacts with the world.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: How to learn minetest moding?

by Evergreen » Wed Dec 10, 2014 13:29

I think the tutorial should not be seperate from the main documentation. It should be included with the source. Although, it's fine to go ahead and write it before a PR is created.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
Linuxdirk
Member
 
Posts: 497
Joined: Wed Sep 17, 2014 11:21
GitHub: dsohler
In-game: Linuxdirk

Re: How to learn minecraft moding?

by Linuxdirk » Wed Dec 10, 2014 13:45

rubenwardy wrote:Lua API is the main reference. It, in theory, documents the whole API.

In reality it lacks a shitload of examples and descriptions and is an unorganized mess :(

I usually use a combination of lua_api.txt, the dev wiki, code of existing mods, and simply trying out what happens when I try to use a function.
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: How to learn minetest moding?

by Don » Wed Dec 10, 2014 13:57

rubenwardy wrote:I am going to kick start the documentation writing. It will be done in markdown. GitHub can host markdown websites using jekyll, so it could be available at rubenwardy.GitHub.io/minetest_doc etc.

I'll start this tomorrow using stuff I have already written.

That is awesome. Thank you so much. This will help a lot of people including me.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

leeminer
Member
 
Posts: 90
Joined: Mon Aug 11, 2014 21:29

Re: How to learn minetest moding?

by leeminer » Wed Dec 10, 2014 17:32

The wiki that lists the objects and methods, each separate page has a discussion tab. Perhaps that would be of use????
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: How to learn minetest moding?

by Don » Wed Dec 10, 2014 21:41

I think one of the problems is that people like me don't know enough to be helpful and the people who know enough are too busy with keeping the game progressing. I hope documentation gets better but I do appreciate all that has been done already.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: How to learn minetest moding?

by Gael de Sailly » Fri Dec 12, 2014 18:59

Great idea to make a modding toturiel. I've already thought of that, but I think my knowleadges in Minetest modding aren't sufficient, especially about mobs and inventories, so I can't make it myself.

But I can make a tuto about mapgen, it's a bit my specialty.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: How to learn minetest moding?

by Don » Fri Dec 12, 2014 20:48

Gael de Sailly wrote:Great idea to make a modding toturiel. I've already thought of that, but I think my knowleadges in Minetest modding aren't sufficient, especially about mobs and inventories, so I can't make it myself.

But I can make a tuto about mapgen, it's a bit my specialty.

A mapgen tut would be awesome. I need to learn so much more about it.
All I could do is a cut and paste tut.

Edit - copy and paste too
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: How to learn minetest moding?

by Gael de Sailly » Sat Dec 13, 2014 16:25

There is just a little problem : my English is not very good.
I wrote:I've already thought of that

I've thought of a tuto in French.

So don't hesitate to report me my spelling mistakes. I need to improve my English, not just for Minetest.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: How to learn minetest moding?

by rubenwardy » Sat Dec 13, 2014 16:33

I would like people to work on translatng my book into other languages. Not yet, it is still in quite an unstable state.
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: How to learn minetest moding?

by Don » Sat Dec 13, 2014 16:47

rubenwardy wrote:I would like people to work on translatng my book into other languages. Not yet, it is still in quite an unstable state.

I took a look at what you have so far. It looks awesome. It is clear and easy to read. I hope you continue it. It will help many people. Great work.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: How to learn minetest moding?

by Gael de Sailly » Sun Dec 14, 2014 21:46

Where can I find it ?
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: How to learn minetest moding?

by Don » Sun Dec 14, 2014 23:08

Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: How to learn minetest moding?

by Gael de Sailly » Mon Dec 15, 2014 12:07

Thank you.
Looks interesting.
Not the time to read it completely today.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 8 guests

cron