Post your mapgen questions here (modding or engine)
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
Yes use minetest.emerge_area, i doubt forceload_block actually generates the area.
- ChimneySwift
- Member
- Posts: 320
- Joined: Fri Sep 22, 2017 06:46
- GitHub: ChimneySwift
- IRC: ChimneySwift
- In-game: ChimneySwift
- Location: 127.0.0.1
Re: Post your mapgen questions here (modding or engine)
Is there a way to get a completely flat (no holes) grass-only mapgen (no grass, trees, bushes, just dirt with grass) I don't mind what happens under the ground, I'd just like a cleaner testing environment for mods :)
A spoon is basically a tiny bowl with a stick on it
Re: Post your mapgen questions here (modding or engine)
Maybe use spawnbuilder as a starting point,ChimneySwift wrote:Is there a way to get a completely flat (no holes) grass-only mapgen
and change stone to grass ?
'My' wiki-pages: Build-a-home - basic-robot - basic_robot_csm - basic-machines - digtron - xdecor -
Map-Database
Map-Database
- GreenXenith
- Member
- Posts: 1356
- Joined: Wed Oct 28, 2015 01:26
- GitHub: GreenXenith
- Location: UTC-8:00
- Contact:
Re: Post your mapgen questions here (modding or engine)
Select "flat" from the mapgen list. You can also edit the generation file to disable caves.ChimneySwift wrote:Is there a way to get a completely flat (no holes) grass-only mapgen (no grass, trees, bushes, just dirt with grass) I don't mind what happens under the ground, I'd just like a cleaner testing environment for mods :)
YouTube | Mods | Patreon | Minetest Discord @greenxenith
You should not be able to read this message.
You should not be able to read this message.
Re: Post your mapgen questions here (modding or engine)
The flat mapgen always generates biomes. The ground nodes will change. He wants grass only
- Linuxdirk
- Member
- Posts: 3217
- Joined: Wed Sep 17, 2014 11:21
- In-game: Linuxdirk
- Location: Germany
- Contact:
Re: Post your mapgen questions here (modding or engine)
And trees.burli wrote:The flat mapgen always generates biomes.
Actually in 8/10 test worlds I spawn in the middle of a gigantic forest :(
Re: Post your mapgen questions here (modding or engine)
You can disable trees with "nodecoration", but you always have biomes.
- Linuxdirk
- Member
- Posts: 3217
- Joined: Wed Sep 17, 2014 11:21
- In-game: Linuxdirk
- Location: Germany
- Contact:
Re: Post your mapgen questions here (modding or engine)
I am absolutely fine with decorations (bushes, grass, occasional trees, etc.) but I wouldn't call giant forests as "flat".burli wrote:You can disable trees with "nodecoration", but you always have biomes.
- GreenXenith
- Member
- Posts: 1356
- Joined: Wed Oct 28, 2015 01:26
- GitHub: GreenXenith
- Location: UTC-8:00
- Contact:
Re: Post your mapgen questions here (modding or engine)
Alright, singlenode has a flag for the nodetype, right? (I think I read that somewhere).burli wrote:The flat mapgen always generates biomes. The ground nodes will change. He wants grass only
YouTube | Mods | Patreon | Minetest Discord @greenxenith
You should not be able to read this message.
You should not be able to read this message.
Re: Post your mapgen questions here (modding or engine)
Could be done as mod or subgame. You can write a mod that overrides MTG biomes and replaced them with a single grassland with rare decoration.Linuxdirk wrote: I am absolutely fine with decorations (bushes, grass, occasional trees, etc.) but I wouldn't call giant forests as "flat".
That's the problem with the current mapgen and biome implementation. Mostly everything is possible, but the setup is far from user friendly
-
- Member
- Posts: 1482
- Joined: Fri Apr 19, 2013 16:19
- GitHub: twoelk
- IRC: twoelk
- In-game: twoelk
- Location: northern Germany
Re: Post your mapgen questions here (modding or engine)
as mentioned only a little earlier in this thread, do try these modsChimneySwift wrote:Is there a way to get a completely flat (no holes) grass-only mapgen (no grass, trees, bushes, just dirt with grass) I don't mind what happens under the ground, I'd just like a cleaner testing environment for mods :)
superflat
or
flatgen
Spoiler
very flat map made of layers that you can define.]
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
In .conf add the line: 'mg_flags = nocaves,nodungeons,light,nodecorations' or set those mapgen flags in advanced settings menu.ChimneySwift wrote:Is there a way to get a completely flat (no holes) grass-only mapgen (no grass, trees, bushes, just dirt with grass) I don't mind what happens under the ground, I'd just like a cleaner testing environment for mods :)
Select 'flat' core mapgen and create a new world.
Use a mod that depends on 'default' that clears the MTGame biomes and defines it's own grass biome, code is:
Code: Select all
minetest.clear_registered_biomes()
minetest.clear_registered_ores()
minetest.clear_registered_decorations()
minetest.register_biome({
name = "grassland",
--node_dust = "",
node_top = "default:dirt_with_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 1,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
--node_riverbed = ,
--depth_riverbed = ,
y_min = -31000,
y_max = 31000,
heat_point = 50,
humidity_point = 50,
})
- ChimneySwift
- Member
- Posts: 320
- Joined: Fri Sep 22, 2017 06:46
- GitHub: ChimneySwift
- IRC: ChimneySwift
- In-game: ChimneySwift
- Location: 127.0.0.1
Re: Post your mapgen questions here (modding or engine)
Ahh thank you folks :)
Much appreciated, I will investigate all avenues :)
Much appreciated, I will investigate all avenues :)
A spoon is basically a tiny bowl with a stick on it
Re: Post your mapgen questions here (modding or engine)
Where's a good place to get started writing biomes?
I've read through the contents of \games\minetest_game\mods\default\mapgen.lua, but the parameters there seem rather limited. How is terrain noise changed from biome to biome, for example to differentiate a large flat field from a hilly field?
I'm also having trouble seeing where plant/decoration gen is controlled, like how to control density of a plant's generation and which biomes it will generate in.
Sorry for so many questions at once. I'm coming over from Minecraft, most things in Minetest are a *lot* easier to access and modify, but biomes/terraingen is looking harder to break into.
I've read through the contents of \games\minetest_game\mods\default\mapgen.lua, but the parameters there seem rather limited. How is terrain noise changed from biome to biome, for example to differentiate a large flat field from a hilly field?
I'm also having trouble seeing where plant/decoration gen is controlled, like how to control density of a plant's generation and which biomes it will generate in.
Sorry for so many questions at once. I'm coming over from Minecraft, most things in Minetest are a *lot* easier to access and modify, but biomes/terraingen is looking harder to break into.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
in Minetest a basic 'stone and water' terrain is created first by the engine, then afterwards biomes are added according to definitions in mods or games (like MTGame), so biomes cannot affect terrain shape. However biomes have y-limits so you can limit a biome to a suitable altitude.
See the decoration registrations, density is either fixed and specified by 'fill_ratio', or more often specified by a perlin noise defined in 'noise_params'. I have written or linked to some explanation of noise params in a post earlier in this thread, it's well worth reading through the whole thread there's lots of helpful information.
Make sure to read the docs:
https://github.com/minetest/minetest/bl ... .txt#L5087
https://github.com/minetest/minetest/bl ... .txt#L5128
See the decoration registrations, density is either fixed and specified by 'fill_ratio', or more often specified by a perlin noise defined in 'noise_params'. I have written or linked to some explanation of noise params in a post earlier in this thread, it's well worth reading through the whole thread there's lots of helpful information.
Make sure to read the docs:
https://github.com/minetest/minetest/bl ... .txt#L5087
https://github.com/minetest/minetest/bl ... .txt#L5128
Re: Post your mapgen questions here (modding or engine)
Are there any mods or third-party APIs out there that would let me alter terrain shape per-biome, or ways to get a similar affect? It's a pretty important feature for the mod I'd like to build. I've read through the docs, but didn't see anything that did this, apparently because it doesn't exist in-engine yet! Oh well.
Thanks, those are useful posts. I'll give the whole thread a read through today.
Thanks, those are useful posts. I'll give the whole thread a read through today.
Re: Post your mapgen questions here (modding or engine)
You can mass read/write the map using the LUA voxel manipulator: https://github.com/minetest/minetest/bl ... .txt#L4017
Be warned though, if your operations take too long you will slow down your game.
There is an example at the bottom of this page: http://dev.minetest.net/VoxelManip
Be warned though, if your operations take too long you will slow down your game.
There is an example at the bottom of this page: http://dev.minetest.net/VoxelManip
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
MusaFuchs if you want a particularly custom mapgen you can create one in a Lua mod, then you can do anything you want, however you need to code it.
I have written many Lua mapgens, see my mod threads in this forum, and see the code for example code.
This one is complex but has good code https://github.com/paramat/watershed
I have written many Lua mapgens, see my mod threads in this forum, and see the code for example code.
This one is complex but has good code https://github.com/paramat/watershed
Re: Post your mapgen questions here (modding or engine)
Some of this looks like the kind of parameters and control I need, but I'm not seeing where biomes are coming into play in this mod.paramat wrote:MusaFuchs if you want a particularly custom mapgen you can create one in a Lua mod, then you can do anything you want, however you need to code it.
I have written many Lua mapgens, see my mod threads in this forum, and see the code for example code.
This one is complex but has good code https://github.com/paramat/watershed
I see the --3dnoises section where noises are generated for temperature/humidity/etc, and I see --Mapchunk generation function where it looks like blocks are being defined for different local variables and the different 3dnoises are being generated. What I don't see is where parameters are defined to set blocktypes to the different humidity/temperature/etc parameters?
------------------
On a side note, I see on the wiki that mapgenv6 can have biomes influence terrain to some extent, but I can't find an API specific to v6 that shows how to use this feature.
I also see that this mod here seems to link terrain-gen and biome/surfacenode types, but again I'm not quite catching where the two are linked.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
here https://github.com/paramat/watershed/bl ... t.lua#L348
> I see on the wiki that mapgenv6 can have biomes influence terrain to some extent, but I can't find an API specific to v6 that shows how to use this feature
In mgv6 biomes don't affect terrain much at all, maybe a little, but mgv6 is older and different to the other mapgens, it doesn't use the Biome API and it's biomes are hardcoded.
The '30 biomes' mod doesn't have biomes affecting terrain shape, that's just a use of the Biome API with certain biomes limited to certain y ranges.
> I see on the wiki that mapgenv6 can have biomes influence terrain to some extent, but I can't find an API specific to v6 that shows how to use this feature
In mgv6 biomes don't affect terrain much at all, maybe a little, but mgv6 is older and different to the other mapgens, it doesn't use the Biome API and it's biomes are hardcoded.
The '30 biomes' mod doesn't have biomes affecting terrain shape, that's just a use of the Biome API with certain biomes limited to certain y ranges.
Re: Post your mapgen questions here (modding or engine)
-
Last edited by siva on Fri Jun 22, 2018 08:55, edited 2 times in total.
- Cross_over
- Member
- Posts: 11
- Joined: Fri Nov 10, 2017 18:28
- In-game: Cross_over
Re: Post your mapgen questions here (modding or engine)
Hi all, i'm trying to generate a mainly water map with mapgen, changing the water level to 10 generates more islands and bigger seas as i want, but trees still appear underwater so i got some kind of diluvian world, how could i change the other parameters to generate bigger oceans?
- v-rob
- Developer
- Posts: 970
- Joined: Thu Mar 24, 2016 03:19
- GitHub: v-rob
- IRC: v-rob
- Location: Right behind you.
Re: Post your mapgen questions here (modding or engine)
You will have to change the biome Y min and max values in the code. I think that it should automatically change depending on the sea level by getting the value of the setting and adding/subtracting the necessary numbers to get the correct height, but it doesn't.Cross_over wrote:Hi all, i'm trying to generate a mainly water map with mapgen, changing the water level to 10 generates more islands and bigger seas as i want, but trees still appear underwater so i got some kind of diluvian world, how could i change the other parameters to generate bigger oceans?
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your mapgen questions here (modding or engine)
Yes changing 'water_level' doesn't have the expected result. We considered making all biomes relative to 'water_level' but it caused too much complexity and too many problems.
You *could* use a mod that clears all biome, ore and decoration registrations and re-registers them with altered y-limits to be suitable for your changed 'water_level', but this is a lot of work.
Instead the simplest method is to lower the terrain instead by altering the noise parameters of a mapgen, however this is not easy. If you let me know what mapgen and the desired vertical shift in nodes i can post noise parameters here.
You *could* use a mod that clears all biome, ore and decoration registrations and re-registers them with altered y-limits to be suitable for your changed 'water_level', but this is a lot of work.
Instead the simplest method is to lower the terrain instead by altering the noise parameters of a mapgen, however this is not easy. If you let me know what mapgen and the desired vertical shift in nodes i can post noise parameters here.
- duane
- Member
- Posts: 1715
- Joined: Wed Aug 19, 2015 19:11
- GitHub: duane-r
- Location: Oklahoma City
- Contact:
Re: Post your mapgen questions here (modding or engine)
Sorry to chime in so late, but I see one reason left to use register_on_mapgen_init. As far as I can tell, there is no other way for a lua mapgen mod to force the mapgen setting to singlenode. Setting it in initialization doesn't work. This requires the mod user to set it manually -- not a big deal, unless you're new and don't understand why Valleys lua is making a mess of everything.paramat wrote:> What is on_mapgen_init and why isn't it documented in lua_api.txt?
It's deprecated now and not needed around minetest.set_mapgen_setting().
Of course you could disable the mod if singlenode isn't already selected, but that might also be confusing.
Maybe there's some other method I'm missing. The documentation is a bit sparse.
Edit: Well, never mind. I figured out that the parameter name has changed. After fixing that, it works fine.
Believe in people and you don't need to believe anything else.
Who is online
Users browsing this forum: No registered users and 6 guests