Post your mapgen questions here (modding or engine)

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

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

by burli » Tue Dec 05, 2017 11:44

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
Member
 
Posts: 553
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob

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

by v-rob » Tue Dec 05, 2017 15:45

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.
 

User avatar
duane
Member
 
Posts: 1273
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

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

by duane » Wed Dec 06, 2017 02:55

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: 358
Joined: Thu May 05, 2016 10:18
In-game: Bibs

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

by BirgitLachner » Wed Dec 06, 2017 06:15

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
Member
 
Posts: 553
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob

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

by v-rob » Wed Dec 06, 2017 06:22

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.
 

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

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

by Devy » Wed Dec 06, 2017 07:38

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: 127
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

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

by Devy » Fri Dec 08, 2017 09:36

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/bettermapgensettings 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: 358
Joined: Thu May 05, 2016 10:18
In-game: Bibs

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

by BirgitLachner » Fri Dec 08, 2017 21:16

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: 127
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

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

by Devy » Fri Dec 08, 2017 21:41

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: 127
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

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

by Devy » Sat Dec 09, 2017 17:56

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: https://forum.minetest.net/viewtopic.php?f=9&t=18969&p=303312#p303312. You can place issues and discussion there.
 

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

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

by Wuzzy » Sun Dec 10, 2017 18:40

How do I figure out whether any given position has been generated by the map generator?
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

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

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

by Devy » Sun Dec 10, 2017 18:48

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/blob/02cc257fe09ee0a68f3c09e0cbe48cbbda29a71c/doc/lua_api.txt#L2902

https://github.com/minetest/minetest/blob/02cc257fe09ee0a68f3c09e0cbe48cbbda29a71c/doc/lua_api.txt#L4037

https://github.com/minetest/minetest/blob/02cc257fe09ee0a68f3c09e0cbe48cbbda29a71c/doc/lua_api.txt#L2714-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: 3208
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Mon Dec 11, 2017 02:48

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.
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

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

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

by Devy » Mon Dec 11, 2017 03:28

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: 3195
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

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

by paramat » Mon Dec 11, 2017 13:40

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: 3195
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

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

by paramat » Mon Dec 11, 2017 13:54

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: 358
Joined: Thu May 05, 2016 10:18
In-game: Bibs

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

by BirgitLachner » Mon Dec 11, 2017 17:12

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: 3616
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

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

by Sokomine » Mon Dec 11, 2017 20:21

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: 1249
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

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

by twoelk » Tue Dec 12, 2017 19:30

@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: 3195
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

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

by paramat » Tue Dec 12, 2017 20:58

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: 358
Joined: Thu May 05, 2016 10:18
In-game: Bibs

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

by BirgitLachner » Wed Dec 13, 2017 07:42

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: 3616
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

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

by Sokomine » Fri Dec 15, 2017 22:04

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 » Sat Dec 16, 2017 04:57

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: 127
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

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

by Devy » Sun Dec 17, 2017 05:33

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/blob/26c7e98e3d87446acbc0c30b3c0ea8eb8bc1f6c5/doc/lua_api.txt#L3364-L3374
 

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

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

by zing269 » Sun Dec 17, 2017 19:38

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.
 

PreviousNext

Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 4 guests