Page 5 of 6

Re: Modding Tutorial Book (new: Inventories)

PostPosted: Fri Apr 15, 2016 23:13
by rubenwardy
You're welcome.
Also, I forgot to announce:

New chapter available, "privileges": http://rubenwardy.com/minetest_modding_ ... leges.html

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Sat Apr 16, 2016 01:16
by ExeterDad
Funny this topic came up today. My ten year old son wanted me to teach him how to make a mod to add new blocks to Minetest. I referred him to your book this afternoon to learn a thing or two before I just coded it for him. He read for quite awhile. The fact it held his interest for that long tells me things were sinking in, and not too boring.
Well done... and Thank you.

proofreading

PostPosted: Sat Jun 04, 2016 18:55
by Godo
Hi, rubenwardy. First of all thank you for all the hard work that went into writing the modding book, I have found it quite interesting and useful. Unfortunately, I haven't got the time to pursue it to its farthest limits, but it has helped me understand a lot about how textures work within Minetest.

One thing I miss is an explanation of how you make the background transparent using the Gimp. I use a different program to edit the pixels in .gif, then open it with the Gimp and save it as .png, but although I managed to adjust the paintbrush and eraser sizes following your instructions I haven't been able to figure out how to do the transparency bit (the help section in the Gimp was not very helpful: I managed to add an alpha channel and select the background in the image, then I tried all four options in the transparency menu option, but I couldn't see any changes to the background with any of them).

In the end I managed to do it using another program (a litlle freeware jewel called Giffy whose main function is basically to set a transparent background to a .gif image), then saving it as .png with the Gimp. But all the same, could anyone tell me how to make the background transparent using the Gimp?

One more thing: I have come across some language mistakes which you might want to correct. They are detailed below.

README.html
... which is understandably
---> ... which is understandable.

chapters/folders.html
a good mod name can describes what the mod does.
---> a good mod name should describe what the mod does.

chapters/lua.html
Nil means not initalised. The variable hasn’t been assigned a variable yet
---> ...hasn’t been assigned a value yet

chapters/nodes_items_crafting.html
or they can be used be the player
---> or they can be used by the player
Item definitions like seen above...
---> Item definitions like the one seen above...
... are usually made up of an unique item string
... are usually made up of a unique item string

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Sat Jun 04, 2016 19:18
by rubenwardy
Most of those typos have already been fixed, where are you reading the book from?
Added "explanation of how you make the background transparent using the Gimp" to the todo list.
The answer is to right click the layer and select "add alpha channel" or something like that, then use the rubber to erase.

proofreading

PostPosted: Sat Jun 04, 2016 20:21
by Godo
I have been reading the "offline" version of your book, which I downloaded two days ago.

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Sat Jun 04, 2016 20:23
by rubenwardy
I forgot to upload a newer version of that, but I've just uploaded one now. (the one you downloaded is from november)

signlike nodes

PostPosted: Sat Jun 04, 2016 21:07
by Godo
Thank you so much, rubenwardy.

I see you have added a section about privileges, I'm going to read that (not now, thought, it's bedtime). When you have nothing better to do, could you finish the section about signlike nodes in the chapter about Node Drawtypes? When I started reading your book I was hoping to find a way to craft wooden arrow signs, to avoid getting lost as I explore (as a newbie, that was one of the first problems I encountered). I know I can use /sethome and all that, but it feels like cheating, doesn't it?

I'm uploading the signpost I was working on before deciding it was out of my depth, in case someone out there learning to do mods wants a challenge.

What I am doing in the meantime is this: I've changed the texture of the wooden sign to give it the shape of an arrow pointing left. When I want to point the way to an interesting feature in my world, I put two blocks of stone one of top of the other, then I nail the sign on the top one with the arrow facing in the direction I want to indicate. Sometimes I use several signs on different sides of the stone signpost, because they all point to the left. Instead of stone blocks you can use three pieces of wooden fence one on top of another, they look nicer, but if you don't put a sign in each of the four sides there is a problem: the sign points in opposite directions when seen from opposite sides. I am also uploading the texture I have changed. It would be nice to have another one pointing right, but I would need to sacrifice the iron sign for that.

Back again with an example

PostPosted: Mon Jun 06, 2016 20:21
by Godo
Hi, rubenwardy, it's me again. In the end I couldn't resist putting your wonderful tutorial to the test. I have managed to write a couple of mini-mods (for a washing-machine and a bedside table) and I am trying for a slanted straw roof (having a bit of a hard time with that, but it's fun).

(By the way, I came across another couple of typos in your tutorial (chapters/node_drawtypes.html):

Each row is a cubiod... --->
Each row is a cuboid...

... which are joined to make a single node. --->
... which is joined to the others to make a single node.

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Fri Jun 10, 2016 14:11
by KCoombes
Chapter suggestion: Biomes and how to create them. I'm currently dissecting TenPlus1's Ethereal mod for his biome generation code, which is marvelously commented, but explanations of each definition entry would be helpful.

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Fri Jun 10, 2016 14:37
by TumeniNodes
Maybe more info regarding "meshes"?
I am not sure if you have updated it, but if so I have not found it. I think it is one of the area under types of nodes which is yet to be finished?

I had received a pm from a new user a week ago asking if I knew of any info regarding graphics (how to make changes to the UI, etc.
I would like to offer any help I could give toward this if needed? In regards to textures, UI graphics and even how to make changes to the interface (as I dig into it to see what is what and how to) etc.

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Thu Jun 23, 2016 15:02
by KCoombes
Chapter 12 Formspecs: Other Elements

You should look in lua_api.txt for a list of all possible elements, just search for “Formspec”. It is near line 1019, at time of writing.

It is now at line 1376.

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Fri Jun 24, 2016 02:14
by TumeniNodes
KCoombes wrote:Chapter 12 Formspecs: Other Elements

You should look in lua_api.txt for a list of all possible elements, just search for “Formspec”. It is near line 1019, at time of writing.

It is now at line 1376.


Thank you.

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Mon Jun 27, 2016 16:23
by KCoombes
Help please?

In the Lua Modding API Reference page, you have this:

drop = {
max_items = 1, -- Maximum number of items to drop.
items = { -- Choose max_items randomly from this list.
{
items = {"foo:bar", "baz:frob"}, -- Choose one item randomly from this list.
rarity = 1, -- Probability of getting is 1 / rarity.
},
},
},

As this is written, my node is dropping 1 of each item, not 1 single item. Any advice?

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Mon Jun 27, 2016 19:13
by rubenwardy
I did not write that, as the page says at the top. It's just a nicely formated version of the official docs. I'm not sure how it works, please seek support through normal means

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Wed Aug 03, 2016 10:25
by Wuzzy
In your guide, can you please also link to http://dev.minetest.net/Mod_interoperability and http://dev.minetest.net/Groups in the appropriate places?

The first page is written to improve interoperability and general collaboration between mods in the hope to reduce redundancy and confusion. It mostly lists API mods. The second page lists known groups.

You are also invited to improve said pages by yourselves. ;-)

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Thu Aug 04, 2016 22:08
by MineYoshi
Somebody talked about translating this Modding Tutorial Book?

Because i would like to translate this to spanish...
(Now that I have the idea)

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Mon Aug 08, 2016 13:29
by DraggonFantasy
MineYoshi wrote:Because i would like to translate this to spanish...

I can also translate it to russian :) if I'll not be lazy
But the only bad thing in translations is that they often get outdated very quickly. When there's only 1 version of book (english) - it's needed to maintain only 1 version. But when there are spanish, french, russian etc, then you need to maintain 100500 versions.

Btw, I noticed a little mistake in "Inventories" chapter, "List sizes" part in example code:
Code: Select all
print("size:  " .. inv.get_size("main"))

But AFAIK, it should be:
Code: Select all
print("size:  " .. inv:get_size("main"))

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Mon Aug 08, 2016 21:37
by MineYoshi
I can maintain the version updating it every week...

Isn't that hard when one person has to care only about one translation!

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Sat Aug 26, 2017 08:07
by muhdnurhidayat
Since the owner says that this is not ready for translated yet (and so no support for translation yet)...

What if we forked the book and translate it? I think there's a way to get notified whenever the main repo get new merge/new update... then we can update the translation manually in our translation forks?

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Sat Aug 26, 2017 09:34
by rubenwardy
It's ready for translation, I'm just not sure how it should be done

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Sat Aug 26, 2017 10:22
by muhdnurhidayat
If it is jekyll, maybe this can give some idea on how to do the translations?

http://chocanto.me/2016/04/16/jekyll-multilingual.html

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Sat Aug 26, 2017 15:47
by rubenwardy
muhdnurhidayat wrote:If it is jekyll, maybe this can give some idea on how to do the translations?

http://chocanto.me/2016/04/16/jekyll-multilingual.html


Done! https://rubenwardy.com/minetest_modding ... w-language

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Sat Aug 26, 2017 18:06
by rubenwardy
Added the ability to convert the book into PDF form. You can download a PDF from here: https://github.com/rubenwardy/minetest_ ... k/releases

You can also download a zip file of the HTML version

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Sun Aug 27, 2017 00:55
by TumeniNodes
PDF version is great to have rubenwardy, thank you.

Re: Modding Tutorial Book (new: Privileges)

PostPosted: Thu Sep 14, 2017 20:05
by Stix
ive been reading this book, and i must say that its very helpful for a beginner like me!