Livestock and pastures
livestock_and_pasturesMonitor your fort's tame livestock and pasture status. Identify grazers without pasture, egg layers missing nestboxes, and get detailed counts by species, age, training, and slaughter marking.
Instructions
The fort's tame animal economy as facts — every prior tool sees hostiles (threats) or nothing at all here. tame_total/pets/livestock split ownership; by_group[]/by_group_total/by_group_truncated count tame animals by species/sex/adult-or-not, capped at 100 distinct combinations. grazers reports total vs pastured, plus the individual animals NOT in any pasture zone — a grazer with no pasture cannot graze and silently starves; this is normally invisible (juveniles graze too, so grazer status is NOT gated on adulthood). egg_layers reports counts only (total, fort-wide nestbox count, how many are pastured without a nestbox in reach, how many are unpastured) since the consequence (missed eggs) is mild and the population is usually large — gated on adulthood (a juvenile of an egg-laying caste cannot actually lay yet, matching DFHack's own autonestbox behavior). marked_for_slaughter and trained (training_level Trained..MasterfullyTrained — DF's single shared training-quality scale, NOT which discipline the animal was trained for; it does not persist war-vs-hunting per animal) list individual animals, capped. cages[]/cages_truncated lists occupied cages with their occupants (dfhack.buildings.getCageOccupants); each cage's own occupants[] is independently capped too (occupants_total/occupants_truncated), so a single densely-packed cage trap can't inflate the response either. unassigned_count is animals with no pasture, cage, or chain — DFHack's zone tool calls this "unassigned" (roaming loose); reported as a count only since it is commonly large and often intentional (e.g. free-roaming cats). Every unit fact here is gated through the fog-of-war visibility check — an undiscovered cavern's wildlife never leaks in. The tame-animal enumeration (tame_total/pets/livestock/by_group/grazers/egg_layers/marked_for_slaughter/trained/unassigned_count) is ADDITIONALLY restricted to this fort's own civ, so a caravan's or diplomat's pack animal is excluded; cages[].occupants[] intentionally skips that restriction — a cage's contents (which may include a captured wild or hostile creature) are a structural fact independent of ownership, still fog-of-war gated. The tame-animal enumeration also requires isActive/not isDead (a dead animal's unit record never counts). Returns {"error":"no fort loaded"} if no fort is active.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||