Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: dfstatus - A dfhack tool that gives you an out of game 'z' status window.  (Read 6327 times)

enjia2000

  • Bay Watcher
    • View Profile

http://dl.dropbox.com/u/4326631/dfstatus1.04.zip - version 1.04

I made a tool that gives you updates of the amount of food and drink you have available in your fort. Uses the curses library to maintain that DF look and feel.  I plan to do low drink warnings. Will add barrel, bin, and pots numbers in the future. No color yet but that will come soon as well.



There is a lot of data that gets pulled from DF so once every 30 seconds you might notice a slight pause, this is normal. If df hangs for too long you can always run dfunstuck.exe that i've included from dfhack.
This is also more accurate then a bookkeeper can keep track of so you may notice the numbers don't line up in game sometimes.
Any input or questions are welcomed.

Compiled for windows for DF 31.25

Also, I need feedback! This is a app for the community. Let me know what needs to be added.

Changlog:

1.00 - Initial release
1.01 - Included missing .dlls
1.02 - added steel bars
1.03 - added prepared meals
1.04 - add pig iron bars and internal fixes
« Last Edit: May 23, 2011, 03:39:11 pm by enjia2000 »
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile

Though right now it doesnt do much the game allready does on its own, it could be used for some interesting purposes.

You could make it have some sort of feedback to the game. For example, tell the program you want a minimum of 2500 drinks, and have it add brewing orders untill that number is reached. Could be great way to reduce the menial micromanagement.

Alternately you could just keep to displaying the game information, but keep a history of it, so you can for example see how many drinks you had throughout the last few years. Perhaps you could even make neat ascii charts. That would be most dwarfy.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

enjia2000

  • Bay Watcher
    • View Profile

Though right now it doesnt do much the game allready does on its own, it could be used for some interesting purposes.

This is true, I just hate hitting 'z' stocks, page down twice, arrow down 4 times, tab over. Just to see how many bars I have. Also it let's you see what you have without pausing.

You could make it have some sort of feedback to the game. For example, tell the program you want a minimum of 2500 drinks,

As far as I know there is no way to set jobs with dfhack, i'm limited to what the library allows.

Thanks for the feedback.
Logged

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile

Excellent tool, downloading now.

Kaos

  • Bay Watcher
    • View Profile

Just wondering is it normal that it hangs if used with version 31.21??  :P


I'm getting:
Quote
terminate called after throwing an instance
of 'DFHack::Error::InvalidMemoryDefinition'
  what():  memory object is INVALID: type address key /Items/items_vector


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


dwarfortress hangs after that and it gets back with dfunstuck, I'll have to try this with 31.25....
Logged

enjia2000

  • Bay Watcher
    • View Profile

Just wondering is it normal that it hangs if used with version 31.21??  :P

I've only tested this on 31.25, sorry.
Logged

Aalto

  • Bay Watcher
    • View Profile

You could make it have some sort of feedback to the game. For example, tell the program you want a minimum of 2500 drinks, and have it add brewing orders untill that number is reached.

Dwarf Foreman.
Logged

nomad_delta

  • Bay Watcher
    • View Profile

This looks awesome, especially for those of us with large (or multiple) monitors so we can keep this up on the screen all the time while DF is running.

If it doesn't already, can you add "prepared meals" to the list of things it tracks?  Those and drinks are the two main things I want to make sure I don't run out of in most cases.

--nomad_delta
Logged

enjia2000

  • Bay Watcher
    • View Profile

If it doesn't already, can you add "prepared meals" to the list of things it tracks?  Those and drinks are the two main things I want to make sure I don't run out of in most cases.

I looked into it and it can be done, but the way the raws are written fat counts as a prepared meal (glob, because dwarfs can eat pure fat for a meal.)
So the count is going to reflect that (5 meals + 50 fat = 55 meals.)
Logged

Ghills

  • Bay Watcher
    • View Profile

If it doesn't already, can you add "prepared meals" to the list of things it tracks?  Those and drinks are the two main things I want to make sure I don't run out of in most cases.

I looked into it and it can be done, but the way the raws are written fat counts as a prepared meal (glob, because dwarfs can eat pure fat for a meal.)
So the count is going to reflect that (5 meals + 50 fat = 55 meals.)

Could this program get the number of fat globs and subtract that from the 'meals' number? That would give a better estimate of how many actual prepared meals are in the fort.
Logged
I AM POINTY DEATH INCARNATE
Ye know, being an usurper overseer gone mad with power isn't too bad. It's honestly not that different from being a normal overseer.
To summarize:
They do an epic face. If that fails, they beat said object to death with their beard.

Aranador

  • Bay Watcher
    • View Profile

This is really clever.

Because this is really clever - I am going to give you a MegaProject.

Make an app that can display a dwarf - you can scroll through the dwarves.

The app displays the dwarf's equipment, in a modestly easy for humans to read format - IE stuff on the dwarf's head appears near the top, stuff on the feet appears at the bottom.  Stuff on the right appears on the right.

Now for bonus points:

- Allow the user to set/deset ownership of items.

- Allow the user to scroll through a list of all available items for that inventory slot, with each item having a note as to if it is claimed, worn, free, or otherwise.

- Allow the user to have that dwarf claim another item.

- Allow the user to equip another item - neatly teleporting said item onto the dwarf.


Nothing to do with what your current app does right?  But a good challenge for a clever programmer, and a tool that many people would kill for.

Have fun.
Logged

enjia2000

  • Bay Watcher
    • View Profile

Could this program get the number of fat globs and subtract that from the 'meals' number? That would give a better estimate of how many actual prepared meals are in the fort.
there is no 'meal' number, meals and tallow both share the item type 'glob'
Logged

enjia2000

  • Bay Watcher
    • View Profile

This is really clever.
Because this is really clever - I am going to give you a MegaProject.
Make an app that can display a dwarf - you can scroll through the dwarves.
The app displays the dwarf's equipment, in a modestly easy for humans to read format - IE stuff on the dwarf's head appears near the top, stuff on the feet appears at the bottom.  Stuff on the right appears on the right.
Now for bonus points:
- Allow the user to set/deset ownership of items.
- Allow the user to scroll through a list of all available items for that inventory slot, with each item having a note as to if it is claimed, worn, free, or otherwise.
- Allow the user to have that dwarf claim another item.
- Allow the user to equip another item - neatly teleporting said item onto the dwarf.

I'm not really interested in making this, but it sounds like something you already have worked out in your head. Make it a reality!
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions

Could this program get the number of fat globs and subtract that from the 'meals' number? That would give a better estimate of how many actual prepared meals are in the fort.
there is no 'meal' number, meals and tallow both share the item type 'glob'
Wait, what? Last I checked, prepared meals used the FOOD item type (#71) with subtype indicating whether it was biscuits (FOOD:ITEM_FOOD_BISCUITS), stew (FOOD:ITEM_FOOD_STEW), or roast (FOOD:ITEM_FOOD_ROAST)...
« Last Edit: May 21, 2011, 10:32:54 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

enjia2000

  • Bay Watcher
    • View Profile

Wait, what? Last I checked, prepared meals used the FOOD item type (#71) with subtype indicating whether it was biscuits (FOOD:ITEM_FOOD_BISCUITS), stew (FOOD:ITEM_FOOD_STEW), or roast (FOOD:ITEM_FOOD_ROAST)...

Well, that may be the case but i'm limited to what the dfhack library provides and the class type returned is 'glob' for all prepared meals.
It could be the dfhack library needs expanding for prepared meals but I have no idea how to do that.
Logged
Pages: [1] 2