Modding Tutorial Book (new: Code architecture, unit testing)
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: Modding Tutorial Book (new: Inventories)
You're welcome.
Also, I forgot to announce:
New chapter available, "privileges": http://rubenwardy.com/minetest_modding_ ... leges.html
Also, I forgot to announce:
New chapter available, "privileges": http://rubenwardy.com/minetest_modding_ ... leges.html
- ExeterDad
- Member
- Posts: 1717
- Joined: Sun Jun 01, 2014 20:00
- In-game: ExeterDad
- Location: New Hampshire U.S.A
Re: Modding Tutorial Book (new: Privileges)
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.
Well done... and Thank you.
HOMETOWN -Our little server. Keep the HOMETOWN chatter @ http://hometownserver.com - Our server map: http://media.hometownserver.com
proofreading
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
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.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: Modding Tutorial Book (new: Privileges)
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.
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
I have been reading the "offline" version of your book, which I downloaded two days ago.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: Modding Tutorial Book (new: Privileges)
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
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.
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
-
- modified texture for wooden wall sign
- default_sign_wall_wood.png (1.03 KiB) Viewed 3564 times
-
- Wooden singpost (pointing left)
- arrow_sign_left.png (395 Bytes) Viewed 3564 times
Back again with an example
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.
(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.
Re: Modding Tutorial Book (new: Privileges)
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.
- TumeniNodes
- Member
- Posts: 2943
- Joined: Fri Feb 26, 2016 19:49
- GitHub: TumeniNodes
- IRC: tumeninodes
- In-game: TumeniNodes
- Location: in the dark recesses of the mind
- Contact:
Re: Modding Tutorial Book (new: Privileges)
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.
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.
A Wonderful World
Re: Modding Tutorial Book (new: Privileges)
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.
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.
- TumeniNodes
- Member
- Posts: 2943
- Joined: Fri Feb 26, 2016 19:49
- GitHub: TumeniNodes
- IRC: tumeninodes
- In-game: TumeniNodes
- Location: in the dark recesses of the mind
- Contact:
Re: Modding Tutorial Book (new: Privileges)
Thank you.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.
A Wonderful World
Re: Modding Tutorial Book (new: Privileges)
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?
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?
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: Modding Tutorial Book (new: Privileges)
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
- Wuzzy
- Member
- Posts: 4804
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: Modding Tutorial Book (new: Privileges)
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. ;-)
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)
Somebody talked about translating this Modding Tutorial Book?
Because i would like to translate this to spanish...
(Now that I have the idea)
Because i would like to translate this to spanish...
(Now that I have the idea)
Have a nice day! :D
-
- New member
- Posts: 7
- Joined: Tue Aug 02, 2016 12:51
- GitHub: DraggonFantasy
- IRC: DraggonFantasy
- In-game: DraggonFantasy
Re: Modding Tutorial Book (new: Privileges)
I can also translate it to russian :) if I'll not be lazyMineYoshi wrote:Because i would like to translate this to spanish...
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"))
Code: Select all
print("size: " .. inv:get_size("main"))
Re: Modding Tutorial Book (new: Privileges)
I can maintain the version updating it every week...
Isn't that hard when one person has to care only about one translation!
Isn't that hard when one person has to care only about one translation!
Have a nice day! :D
- mnh48
- Member
- Posts: 310
- Joined: Wed Nov 16, 2016 22:55
- GitHub: mnh48
- IRC: MNH48
- In-game: mnh48
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: Modding Tutorial Book (new: Privileges)
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?
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?
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: Modding Tutorial Book (new: Privileges)
It's ready for translation, I'm just not sure how it should be done
- mnh48
- Member
- Posts: 310
- Joined: Wed Nov 16, 2016 22:55
- GitHub: mnh48
- IRC: MNH48
- In-game: mnh48
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: Modding Tutorial Book (new: Privileges)
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
http://chocanto.me/2016/04/16/jekyll-multilingual.html
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: Modding Tutorial Book (new: Privileges)
Done! https://rubenwardy.com/minetest_modding ... w-languagemuhdnurhidayat 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
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: Modding Tutorial Book (new: Privileges)
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
You can also download a zip file of the HTML version
- TumeniNodes
- Member
- Posts: 2943
- Joined: Fri Feb 26, 2016 19:49
- GitHub: TumeniNodes
- IRC: tumeninodes
- In-game: TumeniNodes
- Location: in the dark recesses of the mind
- Contact:
Re: Modding Tutorial Book (new: Privileges)
PDF version is great to have rubenwardy, thank you.
A Wonderful World
Re: Modding Tutorial Book (new: Privileges)
ive been reading this book, and i must say that its very helpful for a beginner like me!
Hey, what can i say? I'm the bad guy.
Who is online
Users browsing this forum: No registered users and 15 guests