Page 1 of 1

need Help with my stock mod for wazuclan server

PostPosted: Mon Jun 03, 2013 15:17
by tyo445
grisha's advice kindof fixed it. It shows at least something now but it's a dummy image. It can't load the image. any ideas anyone?
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_craftitem("stock:stock1", {
inventory_images = {"stock_stock.png"},
wield_image = "stock_stock",
groups={level=1},
})
minetest.register_craftitem("stock:stock2", {
tile_images = {"stock_stock2.png"},
wield_image = "stock_stock2",
groups={level=1},
})
minetest.register_craftitem("stock:stock3", {
tile_images = {"stock_stock3.png"},
wield_image = "stock_stock3",
groups={level=1},
})
minetest.register_craftitem("stock:stock4", {
tile_images = {"stock_stock4.png"},
wield_image = "stock_stock4",
groups={level=1},
})
minetest.register_craftitem("stock:stock5", {
tile_images = {"stock_stock5.png"},
wield_image = "stock_stock5",
groups={level=1},
})

PostPosted: Mon Jun 03, 2013 15:45
by PilzAdam
tyo445 wrote:[img]C:\Users\Will\Desktop\stock\textures\stock_stock.png.png[/img]

I guess you have named all your textures ".png.png" at the end. AFAIK windows 7 doesnt show the file extention, so renaming the image to "something" will actually create the file "something.png".
So renaming it to "something.png" will produce "something.png.png" and minetest doesnt find it anymore.
Windows sucks ;-)

PostPosted: Mon Jun 03, 2013 15:57
by grisha
i tried thats on mine, made my own pics and run singleplayer with that mod. same problem here. yuo forgot to add a "wield image" value:
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_craftitem("stock:stock1", {
tile_images = {"stock_stock.png"},
wield_image = "stock_stock",
groups={level=1},
})
minetest.register_craftitem("stock:stock2", {
tile_images = {"stock_stock2.png"},
wield_image = "stock_stock2",
groups={level=1},
})
minetest.register_craftitem("stock:stock3", {
tile_images = {"stock_stock3.png"},
wield_image = "stock_stock3",
groups={level=1},
})
minetest.register_craftitem("stock:stock4", {
tile_images = {"stock_stock4.png"},
wield_image = "stock_stock4",
groups={level=1},
})
minetest.register_craftitem("stock:stock5", {
tile_images = {"stock_stock5.png"},
wield_image = "stock_stock5",
groups={level=1},
})

PostPosted: Mon Jun 03, 2013 17:01
by PilzAdam
The correct field would be "inventory_image", "tile_images" does simply nothing (its also a string, not a table).

PostPosted: Mon Jun 03, 2013 17:30
by Evergreen
"tile_images" should be "tiles".

PostPosted: Mon Jun 03, 2013 18:07
by PilzAdam
Evergreen wrote:"tile_images" should be "tiles".

That only applies to nodes and does nothing in craftitem definitions.

PostPosted: Mon Jun 03, 2013 18:12
by Evergreen
PilzAdam wrote:
Evergreen wrote:"tile_images" should be "tiles".

That only applies to nodes and does nothing in craftitem definitions.

Ah ok. I never knew that.

PostPosted: Tue Jun 04, 2013 22:54
by tyo445
PilzAdam wrote:
tyo445 wrote:[img]C:\Users\Will\Desktop\stock\textures\stock_stock.png.png[/img]

I guess you have named all your textures ".png.png" at the end. AFAIK windows 7 doesnt show the file extention, so renaming the image to "something" will actually create the file "something.png".
So renaming it to "something.png" will produce "something.png.png" and minetest doesnt find it anymore.
Windows sucks ;-)

O thanx for that info. I disagree with the last scentence tho

PostPosted: Wed Jun 05, 2013 01:35
by Evergreen
tyo445 wrote:
tyo445 wrote:
grisha wrote:i tried thats on mine, made my own pics and run singleplayer with that mod. same problem here. yuo forgot to add a "wield image" value:
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_craftitem("stock:stock1", {
tile_images = {"stock_stock.png"},
wield_image = "stock_stock",
groups={level=1},
})
minetest.register_craftitem("stock:stock2", {
tile_images = {"stock_stock2.png"},
wield_image = "stock_stock2",
groups={level=1},
})
minetest.register_craftitem("stock:stock3", {
tile_images = {"stock_stock3.png"},
wield_image = "stock_stock3",
groups={level=1},
})
minetest.register_craftitem("stock:stock4", {
tile_images = {"stock_stock4.png"},
wield_image = "stock_stock4",
groups={level=1},
})
minetest.register_craftitem("stock:stock5", {
tile_images = {"stock_stock5.png"},
wield_image = "stock_stock5",
groups={level=1},
})


O thanx!

It kindof works now

What do you mean kind of?

PostPosted: Wed Jun 05, 2013 19:45
by tyo445
Evergreen wrote:
tyo445 wrote:
tyo445 wrote:
O thanx!

It kindof works now

What do you mean kind of?

now it shows SOMETHING... but it's a dummy image though. Any ideas on this?

PostPosted: Fri Jun 07, 2013 21:11
by Ducky
tyo445 wrote:now it shows SOMETHING... but it's a dummy image though. Any ideas on this?

Did you change "tile_images" to "inventory_image" like PilzAdam said?
You also won't need a wield_image, if it is the same as inventory_image.