Page 1 of 1

creating a tool

PostPosted: Fri Oct 17, 2014 09:15
by pixelface
Hello,
I need help/infos on how to create a tool with minetest mods.

There are 2 problems:
1) There is no pick created with the recipe. I don't know why.

The Code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all

minetest.register_craft({
    output = 'korallen:pink_coral_stick',
   recipe = {
      {'korallen:pinkcoral', '', ''},
      {'korallen:pinkcoral', '', ''},
      {'korallen:pinkcoral', '', ''},
}
})

minetest.register_tool('korallen:coral_pick', {
    description = 'coral Pickaxe',
    inventory_image = 'default_tool_diamondpick.png', -- just for testing
    tool_capabilities = {
        max_drop_level=3,
        groupcaps= {
            cracky={times={[1]=4.00, [2]=1.50, [3]=1.00}, uses=70, maxlevel=1}
        }
    }
})

-- does not wor!
minetest.register_craft({
    output = 'korallen :coral_pick',
   recipe = {
      {'korallen:pinkcoral', 'korallen:pinkcoral', 'korallen:pinkcoral'},
      {'', 'pink_coral_stick', ''},
      {'', 'pink_coral_stick', ''},
}
})


2) I looked at http://dev.minetest.net/minetest.register_craftitem but I do not understand how to tell the craftitem to be a tool, and not just for example a node.
Are tools, plants ect. 3d-Models with a texture? How can I use an existing model and change it's texture?

If you know a good documented example or a tutorial , please let me now the link. :)

Here's a screenshot of what I did:
Image

Thanks in advance! :D

Re: creating a tool

PostPosted: Fri Oct 17, 2014 09:47
by Amaz
I think you need to get rid of the space here:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
output = 'korallen :coral_pick',
so it is
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
output = 'korallen:coral_pick',
that is the only problem I can see, but I may be wrong...

Re: creating a tool

PostPosted: Fri Oct 17, 2014 12:46
by Esteban
.

Re: creating a tool

PostPosted: Fri Oct 17, 2014 19:16
by pixelface
Thanks a lot. Now the tool can be created!
I'll try to take more care not to forget writing the mods' names.=)