I'd start with a singlenode mapgen that fills the universe with stone, and then use a lua mapgen to carve out the caverns. You can find the noise parameters used by the existing mapgens in the root minetest.conf.example file, look for mgv5_np_cavern, mgv7_np_cavern and carpathian_np_cavern. Wherever the noise value is above the corresponding cavern_threshold value the stone gets replaced with air.Extex wrote:How would I make a mapgen that is entirely large caves like at -700 in Minetest game
All the way up and all the way down
If you want the small twisting connecting tunnels too, I'm not sure how to recreate those off the top of my head but they use a combination of two noise fields, np_cave1 and np_cave2. intersecting might be a good mod to look at for how to make tunnels out of noises, I don't know if this is exactly how the default mapgens do it but what this mod produces looks similar at a glance.
If you'd like to populate your underground game with farmable fungi for food and wood, you may find some useful bits to scavenge out of the DF Caverns mod. If I may self-promote slightly. :) You might also want to use the "subterrane" mod that dfcaverns uses for its caves, which is intended as a utility mod for creating large caverns with decor. Probably overkill if you just want hollow spaces without full-blown biomes and stuff though.