Biome support in the API

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

Biome support in the API

by PilzAdam » Post

Hello everyone!
I think it would be great if there where some functions in the API that mods can define biomes.
Here are some ideas how these functions could look like:

Code: Select all

minetest.register_biome("desert", {
    rarity = 0.1,
    stone_like_node = "default:desert_stone",
    dirt_like_node = "default:default:desert_sand",
    dirt_with_grass_like_node = "default:desert_sand",
    generate_trees = true,
    tree_rarity = 0.01,
    leaves_like_node = "air",
    tree_like_node = "default:cactus",
}
This is an example for the desert biome.
There should be also a global table that cotains all definitions ordered by name:

Code: Select all

minetest.registered_biomes
If this would be implemented into upstream, the API would be much more powerful and mod creators could create variet maps.
Please post what you think about it and what you would add/remove to the functions.

jin_xi
Member
Posts: 165
Joined: Mon Jul 02, 2012 18:19

by jin_xi » Post

i agree, this would be great. but i think some more degrees of control would be good, esp for placement of biomes.

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

by PilzAdam » Post

Another idea: In minetest.register_on_generated() there should be the biome as one param:

Code: Select all

minetest.register_on_generated(minp, maxp, seed, biome)
"biome" should contain the name of the biome or a table with all biomes in that block.
So the mod developers can check if they are in a desert and create some oasis there.

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

by Topywo » Post

Good idea.

Would it also be possible to let the mod makers use more 'like' nodes and use other than the minetest_game mods?

For example:
stone_like_node = "default:desert_stone",
stone_like_node_a = "modmakersmod:granite"

User avatar
BrandonReese
Member
Posts: 839
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese
Location: USA

by BrandonReese » Post

Topywo wrote:Good idea.

Would it also be possible to let the mod makers use more 'like' nodes and use other than the minetest_game mods?

For example:
stone_like_node = "default:desert_stone",
stone_like_node_a = "modmakersmod:granite"
for something like that it would be better to make stone_like_node an array

stone_like_node = { 'default:desert_stone','modmakersmod:granite' }

In the biome definition should it include a size range. So you could make the desert biome rare, but you could make it very large. If it's just rare it could end up being small too.
Last edited by BrandonReese on Wed Oct 24, 2012 14:18, edited 1 time in total.

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

by PilzAdam » Post

Another idea: Different types of trees.
New fields in the definition table:

Code: Select all

tree_small = true,
tree_medium = true,
tree_big = false,

User avatar
kotolegokot
Member
Posts: 131
Joined: Mon Jul 02, 2012 17:03
Location: Russia, Ishim

by kotolegokot » Post

This is very great idea! I have some amendments. I think trees must be generated separately. I mean it must be generated by minetest.register_on_generated function. Also, we need function, that get biome name from position. Example: minetest.env:get_biome_name(pos).
Last edited by kotolegokot on Sat Oct 27, 2012 05:52, edited 1 time in total.
I'm creator of these mods: Locked sign, Locked furnace, Money. And I'm a developer of The RealTest Game.

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

by PilzAdam » Post

kotolegokot wrote:Also, we need function, that get biome name from position. Example: minetest.env:get_biome_name(pos).
I already had the idea to pass the biome to minetest.register_on_generated(). But this would be cool too, to use it in abms.

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

by PilzAdam » Post

2 new ideas:
1) A new layer above_dirt (for snow biomes)
2) Some params to control the mapgen (e.g. high mountains or flat).

OdnetninI
Member
Posts: 38
Joined: Sun Oct 21, 2012 08:20

by OdnetninI » Post

I think the same that you, we need more control of mapgen (like mines). +3

sky
Member
Posts: 152
Joined: Tue Oct 16, 2012 11:59
Location: SKY

by sky » Post

I like this biome idea i can make a jungle biome a snow biome and plains biome if it will work
Last edited by sky on Sun Oct 28, 2012 16:36, edited 1 time in total.

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

by PilzAdam » Post

Maybe textures that depend on the biome would be nice. When you place a grass block in a swamp biome it looks different than in a grass biome.

jmf
Member
Posts: 164
Joined: Mon Nov 05, 2012 18:13
Location: Germany

by jmf » Post

A height parameter would be nice, so for example snow biomes are only generated at great heights.
No longer active in minetest.

User avatar
0gb.us
Member
Posts: 841
Joined: Sun Sep 16, 2012 01:55
Location: 0gb.us:30000
Contact:

by 0gb.us » Post

PilzAdam wrote:Maybe textures that depend on the biome would be nice. When you place a grass block in a swamp biome it looks different than in a grass biome.
That sounds like it would requite work on the client side.

Or on the server side, it could be implemented as a separate node that gets switched in.

Post Reply

Who is online

Users browsing this forum: Walker and 5 guests