Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Caverns in worldgen  (Read 916 times)

Trekkin

  • Bay Watcher
    • View Profile
Caverns in worldgen
« on: July 18, 2010, 08:14:18 am »

Having played around a lot with worldgen in 40d and a bit in it here, I'm still in the dark as to how caverns are handled, and the wiki, while very thorough in describing what to expect from caverns, is a bit sparse on the subject of their generation. Thus, a bevy of questions:

1. How do they handle elevation changes? If I have a mountain next to a valley, will the cavern system(s) likewise adjust in height to match, at either a constant distance below the surface or a constant proportion of above-cavern to below-cavern space?
2. What about the magma sea? Does it too retain a constant elevation despite surface features?
3. How do the various variables for cavern worldgen interact, especially those for the Z levels that act as a vertical buffer between cavern systems? Are those buffers absolute, or in what fashion do they vary?

I suppose I'm just asking whether the caverns and magma sea are generated and the terrain dropped on top of it or if the terrain is generated and the caverns generated beneath them.
Logged

Snook

  • Bay Watcher
  • Sultan of Swing
    • View Profile
Re: Caverns in worldgen
« Reply #1 on: July 18, 2010, 09:23:55 am »

1. How do they handle elevation changes? If I have a mountain next to a valley, will the cavern system(s) likewise adjust in height to match, at either a constant distance below the surface or a constant proportion of above-cavern to below-cavern space?
I *think* it picks the lowest point on the map and works from there. So if your lowest point is at (absolute) level 121, and your parameters are set to default, you'll have the first cavern start at level 116. Note that that's the cavern roof, the floor might be several levels below that. If you muck about with the parameters (like me) you can set the caverns to appear either lower or higher. I generally set them to be 9 levels below the surface, so I have plenty of building space above them ("levels above layer 1").

2. What about the magma sea? Does it too retain a constant elevation despite surface features?
The magma sea works the same way as the caverns, appearing below the last cavern layer (you can set the number of cavern layers, btw. Anything between none and 3. "Layers above level 4" dictates how far below the last cavern you'll find the magma.

3. How do the various variables for cavern worldgen interact, especially those for the Z levels that act as a vertical buffer between cavern systems? Are those buffers absolute, or in what fashion do they vary?
These "buffers" as you call them are editable in the worldgen files. Find the "Layers above..." lines and edit them. Layer 1 = first cavern, layer 2 = second cavern, layer 3 = third cavern, layer 4 = magma sea, layer 5 = hell. PROTIP: The bigger the number you have for "levels above layer 5", the longer your spoiler spires will be. Beware, for the holes to hell can still be anywhere, leaving you with a 100z spire worth almost nothing because the hole is one level below the start.

Also some other miscellaneous info:

"Passage density" is just an abstract measure of how many twisty little corridors your caverns have. I set my max to 0 for FPS reasons, and I think open caverns look nicer.

The one involving water (can't remember the exact param) just dictates the range of water you might find. If you don't want flooded caverns set it to 0. Otherwise, leave it be.

The "openness" param is simply a measure of how tall and wide the caverns will be (I think - haven't done much testing.)

Hope this helps!
Logged
Hello my name is Kristoffer Jørgensen and I am from Norweigen
I come to see hot USA girls and history landmarks!!

TheyTarget

  • Bay Watcher
  • Memento Mori
    • View Profile
Re: Caverns in worldgen
« Reply #2 on: July 18, 2010, 02:27:46 pm »

Keep the water. Otherwise you might not have any plants.
Logged
Code: [Select]
This is a platinum warhammer. All craftsdwarfship is of the highest quality. it menaces with spikes of platinum.
there is an image of the goblin Utes Gozrusrozsnus and dwarves in elf bone. The goblin is making a plaintive gesture. the dwarves are striking a menacing pose.
this image relates to the slaying of Utes Gozrusroz

clc02

  • Bay Watcher
    • View Profile
Re: Caverns in worldgen
« Reply #3 on: July 18, 2010, 02:50:30 pm »

Though you might want to tone down openess, with vanilla settings I had a 99 z-level straight drop from the topmost to bottommost level

Of the first cavern layer, others were almost just as high.
Logged
Only in dwarven culture is alcohol poisoning a death worthed investigating, while being impaled through several toes, a eye, and a thumb from a spiraling water[3] is not.  Because everyone knows, the only way a dwarf could get alcohol poisoning is if someone put poison into the alcohol.