Important changes: Define dungeon nodes in biome definitions

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

Important changes: Define dungeon nodes in biome definitions

by paramat » Post

A change has just been made to the development version of the MT engine that removes most of the disgusting hardcoded dungeon node code.

The following now applies to mapgens other than v6:

The MT 5.0.0 and 5.0.1 stable releases added the ability to define the dungeon nodes in biome definitions.
You should now define dungeon nodes in biome definitions instead of doing so using mapgen aliases.
As an example of how to do this see this recent commit to MTGame https://github.com/minetest/minetest_ga ... b1eb758510

From new documentation https://github.com/minetest/minetest/bl ... .txt#L6596

Code: Select all

        node_dungeon = "default:cobble",
        -- Node used for primary dungeon structure.
        -- If absent, dungeon nodes fall back to the 'mapgen_cobble' mapgen
        -- alias, if that is also absent, dungeon nodes fall back to the biome
        -- 'node_stone'.
        -- If present, the following two nodes are also used.

        node_dungeon_alt = "default:mossycobble",
        -- Node used for randomly-distributed alternative structure nodes.
        -- If alternative structure nodes are not wanted leave this absent for
        -- performance reasons.

        node_dungeon_stair = "stairs:stair_cobble",
        -- Node used for dungeon stairs.
        -- If absent, stairs fall back to 'node_dungeon'.
If a biome does not define dungeon nodes they will fall back to the 'mapgen_cobble' mapgen alias, if that is not defined by a game, the dungeon nodes will fall back to the biome 'node_stone'.

Games that do not use mapgen v6 (i highly recommend not supporting mapgen v6, it will make your game much simpler and easier to develop) now do not need to define as many mapgen aliases.

From new documentation https://github.com/minetest/minetest/bl ... i.txt#L281

Code: Select all

### Aliases needed for all mapgens except Mapgen V6

* mapgen_stone
* mapgen_water_source
* mapgen_river_water_source

`mapgen_river_water_source` is required for mapgens with sloping rivers where
it is necessary to have a river liquid node with a short `liquid_range` and
`liquid_renewable = false` to avoid flooding.

#### Deprecated aliases

* mapgen_lava_source
* mapgen_cobble

Use biome-defined cave liquids and dungeon nodes instead.
if a game does not use mapgen v6 and defines cave liquids and dungeon nodes in biome definitions (as it now should), you only need to define 3 mapgen aliases.

I can answer any questions here, feel free to ask.

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

Re: Important changes: Define dungeon nodes in biome definit

by Wuzzy » Post

Why is mapgen_lava_source deprecated? How will mapgen v6 know which node to use for lava then?

If the dungeon stair node is a full cube, will the dungeons still be walkable?
i highly recommend not supporting mapgen v6, it will make your game much simpler and easier to develop
Supporting v6 anyway is fun!

User avatar
v-rob
Developer
Posts: 970
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: Important changes: Define dungeon nodes in biome definit

by v-rob » Post

It would be nice if there was a second version of v6 added that supported the full biomes. I like v6 better than any other mapgen (especially because the cave generation is actually different, whereas the other mapgens are extremely monotonous since they're all the same), but it's not changeable.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

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

Re: Important changes: Define dungeon nodes in biome definit

by paramat » Post

Wuzzy wrote:Why is mapgen_lava_source deprecated? How will mapgen v6 know which node to use for lava then?

If the dungeon stair node is a full cube, will the dungeons still be walkable?
Lava and cobble aliases are only deprecated for non-v6 mapgens, the notification of deprecation is only in the 'non-v6' section. In the v6 section those aliases are listed as required.
Maybe 'deprecation' wasn't the best way to document this, perhaps 'soon unsupported in non-v6 mapgens' would be better.

And yes, dungeons stair corridors are still passable even with full-cube stairs.
Last edited by paramat on Mon Jul 08, 2019 23:13, edited 1 time in total.

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

Re: Important changes: Define dungeon nodes in biome definit

by paramat » Post

v-rob wrote:It would be nice if there was a second version of v6 added that supported the full biomes.
I've suggested this a few times and can code it quite easily, my opinion about doing so has changed a few times, currently i'm fairly neutral. There hasn't been much interest from other core devs.
It will be a little different though to be compatible with the Biome API, no mudflow.
Adding a new mapgen is a huge responsibility for MT, as worlds will always have to be supported, so this would need a lot of justification. I find it difficult to consider v6 terrain interesting enough to be worth it, it never rises above y = 47.

Termos
Member
Posts: 417
Joined: Sun Dec 16, 2018 12:50

Re: Important changes: Define dungeon nodes in biome definit

by Termos » Post

paramat wrote:
v-rob wrote:I find it difficult to consider v6 terrain interesting enough to be worth it, it never rises above y = 47.
I don't think max terrain height is what contributes to it being interesting,
rather it's a function of view range, which is 100 by default, fairly small.

Take v7 and cartpathian for example, both generate large flats way wider than 200 nodes, that means standing in the middle you see nothing on default setting, boring as hell.
On the other hand, ~600 nodes high monstrosities occasionaly generated by these mapgens cannot be appreciated on any reasonable view settings, even on unlimited view range the game becomes hardly playable and it's difficult to keep all of it loaded anyway.

Smaller scale of terrain features makes it more suitable for smaller view ranges, because of more varied terrain within view radius and thus more interesting.
I'd argue v6 is more interesting on default settings than most other available mapgens.

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

Re: Important changes: Define dungeon nodes in biome definit

by Sokomine » Post

Termos wrote: Smaller scale of terrain features makes it more suitable for smaller view ranges, because of more varied terrain within view radius and thus more interesting.
I'd argue v6 is more interesting on default settings than most other available mapgens.
That may very well be true. I sometimes enjoy walking around on a map, exploring terrain. But once it comes down to building something, view range needs to be less extreme. Areas where several biomes intersect are usually particulary intresting places for a settlement. And there's a second factor: If there's too much nice scenery, it might turn into a too long search for the best place to build. Sometimes a bit less is more, and a world that lacks something motivates to improve it.
A list of my mods can be found here.

User avatar
v-rob
Developer
Posts: 970
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: Important changes: Define dungeon nodes in biome definit

by v-rob » Post

Sokomine wrote:And there's a second factor: If there's too much nice scenery, it might turn into a too long search for the best place to build.
Way too true. I can barely ever find any good places to do anything, and when I do, I get bogged down with what to build, how to build it, and what to build with. Sometimes, I think many of the minimalistic things are better.

Regardless, I can still disable snowlands and change desert frequency, so I'm fairly happy.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests