Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: New C# dwarf fortress mod wip - need help getting started  (Read 1242 times)

Buildengaems

  • Escaped Lunatic
    • View Profile
New C# dwarf fortress mod wip - need help getting started
« on: October 06, 2010, 09:56:10 am »

Can someone point me in the right direction?  I want to create a mod that tracks different stats of the dwarfs, like how many spaces they travel between tasks, what those tasks are...the end result being a report that can let you know where to improve efficiency.   Does anyone know of an open-source C# project I can look at that reads dwarf fortress details, or documentation that could point me in the right dir?

Thanks :)
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: New C# dwarf fortress mod wip - need help getting started
« Reply #1 on: October 06, 2010, 11:22:14 am »

The main memory-reading library right now is DFHack. And there're various tools based on dfhack.dll which show dwarven stats, attributes and other parameters.

Read the Community Mods and Utilities list.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

codewright

  • Bay Watcher
    • View Profile
Re: New C# dwarf fortress mod wip - need help getting started
« Reply #2 on: October 06, 2010, 02:51:31 pm »

Luckily, DFHack has nice C exports so you can easily P/Invoke most functions directly from the DLL. I think the C exports do not contain all the functionality the C++ code has, but it should be enough in most cases and you don't need to recompile any code. I can really recommend using DFHack for .NET projects.
Logged