Stockpiles
stockpilesRetrieve the fort's hauling/logistics picture: per-stockpile details (bounds, size, categories, links), unstored item backlog, and rotten items outside stockpiles.
Instructions
The fort's hauling/logistics picture: every stockpile as a fact sheet, plus fort-wide backlog signals stockpiles alone don't surface. piles[] is one row per stockpile building: id, exact bounds (x1/y1/x2/y2/z — the bounding box; an irregularly-shaped pile's real footprint can be smaller, see size), size (the pile's real tile count — for an irregular pile this reads its room.extents occupancy map rather than the bounding box, so holes/excluded tiles are correctly excluded), categories[] (which of the 17 top-level stockpile groups this pile accepts — animals/food/furniture/corpses/refuse/stone/ammo/coins/bars_blocks/gems/finished_goods/leather/cloth/wood/weapons/armor/sheet; note Ore has no flag of its own in DF's own stockpile_group_set — it rides under stone — and Misc (organic/inorganic) is a refuse sub-filter, not a top-level category, so neither appears in this list), barrels_allowed/bins_allowed (the pile's max_barrels/max_bins > 0 — DF stores 0 there specifically to mean "no containers of this kind," not "unlimited"), max_wheelbarrows (raw count; 0 here means no wheelbarrow is assigned so DF queues one haul job per item, NOT "wheelbarrows disallowed" — this one has no allowed/disallowed reading, unlike barrels/bins), links_only (DF's own "take from links only" toggle), give_to[]/take_from[] (ids of stockpiles this pile explicitly feeds into / pulls from via the g/q-t hauling-route UI, each capped at 50 with its own _truncated flag), item_count (exact count of non-rotten/non-dump/non-forbidden/non-construction/non-trader items physically sitting on the pile's tiles right now — via each item's resolved position, so items inside a bin or barrel parked on the pile count too — regardless of whether the pile's own categories[] actually accept that item, since this is a positional fact, not a settings-compliance check), and occupied_tiles (how many of the pile's size tiles have at least one qualifying item on them right now — a directly-counted fact, bounded [0, size], NOT a percentage or a capacity estimate: an earlier draft derived a fullness_pct from a placeholder items-per-tile constant that produced numbers with no real relationship to DF's actual per-tile capacity (which varies by item size and container packing — a barrel-heavy tile can hold far more than one item) and was dropped as a fabricated fact; occupied_tiles/size is a defensible coverage ratio if you want one, but it is spatial coverage, not capacity headroom). Fort-wide: unstored_backlog[] groups loose items (on the ground, not rotten/dump/forbidden/under-construction/trader-owned, and not sitting on ANY stockpile's tiles) by their raw DF item type token, with unstored_backlog_item_count as the grand total and a 150-distinct-type cap; this is the hauling backlog the issue asks for. rotting_outside_stockpiles is the same idea for the ROTTEN subset specifically (food/organic matter that has already decayed while lying outside any stockpile, i.e. hauling arrived too late) — {count, by_type[], by_type_truncated}. dump_flagged_count is an exact, unfiltered count of every item currently designated for dumping, wherever it sits. Returns {"error":"no fort loaded"} if no fort is active.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||