need Help with my stock mod for wazuclan server

User avatar
tyo445
Member
 
Posts: 18
Joined: Sun Dec 02, 2012 14:52

need Help with my stock mod for wazuclan server

by tyo445 » Mon Jun 03, 2013 15:17

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},
})
Last edited by tyo445 on Tue Jun 04, 2013 23:21, edited 1 time in total.
Don't.Turn.Around.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Jun 03, 2013 15:45

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 ;-)
Last edited by PilzAdam on Mon Jun 03, 2013 15:45, edited 1 time in total.
 

grisha
New member
 
Posts: 3
Joined: Mon Jun 03, 2013 15:57

by grisha » Mon Jun 03, 2013 15:57

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},
})
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Jun 03, 2013 17:01

The correct field would be "inventory_image", "tile_images" does simply nothing (its also a string, not a table).
Last edited by PilzAdam on Mon Jun 03, 2013 17:01, edited 1 time in total.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Mon Jun 03, 2013 17:30

"tile_images" should be "tiles".
Last edited by Evergreen on Mon Jun 03, 2013 17:31, edited 1 time in total.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Jun 03, 2013 18:07

Evergreen wrote:"tile_images" should be "tiles".

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

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Mon Jun 03, 2013 18:12

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.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
tyo445
Member
 
Posts: 18
Joined: Sun Dec 02, 2012 14:52

by tyo445 » Tue Jun 04, 2013 22:54

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
Don't.Turn.Around.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Wed Jun 05, 2013 01:35

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?
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
tyo445
Member
 
Posts: 18
Joined: Sun Dec 02, 2012 14:52

by tyo445 » Wed Jun 05, 2013 19:45

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?
Don't.Turn.Around.
 

Ducky
Member
 
Posts: 12
Joined: Fri Mar 22, 2013 20:48

by Ducky » Fri Jun 07, 2013 21:11

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.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 20 guests

cron