Does anyone know what i did wrong?

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

Does anyone know what i did wrong?

by Chinchow » Sat Oct 13, 2012 20:50

Ok so I'm trying to make cobblestone bricks but it wont work here is 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_node( "stonebricks_cobble_bricks", {
    description = "Cobblebricks",
    tile_images = { "cobble_bricks.png" },
    is_ground_content = true,
    groups = {cracky=3},
    sounds = default.node_sound_stone_defaults(),
        }
    }
})
minetest.register_craft({
output = 'cobble_bricks",
recipe = {
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
    }
})
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sat Oct 13, 2012 21:35

Get rid of the extra two braces just below the sounds= line. Also, your proposed recipe will conflict with More Blocks "stone square".
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Sat Oct 13, 2012 21:55

Chinchow wrote:Ok so I'm trying to make cobblestone bricks but it wont work here is the code

minetest.register_node("stonebricks:cobble_bricks", {
description = "Cobblebricks",
tiles = {"stonebricks_cobble_bricks.png" },
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})

minetest.register_craft({
output = 'stonebricks:cobble_bricks 6',
recipe = {
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
}
})


Red = need to change
Blue = not necessary

Don't forget to have a folder called textures with a file called stonebricks_cobble_bricks.png

and VanessaE is right, so maybe try an extra row (edit:) and an output of 6 (or 3 or 1 whatever you like)

Good luck!
Last edited by Topywo on Sat Oct 13, 2012 21:56, edited 1 time in total.
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Sat Oct 13, 2012 21:59

Ok I tried them and here is the new version but it still won't work


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_node( "stonebricks:cobble_bricks", {
    description = "Cobblebricks",
    tiles = { "_stonebricks_cobble_bricks.png" },
    is_ground_content = true,
    groups = {cracky=3},
    sounds = default.node_sound_stone_defaults(),
})

minetest.register_craft({
output = 'cobble_bricks 9',
recipe = {
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
 }
})
Last edited by Chinchow on Sat Oct 13, 2012 22:10, edited 1 time in total.
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Sat Oct 13, 2012 22:49

Chinchow wrote:Ok I tried them and here is the new version but it still won't work


minetest.register_node( "stonebricks:cobble_bricks", {
description = "Cobblebricks",
tiles = { "_stonebricks_cobble_bricks.png" }, --> The underscore "_" causes a dummy image to be used, so you need to remove it.
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})

minetest.register_craft({
output = 'stonebricks:cobble_bricks 9', --> Without the mod name "stonebricks" your output will be an unknown item.
recipe = {
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
}
})


Edit: removed code stuff for colors
Last edited by Topywo on Sat Oct 13, 2012 22:50, edited 1 time in total.
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Sat Oct 13, 2012 23:16

For some reason it still wont work
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Sat Oct 13, 2012 23:35

Copy paste this code in the init.lua:

minetest.register_node( "stonebricks:cobble_bricks", {
description = "Cobblebricks",
tiles = { "stonebricks_cobble_bricks.png" },
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})

minetest.register_craft({
output = 'stonebricks:cobble_bricks 9',
recipe = {
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
{'default:cobble', 'default:cobble'},
}
})

I've tested it and it works. For the line: tiles = { "stonebricks_cobble_bricks.png" },
I used an .png image I save (as) with the name: stonebricks_cobble_bricks.png

- The name of the folder of your mod must be: stonebricks --> no CAPS
- In the stonebricks folder must be an init.lua with the lines I asked you to copy and paste
- In the stonebricks folder, there must be a folder called textures (no CAPS to be sure).
- In the textures folder must be at least 1 .png file called (no CAPS) stonebricks_cobble_bricks.png
- In the stonebricks folder must be a file called depends.txt (no CAPS to be sure),
- In the depends.txt folder must be 1 line with the text: default (copy/paste it in there)

My first guess is that you don't have the depends.txt file (with the single word "default' in it).

Good luck and don't give up on it!
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Sat Oct 13, 2012 23:51

It still won't work butI am not giving up this mod is going to be created but thanks for all you're help Topywo and thanks for your help VanessaE
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Sun Oct 14, 2012 00:04

Okay, then maybe the debug.txt will give some helpfull info:

Exit minetest completely, go to your home folder/directory, delete the debug.txt file, start minetest up again. Try to create/start a game, leave minetest again, go to your home folder, doubleclick on debug.txt to open it with your default text editor, search for ERROR (most of the time the bottom part), copy all those error lines and paste them here.

I'm curious :-)
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Sun Oct 14, 2012 01:00

I will tomorrow my computer needs to recharge and im on my dsi right now
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Sun Oct 14, 2012 01:10

Good, I need some sleep anyway :-)
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Mon Oct 15, 2012 19:34

" Failed to load and run script from
19:55:02: ERROR[main]: C:\Users\Cameron\Downloads\minetest-0.4.3-4a11323-meta_set_nodedef-win32\minetest-0.4.3-4a11323-meta_set_nodedef-win32\bin\..\mods\minetest\stonebricks\init.lua:
19:55:02: ERROR[main]: ...edef-win32\bin\..\mods\minetest\stonebricks\init.lua:6: attempt to index global 'default' (a nil value)
19:55:02: ERROR[main]: stack traceback:
19:55:02: ERROR[main]: ...edef-win32\bin\..\mods\minetest\stonebricks\init.lua:6: in main chunk

there is the debug.txt
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
GloopMaster
Member
 
Posts: 213
Joined: Wed Aug 01, 2012 18:03

by GloopMaster » Mon Oct 15, 2012 19:58

needs to depend on default then
Meow.

That is all.
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Mon Oct 15, 2012 20:15

I feel noobish I accidentally put depends.txt
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 8 guests

cron