Mod Developing

Post Reply
MrOverCast
Member
Posts: 38
Joined: Fri Mar 30, 2018 06:18
GitHub: MrOverCast
IRC: MrOverCast
In-game: MrOverCast

Mod Developing

by MrOverCast » Post

hello


So i am creating a mod with a assortment of random items and things. one of them being aluminum ingots and aluminum tools. i want to make a aluminum ore generate in the world. How would i do that

here is my code so far

Code: Select all

minetest.register_node("aluminum:aluminum_ore", {
       description = "aluminum Ore",
	tiles = {"defaulth_stone.png^aluminum_mineral.png"},
	groups = {cracky = 3, stone = 1},
	drop = 'aluminum:aluminum_lump',
	legacy_mineral = true
})


minetest.register_craftitem("aluminum:aluminum_lump", {
	description = "aluminum Lump",
	inventory_image = "aluminum_Lump.png"
})


minetest.register_ore({
	ore_type       = "vein",
	ore            = "aluminum:aluminum_ore",
	wherein        = "default:stone",
	clust_scarcity = 8*8*8,
	clust_num_ores = 8,
	clust_size     = 3,
	y_min          = -31000,
	y_max          = 64,
})

User avatar
Andrey01
Member
Posts: 2443
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Mod Developing

by Andrey01 » Post

And what are your questions regarding to the mod development? If you wanted to post the mod, you need to do it here: viewforum.php?f=9

MrOverCast
Member
Posts: 38
Joined: Fri Mar 30, 2018 06:18
GitHub: MrOverCast
IRC: MrOverCast
In-game: MrOverCast

Re: Mod Developing

by MrOverCast » Post

Andrey01 wrote:
Wed May 06, 2020 17:51
And what are your questions regarding to the mod development? If you wanted to post the mod, you need to do it here: viewforum.php?f=9

like i mentioned in the post i would like to make a ore that generates in the world. how would i do that

User avatar
Andrey01
Member
Posts: 2443
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Mod Developing

by Andrey01 » Post

As I see, in your code you already registered an ore ("minetest.register_ore" function is applied) that will generate in the world in the depth span from 64 up to -31000 down.

Eran
Member
Posts: 123
Joined: Fri May 03, 2019 16:46

Re: Mod Developing

by Eran » Post

You are trying to register a 'vein' ore type. For this ore type to work you need to add noise_params and noise_threshold to the ore definition, see here.
However the vein ore type is fairly resource expensive and also hard to control with noise params. You might want to use another ore type instead.

MrOverCast
Member
Posts: 38
Joined: Fri Mar 30, 2018 06:18
GitHub: MrOverCast
IRC: MrOverCast
In-game: MrOverCast

Re: Mod Developing

by MrOverCast » Post

Eran wrote:
Thu May 07, 2020 10:15
You are trying to register a 'vein' ore type. For this ore type to work you need to add noise_params and noise_threshold to the ore definition, see here.
However the vein ore type is fairly resource expensive and also hard to control with noise params. You might want to use another ore type instead.
Well the problem I am having is when i generate a new world I Don't see my ore i made underground. regarding if its vein or scatter

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests