preload button hover image:
HomeSearchRankingsStatisticsAboutContact
Current Time: Nov 22, 2024, 03:40:33 pm
 Dwarf Fortress File Depot » Utilities » gui/unit-info-viewer.lua
      
Registration is not required to download. However, it will allow you to vote, comment, and upload. Forgot your password?
File Listing: gui/unit-info-viewer.lua
Last Updated: Jun 19, 2013, 05:05:13 pm
First Created: Jun 03, 2013, 03:51:47 pm
File version: 1.04
For DF version: 0.34.11
Downloads: 113 (157) Size: 8.5 KB
Views: 2,276 (2,497) Type: ZIP
Rating (0 votes): Unrated
Description
Uses a lua viewscreen to display information about a unit's age, birth day, life expectancy, shearing products, milking products, grazing value, Egg laying, body size, and death info.

extract to hack/scripts/gui

add a key binding to dfhack.init such as:
Code:
keybinding add Alt-I gui/unit-info-viewer

(written for dhack r3)
Designed for fortress mode, may work in adventure mode (most likely will have issues with dates and ages).

Age, max age (as an average), and grazing (small number has to eat more), are limited to members of the civilization (animals and citizens).
Birth day is limited to citizens (since I couldn't figure a way to filter out wild animals that had been tamed/trained).
Shearing and milking products are currently limited to members of the civilization who are of an adult age.

Body size is currently given as 2 values in cubic decimeters (used by the game) rather than cubic centimeters (used by the raw declarations):
> The first value is the size that triggers a pressure plate and thickens/thins on strength and fat (energy storage).
> The second value is the base size (determines butchering products).

Not all possible causes of death have a nice death string as I think that many of the causes of death are only possible during world gen and will therefore be unused during fort mode. If any of these are encountered, please let me know how the unit died and what message the game reported. Currently omits time of death and killer/slayer info.

Provides a context for dfhack.gui.getSelectedUnit() and receives a unit context from most unit contexts. Does not receive a unit from the justice screen, military scheduling of new orders, and unit->relations. Should work just about everywhere else.


Change log:

Version 1.04
  • removed calculated body size, with a growth bug fix running, it isn't needed.
  • added egg laying info.
  • fixed ghost info not showing up.
  • allowed body size info for undead.
  • changed/fixed wrong char for masterful training.
  • updated cause of death by trap string.
Version 1.02
  • enabled working with arena mode by removing requirement for dfhack.isWorldLoaded()
Version 1.01
  • fix vampires showing as dead
  • update estimated size calculation, I think it should now be accurate for any unit that first spawns full grown
Raw Data: JSON / Text
Checksum / Hash
SHA-256: 44bcc782f3add1dd2b26c816b4bd23334bbece7ca3bea22f3aefb898cb8f33fd
IP: logged
Commands
More From This Author
Comments
No comments have been posted for this file yet.
HomeSearchRankingsStatisticsAboutContact

Website by Brett Flannigan. The core site script is PHCDownload (© 2005-2024).
Hosted by Linode.