biome specific decorations

Post Reply
User avatar
ensayia
New member
Posts: 3
Joined: Wed Sep 21, 2022 04:11

biome specific decorations

by ensayia » Post

Hello everyone! I have only a few biomes on my very early minetest mod. When I register decorations and specify the biomes they can generate in, this value seems to be ignored. If I supply bogus biome names, real ones, or gibberish I get absolutely no feedback or error from minetest itself. I have a decorative grass node (plantlike), that spawns on grass node blocks but I only want it to spawn in my sparse forests, not my dense ones.

Can anyone look at this code and see if I'm doing something strange? The way it is now, even when specifying biomes, the grass will spawn in any biome with node:grass blocks regardless of what I tell it.

My entire biome file:

Code: Select all

minetest.register_alias("mapgen_stone", "node:stone")
minetest.register_alias("mapgen_sand", "node:sand")
minetest.register_alias("mapgen_water_source", "node:water_source")
minetest.register_alias("mapgen_river_water_source", "node:water_source")


minetest.register_biome({
	name = "forest_sparse_mountain",
	node_top = "node:stone",
	depth_top = 1,
	node_filler = "node:stone",
	depth_filler = 1,
	node_riverbed = "node:sand",
	depth_riverbed = 2,
	y_max = 31000,
	y_min = 33,
	heat_point = 50,
	humidity_point = 50,
})

minetest.register_biome({
	name = "forest_sparse_base",
	node_top = "node:grass",
	depth_top = 1,
	node_filler = "node:dirt",
	depth_filler = 2,
	node_riverbed = "node:sand",
	depth_riverbed = 2,
	y_max = 32,
	y_min = 3,
	heat_point = 50,
	humidity_point = 50,
})

minetest.register_biome({
	name = "forest_sparse_ocean",
	node_top = "node:sand",
	depth_top = 1,
	node_filler = "node:sand",
	depth_filler = 2,
	node_riverbed = "node:sand",
	depth_riverbed = 2,
	node_water = "node:water",
	node_river_water = "node:water_source",
	node_cave_liquid = "node:water_source",
	y_max = 3,
	y_min = -255,
	heat_point = 50,
	humidity_point = 50,
})

--------------------------------------------------------------------------------

minetest.register_biome({
	name = "forest_dense_mountain",
	node_top = "node:stone",
	depth_top = 1,
	node_filler = "node:stone",
	depth_filler = 1,
	node_riverbed = "node:sand",
	depth_riverbed = 2,
	y_max = 31000,
	y_min = 33,
	heat_point = 50,
	humidity_point = 50,
})

minetest.register_biome({
	name = "forest_dense_base",
	node_top = "node:grass",
	depth_top = 1,
	node_filler = "node:dirt",
	depth_filler = 2,
	node_riverbed = "node:sand",
	depth_riverbed = 2,
	y_max = 32,
	y_min = 3,
	heat_point = 50,
	humidity_point = 50,
})

minetest.register_biome({
	name = "forest_dense_ocean",
	node_top = "node:sand",
	depth_top = 1,
	node_filler = "node:sand",
	depth_filler = 2,
	node_riverbed = "node:sand",
	depth_riverbed = 2,
	node_water = "node:water",
	node_river_water = "node:water_source",
	node_cave_liquid = "node:water_source",
	y_max = 3,
	y_min = -255,
	heat_point = 50,
	humidity_point = 50,
})
The relevant deco code:

Code: Select all

minetest.register_decoration({
	name = "deco:grass_deco",
	deco_type = "simple",
	place_on = {"node:grass"},
	fill_ratio = 0.05,
	y_max = 31000,
	y_min = 0,
	param2 = 20,
	decoration = {"node:grass_deco", "node:grass_deco_2", "node:grass_deco_3"},
	biomes = {"forest_sparse_base", "forest_sparse_mountain"},
	flags = "place_center_x, place_center_z",
	rotation = "random",
})

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: biome specific decorations

by ShadMOrdre » Post

Two other issues off the bat. The first, there are only three mapgen aliases, stone, water, and river water. The second, all the biome definitions have the same heat humidity values, so only the last registered should appear.

I've have little luck using the biome defs in decoration definitons as well. My only solution was to ensure that each biome has it's own node top. This is apparently also what MTG does.


Shad

User avatar
ensayia
New member
Posts: 3
Joined: Wed Sep 21, 2022 04:11

Re: biome specific decorations

by ensayia » Post

Other issues aside, do any of those things affect decorations being ignored? That behavior not executing correctly is my biggest issue at the moment.

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: biome specific decorations

by Festus1965 » Post

I see another problem,
a decoration is global, and a gamer can have 3 different biome decorations in his inventory, whatever biome gamer stay,
BUT then gamer should only be able to place the correct decoration = will cause several failure reports as most will NOT understand the problem ...
or will the wrong biome decoration just disappear, when build in wrong area ? = also failure reports ...
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
ensayia
New member
Posts: 3
Joined: Wed Sep 21, 2022 04:11

Re: biome specific decorations

by ensayia » Post

If I set my forest_dense_base biome as the only one and totally disable all other biomes, then set the grass decoration to use only one of the disabled biomes, they still show up. The issue I have is that minetest seems to ignore the setting.

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests