how do you add ores and biomes

Post Reply
User avatar
Christian9
Member
Posts: 338
Joined: Fri Sep 19, 2014 20:29
In-game: Christian9
Location: Hell Creek

how do you add ores and biomes

by Christian9 » Post

ive seen mods do it but i dont know how

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: how do you add ores and biomes

by Krock » Post

You can't add biomes in mgv6 but mgv5/7 allow the register_biome function

For ores, see http://dev.minetest.net/minetest.register_ore .
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: how do you add ores and biomes

by Calinou » Post

Just look at their code.

Ores are added with minetest.register_ore:

Code: Select all

	minetest.register_ore({
		ore_type       = "scatter",
		ore            = "default:stone_with_gold",
		wherein        = "default:stone",
		clust_scarcity = 15*15*15,
		clust_num_ores = 3,
		clust_size     = 2,
		y_min          = -255,
		y_max          = -64,
		flags          = "absheight",
	})
As for biomes, you probably want to clear existing biome definitions first:

Code: Select all

-- Clear mgv5/mgv7 biomes and decorations
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()
Then look at the bottom of this file: https://github.com/paramat/paragenv7/bl ... r/init.lua

Note that only v5 and v7 map generations support proper biomes, in v6 biomes are a hack (you basically overwrite the already-present biomes).

prestidigitator
Member
Posts: 647
Joined: Thu Feb 21, 2013 23:54

Re: how do you add ores and biomes

by prestidigitator » Post

In other words, at least you aren't alone. NOBODY knows what they are, what they do, or how you use them. Proven by the sparsity of examples and documentation (including the forums, the developer wiki, and lua_api.txt). For now, probably better just to roll your own using noise in Lua, interpret it, and splat the results in using VoxelManip. I'm sure it's slower than the nebulous thing nobody can describe at doing whatever it is it does, but....

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: how do you add ores and biomes

by rubenwardy » Post

Don't make your own system to do the same thing.

http://dev.minetest.net/register_ore
http://rubenwardy.com/minetest_modding_ ... gister_ore
http://rubenwardy.com/minetest_modding_ ... #ore-types

I don't think biomes are officially supported yet (they weren't last time i checked) but jordach made a nice tutorial on them. See the Dropbox link in his signature.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

prestidigitator
Member
Posts: 647
Joined: Thu Feb 21, 2013 23:54

Re: how do you add ores and biomes

by prestidigitator » Post

rubenwardy wrote:Don't make your own system to do the same thing.
Ah. Yeah. Sorry. I should have qualified that. I was mostly referring to biomes. Ores are a little better documented at this point.
rubenwardy wrote:I don't think biomes are officially supported yet (they weren't last time i checked) but jordach made a nice tutorial on them. See the Dropbox link in his signature.
Of course, I'd be happy to be proven wrong about there being some documentation on biomes somewhere (I'd even be happy to—with permission and any caveats about lack of official support—help copy it to the developer wiki). However, there don't seem to be any links in Jordach's signature at the moment, so such documentation still has yet to materialize.

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: how do you add ores and biomes

by rubenwardy » Post

Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
bdjnk
Member
Posts: 104
Joined: Wed Mar 20, 2013 21:03
GitHub: bdjnk
Location: New York
Contact:

Re: how do you add ores and biomes

by bdjnk » Post

Another possibility is to take a look at recent "register_biome" activity on github. See what others are doing.

prestidigitator
Member
Posts: 647
Joined: Thu Feb 21, 2013 23:54

Re: how do you add ores and biomes

by prestidigitator » Post

Cool. I see it may be a bit, "opinionated," too. Should be a good read. Thank you.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests