Modding Tutorial Book (new: BasicMapOps, AutoErrorChecking)

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

User avatar
ExeterDad
Member
 
Posts: 1624
Joined: Sun Jun 01, 2014 20:00
Location: New Hampshire U.S.A
In-game: ExeterDad

Re: Modding Tutorial Book (new: Privileges)

by ExeterDad » Sat Apr 16, 2016 01:16

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.
 

Godo
Member
 
Posts: 20
Joined: Mon May 02, 2016 06:41
In-game: Godo

proofreading

by Godo » Sat Jun 04, 2016 18:55

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
Last edited by Godo on Sat Jun 04, 2016 20:19, edited 1 time in total.
 

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

Re: Modding Tutorial Book (new: Privileges)

by rubenwardy » Sat Jun 04, 2016 19:18

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.
 

Godo
Member
 
Posts: 20
Joined: Mon May 02, 2016 06:41
In-game: Godo

proofreading

by Godo » Sat Jun 04, 2016 20:21

I have been reading the "offline" version of your book, which I downloaded two days ago.
 

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

Re: Modding Tutorial Book (new: Privileges)

by rubenwardy » Sat Jun 04, 2016 20:23

I forgot to upload a newer version of that, but I've just uploaded one now. (the one you downloaded is from november)
 

Godo
Member
 
Posts: 20
Joined: Mon May 02, 2016 06:41
In-game: Godo

signlike nodes

by Godo » Sat Jun 04, 2016 21:07

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.
Attachments
default_sign_wall_wood.png
modified texture for wooden wall sign
(1.03 KiB) Not downloaded yet
arrow_sign_left.png
Wooden singpost (pointing left)
(395 Bytes) Not downloaded yet
 

Godo
Member
 
Posts: 20
Joined: Mon May 02, 2016 06:41
In-game: Godo

Back again with an example

by Godo » Mon Jun 06, 2016 20:21

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.
Last edited by Godo on Tue Jun 28, 2016 19:13, edited 1 time in total.
 

KCoombes
Member
 
Posts: 387
Joined: Thu Jun 11, 2015 23:19
Location: SW Florida, USA
In-game: Knatt or Rudilyn

Re: Modding Tutorial Book (new: Privileges)

by KCoombes » Fri Jun 10, 2016 14:11

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.
 

User avatar
TumeniNodes
Member
 
Posts: 2321
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: Modding Tutorial Book (new: Privileges)

by TumeniNodes » Fri Jun 10, 2016 14:37

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.
There is nothing closer to Hell on Earth, than peanut butter in your jelly jar.
 

KCoombes
Member
 
Posts: 387
Joined: Thu Jun 11, 2015 23:19
Location: SW Florida, USA
In-game: Knatt or Rudilyn

Re: Modding Tutorial Book (new: Privileges)

by KCoombes » Thu Jun 23, 2016 15:02

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.
 

User avatar
TumeniNodes
Member
 
Posts: 2321
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: Modding Tutorial Book (new: Privileges)

by TumeniNodes » Fri Jun 24, 2016 02:14

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.
There is nothing closer to Hell on Earth, than peanut butter in your jelly jar.
 

KCoombes
Member
 
Posts: 387
Joined: Thu Jun 11, 2015 23:19
Location: SW Florida, USA
In-game: Knatt or Rudilyn

Re: Modding Tutorial Book (new: Privileges)

by KCoombes » Mon Jun 27, 2016 16:23

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?
 

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

Re: Modding Tutorial Book (new: Privileges)

by rubenwardy » Mon Jun 27, 2016 19:13

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
 

User avatar
Wuzzy
Member
 
Posts: 3013
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Modding Tutorial Book (new: Privileges)

by Wuzzy » Wed Aug 03, 2016 10:25

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. ;-)
My projects: MineClone 2. Hades Revisited. Help modpack. A ton of other mods, see here.
 

User avatar
MineYoshi
Member
 
Posts: 5338
Joined: Wed Jul 08, 2015 13:20

Re: Modding Tutorial Book (new: Privileges)

by MineYoshi » Thu Aug 04, 2016 22:08

Somebody talked about translating this Modding Tutorial Book?

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

DraggonFantasy
New member
 
Posts: 7
Joined: Tue Aug 02, 2016 12:51
GitHub: DraggonFantasy
IRC: DraggonFantasy
In-game: DraggonFantasy

Re: Modding Tutorial Book (new: Privileges)

by DraggonFantasy » Mon Aug 08, 2016 13:29

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"))
 

User avatar
MineYoshi
Member
 
Posts: 5338
Joined: Wed Jul 08, 2015 13:20

Re: Modding Tutorial Book (new: Privileges)

by MineYoshi » Mon Aug 08, 2016 21:37

I can maintain the version updating it every week...

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

User avatar
muhdnurhidayat
Member
 
Posts: 271
Joined: Wed Nov 16, 2016 22:55
Location: Shah Alam, Selangor, Malaysia
GitHub: MuhdNurHidayat
IRC: muhdnurhidayat
In-game: muhdnurhidayat

Re: Modding Tutorial Book (new: Privileges)

by muhdnurhidayat » Sat Aug 26, 2017 08:07

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?
[ Full signature ] - UTC+8 here, contributing to Minetest Wiki. I'm muhdnurhidayat in IFS (mod), HOMETOWN & others. / Twitter / MT Offtopic ✂️- - - - - -

You just read my profile, right?
Because these few texts of signature only appear on profile page as the texts are cut in signature. xD
 

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

Re: Modding Tutorial Book (new: Privileges)

by rubenwardy » Sat Aug 26, 2017 09:34

It's ready for translation, I'm just not sure how it should be done
 

User avatar
muhdnurhidayat
Member
 
Posts: 271
Joined: Wed Nov 16, 2016 22:55
Location: Shah Alam, Selangor, Malaysia
GitHub: MuhdNurHidayat
IRC: muhdnurhidayat
In-game: muhdnurhidayat

Re: Modding Tutorial Book (new: Privileges)

by muhdnurhidayat » Sat Aug 26, 2017 10:22

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
[ Full signature ] - UTC+8 here, contributing to Minetest Wiki. I'm muhdnurhidayat in IFS (mod), HOMETOWN & others. / Twitter / MT Offtopic ✂️- - - - - -

You just read my profile, right?
Because these few texts of signature only appear on profile page as the texts are cut in signature. xD
 

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

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

Re: Modding Tutorial Book (new: Privileges)

by rubenwardy » Sat Aug 26, 2017 18:06

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
 

User avatar
TumeniNodes
Member
 
Posts: 2321
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: Modding Tutorial Book (new: Privileges)

by TumeniNodes » Sun Aug 27, 2017 00:55

PDF version is great to have rubenwardy, thank you.
There is nothing closer to Hell on Earth, than peanut butter in your jelly jar.
 

User avatar
Stix
Member
 
Posts: 736
Joined: Fri Aug 04, 2017 14:19
Location: USA
IRC: Stix_ + Demolisher_
In-game: [CTF] demolisher

Re: Modding Tutorial Book (new: Privileges)

by Stix » Thu Sep 14, 2017 20:05

ive been reading this book, and i must say that its very helpful for a beginner like me!
Need to know something? "Google it" --GreenDimond
Why do so many people believe in "God"?
Want to know whats gonna be in the next release of your favorite game? "Bugfixes" --Wuzzy
The new Minetest-offtopic can be found here: https://minetestoftopic.createaforum.com/index.php
 

PreviousNext

Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 2 guests