DFHack / dfhack

Memory hacking library for Dwarf Fortress and a set of tools that use it
Other
1.84k stars 461 forks source link

embark-tools hides aquifers (v0.47) #1499

Closed PatrikLundell closed 4 years ago

PatrikLundell commented 4 years ago

This is a strange issue. With DFHack aquifers have randomly been displayed and not for v0.47, i.e. either they're all shown as DF shows them, or they're all completely suppressed, but with the current data (we don't have versions yet) I haven't been able to get them to show at all (5 or so attempts). I suspect it has something to do with the Sand indicator, although sand presence or absence does not affect whether aquifers are shown: they're gone (i.e. not shown: I'm sure they're still there...) throughout the map.

Edit: It's indeed connected to embark-tools, but it appears not to be the tool itself, but some timing issue with its connection. Once, the first out of many attempt, I managed to get aquifers to display by disabling the Sand indication and then enabling it again, without any of the other attempts achieving anything. I've tried to disable embark-tools in dfhack.init and enable it from the console, and it worked, and I've likewise disabled it from the console and re-enabled it from there when started from dfhack.init, and that caused aquifers to show up correctly as well. I've only done one attempt of each, though.

Edit 2: I think it's related to whether there's an aquifer in the tile DF happens to be located at when the pre embark screen is brought up. If there isn't an aquifer there it fails to show up when you move to tiles having aquifers, but it if is present it seems to show up from the start. Similarly, it seems disabling/enabling embark-tools while on an aquifer bearing tile works, while doing it on a non aquifer tile does not. And I just verified it did work when starting on a non aquifer tile in 0.44.12 (just in case).

lethosor commented 4 years ago

This is weird - have you seen it recently? The sand indicator actually runs prospect under the hood and parses its output (it's kind of hacky) - maybe that's related? Could be another thing to investigate, anyway.

PatrikLundell commented 4 years ago

I just tried it again, and yes, it show up again with DFHack compiled days ago. However, it seems it requires a save where the starting position (i.e. where DF places the cursor when you load the save) does not have an aquifer, but give how it works I have no idea how it can even fail. I can provide a save where I get this every time (probably generated with 0.47.01, although it might be later).

lethosor commented 4 years ago

viewscreen_choose_start_sitest does seem to be misaligned a bit, so I'll work through it and see if that helps.

lethosor commented 4 years ago

Disregard, I was just seeing bools in finder that were uninitialized. BenLubar already addressed the new finder options in dfhack/df-structures@b8fed2c9.

Maybe a dumb question, but if you move around with u/m/k/h, are aquifers in only part of the local map? I ran into search results pointing me to some world map tiles where this was the case, so I thought I had reproduced the issue for a minute until I moved the embark region around.

PatrikLundell commented 4 years ago

I don't think it's a stupid question, but I've done that as well. In the world I happened to encounter it I could move around the whole world without finding any aquifers anywhere. The reason I reacted to it was that I was trying to figure out how the heavy/light aquifers worked, so I knew I'd seen an aquifer in a particular location, but then it was gone... The world: http://dffd.bay12games.com/file.php?id=15031

PatrikLundell commented 4 years ago

I went back to it for an umphteenth time, and have finally made some progress. It doesn't seem to be an embark-tools bug at all, but rather a DF one. Wriggling west-east does nothing, wriggling east-west reveals an aquifer that then disappears (on suitable terrain), and I've apparently consistently wriggled west-east. The reason it seems to work after disabling, finding an aquifer, and enabling is that the stable-cursor then has a suitable position...

The root seems to be that DF refuses to acknowledge the presence of an aquifer anywhere below a (0, 0) - (15, 15) MLTs line. Time to hit the bug tracker.