[Mod] MapGenerator - regular maps by Lua [lualandmg]

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

[Mod] MapGenerator - regular maps by Lua [lualandmg]

by Krock » Post

LuaLandMG
Previously called "yappy". Name change due large backwards compatibility break.

This mapgen is written in Lua, designed to offer a slightly different landscape than available in mgv6.
Image
Old, some really old screenshots

Features:
  • Trees: Apple, Pine and Oak
  • Cactus
  • Ores: Custom system replaced by the Lua API function (WIP)
  • Caves: Empty or filled with lava
  • Biomes: Desert, Grasslands and Arctic with overlapping, smaller biomes in between
  • Water: Normal, Ice form or none, when too hot
  • Mudflow: Makes cave entrances fancy
What it uses:
  • 4x 2D-perlin noise: Used above -80m for terrain/mountain height, tree generation and temperature[/i]
  • 1x 3D-perlin noise: Cave generation
Licenses:
Codes and textures: BSD 3-Clause
Pine tree from HeroOfTheWinds and paramat: WTFPL

Depends: default, flowers

Download: master *.zip | View source
Last edited by Krock on Fri Sep 22, 2017 13:22, edited 4 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
HeroOfTheWinds
Member
Posts: 470
Joined: Wed Apr 23, 2014 23:16
GitHub: HeroOfTheWinds
IRC: WindHero
Location: Hawaii

Re: [Mod] Again a Lua mapgen [yappy]

by HeroOfTheWinds » Post

Very neat, I'll have to try this out later. Pretty much any mapgen with rivers is neat in my book. Question though: why do those trees have some off-white in the texture? Is that some sort of alpha error with fancy trees off?

Also, the pine tree is paramat's originally, mine is just a plain ol' copy of his. xD
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P

User avatar
philipbenr
Member
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: [Mod] Again a Lua mapgen [yappy]

by philipbenr » Post

Very good. I am looking for a good magpen for my indev subgame. I liked mg, but It really wasn't working out... Your other one was rather promising, but not quite good enough. Anyhoo, I'll be watching this topic pretty closely.

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

Re: [Mod] Again a Lua mapgen [yappy]

by Krock » Post

HeroOfTheWinds wrote:Question though: why do those trees have some off-white in the texture? Is that some sort of alpha error with fancy trees off?

Also, the pine tree is paramat's originally, mine is just a plain ol' copy of his. xD
I'll try to fix this bug soon.

I already thought, it could be a copy of paramat's mapgen, so I just added both names.
philipbenr wrote:Anyhoo, I'll be watching this topic pretty closely.
Nice to see someone interested in this mapgen :)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
sfan5
Moderator
Posts: 3892
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

Re: [Mod] Again a Lua mapgen [yappy]

by sfan5 » Post

I think something is wrong...
Image
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

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

Re: [Mod] Again a Lua mapgen [yappy]

by Krock » Post

sfan5 wrote:I think something is wrong...
https://cdn.mediacru.sh/cPbGVBpBfu6D.png
Feature! Under the 1st layer is sand, cacti loves sand.
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: 3626
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Again a Lua mapgen [yappy]

by paramat » Post

Hi, i saw this on IRC logs:
* Krock wonders if there's something like <PerlinNoise>:get3d(x, y, z) and which returns a number
There is but it's not well documented, see my very early (pre voxelmanip, pre perlinmap) mods.

In the parameters section set the noise parameters:

Code: Select all

local SEEDDIFF = 1975
local OCTAVES = 5
local PERSISTENCE = 0.6
local SCALE = 384
Here 'SCALE' equals the 'spread' of perlinmap noise parameters, the size in nodes of the largest pattern found in the noise. It has one value instead of 3 so applies to all 3 dimensions.
'SEEDDIFF' is the same value as 'seed' in perlinmap noise values.

Then use this once:

Code: Select all

local perlin = minetest.get_perlin(SEEDDIFF, OCTAVES, PERSISTENCE, SCALE)
Then you can get multiple noise values of any points in the world by using this multiple times:

Code: Select all

local noise = perlin:get2d({x=x,y=z})
Where x and z are the world co-ordinates.
Note 'x=x, y=z' because 2d noise always expects 2 values x and y and you're inputting the world co-ordinates x and z.
For 3D noise:

Code: Select all

local noise = perlin:get3d({x=x,y=y,z=z})

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

Re: [Mod] Again a Lua mapgen [yappy]

by Krock » Post

paramat wrote:Hi, i saw this on IRC logs:
* Krock wonders if there's something like <PerlinNoise>:get3d(x, y, z) and which returns a number
There is but it's not well documented, see my very early (pre voxelmanip, pre perlinmap) mods.

<snip>
Thanks for your explanation, other IRC users were also able to help with that.
I searched that function on the wrong part in the lua_api (minetest.get_perlin_map).
Could you extend minetest.get_perlin at the dev wiki with your explantation, so it's easier to understand?
(Future) mod developers could appreciate that.

EDIT: Example map:
Image
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] Again a Lua mapgen [yappy]

by Krock » Post

<snip>
Last edited by Krock on Sat Sep 23, 2017 11:41, edited 1 time in total.
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: 3626
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Again a Lua mapgen [yappy]

by paramat » Post

Your screenshot 2 posts above looks lovely, those appletree leaves do not though, they need a dark background behind the leaves, they look like cobblestone from a distance ;)

User avatar
philipbenr
Member
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: [Mod] Again a Lua mapgen [yappy]

by philipbenr » Post

sfan5 wrote: I think something is wrong...
Image
That's not a bug, that's a :
Krock wrote: Feature!
;)

I'll be taking a look at the latest sooner or later, so please, keep it up Krock. :)

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

Re: [Mod] Again a Lua mapgen [yappy]

by Krock » Post

philipbenr wrote:That's not a bug, that's a :
Krock wrote: Feature!
Well, I dropped this feature now and added:

- clay (in sand, underwater)
- jungle trees (from default game)
- jungle grass

Image
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] Again a Lua mapgen [yappy]

by Krock » Post

Would you like to....

Build here?
Image

Or here?
Image Image

There weren't any important changes - just trying to bump this thingy again.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] Again a Lua mapgen [yappy]

by Krock » Post

Update!
- Added a simple mudflow
- Made caves generating also at surface

What is mudflow?

Without:
Image
And with:
Image
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
philipbenr
Member
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: [Mod] Again a Lua mapgen [yappy]

by philipbenr » Post

I would like and almost use this magpen all the time, except for one thing. It lacks a bit of interest. One suggestion; Add things like birch and oak trees in the mix with forests. I would do it myself (and I just might) but I am too lazy. :)

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

Re: [Mod] Again a Lua mapgen [yappy]

by Calinou » Post

Krock wrote:Update!
- Added a simple mudflow
- Made caves generating also at surface

What is mudflow?

Without:
Image
And with:
Image
Heh, mud flow is explicity disabled in new worlds created with Carbone (to make world generation a bit faster and better-looking).

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

Re: [Mod] Again a Lua mapgen [yappy]

by Krock » Post

philipbenr wrote:One suggestion; Add things like birch and oak trees in the mix with forests.
Asked & added:

Krock presents: Oak trees
Image
Calinou wrote:Heh, mud flow is explicity disabled in new worlds created with Carbone (to make world generation a bit faster and better-looking).
Seriously? Do you think the stone-only screenshot looks better than the one, overed with dirt?
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Inocudom
Member
Posts: 3085
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Again a Lua mapgen [yappy]

by Inocudom » Post

In the snow biomes, the ice goes far, far underground. I have seen lava caves, diamonds, and mese in it, in fact.

Are you planning to post this mod in the Freeminer forums and test it there? It seems Freeminer doesn't have LuaVoxelManip anymore, but I need a second opinion.
You can now find my videos at BitChute: https://www.bitchute.com/channel/some_cheeky_jinuskian/

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

Re: [Mod] Again a Lua mapgen [yappy]

by paramat » Post

Krock i prefer your mudflow to no mudflow. You can avoid generating overhanging unstable dirt and sand by using my stability table system as demonstrated in my 'stability' mod.

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

Re: [Mod] Again a Lua mapgen [yappy]

by Krock » Post

paramat wrote:Krock i prefer your mudflow to no mudflow. You can avoid generating overhanging unstable dirt and sand by using my stability table system as demonstrated in my 'stability' mod.
I combined mudflow with stability now. (desert) sand will have a (desert) stone under it.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] Again a Lua mapgen [yappy]

by Krock » Post

Added better biome borders!

Image
Interesting what 1 new line and 1 changed line of code can do..
Last edited by Krock on Sun Sep 07, 2014 11:52, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Again a Lua mapgen [yappy]

by ExeterDad » Post

Borders with a more gradual transition, nice feature.

Sol
Member
Posts: 73
Joined: Thu Jul 31, 2014 05:21
In-game: sol

Re: [Mod] Again a Lua mapgen [yappy]

by Sol » Post

Krock wrote:Added better biome borders!
That looks awesome.
There is no such thing as duty. If you know that a thing is right, you want to do it. If you don't want to do it—it isn't right. If it's right and you don't want to do it—you don't know what right is and you're not a man. -- Ayn Rand

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

Re: [Mod] Again a Lua mapgen [yappy]

by Krock » Post

Sol wrote:
Krock wrote:Added better biome borders!
That looks awesome.
Thanks.

And this is how caves look right now:
Image
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: 557
Joined: Sat Jun 28, 2014 04:31
GitHub: srifqi
IRC: srifqi
In-game: srifqi
Location: Indonesia

Re: [Mod] Again a Lua mapgen [yappy]

by srifqi » Post

Krock wrote:And this is how caves look right now:--img--
A big entrance.
Saya dari Indonesia! · Terjemahkan Minetest! · my mods · My nickname in IPA: /es.rif.qi/

Post Reply

Who is online

Users browsing this forum: VanessaE and 4 guests