Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Underground connecting river  (Read 1177 times)

The Riddled Basement

  • Bay Watcher
  • Praise Armok
    • View Profile
Underground connecting river
« on: September 29, 2014, 03:28:12 pm »

I have a volcano, but its too far from the river for a reasnoble embark.
So, I make an embark below it with the river, channel it through the mountain to the map edge and let it flow through fortifications.
I then retire and make my volcano embark, mine down to the correct level and dig, smooth, fortificate the map edge where I channeled from the other side. (did this with a macro telling me where it is)
But.... No water :O

Anyone got any thoughts how to connect two embarks with a underground river?
Or how to connect them with a river anyhow...

Use of dfhack etc.. is a possibility.

Many thanks in advance
Logged
-- Make a dining room around the 25z pit floor and tada, easy tragedy training --

Tacomagic

  • Bay Watcher
  • Proud Sir Wordy McWordiness at your service.
    • View Profile
Re: Underground connecting river
« Reply #1 on: September 29, 2014, 04:03:25 pm »

You can't do it that way, not quite.  The issue is that the river sourcing is only checked one time when you embark, so since it was trying to flow into solid stone, it flagged that edge of the map as no source.

You need to embark with enough overlap for the river to make it partially onto the map, not just adjoining it.
Logged

mobucks

  • Bay Watcher
    • View Profile
Re: Underground connecting river
« Reply #2 on: September 29, 2014, 07:57:13 pm »

You might be able to use dfhack's "liquids" command to change a tile to a water source. Choose the tiles you wanted to flow from the other map and it's barely cheating. Check the readme for DFHack.
Logged

lowbart

  • Bay Watcher
    • View Profile
Re: Underground connecting river
« Reply #3 on: September 30, 2014, 01:33:56 am »

Overlapping embarks cause crazy bugs, no?
Logged
"Are you there, gods? It's me, Mistêm."
Quote from: Boatmurdered
Guerilla Burialgears absently tucks the child's rock into his pack and turns to leave for good; his head hung low. His words trail behind him as he disappears over the ridge. It is a haunting whisper, quickly stolen away by the wind: "All burn..."

Tacomagic

  • Bay Watcher
  • Proud Sir Wordy McWordiness at your service.
    • View Profile
Re: Underground connecting river
« Reply #4 on: September 30, 2014, 08:29:14 am »

Overlapping embarks cause crazy bugs, no?

Typically, yes.
Logged

gchristopher

  • Bay Watcher
    • View Profile
Re: Underground connecting river
« Reply #5 on: September 30, 2014, 03:49:19 pm »

The easiest way to address this is to use dfhack to create a river from the embark screen. It's probably possible after embark, but you'd have a lot of work to do editing the map edges and every connecting tile to create a river.

I don't have complete notes handy, but in 34.11, it was safe and easy to add a river to the world just prior to embark. I think you need to set the river direction, width, and elevation. If it works, you should see the river appear in the embark window. Whenever editing river or terrain, be sure to edit out to one tile outside your actual embark rectangle, so the map borders are consistent.

34.11 river elevations:
Code: [Select]
df.global.world.world_data.region_details[0].rivers_horizontal.local_id[x][y]
df.global.world.world_data.region_details[0].rivers_vertical.local_id[x][y]

Hmm, I don't have the others handy. I'll try to find my notes.
Logged

gchristopher

  • Bay Watcher
    • View Profile
Re: Underground connecting river
« Reply #6 on: October 01, 2014, 12:33:50 am »

Hahaha! Found some useful notes. Play with these in a lua session and you'll be able to get some rivers going in any embark.

Code: [Select]
function add_vert_river(x, y, min, max, dir, elev)
  df.global.world.world_data.region_details[0].rivers_vertical.x_min[x][y] = min;
  df.global.world.world_data.region_details[0].rivers_vertical.x_max[x][y] = max;
  df.global.world.world_data.region_details[0].rivers_vertical.active[x][y] = dir;
  df.global.world.world_data.region_details[0].rivers_vertical.local_id[x][y] = elev;
end

function add_horiz_river(x, y, min, max, dir, elev)
  df.global.world.world_data.region_details[0].rivers_horizontal.y_min[x][y] = min;
  df.global.world.world_data.region_details[0].rivers_horizontal.y_max[x][y] = max;
  df.global.world.world_data.region_details[0].rivers_horizontal.active[x][y] = dir;
  df.global.world.world_data.region_details[0].rivers_horizontal.local_id[x][y] = elev;
end

All kinds of weird nonsensical results are possible, though. Rivers with dramatic elevation changes are the way to get giant fun FPS-sucking waterfalls. 

Terrain elevations are:

Code: [Select]
df.global.world.world_data.region_details[0].elevation[x][y]
    df.global.world.world_data.region_details[0].elevation2[x][y]

I wonder if this all still works in 40.x? I haven't been up for an attempt until the invasion auto-success bug is resolved.
Logged