First Hacks on Minetest

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

First Hacks on Minetest

by webmanoffesto » Tue Oct 16, 2018 20:43

I want my first Minetest hack to be something like changing the image used for an item in a mod. How can I do that. I am running Minetest 0.5.0 on Ubuntu. I have the directory
/home/tom/Documents/minetest/games/Block_Islands/mods/creatures/chicken/textures
Can I just put different .png files in that? Under the same name?
 

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

Re: First Hacks on Minetest

by Gael de Sailly » Tue Oct 16, 2018 22:38

Yes, it is as simple as that. Just replace the image you want to change, and give it the same name.
Try it!

Don't hesitate to actually try things by yourself if you want to learn Minetest modding. The eternal DIY :D
Contributor of Minetest and OpenStreetMap, on Ubuntu 16.04. ~ ~ ~ Meet me on MinetestForFun, VanessaE's Basic, Capture the Flag and Inside the Box.
 

User avatar
Linuxdirk
Member
 
Posts: 1659
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: First Hacks on Minetest

by Linuxdirk » Wed Oct 17, 2018 11:11

Actually for changing the look of an item you don't need a mod. All you need is a texture pack having the texture for the item.

webmanoffesto wrote:Can I just put different .png files in that? Under the same name?

Do not alter upstream files. It makes updating the package harder. Simply create a texture pack having the file and select the texture pack. The file then will be used instead of the original file.

Since you asked for modding: I am not sure if it works but according to logic it should work.

Create a new mod and depend it creatures then create an empty init.lua and create a folder textures and place your new chicken texture there, using the original file name an enable the mod for the world.
 

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

Re: First Hacks on Minetest

by Gael de Sailly » Wed Oct 17, 2018 18:26

As I understand it, it was for experimenting how mods work rather than just for changing a texture.
Linuxdirk wrote:Create a new mod and depend it creatures then create an empty init.lua and create a folder textures and place your new chicken texture there, using the original file name an enable the mod for the world.

I remember my first modding experience, I learnt better by tweaking existing mods and seeing what happens, than adding some mod coded from scratch (but make sure to have an intact copy somewhere for backup).
Contributor of Minetest and OpenStreetMap, on Ubuntu 16.04. ~ ~ ~ Meet me on MinetestForFun, VanessaE's Basic, Capture the Flag and Inside the Box.
 

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Re: First Hacks on Minetest

by webmanoffesto » Thu Oct 18, 2018 19:47

That's so cool. I'm working in /minetest/games/Lord-of-the-Test-master/mods/default
I replaced the apple with a photo I edited in Gimp.
Where are frequently encountered sounds set? I want to do something like replace the walking sound.
How do I set the sound which is made when I plant an apple tree?
Awesome game.
 

parasite
Member
 
Posts: 116
Joined: Sat May 06, 2017 17:45
GitHub: Parasitoid

Re: First Hacks on Minetest

by parasite » Thu Oct 18, 2018 21:43

webmanoffesto wrote:That's so cool. I'm working in /minetest/games/Lord-of-the-Test-master/mods/default
I replaced the apple with a photo I edited in Gimp.
Where are frequently encountered sounds set? I want to do something like replace the walking sound.
How do I set the sound which is made when I plant an apple tree?
Awesome game.

Lol! I like this guy very much! :-D
Well, exploring the secrets of the Minetest Game is not so difficult. Note that minetest files which you have on your hard disk in your computer, are also available online at the github server. I think it is much more convenient and easy to view, explore and learn these things at github using a web browser. I would like to mention that there is a keyword search option in the browser, you can also look at each catalog quickly and efficiently, as well as it is very easy to view the contents of each file with the Lua code.

Check these links: the general Minetest Game catalog and sound folder:
- https://github.com/minetest/minetest_game
- https://github.com/minetest/minetest_ga ... ult/sounds

Learn the structure of those folders, where is the folder with sound files, what kind of sound files are those used by minetest and what is the name of the file you are interesting. When you explore these things on github, you should easily find them in your computer minetest folder ;-) Have lot of fun with testing!
 

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Re: First Hacks on Minetest

by webmanoffesto » Thu Oct 18, 2018 23:23

Cool, I changed replaced the default_place_node.1.ogg file with a sound effect I found online and named it default_place_node.1.ogg.

Now I understand the
Linuxdirk wrote:Do not alter upstream files
comment. Don't worry, I won't do that. I'm not using Git on this folder.
 

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Re: First Hacks on Minetest

by webmanoffesto » Thu Oct 18, 2018 23:46

Linuxdirk wrote:Create a new mod and depend it creatures then create an empty init.lua and create a folder textures and place your new chicken texture there, using the original file name an enable the mod for the world.

Can you be more specific on how I do that?
 


Return to General Discussion



Who is online

Users browsing this forum: No registered users and 3 guests