Trying to compile from the latest tarball () on Linux gives:
Scanning dependencies of target dfveinlook
[ 87%] Building CXX object tools/supported/CMakeFiles/dfveinlook.dir/veinlook.cpp.o
/home/matt/temp/peterix-dfhack-da2fb1c/tools/supported/veinlook.cpp: In function ‘void puttile(int, int, int, int)’:
/home/matt/temp/peterix-dfhack-da2fb1c/tools/supported/veinlook.cpp:103: error: ‘mvwaddwstr’ was not declared in this scope
Commenting out all instances of mvwaddwstr() made it compile.
More curses weirdness. Good thing I'm removing that bag of fail in the new dfhack... Anyway, this is a wide-character ncurses function. You need that library (and its -dev packages where applicable). Real problem here is that every distro packages these librariesslightly differently. Any solution to this problem will depend on what packages you have installed and how weird is ncurses in your distro.
I'm trying to figure out how to use dfincremental to determine:
1) Where and how the game stores info on wild beehives and ant colonies.
2) Where and how the game stores info on site-wide population counts (like how many turtles are left to fish before extinction)
Any advice?
Yes, first and foremost, get some decent tool for viewing process memory. Edb will do (evan's debugger), and will let you edit memory contents too. It's a bit sparse feature-wise compared to the windows equivalents, but it works... unlike most other things.
1) Should be quite manageable with the coord search, followed by backpointer search on the address(es) found. I already found those a few times, but never added the support into dfhack, mostly because anthills were just a flavor thing... might be interesting with the bees though
2) This is a bit tougher. The tool doesn't have number search for unknown values with relative increments/decrements between searches - only exact values. Shouldn't be too hard to add some kind of naive algorithm doing this, but the memory requirements with the current design (or non-design?) might be steep.
The information is also probably stored in some very non-obvious data structure (see Maps and the things that hang off the world-data address - mainly geology and local/global features. Some of it might overlap, and if you can backpointer search to it, you can save some effort.).
About the tool in general:
At first you are asked which memory regions to search. This is entered in a '##-##' format. For example '1-4' would search in regions 1-4. Make sure you include DF's static data and the heaps(mostly unnamed regions with read/write access that don't belong to any library). Omitting the DF code can remove some false positives when doing backpointer scan.
Then, pick what you want to do. Just about everything should work on linux, so that's fine. Most of the searches will ask for variable sizes, and increments between addresses to check. Most will also let you search, adjust things in DF, search again for new values, etc. (incremental search).
The backpointer scan starts with an address you give it and walks back from it, searching for pointers in the whole memory. It follows the path of those pointers... endlessly. It can be a bit slow, so make sure you build in Release mode. It also loves to go into endless goose chases across the whole DF memory. Unfortunately, I didnt include any way to stop it while it's running, so you'll have to CTRL+C out of the whole thing. Sometimes you'll have to combine it with a plain old number value search to get all the pointers to an address.
The coord search uses the position of DF's cursor to search for addresses, where the same position is stored. You can't use it to find the cursor, but placing the cursor over something you want to find, you can repeat the search incrementally. Works best with moving things obviously... and make sure there's nobody standing over the anthill or something.
If you have any further questions, check out the IRC channel. I'm around most of the time