Post your mapgen questions here (modding or engine)

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

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

by paramat » Tue Mar 21, 2017 16:39

> Is it possible to change the default mapgen flags for a subgame, so the user can still overwrite them?

I doubt it.

> I think of this: If Minetest fails to place any node (except those with probability 0), the entire decoration is not placed. Think of it as an “all-or-nothing decoration”. :D
Is this possible?

Possible but complex and slow, it would have to be optional because with trees we want them to intersect and overlap, decoration code has of course to be lightweight and fast because it acts during mapgen. So no doing this is not liely to happen.
As explained you can already avoid this using order of registration.

> But I still have large plants over ferns (=jungle grass), maybe because it also comes from v6

This is because the mgv6 1-node decorations are registered in default/mapgen.lua before your mod decorations so you have the order of placement wrong. It's not a bg.
You need to 'minetest.clear_registered_decorations' then re-register all (including mgv6 decorations) in a new order.
 

User avatar
Wuzzy
Member
 
Posts: 2161
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 » Fri Mar 31, 2017 19:38

How can I use the decorations API to spawn simple decorations underground?
For example, placing mushrooms on top of stone in caves.
Or do I have to use LuaVoxelManip (or similar)?

With my experiments so far, I only managed to make mushrooms appear at Y chunk borders.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

FaceDeer
Member
 
Posts: 152
Joined: Sat Aug 29, 2015 19:01

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

by FaceDeer » Fri Mar 31, 2017 22:20

Wuzzy wrote:How can I use the decorations API to spawn simple decorations underground?
For example, placing mushrooms on top of stone in caves.
Or do I have to use LuaVoxelManip (or similar)?

With my experiments so far, I only managed to make mushrooms appear at Y chunk borders.


I don't know of a way to use the decorations API for this (and will be keenly interested if someone knows of a way), but in the meantime you might find this mod I've been working on recently to be of use: subterrane. If you make a mod that depends on this and then call subterrane:register_cave_decor for a range of depths, a mapgen callback will be registered that will call some methods you can specify on biomes to add decorations to the floor and ceiling of caves.

I've been making use of subterrane as the basis for my Dwarf Fortress cavern mod and I also rewrote Caverealms to be able to use it, so it seems reasonably solid.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

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

by paramat » Sat Apr 01, 2017 03:39

Wuzzy wrote:With my experiments so far, I only managed to make mushrooms appear at Y chunk borders.

Yes this is all that is possible currently, because decorations can only be placed on the highest surface in a mpchunk, so only where caves intersect a mapchunk border.

I intend to add underground decorations before next release.
 

Mator
New member
 
Posts: 1
Joined: Sun Apr 02, 2017 17:41
GitHub: matortheeternal
In-game: Mator

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

by Mator » Sun Apr 02, 2017 17:58

Just found out about Minetest today and I'm really excited because of the high world size limit. I'm a fractal enthusiast and have been interested in generating voxel representations of fractal objects for a many years now. Awhile back I made a WorldEdit script to generate fractals in Minecraft. Soon after that I made my own voxel engine in Java, and later an improved version in C++ (all with the specific purpose of generating fractals).

What I'd like to do is create new map generation presets for generating certain fractal objects, and eventually a mixed "fractal garden" preset. I'm still poking around to get a feel for how I would do this, noticed the flat map generator which looks like a good starting point.

Any recommendations for things I should look into/read going into this?

Cheers,
- Mator

EDIT: Got some help from paramat in IRC. Thanks man!
 

Previous

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 9 guests

cron