Post your mapgen questions here (modding or engine)

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

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

by burli » Post

Just a question: when does Minetest "know" the position of a specific node?

And Minetest stores each node in a database. Where should Minetest know which of them you need later? A furnace is nothing different than a stone block for MT.

To be honest: if you have a furnace in a schematic you know the relative position of the furnace, even if it is rotated. And if you place it later you already have the position yourself

User avatar
v-rob
Developer
Posts: 971
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)

by v-rob » Post

BirgitLachner wrote:Guys ... I already know a little bit about Mod creating but Mapgen stuff is much to far away form me.

But may be my wishes are very simple for you:
For use in the classroom or for similar purposes, it would be useful to be able to define the world a little more precisely. Some things that might be interesting:
1) a flat world with uniform ground, e. g. a layer of earth with grass, underneath stones to the bottom, without caves, without decoration and trees.
.... I have asked about it before and got some ideas for solutions, but none of them were perfect, i. e. as I described it. It would be nice if you could create a map-generator, where you could for example choose the layout of the map, so you could define the layers.
2) You should be able to choose certain biomes. This doesn't have to be done with the same Mapgen-Mod as in 1.) but can also be done with an extra mod. This would be interesting for certain topics, such as the server that was set up by religious educators for Advent/Christmas time https://www.facebook.com/minetestAdvent ... &fref=five
... I know that this can be done by hand by deleting the definitions of the other Biom types, but it's important to me that you don't need to change anything in a file.
3) Also for the water level and thus the size of the water surface it would be interesting, if you can easily select this. This is about the topic of the ocean and if you want to build in water, you need more sea.
... here too I found out that you can adjust the height of the water level. But the point is that it should be even easier and you don't have to fight with the landscape decoration that is still visible in the water.
4) It would also be interesting, if you can make specifications at the average temperature and humidity, for example that you have more deserts or more jungle or more snow bioms.
... I don't know how to do that yet.

Me and all the other teachers that are interessting in Minetest would be really happy about nice and simple Mapgen mods,
Birgit
1) So you want these things to be enabled through mods? The flat land is fairly easy, and I could do it in a mod.
2) I think you also seem to want to have a world with biomes of totally ice and snow. See 4.
3) I can do this in a mod.
4) Specifying the temperature and humidity is impossible without some hackish stuff, but I can make each biome selectable via a mod so that you could choose the mods for jungle and snow or whatever you want in your world, and only those would appear. I can also make the default size of biomes bigger so that you aren't constantly changing .

If that sounds like what you want then I'll get to work as soon as possible.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
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)

by duane » Post

Wuzzy wrote:
Wuzzy if you don't rotate the schematic and the chest does not have a chance of placement, then you know where it is from it's position in the schematic, add relative position of chest from schematic minimum point, to placement position.
Sigh.
This is exactly what I do not want to do. This forces me to hardcode the chest positions in Lua, which a horrible idea. What if the schematic is changed?
The idea is that this must work for schematics with arbitrary chest positions.

Or do you want me to do find_nodes_in_area every time after a schematic is placed? This is stupid since Minetest first knows the chest positions, then throws it away, then it scans the chest positions again.
Minetest doesn't throw the information away. It stores it in the database. When you do a find, you're using information from that database. The only way to make that information more available would be to cache it in memory, which seems a bit extreme for this case.

I know that you want the game to do the on_construct calls when the chest is placed, but that's probably not practical when it comes to placing large amounts of nodes with voxelmanip or schematics. It requires a ton of call-backs, and could kill the terrain generation rate.

However, there's no need to hard code a position. You know the dimensions of the schematic from the schematic data. Just look in that volume for anything with an on_construct function. It doesn't take that long.
Believe in people and you don't need to believe anything else.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

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

by BirgitLachner » Post

v-rob wrote: 1) So you want these things to be enabled through mods? The flat land is fairly easy, and I could do it in a mod.
2) I think you also seem to want to have a world with biomes of totally ice and snow. See 4.
3) I can do this in a mod.
4) Specifying the temperature and humidity is impossible without some hackish stuff, but I can make each biome selectable via a mod so that you could choose the mods for jungle and snow or whatever you want in your world, and only those would appear. I can also make the default size of biomes bigger so that you aren't constantly changing .

If that sounds like what you want then I'll get to work as soon as possible.
Sounds really good ... fantastic ...
concerning a flat world. There is already a mod that offers something like that, but it is not endless ... in this case about just around 1000 blocks wide. The best would be, if you have a world size like it is usually, but with the defined blocks.

Would be very cool ... thanks, Birgit

User avatar
v-rob
Developer
Posts: 971
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)

by v-rob » Post

BirgitLachner wrote:concerning a flat world. There is already a mod that offers something like that, but it is not endless ... in this case about just around 1000 blocks wide. The best would be, if you have a world size like it is usually, but with the defined blocks.

Would be very cool ... thanks, Birgit
The flat world will extend to the width of the whole map.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
Devy
Member
Posts: 133
Joined: Sat Jan 21, 2017 02:31
GitHub: DevyHeavy
In-game: devy

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

by Devy » Post

v-rob wrote:
BirgitLachner wrote:concerning a flat world. There is already a mod that offers something like that, but it is not endless ... in this case about just around 1000 blocks wide. The best would be, if you have a world size like it is usually, but with the defined blocks.

Would be very cool ... thanks, Birgit
The flat world will extend to the width of the whole map.
If you make a Github page for this mod then I would like to help also. I have about a week and a half left until I'm done with school, after that, I can do all the coding I want!

Just link the Github and I'll issue some pull requests to help out when I can, that is, if you want my help.

User avatar
Devy
Member
Posts: 133
Joined: Sat Jan 21, 2017 02:31
GitHub: DevyHeavy
In-game: devy

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

by Devy » Post

BirgitLachner wrote:
v-rob wrote: 1) So you want these things to be enabled through mods? The flat land is fairly easy, and I could do it in a mod.
2) I think you also seem to want to have a world with biomes of totally ice and snow. See 4.
3) I can do this in a mod.
4) Specifying the temperature and humidity is impossible without some hackish stuff, but I can make each biome selectable via a mod so that you could choose the mods for jungle and snow or whatever you want in your world, and only those would appear. I can also make the default size of biomes bigger so that you aren't constantly changing .

If that sounds like what you want then I'll get to work as soon as possible.
Sounds really good ... fantastic ...
concerning a flat world. There is already a mod that offers something like that, but it is not endless ... in this case about just around 1000 blocks wide. The best would be, if you have a world size like it is usually, but with the defined blocks.

Would be very cool ... thanks, Birgit
@BirgitLachner, I have started working on a mod just for you! Here is the link: https://github.com/CoderForTheBetter/be ... ensettings make sure to read the "README" file for instructions on how to use this mod. It is a different installation than normal.

Right now, that mod can't let you select biomes or adjust them, but if you choose the "flat" mapgen when making a world, then you should get some of what you want. I figured out how to get rid of caves as well, but dungeons still spawn. I will need to debug this some and add new features. Also, you can only pick blocks that I have defined, so if you want more just ask.

Here's a picture of the GUI, with some random blocks I chose (https://imgur.com/a/gV2rr):
Image

I hope this helps you!

Edit: I forgot to add the main menu folder to the project. I will do it in the morning. Mod doesn't work as of now then.

Edit2: All the files are in place now. You can start using it.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

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

by BirgitLachner » Post

THANK YOU VERY MUCH ... you are my hero !!!

It took some time until I got my first flat world, because you need to choose the mapgen "flat". But that really fantastic. I will give it to my collegues.
Little isue: the meaning of the checkboxes are a bit different. For some, you check them to get something, other do clear something. May be a more consistent meaning would be better. Checkbox on for ...
- Decorations on
- Ore on
- Schematics on
- Defined nodes on
- Cave generation on

But besides this ... fantastic. Hopefully, this can be added to the main game, to make it more easy for others to choose a proper map.

Once again ... Thanks!
Birgit

User avatar
Devy
Member
Posts: 133
Joined: Sat Jan 21, 2017 02:31
GitHub: DevyHeavy
In-game: devy

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

by Devy » Post

BirgitLachner wrote:THANK YOU VERY MUCH ... you are my hero !!!

It took some time until I got my first flat world, because you need to choose the mapgen "flat". But that really fantastic. I will give it to my collegues.
Little isue: the meaning of the checkboxes are a bit different. For some, you check them to get something, other do clear something. May be a more consistent meaning would be better. Checkbox on for ...
- Decorations on
- Ore on
- Schematics on
- Defined nodes on
- Cave generation on

But besides this ... fantastic. Hopefully, this can be added to the main game, to make it more easy for others to choose a proper map.

Once again ... Thanks!
Birgit
Thanks. I will adjust those boxes as soon as possible. I was worried that would happen but did not have enough time to test it. Don't worry, I will fix everything I can. I'm thinking of adding profiles per world that you can choose when creating worlds, this also means you will be able to keep settings consistent per world. I may look into making a way to choose biomes.

I will probably also put a "Create World" button in this new tab and handle everything there so it is more clear on how to get a flat world or biomes.

User avatar
Devy
Member
Posts: 133
Joined: Sat Jan 21, 2017 02:31
GitHub: DevyHeavy
In-game: devy

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

by Devy » Post

BirgitLachner wrote:THANK YOU VERY MUCH ... you are my hero !!!

It took some time until I got my first flat world, because you need to choose the mapgen "flat". But that really fantastic. I will give it to my collegues.
Little isue: the meaning of the checkboxes are a bit different. For some, you check them to get something, other do clear something. May be a more consistent meaning would be better. Checkbox on for ...
- Decorations on
- Ore on
- Schematics on
- Defined nodes on
- Cave generation on

But besides this ... fantastic. Hopefully, this can be added to the main game, to make it more easy for others to choose a proper map.

Once again ... Thanks!
Birgit
I've made a post on the WIP mods section: viewtopic.php?f=9&t=18969&p=303312#p303312. You can place issues and discussion there.

User avatar
Wuzzy
Member
Posts: 4801
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

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

by Wuzzy » Post

How do I figure out whether any given position has been generated by the map generator?

User avatar
Devy
Member
Posts: 133
Joined: Sat Jan 21, 2017 02:31
GitHub: DevyHeavy
In-game: devy

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

by Devy » Post

Wuzzy wrote:How do I figure out whether any given position has been generated by the map generator?
Found some links that may or may not be helpful Wuzzy:
https://github.com/minetest/minetest/bl ... .txt#L2902

https://github.com/minetest/minetest/bl ... .txt#L4037

https://github.com/minetest/minetest/bl ... 2714-L2717 (Note what it returns).

All of those only deal with what positions and chunks are loaded/not loaded now. If you want to know if it was ever generated in the past then I have no idea. I would go with the third link and check if the name is "ignore," if your question refers to the former.

User avatar
Wuzzy
Member
Posts: 4801
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

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

by Wuzzy » Post

Yeah, I was talking about areas which have not been generated yet. So these links are all useless to me. :-( I don't care if the area is currently loaded.

User avatar
Devy
Member
Posts: 133
Joined: Sat Jan 21, 2017 02:31
GitHub: DevyHeavy
In-game: devy

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

by Devy » Post

Wuzzy wrote:Yeah, I was talking about areas which have not been generated yet. So these links are all useless to me. :-( I don't care if the area is currently loaded.
Hmm, isn't 'minetest.register_on_generated' only called for areas that have not been loaded yet? I'm not even sure how that could help but maybe it will.

User avatar
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)

by paramat » Post

BirgitLachner wrote: For use in the classroom or for similar purposes, it would be useful to be able to define the world a little more precisely. Some things that might be interesting:
1) a flat world with uniform ground, e. g. a layer of earth with grass, underneath stones to the bottom, without caves, without decoration and trees.
.... I have asked about it before and got some ideas for solutions, but none of them were perfect, i. e. as I described it. It would be nice if you could create a map-generator, where you could for example choose the layout of the map, so you could define the layers.
2) You should be able to choose certain biomes. This doesn't have to be done with the same Mapgen-Mod as in 1.) but can also be done with an extra mod. This would be interesting for certain topics, such as the server that was set up by religious educators for Advent/Christmas time https://www.facebook.com/minetestAdvent ... &fref=five
... I know that this can be done by hand by deleting the definitions of the other Biom types, but it's important to me that you don't need to change anything in a file.
3) Also for the water level and thus the size of the water surface it would be interesting, if you can easily select this. This is about the topic of the ocean and if you want to build in water, you need more sea.
... here too I found out that you can adjust the height of the water level. But the point is that it should be even easier and you don't have to fight with the landscape decoration that is still visible in the water.
4) It would also be interesting, if you can make specifications at the average temperature and humidity, for example that you have more deserts or more jungle or more snow bioms.
... I don't know how to do that yet.
1. You may know already you can use 'mapgen flags' in advanced settings to disable caves, dungeons and decorations.
Then you can write a mod that clears the MTGame biomes and defines new ones with whatever you want.
However it seems you are looking for something easier to use.

2. > I know that this can be done by hand by deleting the definitions of the other Biom types, but it's important to me that you don't need to change anything in a file.

The way to create custom biome systems is to add a mod that first clears all MTGame biomes, then defines new ones. You should not edit default mod to do this.

3. Indeed changing water level causes a mess, much better to adjust terrain noise parameters to shift terrain up or down, but this is not easy to understand.

4. Advanced settings > Mapgen > Biome API temperature and humidity noise parameters
Then edit the noise parameters 'Heat noise' and 'Humidity' noise.
The first number is the average value, the second number is the variation either side of average value.
Do all this before starting a new world, otherwise it has no effect.

User avatar
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)

by paramat » Post

Wuzzy wrote:How do I figure out whether any given position has been generated by the map generator?
First you need to force-load a node (and it's containing block) into the server by using a lua voxelmanip, then use 'get node' for that position, if it is 'ignore' it is ungenerated world.
The nether mod does this, where 'target' is a position:

Code: Select all

					-- force emerge of target area
					minetest.get_voxel_manip():read_from_map(target, target)
					if not minetest.get_node_or_nil(target) then
Although i suspect it may be better to check for 'ignore' rather than use 'get node or nil', i'm not sure, may need some experimenting.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

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

by BirgitLachner » Post

Thanks paramat ... (nearly) everything not so difficult, but a simple dialogue is better to use, specially for beginner and part-time Minetest user.

Sokomine
Member
Posts: 4287
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

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

by Sokomine » Post

Wuzzy wrote: Or do you want me to do find_nodes_in_area every time after a schematic is placed? This is stupid since Minetest first knows the chest positions, then throws it away, then it scans the chest positions again.
Depending on how and when you place schematics, you might use a similar approach to the one handle_schematic takes: Analyze the .mts file once, store the position of objects of intrest (chests, doors, ...), let the spawning happen, add the offset and treat the special nodes the way they need to be treated.
A list of my mods can be found here.

twoelk
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)

by twoelk » Post

@BirgitLachner
Not sure wether this has not been mentioned yet but ...
you can use these mods to define layers in a very flat map:
superflat
or
flatgen

together with mods such as:
Stay Inside
or
World Edge
maps for pupils to focus on some project are easily made.

User avatar
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)

by paramat » Post

Sokomine wrote:Depending on how and when you place schematics, you might use a similar approach to the one handle_schematic takes: Analyze the .mts file once, store the position of objects of intrest (chests, doors, ...), let the spawning happen, add the offset and treat the special nodes the way they need to be treated.
Good idea. Plus a little maths to cope with rotation.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

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

by BirgitLachner » Post

twoelk wrote:@BirgitLachner
Not sure wether this has not been mentioned yet but ...
you can use these mods to define layers in a very flat map:
superflat
or
flatgen

together with mods such as:
Stay Inside
or
World Edge
maps for pupils to focus on some project are easily made.
Oh ... some Mods are really hidden. Superflat is interesting and offers some of the things I'm looking for. flatgen seems to be easier.

The last two look like there are made for big map and just prevent a common problem ... of cause I can change the size but if the pupils dont have the teleport priv the won't be really able to get of the map, if it has the usual size.

Sokomine
Member
Posts: 4287
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

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

by Sokomine » Post

BirgitLachner wrote: The last two look like there are made for big map and just prevent a common problem ... of cause I can change the size but if the pupils dont have the teleport priv the won't be really able to get of the map, if it has the usual size.
Trouble is: It's a border. Those tend to attract some types of players. They venture out and travel very far for no other reason than to explore these borders.
A list of my mods can be found here.

Reedych
Member
Posts: 58
Joined: Wed Aug 03, 2016 08:09
GitHub: SlackCoyote
In-game: SlackCoyote

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

by Reedych » Post

I have a random position (x,y,z). How to force to generate a block (16*16*16 nodes) on this position?
Slackware64 14.2, MT 0.4.16. My best mod.

User avatar
Devy
Member
Posts: 133
Joined: Sat Jan 21, 2017 02:31
GitHub: DevyHeavy
In-game: devy

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

by Devy » Post

Reedych wrote:I have a random position (x,y,z). How to force to generate a block (16*16*16 nodes) on this position?
Not an area but does work for a single block position: https://github.com/minetest/minetest/bl ... 3364-L3374

zing269
Member
Posts: 109
Joined: Sat Apr 30, 2016 19:10

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

by zing269 » Post

Reedych wrote:I have a random position (x,y,z). How to force to generate a block (16*16*16 nodes) on this position?
Perhaps minetest.emerge_area might work for you. Note that it is asynchronous so the blocks may not be immediately available.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest