Page 1 of 1

Help me please

PostPosted: Sat Feb 09, 2013 02:19
by xavier108
I was working on my mod.It is called mememod will let you have some blocks with meme face in it.I can't make it work here's the init.lua
---
---Blocks
---

minetest.register_node ("memeblocks:trollblock", {
drawtype = draw,
description = "trollblock",
tile_images = {"trollblock.png"},
inventory_image = {"trollblock.png"},
sunlight_propagates = true,
paramtype = 'light',
walkable = true,
material = minetest.digprop_constanttime(1.0),
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,},
})



--
--Crafting
--

minetest.register_craft({
output = 'memeblocks:trollblock 10',
recipe = {
{'default:steelblock', 'default:clay', 'default:steelblock'},
{'default:steelblock', '', 'default:steelblock'},
{'default:clay', 'default:steelblock', 'default:clay'},
}
})





Can someone help me

PostPosted: Sat Feb 09, 2013 02:31
by Aqua
1. Needs depends. Right-click then click on new then choose text document. Name it depends and type default into it. This is for the dependencies since you included default in the crafting.
2. Rename the whole mod folder memeblocks if you haven't already done so.
3. Post in Modding questions topic.

PostPosted: Sat Feb 09, 2013 06:02
by 0gb.us
xavier108 wrote:I can't make it work


What about it can't you make work? Are there any error messages? Does it run, but you can't make the craft work? Does the craft generate an unknown item? You need to be specific.

PostPosted: Sat Feb 09, 2013 07:50
by Menche
I think "drawtype = draw" is the problem; I don't think "draw" is a valid drawtype. You can leave that line out if it's just a cube.

Run minetest from the command line or read the end of debug.txt; if the game crashes, it will give you a useful error message that gives a line number and what went wrong. Post that in the future if you have problems.

Aqua wrote:1. Needs depends. Right-click then click on new then choose text document. Name it depends and type default into it. This is for the dependencies since you included default in the crafting.

I believe that is only required if you use a function from default, which he isn't here. Yes, you need default installed for the crafting recipes, but who's going to remove default? This should work fine without the depends.txt.

PostPosted: Sat Feb 09, 2013 15:42
by Topywo
I made a folder called memeblocks:

/home/topywo/celeron55-minetest-12472a4-test/mods/minetest/memeblocks

Copy pasted from your post the lines for the:

init.lua

I made a textures folder:

/home/topywo/celeron55-minetest-12472a4-test/mods/minetest/memeblocks/textures

I made an image, put it in the textures folder and named it:

trollblock.png

And it all works in this configuration/with these names.

- you could replace tile_images with tiles
- remove the digprop line
- name the .png in the init lua and in the textures folder, memeblocks_trollblock.png

But nevertheless it works :-)

Edit: and oc made a typo