[Mod] flatgen: 100% flat maps [flatgen]

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

[Mod] flatgen: 100% flat maps [flatgen]

by Krock » Post

Flat map generator

Deprecated, use the mapgen "flat" in the world creation dialog.

Image
This is how a flat map looks like.

Why? Well, it's for people which want to have a flat map for sure.

Since version 2, you can define the used nodes and create bedrock-like nodes at the bottom.

Define the used nodes: (init.lua)

Code: Select all

-- Default, grass cover, dirt in between, stone under it
flatgen.cover	= "default:dirt_with_grass"
flatgen.under	= "default:dirt"
flatgen.ground	= "default:stone"

--[[ Templates:
- Sand everywhere
	flatgen.cover	= "default:sand"
	flatgen.under	= "default:sand"
	flatgen.ground	= "default:sand"
	
- Desert sand, sand, sandstone
	flatgen.cover	= "default:desert_sand"
	flatgen.under	= "default:sand"
	flatgen.ground	= "default:sandstone"

- Wool, wool, obsidian
	flatgen.cover	= "wool:white"
	flatgen.under	= "wool:white"
	flatgen.ground	= "default:obsidian"
]]
Other settings:

Code: Select all

flatgen.cover_y		= 1		-- Y position of the cover node [1]
flatgen.depth		= 3		-- Depth of the "under" node [3]
flatgen.limit_y		= true	-- False = map generation stops at 100m under cover_y
License: WTFPL
Depends: none (Depends on the wanted terrain nodes)
Download: master.zip (GitHub), Browse code
Last edited by Krock on Sun Apr 02, 2017 12:51, edited 6 times in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
BrunoMine
Member
Posts: 1082
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

by BrunoMine » Post

Fantastico. this is perfect
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

Code: Select all

mg_flags = flat
What does your mod do compared to that?

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

by Krock » Post

Calinou wrote:

Code: Select all

mg_flags = flat
What does your mod do compared to that?
Using a mod for this is handier than editing world files or even the minetst.conf :)
Maybe it's faster than the builtin mapgen in flat-mode.
Also, this mod offers an unique setting of the dirt depth! Wow so amazing feature.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

falsegrayburger
Member
Posts: 158
Joined: Sat Aug 03, 2013 15:16
In-game: naro

by falsegrayburger » Post

This is easiest and better mod

User avatar
kidmondo
Member
Posts: 130
Joined: Sun May 11, 2014 07:56
IRC: kidmondo
In-game: kidmondo
Location: New Zealand

Re: [Mod] flatgen [100% flat maps]

by kidmondo » Post

I have searched so hard to find a flat mod

superschizo
Member
Posts: 121
Joined: Mon Aug 26, 2013 17:08
In-game: uberdorf
Location: Missouri, USA

Re: [Mod] flatgen [100% flat maps]

by superschizo » Post

Thank you. I tried messing with the mg flags already and was still getting lakes and trees. This mod created a perfectly flat world for me, although there are still flowers to remove.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] flatgen [100% flat maps]

by Krock » Post

superschizo wrote:Thank you. I tried messing with the mg flags already and was still getting lakes and trees. This mod created a perfectly flat world for me, although there are still flowers to remove.
Cool to see someone using this mod.

The "flowers" mod generates those flowers automatically and therefore it's not releated to this "mapgen".
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Daïmanu
Member
Posts: 12
Joined: Tue Feb 04, 2014 21:48

Re:

by Daïmanu » Post

Thanks for that mod, that was exactly what I am looking for!
Calinou wrote:

Code: Select all

mg_flags = flat
What does your mod do compared to that?
This flag makes the map flat, but doesn't deactivate biomes, so we can see some kind of "drawings" of stone, sand and dirt on the ground.

This mod makes a coherent ground of grass (or anything else like infinite water).

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: Re:

by Calinou » Post

Daïmanu wrote:This flag makes the map flat, but doesn't deactivate biomes, so we can see some kind of "drawings" of stone, sand and dirt on the ground.

This mod makes a coherent ground of grass (or anything else like infinite water).
This is slightly better:

Code: Select all

mg_flags = flat, notrees, nocaves
But the upside of this mod is that it makes really flat maps, removing ores, springs an such, regardless of installed mods. So this mod does have an use, actually.

gunnercody
Member
Posts: 23
Joined: Sun Jul 20, 2014 18:26
In-game: gunnercody
Contact:

Re: [Mod] flatgen [100% flat maps]

by gunnercody » Post

Works great! I will be using this for my next titanic!

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] flatgen [100% flat maps]

by Krock » Post

gunnercody wrote:Works great! I will be using this for my next titanic!
Stranded titanic? Uh...
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
srifqi
Member
Posts: 570
Joined: Sat Jun 28, 2014 04:31
GitHub: srifqi
IRC: srifqi
In-game: srifqi
Location: Indonesia

Re: [Mod] flatgen [100% flat maps]

by srifqi » Post

Krock wrote:The "flowers" mod generates those flowers automatically and therefore it's not releated to this "mapgen".
This mapgen.lua?
Saya dari Indonesia! · Terjemahkan Minetest! · my mods · My nickname in IPA: /es.rif.qi/

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: [Mod] flatgen [100% flat maps]

by rubenwardy » Post

Yes
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

mojuave
Member
Posts: 51
Joined: Wed Aug 13, 2014 16:43

Re: [Mod] flatgen [100% flat maps]

by mojuave » Post

I am looking for something similar but not quite as flat lol, I am trying to build a server and want a more flat map(vs the current where you need a lot of digging to semi flat to build on a large area) maybe something where a node can be placed where the node is will level the land straight in all horizontal direction to same level as where node is placed but also configurable to distance IE 0-??? node space away saying I chose 10 then say it levels 10 blocks in all 4 directions to give a perimeter of 21x21 block area.

Ok that was a lot to say but do you know if that exists or maybe you know how to build it

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] flatgen [100% flat maps]

by Krock » Post

mojuave wrote:<snip>
Sorry but I can't really understand what you wish in this mod.
I could add a perlin noise to add tiny hills if you want this.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Amaz
Member
Posts: 354
Joined: Wed May 08, 2013 08:26
GitHub: Amaz1
IRC: Amaz
In-game: Amaz

Re: [Mod] flatgen [100% flat maps]

by Amaz » Post

If I understand correctly, he wants a map where there are fairly large flat space.

Paramat's flatten mod might work best for want you want: viewtopic.php?f=11&t=7701

mojuave
Member
Posts: 51
Joined: Wed Aug 13, 2014 16:43

Re: [Mod] flatgen [100% flat maps]

by mojuave » Post

Krock wrote:
mojuave wrote:<snip>
Sorry but I can't really understand what you wish in this mod.
I could add a perlin noise to add tiny hills if you want this.

no not tiny hills more like realistic world still have mountain ranges but have large areas for towns and cities to be built as well. This game has way too many bumps and holes you either are sitting at a cliff edge or falling in a hole. Amaz is right as far as what I am basically looking for but I don't know how that mod works, where its at or how to control it.


Basically look at it like the HV Quarry in technic. You place a node and set a parameter and lets say that is set at 8 so then the HV Quarry digs 8 blocks left 8 blocks right and whatever down. Now say you have a flat creation node and where it is placed and parameter is set will "dig" straight horizontally and upwards. So someone places this node and sets parameter of say 8 then this digs 8 blocks left, right, infront and behind the node and vertically(like digging a reversed mine) so now I have a flat walk-able area 17x17x17x17(17 because the "node" is in the center) and clear to the sky. Even a special touch of selecting the foundation like in the TBM, so now all that flat land can be cobble, sand, dirt, ect.....

So ideally say I wanted to create a beach resort mock up area(which I have never seen a large enough area near water to create. I would place this node at the waters edge and say set it to 20 and set "sand" as my foundation. BAMM I have a large sandy beach 41 blocks wide and 21 blocks inland where nothing happens to water because it is already at node level. You could place this out in the water to create shallow inland beach.

So after reading my reply in reality I guess im asking for the HV quarry to work upside down with a larger programmable area than just 8 maybe to 50 IDK and having ability to lay down a desired medium as the ground like TBM so merging the Quarry and TBM then making them work upside down I guess is what I am asking


Edit: uniflat is for linux and I have windows so that won't work for me

mojuave
Member
Posts: 51
Joined: Wed Aug 13, 2014 16:43

Re: [Mod] flatgen [100% flat maps]

by mojuave » Post

ok so after i wrote my last post I was tired so took a nap and after I woke I realized I answered my own question so I studied the quarry file and saw where I needed to change numbers. So now my quarry is digging up not down and I widened the range to 50 and set it at 40 and its doing what I wanted to do. Only bad thing is i can only do this to build but will need to set it back to play normal with quarry.

But hey its still a great idea to create a machine to do this that would also be server friendly as far as not digging "owned" and setting limits on range either to add to or credit technic mod. I think people would love this to level land for builds, farming or just aesthetics for landscaping around home

still think laying down a certain material as the base would be fantastic so at the end you dont need to do that manually

Thank you for your time

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] flatgen [100% flat maps]

by Krock » Post

mojuave wrote:I think people would love this to level land for builds, farming or just aesthetics for landscaping around home

still think laying down a certain material as the base would be fantastic so at the end you dont need to do that manually
I can not help you with this flatgen mod, but there are possibilities to make the area more flat.

1st soulation: With mapgen v6, you can do it with some changed values:
minetest_folder/worlds/your_world/map_meta.txt

Code: Select all

# Perlin noise attributes for different map generation parameters
# Offset, scale, spread factor, seed offset, number of octaves, persistence
mgv6_np_terrain_base = -4, 80, (250, 250, 250), 82341, 5, 0.6
mgv6_np_terrain_higher = 50, 16, (500, 500, 500), 85039, 5, 0.6
Experimental.

2nd soulation: Using WorldEdit to make it flat
3rd soulation: Use an other mapgen which contains +/- flat areas. (this one?)

Sorry if I couldn't help you completely. I didn't understand everything.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
kidmondo
Member
Posts: 130
Joined: Sun May 11, 2014 07:56
IRC: kidmondo
In-game: kidmondo
Location: New Zealand

Re: [Mod] flatgen [100% flat maps]

by kidmondo » Post

Could you make a clone of this mod, but have lakes and rivers... but not as big as the normal game ones?

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] flatgen [100% flat maps]

by Krock » Post

kidmondo wrote:Could you make a clone of this mod, but have lakes and rivers... but not as big as the normal game ones?
Image
https://github.com/SmallJoker/flatgen/tree/river
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] flatgen [100% flat maps]

by paramat » Post

mojuave wrote:I am looking for something similar but not quite as flat lol, I am trying to build a server and want a more flat map(vs the current where you need a lot of digging to semi flat to build on a large area) maybe something where a node can be placed where the node is will level the land straight in all horizontal direction to same level as where node is placed but also configurable to distance IE 0-??? node space away saying I chose 10 then say it levels 10 blocks in all 4 directions to give a perimeter of 21x21 block area.
This mapgen has chat commands that flatten or blend whole mapchunks (80x80) viewtopic.php?f=9&t=10072
Very simple lua mapgen: trees, ores, fissures, flowers, grasses and no deserts (yet).

User avatar
kidmondo
Member
Posts: 130
Joined: Sun May 11, 2014 07:56
IRC: kidmondo
In-game: kidmondo
Location: New Zealand

Re: [Mod] flatgen [100% flat maps]

by kidmondo » Post

Krock wrote:
kidmondo wrote:Could you make a clone of this mod, but have lakes and rivers... but not as big as the normal game ones?
Image
https://github.com/SmallJoker/flatgen/tree/river
Wow, thanks just what I wanted, but how do I install this?

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] flatgen [100% flat maps]

by Krock » Post

kidmondo wrote:Wow, thanks just what I wanted, but how do I install this?
Just download the zip file from github.

And install it like All other mods
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests