how do you add ores and biomes
- Christian9
- Member
- Posts: 338
- Joined: Fri Sep 19, 2014 20:29
- In-game: Christian9
- Location: Hell Creek
how do you add ores and biomes
ive seen mods do it but i dont know how
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: how do you add ores and biomes
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 .
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>
- 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
Just look at their code.
Ores are added with minetest.register_ore:
As for biomes, you probably want to clear existing biome definitions first:
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).
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",
})
Code: Select all
-- Clear mgv5/mgv7 biomes and decorations
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()
Note that only v5 and v7 map generations support proper biomes, in v6 biomes are a hack (you basically overwrite the already-present biomes).
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
Re: how do you add ores and biomes
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....
- 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
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.
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.
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
Re: how do you add ores and biomes
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:Don't make your own system to do the same thing.
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.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.
- 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
Another possibility is to take a look at recent "register_biome" activity on github. See what others are doing.
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
Re: how do you add ores and biomes
Cool. I see it may be a bit, "opinionated," too. Should be a good read. Thank you.
Who is online
Users browsing this forum: No registered users and 5 guests