Руководство по размещению складов

Материал из Dwarf Fortress Wiki
Версия от 13:24, 31 июля 2014; Xenofeel (обсуждение | вклад) (перевел раздел == Как избежать проблем отмены заданий по переноске ==)
Перейти к навигацииПерейти к поиску
Production flowchart for most workshops.
Not all items are represented!
(Click to enlarge)
Данная статья помечена как не оконченная.
Вы можете прочитать эту статью на английском или помочь проекту её переводом.

Склады могут быть созданы практически в любом месте, быть любого размера, и могут иметь множество различных настроек. Выбор места, размера и настроек может представлять из себя целое искусство. Эффективность дизайна складов - один из самых критических аспектов эффективности всей крепости. Проектирование складов и потоков работы, вероятно, третья по необходимости вещь в вашей крепости, после еды и построения обороны. Крепость с плохим расположением складов убьет FPS намного быстрее, чем та, в которой склады спроектированы с умом..

Как избежать проблем отмены заданий по переноске

Одна из главных проблем, с которой сталкивается крепость с неэффективным расположением складов, это бесконечный спам сообщений об отмене работ из-за переноса вещей. Пока предмет переносится, или внутри контейнера, который помечен заданием по переноске, он не может быть использован. Если задание по переноске занимает месяц, то все предметы, относящиеся к этому заданию, будут недоступны в течение целого месяца.

Способом решения этой проблемы является минимизация времени переноски контейнера, заполненного предметами, либо избегая использования контейнеров, либо минимизация пути переноски.

Классический пример это проблемы - склад семян. Вашим фермерам нужны семена для посадки на фермах. Семена хранятся на складах еды в мешках; мешки, в свою очередь, могут храниться в бочках или горшках, если вы разрешите это, и если есть достаточное количество бочек или горшков. Если просто создать склад еды рядом с фермой и запретить складирование на нем всего, кроме семян, настройки по умолчанию позволят использовать бочки для хранения мешков с семенами. Это приведет к отмене заданий. Рассмотрим причину.

В "спящем складе" (когда долгое время не производится новых семян) у нас, скорее всего, будет 1-2 полных бочки с мешками семян и одна пустая бочка (все использующие бочки и ящики склады стараются сохранять один контейнер на потом). Бочки могут хранить огромное количество мешков семян, поэтому будет очень маленькое количество полностью заполненных бочек.

Теперь предположим, какой-нибудь дварф съедает толстошлемник и, таким образом, появляются его семена (споры). В конечном итоге, склад поймет, что сгенерировались семена и создаст работу по переноске семени. Если на складе уже есть мешок с семенами толстошлемника, тогда работой будет "Положить предмет в мешок" en. Какой-нибудь дварф будет назначен на взятие мешка семян толстошлемника со склада, принесет мешок в столовую, где лежат семена, и положит семя в мешок. Однако, как только эта работа будет создана, мешок будет помечен как часть задания по переноске. Все семена в нем станут недоступны для использования - дварф даже не сможет поднять его!

Дальше еще хуже. Как только мешок принесен в столовую и в него положили семя (или несколько), склад создает новую работу по переноске этого мешка назад. Так как на складе уже есть неполная бочка, работой будет "Положить предмет в бочку en (потому как мешки могут храниться в бочках). Какой-нибудь дварф будет назначен на взятие бочки со склада, притащит ее в столовую, где находится мешок, и положит мешок в бочку. Как только будет создана эта работа целая бочка с мешками семян (которая может содержать все семена в крепости) помечается как переносимая и становится недоступной для других целей, включая посадку семян. Фермер не может использовать любое из этих семян до тех пор, пока бочка не будет обратно притащена на склад. И если будут появляться новые семена пока это происходит - цикл будет бесконечными.

Есть несколько способов постройки складов, используя которые можно смягчить проблему. Самый просто способ - запретить бочки на складе семян. Семена по-прежнему будут сохраняться в мешках (нельзя остановить это, если есть пустые не запрещенные мешки). Иногда все же будут появляться сообщения об отмене работ по посадке семян, когда мешок будет забран со склада для переноски новых семян, но это намного лучше, чем ситуация при использовании бочек.

Multiple stockpile designs

Double stockpile

Another design that works well for seeds uses two stockpiles. The first stockpile is set to "take from anywhere", and disallows barrels. This stockpile is typically quite small, because it only holds items temporarily. The second stockpile is set to "take from links only", and is linked to take from the first stockpile (and the two stockpiles are extremely close together). This second stockpile may permit barrels. This design gives you the increased storage capacity of the stockpile with containers (for long term storage), while minimizing the amount of the time the barrels spend out of their stockpile. Rather than being dragged all the way from the seed stockpile to the dining room (or still, or farmer's workshop, etc.) the barrel only has to move a few tiles to the neighboring stockpile.

Neither of these designs will completely eliminate job cancellations, but they reduce the spam (and the time a planter spends waiting for seeds) immensely.

The double-stockpile design is also particularly good for heavy items, like armor. An armor stockpile that accepts items from anywhere and permits bins will cause dwarves to drag bins full of metal armor all the way down to the forges and back. If you're using magma forges a hundred levels down, along corridors that have to twist around caverns, such a trip can take literally weeks. The armor in that bin is unavailable for that entire time. But if you make a small "feeder" stockpile with no bins that takes from anywhere, dwarves will simply carry pieces of armor one at a time from the forge to the feeder stockpile. A larger long-term storage stockpile has bins, takes from links only, and takes from the nearby feeder stockpile. The heavy bins will only have to be moved a few tiles, and the armor in them is unavailable for a much shorter time.

Single source distribution

This design works well for inputs that come from a single location (e.g. plants from farm plots), and are used in many other locations. Rather than simply putting a plant stockpile by each workshop that uses plants (which would mean a great deal of hauling barrels from those workshops to the farm plots to pick up new plants), place one "source" plant stockpile by the farms which disallows barrels, and takes from anywhere. All the farm crops will go there first (directly, because no barrels are involved).

Now, place a plant stockpile by each workshop that uses plants (still, farmer's workshop, etc.), set it to take from links only, and link it to take from the "source" stockpile. Ideally, each of these workshop-feeding stockpiles will take only an appropriately chosen subset of the plants (the still takes only brewable plants, while the farmer's workshop for the textile industry only takes plants that can be processed into thread, and so on). You may choose whether to allow barrels on a case by case basis, depending on how many of each plant you expect to have at once, how time-critical their processing is, etc.

If you are so inclined, you can use a quantum stockpile as the "source". This allows an infinite amount of storage in a tiny space. In the specific case of plants, this means your harvest always has somewhere to go, and will never wilt on the ground (unless your haulers are all busy elsewhere).

Workshop layout for efficient hauling

It is virtually impossible to discuss stockpile design without simultaneously addressing workshop (or workflow) design. They are two sides of the same coin.

Most workshops take some items as input and produce other items as output. Consider an entire chain of workshops and products from raw materials to finished products. The closer each workshop's inputs are, the faster your dwarves can process them. When the outputs are in turn used as inputs in another workshop, it makes sense to keep those two workshops close together, to minimize the amount of distance each intermediate product has to move. In many cases, you may not even need a stockpile for the intermediate products; just let them sit in the first workshop until the second workshop is ready for them. (This depends on the workshop and the products.)

It's also worth mentioning that heavily congested corridors are extremely inefficient. Your most heavily traveled tunnels should be at least two tiles wide, and three tiles is better. When dwarves have to squeeze past each other, one of them has to stop moving to let the other go by. Worse, dwarves who are about to collide will run a path-finding algorithm (which takes computer time), and if an alternative route is available, they'll go out of their way - possibly a long way out of their way - rather than simply stop and let the other dwarf squeeze by. Try to avoid this.

Stockpile placement

One strategy is to place the feeder stockpile immediately around the workshop. This works well for single workshops with just one input (like a mason's or mechanic's workshop).

 SSSSS   S feeder stockpile
 SWWWS   W workshop
 SWWWS
 SWWWS
 SSSSS

Another strategy is to put the workshop's stockpile above or below it. This keeps the stockpiles close to the workshops, and lets the workshops expand, even adding workshops on additional Z-levels as necessary. It works particularly well with multiple similar workshops working off the same stockpile.

          adjacent z-level
 WWW WWW      SSSSSSS
 WWW<WWW      SSS>SSS
 WWW WWW      SSSSSSS

Specific industry designs

Farm-centric

Farms feed a wide array of workshops. Plants from farms may directly feed the kitchen, still, millstone (or quern) and farmer's workshop. The mill and farmer's workshop feed the loom and dyer which feed the clothier. Farms are in turn supplied seeds from the still, mill, farmer's workshop and dining rooms, completing the cycle of plant life.

As such, it's a good idea to design all (or at least, many) of these workshops and their stockpiles around each other. Above-ground farms can only be built in certain places, and underground farms are much easier to build in soil layers, so in many cases this dictates the location and layout.

Butcher & Tanning

Because tanners are supplied directly from a butcher it's best to put them right next to each other. Designate a refuse stockpile taking Corpses for the butcher. Let the hides sit in the butcher's shop, and the tanner will take them directly to the tanner's shop with no hauling jobs required.

Consider placing a refuse stockpile somewhere behind an airlock (to keep out the miasma), to take the cartilage and other useless by-products.

  • Note: When near a necromancer tower, butcher shops and refuse piles where corpses are collected should be kept within the fortress out of line of sight of any necromancer. When in an evil biome which causes the dead to reanimate, corpses should be disposed of promptly, preferably in magma.

Kitchen

A food stockpile accepting meat/fish, raw edible plants*†, cheese, leaves, cookable milled plants (everything but the dyes), fat†, cookable extracts (Dwarven syrup and all the milks†). If you cook booze, include that. If you want to reserve some edible plants for brewing, leave them out. Allow the maximum barrels. Remember to turn off prepared food.

(* plump helmet, muck root, bloated tuber, prickle berry, wild strawberry, rat weed, fisher berry and sun berry)
(† These items generally have better uses than cooking: milk for cheese, fat for tallow which is used in soap and plants for brewing as cooking will not return seeds. See kitchen for more information.)

Brewing

A food stockpile accepting brewable plants. Some of these have other uses, like pig tail for making thread, so you might want to disallow them if you plan on using them for something else. Remember to turn off prepared food.

Also include a barrel stockpile near your still to ensure a steady supply of empty barrels.

Use of wheelbarrows

Wheelbarrows are tremendously useful tools, when properly applied. They allow a dwarf to move a single item at the dwarf's normal walking speed, regardless of the item's weight. But they have trade-offs, so they should not be used in every stockpile.

The first trade-off is that you may only use 3 wheelbarrows per stockpile. This limits the number of active hauling jobs a single stockpile can generate to 3 (or however many wheelbarrows you assign). This can be worked around by creating multiple small stockpiles with 3 wheelbarrows each, rather than a single large stockpile.

The second trade-off is that the dwarf has to walk to the stockpile first to fetch the wheelbarrow, then take the wheelbarrow to the item, and finally back to the stockpile. So, each hauling job may involve a much greater travel distance, and even though all the walking done at full speed, the total time spent may actually increase if you aren't careful.

Wheelbarrows are used by default in stone stockpiles, and for good reason -- stones are heavy! Dwarves, especially weak ones, will move extremely slowly when hauling a stone without a wheelbarrow or minecart. It is strongly recommend that if you have any workshops which process stones, you use a feeder stockpile near them (linked to give to the workshop, so the mason doesn't carry a stone all the way from her bedroom!), and use wheelbarrows in that stockpile. This way, the stone is only ever carried by hand for a few tiles, from the stockpile to the workshop, by the mason/mechanic/craftsdwarf doing the work.

Furniture stockpiles are another good use of wheelbarrows, as many pieces of furniture are extremely heavy (a granite statue weighs 156Γ, and a gold statue weighs 1159Γ, despite being made out of 3 gold bars that weigh 115Γ apiece -- dwarves aren't great at math).

By contrast, wheelbarrows are not a great choice for a wood stockpile. Most logs of wood weigh about 30Γ, which will not slow a dwarf of average strength. Forcing the use of wheelbarrows would just increase the time spent per log, as well as reducing the number of simultaneous log hauling jobs. (Weak or very weak dwarves will be slowed when hauling typical logs; you may wish to disable wood hauling on these dwarves. Ironically, very weak dwarves make great stone haulers, because they can push a wheelbarrow perfectly well.)

See Also