The barrels I produce are used to store food and seeds and other stuff and there are never enough barrels for alcohol. Right now I have something like 2000 food and 0 alcohol. How do I balance the usage of barrels or forbid them to use it for anything but alcohol?
It's not (as far as I'm aware) possible to absolutely allocate a set percentage of empty barrels to booze production. However, there are a few tricks you can try that will help:
Segregate your food stockpiles. A big stockpile that holds only food types that can be used for meal preparation (meat, fish, tallow, syrup, sugar, flour, quarry bush leaves, etc) nice and close to the kitchen area, then smaller stockpiles that only accept either prepared food or drinks next to each dining room -- and the stockpile that holds prepared food has an upper limit of zero barrels.
As of right now it's not possible to have one stockpile feed multiple smaller piles, so your best bet is a logistics chain -- if prepared food stockpile A is the one by the dining room that's closest to the kitchens, prepared food stockpile B (which is further away) takes from stockpile A, and stockpile C (which is even further away) takes from B, and so on.EDIT: As it's now (version 0.34.11) possible to have one stockpile give to multiple others, as well as the ability to take directly from workshops, a good tactic is to dig out and designate a large prepared-food-and-booze-only stockpile very close to the kitchen area that takes directly from the kitchens and stills and gives to all the stockpiles near dining areas.
At the same time, arrange for a stockpile for empty barrels (furniture subcategory, if memory serves) near the area where your stills are located, so that your brewers will only have to walk a minimum distance to get their next barrel.
As of the 0.31.21-5 series, you can craft rock pots in a craftsdwarf's workshop; these function exactly the same as barrels and can hold booze as well. Since rock is almost always ubiquitous, queuing the occasional batch of thirty Craft Rock Pot jobs via the manager interface will go a long, long way...
... For clarification, you can change the kinds of stuff a given stockpile is allowed to hold by hitting
q, then moving the cursor over the stockpile, and hitting
s to adjust its settings. You can alter the number of barrels and bins it is allowed to use from the same menu -- hit the capital
E and capital
C once each to set the number of allowed barrels and bins to zero -- and use the
t key to start hunting for the stockpile it should be allowed to take stuff from.
In the stock
pile menu, you can set a number of Reserved Bins and Reserved Barrels using
+-*/. Reserving bins isn't that useful, but Reserved Barrels is exactly the feature you're looking for here. This will prevent stockpiles from claiming the last few barrels, so you always have a few to spare for booze production. Crank this up to 10 or 15, and you won't usually run out of barrels for booze.
Running out of barrels during overproduction of booze is something I also had to deal with. The simple answer is to just stop making so much booze, but I suspect that in your case (as in mine), you are producing booze in order to convert your plants back into seeds as part of scaling up your seed numbers for farming.
Since I didn't want to churn out hundreds of large pots to brute force more booze storage, I solved this problem by using up booze in cooking. If you can get your cook to use booze rather than solid food when cooking meals, he will turn full booze barrels into empty ones that can then be reused again by your brewer, and as a bonus you get lots of lavish meals for trading with caravans.
Since DF tends to make your cook prefer solid to liquid foods when cooking, to actually have your cook use up any booze you need to do some micromanaging. Forbid all uncooked food in your fort, and then unforbid one stack of uncooked food just before your cook needs more food for his next lavish meal. He will grab the unforbidden stack and then grab barrels of booze for the remaining cooking items.
My old answer still stands for versions of Dwarf Fortress older than 0.44, so I'll leave it.
In the newer version it's possible to set conditions on orders via the manager.
Create a job making ten barrels as usual (
j-m-q, 'make wooden barrel', 10), then select the job and hit
c to access the conditions.
In the conditions window you can set various preconditions, as well as how often the conditions need to be checked to see if the job should be started (and whether it needs to be automatically restarted upon completion).
I recommend going with
p right away, to set preconditions for Reagents (IE, sufficient wood logs) and Products (wood barrels). You'll want to adjust the numbers - IE, don't start at all if you don't have at least 40 or so logs remaining so you'll have a reserve, and don't start the job if you already have a reserve of thirty barrels.
Then select the 'Number of wooden barrels available' condition and hit
t for the Traits subwindow. Look for 'empty', select it and go back.
Once the manager validates this work order, they will check whether all preconditions are met as per the stated schedule (daily, monthly, yearly) and activate it when they all are. At that point they will add a 'make a wooden barrel' job to every eligible carpenter's shop, and re-add them after completion until the number (IE, ten) has been reached, at which point the job is finished, automatically respawned, and the loop returns to the 'check preconditions' part.
This way, as long as you have sufficient wood, the manager will automatically make sure you have a buffer of wooden barrels available.
This only scratches the surface of the possibilities, as usual the wiki has in-depth documentation.