Post your mapgen questions here (modding or engine)

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

Re: Post your mapgen questions here (modding or engine)

by ShadMOrdre » Post

Try the following:

mg_flags = nocaves, nodungeons, light, decorations, biomes, ores
mgv7_spflags = nomountains, noridges, nofloatlands, caverns
mgv7_np_terrain_alt = {
lacunarity = 2.11
persistence = 0.3
scale = 25
offset = 4
flags = defaults
spread = (600,600,600)
seed = 5934
octaves = 7
}
mgv7_np_terrain_base = {
lacunarity = 2.11
persistence = 0.3
scale = 70
offset = 4
flags = defaults
spread = (600,600,600)
seed = 82341
octaves = 7
}
mgv7_np_height_select = {
lacunarity = 2
persistence = 0.7
scale = 16
offset = -8
flags = defaults
spread = (500,500,500)
seed = 4213
octaves = 6
}
mgv7_np_terrain_persist = {
lacunarity = 2
persistence = 0.6
scale = 0.1
offset = 0.6
flags = defaults
spread = (2000,2000,2000)
seed = 539
octaves = 3
}


For both terrain_alt and terrain_base, you may scale the spread, octaves, and scale. I have used spread = 4096, scale = 100. Octaves and persistence should be limited to the above. Lacunarity alters "roughness" or terrain. Lower lacunarity means smoother, higher lacunarity means rougher.

Height select and persist are altered by then engine, and the settings are for the most part useless. However, height_select should use above settings, not the default built in settings.

This will successfully "scale" your world by 4.

User avatar
Noriel_Sylvire
Member
Posts: 72
Joined: Mon Dec 24, 2018 02:14
GitHub: NorielSylvire
In-game: Noriel_Sylvire
Contact:

Re: Post your mapgen questions here (modding or engine)

by Noriel_Sylvire » Post

Hi!
I wasn't able to find any info on this so I'm posting my question here, if this isn't the place to ask this, please notify me and I'll take this reply down.

Is there a way to make ores generate only in specific biomes? Making them generate at specified altitudes is easy but I was unable to find anything about how to make them generate only in the biomes you want them to. This is a core feature of one of my mods, to prevent rainbow caves.

Edit: According to this thread anything deeper underground is one single biome called "underground". Is there a way for me to set up my own underground biomes?

Edit2: After doing some more digging (no pun intended) I realised that in order to be able to have some ores only generate in some underground areas, I need to define my own underground biomes. That's great, but after I have my own underground biomes, is there a way to easily make my ores generate only in specific biomes or do I have to think of something myself?
My Games 👾🐉 | My Mods 🔧🧪🎄🎃 | My GitHub 💻📚

User avatar
Skamiz Kazzarch
Member
Posts: 613
Joined: Fri Mar 09, 2018 20:34
GitHub: Skamiz
In-game: Skamiz
Location: la lojbaugag.

Re: Post your mapgen questions here (modding or engine)

by Skamiz Kazzarch » Post

You can specify the biomes in the ore definition.
See the official documentation: https://github.com/minetest/minetest/bl ... .txt#L8203

Also the thread you found is rather old and out of date. Currently in MTG there are several underground biomes (though they all act the same) which all start at -256.

User avatar
Noriel_Sylvire
Member
Posts: 72
Joined: Mon Dec 24, 2018 02:14
GitHub: NorielSylvire
In-game: Noriel_Sylvire
Contact:

Re: Post your mapgen questions here (modding or engine)

by Noriel_Sylvire » Post

Skamiz Kazzarch wrote:
Wed Feb 16, 2022 19:00
You can specify the biomes in the ore definition.
See the official documentation: https://github.com/minetest/minetest/bl ... .txt#L8203

Also the thread you found is rather old and out of date. Currently in MTG there are several underground biomes (though they all act the same) which all start at -256.
Thank you so much!!!
I actually ended up finding this out while commuting, but I won't delete my post as a testament to my 1 digit IQ, and in case anyone finds your reply helpful as well.
My Games 👾🐉 | My Mods 🔧🧪🎄🎃 | My GitHub 💻📚

User avatar
Extex
Member
Posts: 244
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Re: Post your mapgen questions here (modding or engine)

by Extex » Post

-deleted. Duplicate-
Last edited by Extex on Sat Apr 30, 2022 03:34, edited 1 time in total.
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP

User avatar
Extex
Member
Posts: 244
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Re: Post your mapgen questions here (modding or engine)

by Extex » Post

How do I force mapgen to load between two positions?
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP

User avatar
Skamiz Kazzarch
Member
Posts: 613
Joined: Fri Mar 09, 2018 20:34
GitHub: Skamiz
In-game: Skamiz
Location: la lojbaugag.

Re: Post your mapgen questions here (modding or engine)

by Skamiz Kazzarch » Post

Presumably by using this https://github.com/minetest/minetest/bl ... .txt#L5340 :

Code: Select all

* `minetest.emerge_area(pos1, pos2, [callback], [param])`
    * Queue all blocks in the area from `pos1` to `pos2`, inclusive, to be
      asynchronously fetched from memory, loaded from disk, or if inexistent,
      generates them.

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

Re: Post your mapgen questions here (modding or engine)

by ShadMOrdre » Post

I do believe that after emerging an area, you still need to force load it. There is also a function for that, but I have no experience with it.

Shad

User avatar
Extex
Member
Posts: 244
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Re: Post your mapgen questions here (modding or engine)

by Extex » Post

ShadMOrdre wrote:
Sat Apr 30, 2022 19:54
I do believe that after emerging an area, you still need to force load it. There is also a function for that, but I have no experience with it.

Shad
Ok I found a `minetest.forceload_block`, the name is a bit misleading. is this in mapblocks or does it mean nodes?
And where would this go in relation to emerge_area?
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP

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

Re: Post your mapgen questions here (modding or engine)

by ShadMOrdre » Post

Extex,

Sorry for misdirection. Not force load, but minetest.load_area.

You have to emerge the area before you can load it.

After calling minetest.emerge_area(pos1, pos2), then call minetest.load_area(pos1, pos2).


Shad

ZAAo
Member
Posts: 47
Joined: Tue Jul 27, 2021 16:15

Re: Post your mapgen questions here (modding or engine)

by ZAAo » Post

Hi guys, can someone help me with how to use mapgen v7 properly? It seems that I have tried "everything", but mapgen v7 only gives me stone and water... absolutely nothing else. I have enabled TenPlus1's Ethereal mod, but I guess I am missing some steps / procedures to get it to "do it's magic" and generate biomes with dirt, grass, trees, etc etc etc.? I tried all the various settings with v7 and also with creative mode enabled and without it. I tried searching the Minetest forums, Youtube and general web searches for how to use v7 and not get only stone, but no success yet.

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Post your mapgen questions here (modding or engine)

by Miniontoby » Post

Idk if this will also be considered 'mapgen', but I am working on a game and I want the world to be the same everytime you create a new world.

*Since it is generating a map, I was thinking this would also fit in here, any Moderators are allowed to correct me and move me to a different topic*

But yeah I would like a way to load in a map every time you create (and then join the world for the first time).
I would love to do it with as less as possible extra mods. So if possible, without worldedit, which i have tried (with success), but I would love to keep it as fast as possible.
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
Blockhead
Member
Posts: 1602
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: Post your mapgen questions here (modding or engine)

by Blockhead » Post

Miniontoby wrote:
Tue May 17, 2022 11:37
Idk if this will also be considered 'mapgen', but I am working on a game and I want the world to be the same everytime you create a new world.

*Since it is generating a map, I was thinking this would also fit in here, any Moderators are allowed to correct me and move me to a different topic*

But yeah I would like a way to load in a map every time you create (and then join the world for the first time).
I would love to do it with as less as possible extra mods. So if possible, without worldedit, which i have tried (with success), but I would love to keep it as fast as possible.
The mod you're most likely looking for is modgen.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Skamiz Kazzarch
Member
Posts: 613
Joined: Fri Mar 09, 2018 20:34
GitHub: Skamiz
In-game: Skamiz
Location: la lojbaugag.

Re: Post your mapgen questions here (modding or engine)

by Skamiz Kazzarch » Post

ZAAo wrote:
Tue May 17, 2022 08:30
~snip~
Most likely, a game you tried, disabled biome generation, and due to how settings work, this change affects all new world.

Go to 'all settings' and under 'Mapgen' select 'Mapgen flags' and hit 'restore defaults'. That should resolve the issue.

ZAAo
Member
Posts: 47
Joined: Tue Jul 27, 2021 16:15

Re: Post your mapgen questions here (modding or engine)

by ZAAo » Post

Skamiz Kazzarch wrote:
Tue May 17, 2022 17:40
ZAAo wrote:
Tue May 17, 2022 08:30
~snip~
Most likely, a game you tried, disabled biome generation, and due to how settings work, this change affects all new world.

Go to 'all settings' and under 'Mapgen' select 'Mapgen flags' and hit 'restore defaults'. That should resolve the issue.
OK, I will try that. Thank you so much for your advice and for explaining that this problem has likely been caused by another game messing up the biome gen settings (I have indeed tried many games in Minetest and agree that this is therefore very likely to have caused it).

Update: I followed your advice and reset the mapgen flags... and... it worked!!! Now my mg7 worlds are no longer dull and stoned LOL. Thank you so much :)

zadocallen
Member
Posts: 16
Joined: Thu Nov 12, 2020 16:47
In-game: Leuden

Re: Post your mapgen questions here (modding or engine)

by zadocallen » Post

How Could one create a dual node world as in only 2 nodes air/lava or air/water

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: Post your mapgen questions here (modding or engine)

by MisterE » Post

setting the mapgen to singlenode, and making a mod that sets whatever nodes you want at whatever positions you want.

User avatar
gigaturbo
New member
Posts: 3
Joined: Fri Jun 24, 2022 16:45
GitHub: gigaturbo
In-game: gigaturbo

Re: Post your mapgen questions here (modding or engine)

by gigaturbo » Post

I'm trying to create a game with a real flat world, like when you choose "flat" and untick everything, but setting this in "minetest.conf" . I've tried the following according to https://dev.minetest.net/Mapgen_Parameters

Code: Select all

mg_name = flat
mapgen_limit = 5000
mg_flags = nocaves,nodungeons,light,nodecorations
mgflat_spflags = nolakes,nohills,nocaverns
Also my "game.conf" is:

Code: Select all

allowed_mapgens = flat
disallowed_mapgen_settings = seed, mgflat_spflags, mg_flags
disabled_settings = !creative_mode, enable_damage
But when a create a world, it is flat but I does have trees, caves, etc....

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: Post your mapgen questions here (modding or engine)

by sirrobzeroone » Post

gigaturbo wrote:
Sun Jun 26, 2022 17:00
I'm trying to create a game with a real flat world, like when you choose "flat" .....
if I haven't stuffed this up, you can do some of this from a mod like so, im not sure how to do special flags:

Code: Select all

minetest.register_on_mapgen_init(function(mg_params)
	minetest.set_mapgen_params({mgname='flat', flags=nocaves,nodungeons,light,nodecorations})
end)
Did you mean to say didn't want trees?

Icalasari
Member
Posts: 166
Joined: Tue Sep 23, 2014 05:29
IRC: Icalasari
In-game: Icalasari

Re: Post your mapgen questions here (modding or engine)

by Icalasari » Post

Bit embarrassing as it should be a beginner thing, and not sure if this is the right thread or not (seems to be right since it's dealing with ore generation), but...

Trying to make ores and trees first before I start working on biomes (then later a full on game). But I am having an issue with just getting the custom ore to generate. I have the mod using default as a dependency for now, and everything I try - even outright digging through other mods - is not producing the ore at all. Is there something I'm missing about mapgeneration with it?

I have the values set to ridiculous just to get rid of any luck factor

Code: Select all

minetest.register_ore({
	ore_type       = "scatter",
	ore            = "mindeca:ore_ruby",
	wherein        = "default:stone",
	clust_scarcity = 2 * 2 * 2,
	clust_num_ores = 5,
	clust_size     = 99,
	y_min     = -255,
	y_max     = 31000,
})
EDIT: Ok now it works? It was not working until after I posted this

I am

Very confused

EDIT 2: Not super common though like it should be with this. Any explanation on why this is?

EDIT 3: And now it's working perfectly. Hours of frustration and now it works perfectly. Sorry for the trouble

Icalasari
Member
Posts: 166
Joined: Tue Sep 23, 2014 05:29
IRC: Icalasari
In-game: Icalasari

Re: Post your mapgen questions here (modding or engine)

by Icalasari » Post

Not sure what's causing this error on world creation?

Image

EDIT: Reason for confusion is everything works fine. The mod has no issues running. So I'm not sure why it's throwing an error at me at all

User avatar
Skamiz Kazzarch
Member
Posts: 613
Joined: Fri Mar 09, 2018 20:34
GitHub: Skamiz
In-game: Skamiz
Location: la lojbaugag.

Re: Post your mapgen questions here (modding or engine)

by Skamiz Kazzarch » Post

The error itself only tells us that something happened in the engine, but not what.
From looking at your code, the only suspicious thing I found is:

Code: Select all

minetest.register_decoration({
    name = {"mindeca:tree_cherry"},
Pretty sure that name is supposed to be a string. Not a string in a table. Maybe that's the issue?

Icalasari
Member
Posts: 166
Joined: Tue Sep 23, 2014 05:29
IRC: Icalasari
In-game: Icalasari

Re: Post your mapgen questions here (modding or engine)

by Icalasari » Post

Skamiz Kazzarch wrote:
Sat Jul 09, 2022 11:08
The error itself only tells us that something happened in the engine, but not what.
From looking at your code, the only suspicious thing I found is:

Code: Select all

minetest.register_decoration({
    name = {"mindeca:tree_cherry"},
Pretty sure that name is supposed to be a string. Not a string in a table. Maybe that's the issue?
I have a few of those in the files so that's probably it. And gah, that explains why I've never been able to track down some errors - Had similar issues with modding SRB2 and trying to track down the error only to be confused as to where it is

EDIT: Yep, that did it. Thanks! Now to make more nodes before I try to figure out how to make grass replace a top layer in a cave without needing the grass as a node, or if that's even possible on just a lua level

Icalasari
Member
Posts: 166
Joined: Tue Sep 23, 2014 05:29
IRC: Icalasari
In-game: Icalasari

Re: Post your mapgen questions here (modding or engine)

by Icalasari » Post

Two issues now

1) Trying to make grass appear only on the top of soil nodes in an underground biome. Can only get it to be all grass. Is there a way to make it only appear on the top layer?

2) I can't get the tree decorations to spawn underground. I can't figure out how to make underground forests, advice on this?

EDIT: Wait missed something with 2. So decorations are surface only? Then do I need to make them dungeons underground?

EDIT 2: ...Well missed a flag, so that just leaves question 1


EDIT 3: So turns out I really, really did not understand how effective decorations can be at solving problems
Last edited by Icalasari on Tue Jul 12, 2022 17:03, edited 1 time in total.

Icalasari
Member
Posts: 166
Joined: Tue Sep 23, 2014 05:29
IRC: Icalasari
In-game: Icalasari

Re: Post your mapgen questions here (modding or engine)

by Icalasari » Post

OVERALL EDIT: All questions figured out. Turns out I was overthinking while sleep deprived and now everything is becoming much more obvious

Mini Edit: But still sleep deprived enough to think strikethrough starts with an i, not an s



Still stuck on the soil (including a pic - Had to make nodes as the soil is too rare otherwise), but also have another two questions

1) Still the grass one - Want to make it so only the top layer exposed to air will be placed. I doubt I can use the rules for other functions for this, any advice on this? Or is this going to require extensive modding?


EDIT: And looking into a thread reminded me that decorations can replace parts of ore deposits. I was over thinking it

Image

2) Is there a way to make ponds and lakes spawn underground like they do on the surface?

3) I'm guessing there is no way to have the river generation work underground in a biome? If there is, then advice on that? Wanting to make a rare resource appear with rivers and lakes in the underground biome

EDIT: On number 2 and 3, I'm mostly wondering if this is possible in Lua, and for guidance on where to look to do this. I want to try to work on this myself

EDIT 2: Figured out questions 2 and 3, so back to just question 1. Mind, if I can figure out how to make a base of sand appear, then I can kludge a solution to question 1

Now the big issue of this being above my skill level...

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests