You sure got those offsets fast. Isn't there a tutorial somewhere for finding offsets yourself? I couldn't find one and was hoping to help out.
Yeah. I just want this stuff out of the way.
Anyway, if you can read C++ code, you're halfway there already - you can read what the dfhack modules do to read things. Then you need tools. Some visual debugger that lets you disable everything but bookmarks and the memory view is always helpful. I use edb for that (it's a linuxy thing, but I'm sure it has windows equivalents). Look at what's at the addresses known in older versions, look at the code and see what it does with the data it reads and how it reads it. Load the same save in a newer version of DF and see if you can find the same data. For more involved things, you'll need a decent disassembler or a good knowledge of x86 assembly. IDA Pro is great here - even the free version without hexrays.
Well, and that about covers the essentials. Look at things, try to make sense of what you see.
DFHack will eventually have better tools for offset searching. Right now there's just dfincremental, which can, when used properly, speed up your work. I'll cover the basic modes here (and skip the ones that don't work on windows yet)
First thing it will ask you about is the ranges in which it should search. Picking all of them is OK.
[peterix@peterix output]$ ./dfincremental
Which range to search? (default is 1-4)
(0) 10000 - 110000|rw-|
(1) 110000 - 220000|rwx|
(2) 220000 - 221000|rwx|
...
(400) ff8b0000 - ffcb0000|rwx|
(401) ffcb3000 - ffcd4000|rw-|[stack]
(402) ffce0000 - ffff0000|---|
>>0-400
Here I pick ranges 0-400. This will be different depending on your system and the version of DF you use. The less ranges you pick, the faster the search, but you can miss things. When you know that the stuff you search for is normally in some range, you can limit the search this way.
Then it will ask you about what kind of search you want to do:
0= exit
1=number(default) = this lets you incrementally search for an exact number. Incrementally = you search, change it in DF, search again, etc, until you get a small set of addresses. This is a common property of many of the search types.
2=vector by length = very useful. many things in DF are stored in STL vectors. This lets you search for those vectors by how many items they hold. Embark, build a constructed floor, search for 1, build another, search for 2, etc. You'll find the constructions.
3=vector>object>string = only works on linux right now ~_~ Very useful for materials/raws.
4=string = STL string, linux only. For any place you can type things in.
5=automated offset search = very limited automated search. linux only. to be expanded.
6=vector by address in its array = not very useful. lets you search for a vector by a single address that lies inside its range. Produces too many useless results.
7=pointer vector by address of an object = you have an object address and want to find a vector that holds it. the more objects you have, the more you can limit the list
8=vector>first object>string = another linux only.
9=string buffers = plain non-STL string search. Just put in letters and it finds them.
10=known data = similar to string buffers, but accepts a series of bytes in hexadecimal code. useful for binary strings or when you need to string more numbers together.
11=backpointers = say you have an address that you know is inside an object (you searched for a dwarf's nickname for example). this lets you find where the creature object starts and what is referencing it. The search it does is greedy, so it will follow the first backpointer and won't explore the others, if there are any. Combine with plain number search if you think that's happening.
12=data+backpointers = data search and backpointers combined
13=coord lookup = this lets you for example put the DF cursor over something of interest and do a search for the coords of the cursor. Usually, it finds and address that's inside the interesting object, or more addresses if more things share the same coords. Follow a dwarf for a bit with this and you'll certainly find him.
Making the linux-only things here working for windows DF is my next goal.
I'm sure you could find many other tools too.