Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Programming with DF: Better inventory / production statistics  (Read 844 times)

vanatteveldt

  • Bay Watcher
    • View Profile

[I'm not sure whether this should be here or in the modding forum, but since it's not really about a mod I figured I'd post it here...]

One thing that endlessly frustrates me in DF is the lack of useful management statistics. Even in Settlers II, you could get a nice overview of current materials and graphs of recent production. That really helped me to understand which parts are going well and which production chains need tweaking. In DF there is the stocks menu, but I find it horrible to navigate and it doesn't show production/consumption over time. I can build a fortress that supplies all the necessities (food, drink, clothing, furniture, weapons etc), but I don't really feel like I do it in a very informed way. I just set up a bunch of farms, one or two weavers and clothiers, and assign 30 X tasks whenever I think about it.

I thought it would be nice to create a little "therapist" like tool to give some more statistics, e.g. per production chain per item current finished stock, raw stock, # of dwarfs/workshops assigned to production, and recent production.

I've never programmed something around DF before, but in general I'm a decent programmer. Can anyone tell me how difficult it is to get the needed info out of DF? And can I  use the existing libraries used in therapist and/or dfhack to talk to the game?
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Programming with DF: Better inventory / production statistics
« Reply #1 on: May 15, 2013, 04:26:14 am »

This does a lot of the features you mentioned: http://www.bay12forums.com/smf/index.php?topic=119575.0
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

vanatteveldt

  • Bay Watcher
    • View Profile
Re: Programming with DF: Better inventory / production statistics
« Reply #2 on: May 15, 2013, 06:44:45 am »

Wow, that looks fantastic! Thanks for linking. There goes my excuse to dive into DF programming ;-)

(and it reinforces my view that Toady should split df into a proprietary backend/simulation part and an open source interface part, and have a proper API between them. The community here would make an interface for DF that would make a professional game studio jealous, instead of the dfhack / memory tricks that have several disadvantages...

Has Toady ever commented on the dfhack / plugins endeavours?
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Programming with DF: Better inventory / production statistics
« Reply #3 on: May 15, 2013, 09:09:39 am »

Wow, that looks fantastic! Thanks for linking. There goes my excuse to dive into DF programming ;-)

(and it reinforces my view that Toady should split df into a proprietary backend/simulation part and an open source interface part, and have a proper API between them. The community here would make an interface for DF that would make a professional game studio jealous, instead of the dfhack / memory tricks that have several disadvantages...

Has Toady ever commented on the dfhack / plugins endeavours?

Yes.
http://www.bay12forums.com/smf/index.php?topic=74128.15
http://www.bay12forums.com/smf/index.php?topic=58796.0

I am sure that there might be a more positive comment/quote somewhere, but we have to be careful regarding what we try to do. Toady doesn't want to open source any of what he is working on, but seems to tolerate use of dfhack to do things that help the community that he doesn't want to spend time on (such as therapist). It's reasonable protection of intellectual property. Trying to build your own DF UI/frontend will probably end badly.

vanatteveldt

  • Bay Watcher
    • View Profile
Re: Programming with DF: Better inventory / production statistics
« Reply #4 on: May 15, 2013, 09:39:40 am »

Well I think it is fully within Toady's right to determine how he wants to exert his rights under copyright law, and I've seen it noted before that he is not planning to do any open sourcing.

However, I don't think it is very smart of him. The ideas and simulation are what makes this game great, the interface not so much. He could harness the appartent willingness of the playerbase to help him fix the interface, even in the current setup where dfhack et al are merely tolerated and will probably need a substantial rewrite when a new version is released and stuff moves around in memory. Imagine what this community could do if it were helped instead of tolerated.

And he doesn't even need to open source the current interface, as long as he separates backend and frontend and has a decent API between them people will be willing to create a totally new interface for all or parts of the game, just like therapist is a totally new interface for some aspects of the game.

(Personally, given his donations-based business model and niche appeal, I don't see why he wouldn't just throw the whole thing on github, but I fully respect that it is his choice).
Logged

slothen

  • Bay Watcher
    • View Profile
Re: Programming with DF: Better inventory / production statistics
« Reply #5 on: May 15, 2013, 10:11:44 am »

Considering its his livelihood, he has every reason to maintain tight control over it.  Anyway, none of this is new ground, its a perennial topic of conversation.
Logged
While adding magma to anything will make it dwarfy, adding the word "magma" to your post does not necessarily make it funny.
Thoughts on water
MILITARY: squad, uniform, training
"DF doesn't mold players into its image - DF merely selects those who were always ready for DF." -NW_Kohaku

Psieye

  • Bay Watcher
    • View Profile
Re: Programming with DF: Better inventory / production statistics
« Reply #6 on: May 15, 2013, 10:12:15 am »

I think you can find some more comments from him on this topic in his IAMA session on Reddit. Not sure if he gave a direct link to that on the dev blog, he certainly mentioned it there though.
Logged
Military Training EXP Analysis
Congrats, Psieye. This is the first time I've seen a derailed thread get put back on the rails.