Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Reading DF Data While Running  (Read 667 times)

EmperorJon

  • Bay Watcher
  • Still waiting...
    • View Profile
Reading DF Data While Running
« on: March 11, 2011, 11:46:15 am »

I was thinking of making a bit of a basic (Pun intended) tool for DF, but I must admit I have no experience in pulling data out of a program whilst it's running. I was just wondering if anyone could give me a bit of a talk through, or something... it doesn't have to be doing it constantly, simply by an update button... but never dealt with checking if a program instance is running, and then reading data it's using before.

Thanks in advance, even if no help is forcoming. :P
Logged
I think it's the way towns develop now. In the beginning, people move into a town. Then they start producing tables, which results in more and more tables. Soon tables represent a significant portion of the population, they start lobbying for new laws and regulations, putting people to greater and greater disadvantage...
Link for full quote. 'tis mighty funny.

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Reading DF Data While Running
« Reply #1 on: March 11, 2011, 12:13:24 pm »

Im clueless about programming in general, but I know DFhack can serve as a base for a utility. It would also save you most the trouble of updating for newer DF versions.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

EmperorJon

  • Bay Watcher
  • Still waiting...
    • View Profile
Re: Reading DF Data While Running
« Reply #2 on: March 11, 2011, 12:22:50 pm »

Yeah, I'm thinking of something more DTherapist, but for a different use. I just have no idea what that was made in, or any idea on reading information about a program instance anyway.
Logged
I think it's the way towns develop now. In the beginning, people move into a town. Then they start producing tables, which results in more and more tables. Soon tables represent a significant portion of the population, they start lobbying for new laws and regulations, putting people to greater and greater disadvantage...
Link for full quote. 'tis mighty funny.

NewsMuffin

  • Bay Watcher
    • View Profile
Re: Reading DF Data While Running
« Reply #3 on: March 11, 2011, 03:05:21 pm »

Well, I'd imagine it'd be a little challenging.
First, you'd have to print it out, then give yourself adequate room to...
Oh, you mean programming wise.
You could probably use DF hack, and modify it to be more like Dwarf Therapist.
Logged

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Reading DF Data While Running
« Reply #4 on: March 11, 2011, 03:14:48 pm »

DFHack has a nice library that you can use to play with DF's memory regions.

If you didn't understand the above, give up your hopes.
Logged
I like fortresses because they are still underground.

orbcontrolled

  • Bay Watcher
    • View Profile
Re: Reading DF Data While Running
« Reply #5 on: March 11, 2011, 04:47:34 pm »

If you ever plan on offering your tool for download, then use DFHack. That way your potentially useful utility won't have to die like so many others when you lose interest in updating it.
Logged

EmperorJon

  • Bay Watcher
  • Still waiting...
    • View Profile
Re: Reading DF Data While Running
« Reply #6 on: March 11, 2011, 04:50:02 pm »

It wasn't a tool for ingame, and I wanted a more graphical interface. Someone mentioned a tool for checking all relationships in the fort may be nice, and I thought I'd give it a shot. Not now though.
Logged
I think it's the way towns develop now. In the beginning, people move into a town. Then they start producing tables, which results in more and more tables. Soon tables represent a significant portion of the population, they start lobbying for new laws and regulations, putting people to greater and greater disadvantage...
Link for full quote. 'tis mighty funny.

fumphar

  • Escaped Lunatic
    • View Profile
Re: Reading DF Data While Running
« Reply #7 on: April 09, 2011, 04:36:03 pm »

DFHack is the library you want... It makes all that stuff as easy as calling a function.

You need to be able to program in C or Python though, but if you have programming skills, that shouldn't be too difficult to adapt to. There are lots of examples.
Logged