Alveary

Template:Infobox/Block

The **Alveary** is an advanced variant of the Apiary. The Alveary allows for combs to be produced faster due to its natural speed increase to production (as well as the ability to add up to six frames via the Extra Bees Frame Housings) and due to its ability to be modified by other blocks. It is possible to adjust the internal temperature of the Alveary using the Alveary Heater or Alveary Fan in order to accommodate Bees that require hotter or colder climates. It is also possible to use Mutators to increase chances of mutation, Alveary Lighting and Alveary Rain Shield to allow bees without the Nocturnal and Tolerant Flyer traits to work during the night and rain, respectively, and the Swarmer to use excess Royal Jelly to create princesses that last for a limited number of generations.

It takes frames worth 354 logs and 354 string per 24 hours to keep an Alveary working at maximum speed. Doing so makes it about 100 times more productive than a basic Apiary.

## Construction

Although building a single Alveary block is not very expensive, making an Alveary is not this simple. Unlike the Apiary, which only requires the one Apiary block, the Alveary requires 27 Alveary blocks placed in a 3x3x3 cube as well as 9 Wooden Plank Slabs (of any variety of vanilla or Arboriculture-origin wood; wood from ExtrabiomesXL yet untested) on the top of the Alveary. Any slabs, even stone ones, can be used since an Alveary only really checks for 1/2 blocks. The cross of the top layer of Alveary blocks must be regular Alveary blocks, but the bottom two rows and corners of the top layer can be replaced with other varieties of Alveary block to influence the Alveary's operation as described above.

## Piping Information

RedPower Tubes:
Because of RedPower's tube system, you have to be careful how you hook up your alveary:

* The top face does not connect to tubes
* The bottom face is used for pulling products out of the grid
* The NORTH and SOUTH sides are used for DRONE input
* The EAST and WEST sides are used for QUEEN input.

BuildCraft Pipes:

* The top face does not connect to pipes
* Other faces do not appear to matter

## Maximizing Production in Alvearies

Several factors determine the speed at which a Queen will produce items in an Alveary. Together, these factors determine exactly how quickly certain combs or specialty items will be produced, and describe how you can best maximize the production of your bees. Each factor is described in detail below, with examples to help clarify the murkier points.

Before describing these factors, however, a brief description of how time works in Alvearies (and Apiaries, for that matter) is necessary:

**Alveary Ticks**

All activity in an Alveary, including the production of items, occurs on Alveary ticks. One Alveary tick happens every 550 Minecraft ticks, or once every 27.5 seconds. On each Alveary tick, the Queen's life is reduced, Frame durability is impaired, conditions for continued operation are checked (e.g. the presence of appropriate "Flowers"), and, most importantly, there is a chance that items will be produced.

There are three factors that determine the production speed of items in an Alveary. One factor is determined by the item being produced; one factor is derived from the Queen; and one factor depends on the Alveary.

### Base Production Chance of the Item

The first of these factors is the "Base Production Chance" of the item being produced. This is an inherent quality of the item itself, having nothing to do with the Queen's traits or the state of the Alveary, though it is influenced by the Genome's default values for production speed. Simply put, valuable items have a lower base production chance than their more common counterparts.

You can derive the base production chance of any item by working backwards from the information provided in the Apiarist Database, using this formula:

**Base Production Chance = (Alveary Tick Length, in Seconds) / (Speed Trait Multiplier \* Item Production Time, in Seconds)**
* The "Alveary Tick Length" is always 27.5 seconds.

* The "Speed Trait Multiplier" depends on the default speed of the genome, easily located in the Apiarist's Database. This is NOT based on the speed of the individual princess you have happened to breed; the speed of the princess is factored in later:

* Slowest: 0.3
* Slower: 0.6
* Slow: 0.8
* Normal: 1.0
* Fast: 1.2
* Faster: 1.4
* Fastest: 1.7

* The "Item Production Time" is shown on the production tab in the Apiarist's Database. (Convert it to seconds before plugging it into the formula.)

#### Example

Let's determine the base production chance of a Titanium Comb, produced by Impregnable Bees. First, we find the three values we need for the equation (the first is always the same; the second and third are taken from the Apiarist Database entry for Impregnable Bees):

* Alveary Tick Length = 27.5 seconds
* Speed Trait Multiplier = 0.3 (The Impregnable Genome has the "Slowest" Speed trait by default in the Apiarist Database, so we use that as the value for the multiplier)
* Item Production Time = 1.3 hours = 4,680 seconds.

Then, it's just a matter of plugging these into the formula, and converting it to a percentage:

Base Production Chance = (27.5) / (0.3 \* 4,680) = 0.02 (or 2%)

**An important note on Base Production Chance:** It is always rounded to the nearest integer. This means the lowest possible Base Production Chance is 1%, which has important rammifications as you will soon see.

### Speed of the Queen

The second factor is the active Speed trait of the working Queen. Simply find the appropriate multiplier in the table above, then multiply it by the Base Production Chance of the item.

#### Example

Continuing our earlier example: While Impregnable Bees have a *natural* Speed trait of "Slowest", let's say we've bred ours with a little more pluck. Our Impregnable Queen has the "Fastest" Speed trait. A quick look at the table above gives us a happy multiplier of 1.7. When we multiply this number by the Base Production Chance we calculated for Titanium Combs (2%), we get a modified production chance of 3.4% (1.7 \* 2%).

### Frame Housings in the Alveary

Frame Housings replace standard Alveary blocks, and allow you to add Frames to your Alveary---up to 22 of them, in fact (all 18 blocks in the two bottom layers of the Alveary, plus the 4 corner blocks of the top layer). Each Frame you add doubles the production speed of the Queen, and the effects not only stack, they *multiply*.

As good as this sounds, you should never add that many Frame Housings to an Alveary (at least not in an Alveary meant for item production). There are two reasons why: First, **no item can have a production chance greater than 100%**. Second, **the lowest possible base production chance for any item is 1%**. Accordingly, once you've added enough frames to increase a 1% base production speed to 100%, you've maximized production for every possible item... and any additional frames are simply wasted.

#### After MC 1.5

They produce a Honey Comb every 0.9 Minutes, that's 54 seconds. Let's also take a note of what Speed Trait it has, it has the Fast Speed trait (1.2 multiplier), we'll need that later on in our variable.
So now knowing all this we can put all of it into our variable and figure out what the chances are of our bee producing a Honey Comb every 27.5 Seconds

(27.5) / (1.2 \* 54) = 42%
Without any frames there's a 0.42 chance that we produce a comb. Now to the frames:
An Alveary has a production limit of 16x. If you surpass that limit you endanger your queen and risk losing a princess. To reach this safe limit you can, for example, use four frames that double your production (such as Proven, Impregnated and Untreated Frames).
The Alveary has a base production of 100%, we double it from there with each frame we add-
* 100% - Frames ( 0 )
* 100% x 2 = 200% - Frames ( 1 )
* 200% x 2 = 400% - Frames ( 2 )
* 400% x 2 = 800% - Frames ( 3 )
* 800% x 2 = 1600% - Frames ( 4 )

However, if we had something like Chocolate Frames who only increase your production by 50% we would only be able to reach ~1140% production increase using 6 Frame Housings without passing the 1600% limit.
Note that the maximum amount of Combs produced every Bee Tick ( 27.5s ) is 2 for the Regular Combs and 1 for the Special Comb.
So now we can multiply 42% (0.42) chance by 1600% (16), resulting in a 672% (6.72). That means in theory we should be producing 6 Honey Combs every 27.5 Seconds along with a 72% (0.72) chance of producing 7. However, you're only able to produce 2 of Regular Combs every 27.5s because of the 100% limit. So in this case we only would have needed 3 Frames to maximize our production. You might think we would only have needed 2 since with 1 Frame we would have had 0.84 and then with the second a 1.68 total, thus surpassing the 100% production limit but since we're producing normal combs we also have a chance to produce a second comb. To find out how likely you're to produce a second comb you simply cut your current number in half, We have a 1.68 or 100% chance of producing the first comb and then a 0.84 to produce the second.

#### Before MC 1.5

So, how many frames will it take to maximize production and guarantee us an Unobtanium Comb every 27.5 seconds? Here's how the production chance changes as we add more frames (confirmed, at least roughly, through personal testing):
* 0 Frames: 1.2% (no frames, no change)
* 1 Frame: 2.4%
* 2 Frames: 4.8%
* 3 Frames: 9.6%
* 4 Frames: 19.2%
* 5 Frames: 38.4%
* 6 Frames: 76.8%
* 7 Frames: 100%
* 8 Frames: 100%
* 9 Frames: 100%
* ... and so on.

You see the problem with those dozen-plus-frame Alvearies. Even a fairly slow Queen, making the slowest possible item a bee can make, reaches maximum productivity with only seven frames. In a 22-Frame "UberAlveary", over two-thirds of the frames are a superfluous waste of resources.
Note that this is only with the three standard Forestry frames (the Untreated, Impregnated and Proven Frame) as other frames (such as the Chocolate Frame, the Oblivion Frame or the Soul Frame) either do not double the productivity of a queen as described here, instead increasing it by some other value, or instead *decrease* the productivity of the queen in favor of some other positive characteristic (in the case of Soul Frames, an increased chance of mutation.)
**In conclusion:** If your Queen has "Fastest" Speed, **six** frames is your number. Otherwise, go with **seven**. And note that this is enough to maximize production on even the most difficult items to produce---an Alveary dedicated to producing Honey, Royal Jelly or other more common items will require even fewer frames to maximize production. But if you have the slowest production and a 1% Base Production Rate in a queen, you need 9 frames.

## Alveary Frame Automation

Unlike Apiaries, inserting Frames into Frame Housings can be automated. Routers with the Machine Filter Upgrade are especially useful in this regard, as they can service multiple Alvearies very quickly and without the lag issues occasionally caused by pipe/tube systems. Router use is explained in some detail on its wiki page, but briefly: Ensure all Frame Housings are connected to the Router network by a chain of inventories (you can bridge the gaps between separate Alvearies by using a line of unrelated inventories, much as you'd use a cable---a path of Barrels in the floor leading from the Frame Housings of one Alveary to the Frame Housings of another works well).

Another alternative is through the use of transfer nodes. An ideal set-up involves a Transfer Node (Items) which pulls frames out of a chest. Connecting Transfer Pipe to each of the frame housings in your alvearies and to the node creates a network for the node to place frames into. Applying speed and depth upgrades will ensure that the transfer node quickly and efficiently places frames in all of your housings.

## See Also

* Alveary Fan
* Alveary Heater
* Alveary Hygroregulator
* Alveary Lighting
* Alveary Rain Shield
* Frame Housing
* Mutator
* Swarmer