Production and factories
How houses order, build, pay for and release objects, and which rules limit what they can build.
Players and computer houses produce objects in two different ways.
A player’s house has four production slots: one each for infantry, vehicles, aircraft and structures. Each slot builds one object at a time, with a queue behind it, however many factories the house owns. Six war factories do not build six vehicles at once. They only change how long the one vehicle in the slot takes, as More than one factory explains.
A computer house has no production slots. Each of its factory structures builds an object of its own, so six war factories build six vehicles at a time. Every idle factory takes the type its house currently wants for that category, so factories that start together build the same type. The house chooses again each time an object of that category leaves a factory.
In both cases an object takes 54 production steps, and part of its price is charged as the steps advance. The finished object then waits out of play until a factory lets it out.
What counts as a factory
Section titled “What counts as a factory”A BuildingType is a factory when its Factory= names the kind of object it produces.
[MYWEAP] ; example war factory BuildingTypeFactory=UnitTypeWeaponsFactory=yesOwner=GDI,NodWhen a player orders an object, the house looks for a structure that passes all of these tests, in this order:
- it is on the map;
- it is owned by this house;
- its
Factory=names the kind of object being ordered; - it is switched on;
- it is neither being sold nor queued to be sold;
- the product has not reached its build limit;
- the factory type’s
Owner=shares at least one country with the product’sOwner=; - Any of:
- the factory’s type is not listed in
BuildConst; MultiMCV=yesis set;- the structure acts for a country that is one of the product’s owners.
- the factory’s type is not listed in
A structure keeps the country it acts for when it changes hands, so the last test lets a captured construction yard keep building its original owner’s structures.
The search takes the first primary factory it finds that passes. Without one, it takes the last passing structure. For an aircraft, a pad already in radio contact with an aircraft, such as one parked on it, is used only when no free pad passes.
A computer house does not search. Each of its factories builds whatever the house has chosen next for its category.
The primary factory
Section titled “The primary factory”A player’s finished objects leave from the primary factory of their kind whenever it passes the factory search.
Toggling the flag on a structure clears it from every other structure of the house on the map whose Factory= names the same kind, then sets it on the chosen one. Toggling the current primary clears its flag and leaves the house with no primary. EVA announces a newly set primary to a player-controlled house.
A structure loses the flag when it is captured. An IsMobileWar=yes structure toggles the flag on itself when it opens.
The cursor that offers the toggle appears only over a structure that passes all of these, in this order:
- it is not stunned by an EM pulse;
- its
Factory=names a kind of object; - it belongs to the local player;
- its house owns more than one factory of that kind;
- for an infantry factory, another structure of the house has
Factory=InfantryType.
The last test checks only the long name. A second barracks written Factory=Infantry counts toward the test above it but not toward this one, so the cursor is not offered.
What a house may build
Section titled “What a house may build”Four gates decide whether a house may build an object type. They are checked in this order, and a type must pass all four.
With RecheckPrerequisites=yes, the sidebar sweep applies all four gates again and cancels production of any type that fails.
Tech level
Section titled “Tech level”TechLevel=-1 makes a type unbuildable. Otherwise the type’s level must not exceed the house’s tech level. A house’s level comes from its section in the map and defaults to the scenario number. Outside campaigns, every house the session sets up gets the session’s chosen level instead, which starts from [MultiplayerDefaults] TechLevel.
Prerequisites
Section titled “Prerequisites”Every entry in the type’s Prerequisite= list must be satisfied. An entry naming a BuildingType requires the house to own at least one live structure of exactly that type. A structure counts from the moment it is placed, so the prerequisite unlocks during its buildup animation. It still counts while switched off.
Seven group names are satisfied by owning any structure on the matching rules list:
Prerequisite= entry | List read |
|---|---|
POWER | PrerequisitePower |
FACTORY | PrerequisiteFactory |
BARRACKS | PrerequisiteBarracks |
RADAR | PrerequisiteRadar |
TECH | PrerequisiteTech |
GDIFACTORY | PrerequisiteGDIFactory |
NODFACTORY | PrerequisiteNodFactory |
Ownership
Section titled “Ownership”This gate applies only to structures. A BuildingType passes when both of these hold:
- its
Owner=list is not empty; - the house owns a construction yard that is on the map, switched on, not being sold, and acting for one of the countries in that list.
MultiMCV=yes removes the construction-yard requirement, both here and in the factory search. DoubleOwned=yes opens the type to every country, but only outside campaign games.
Vehicles, infantry and aircraft skip this gate. The factory search enforces their ownership instead, by requiring the factory’s Owner= to share a country with the product’s.
Build-limit gate
Section titled “Build-limit gate”The last gate is the build limit. It is the only gate the factory search applies again when an order is placed.
Computer houses
Section titled “Computer houses”A computer house faces only the tech-level gate. Every type that passes it counts as buildable, and base planning decides what the house actually produces.
Build limits
Section titled “Build limits”The sign of BuildLimit= chooses what the limit counts.
BuildLimit= | Counted | Effect |
|---|---|---|
| Above zero | Objects of the type the house owns now, including one still in production | Losing one frees room for another |
| Zero | Nothing | The type can never be built |
| Below zero | Objects of the type the house has ever produced | Losing one frees nothing |
A positive limit counts more than the objects of the type itself:
- A UnitType with a
DeploysInto=structure also counts the house’s structures of that type, so construction yards use up an MCV’s limit. - An InfantryType with
VehicleThief=yesalso counts the house’s vehicles that infantry of its type has entered.
A positive limit counts an object from the moment its production starts. A type the house is already building still counts as buildable, so the build is not canceled when its unfinished object brings the count to the limit.
On the sidebar, a type that has reached a positive limit is drawn darkened. A type whose zero or negative limit is used up loses its cameo.
A player’s orders are checked against the limit in two places:
- The factory search rejects every structure while the product is at its limit, so a new order fails.
- An order that would join a queue is refused when the objects owned or produced, plus the object under construction and everything already queued, reach the limit. At a positive limit, the object under construction is already among the objects owned, so the check counts it only once. With
BuildLimit=2, nothing finished and one in production, one more order joins the queue and the next is refused. For a vehicle, this check does not count deployed structures. It has no case for structures, which are never queued.
How long it takes
Section titled “How long it takes”Build time is counted in game frames. It is computed in this order and truncated to a whole number after each step:
- Start from the object’s
Cost=, multiplied byBuildSpeedand by 0.9 frames per credit. A structure uses itsCost=as written, which includes the price of anyFreeUnitor pad aircraft that comes with it. (Repair costs use the price without them.) - Multiply by the house’s build-time multiplier. That multiplier is fixed when the house is given its difficulty, as the country’s
BuildTime=times the difficulty’sBuildTime=timesGameSpeedBias. Campaign games leave out the country’sBuildTime=. - Divide by the house’s power multiplier.
- Multiply by the multiple-factory adjustment.
- For a
Wall=yesBuildingType, multiply byWallBuildSpeedCoefficient.
Production steps
Section titled “Production steps”The result sets the pace of the build, not its exact length. Divided by 54 and truncated, it gives the number of frames between production steps, kept between 1 and 255. The object takes 54 of those steps.
With every multiplier at 1, a unit costing 1000 credits gives 900 frames. Dividing by 54 gives 16 frames per step after truncation, so the unit finishes in 864 frames. At 15 frames a second that is 57.6 seconds, not the full minute its price suggests.
The 1-to-255 range on the step sets the shortest build at 54 frames (3.6 seconds) and the longest at 13,770 frames (about 15.3 minutes). With every multiplier at 1, every object costing under 120 credits takes the minimum, and every object costing 15,300 credits or more takes the maximum.
More than one factory
Section titled “More than one factory”Extra factories of a category can shorten its build times, depending on MultipleFactory. The house counts its structures whose Factory= names the product’s category, including ones switched off or still in buildup. The build time is multiplied by MultipleFactory once for each factory past the first and truncated after each multiplication. MultipleFactoryCap limits how many factories count; at 0 every factory counts.
| Factories | Multiplier at MultipleFactory=0.8 | With MultipleFactoryCap=3 as well |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 0.8 | 0.8 |
| 3 | 0.64 | 0.64 |
| 4 | 0.512 | 0.64 |
A value of 1 changes nothing, and a value above 1 makes each extra factory lengthen build times. A value of 0 or below skips the adjustment, as the stock rules do.
A house short of power builds more slowly. Its build time is divided by a power multiplier taken from a fixed ladder and never below MinProductionSpeed. The production ladder lists the bands.
The multiplier is refreshed whenever the house’s power is recalculated: when a structure is placed, lost, damaged, or switched on or off, even if the power balance does not change. A running build picks up the new step interval at that recalculation. A build also takes a fresh interval when it resumes from hold or suspension. Either way it keeps the step it had reached, so low power slows it in place without restarting it.
Difficulty and campaign games
Section titled “Difficulty and campaign games”The country and difficulty multipliers are combined once, when the house is given its difficulty, not for each order. Campaign games leave out the country’s multipliers for both build time and price. The Cost= and BuildTime= in a country section such as [GDI] or [Nod] therefore affect only skirmish and multiplayer games.
A difficulty’s Cost= and BuildTime= are independent. Cost= changes what everything costs without changing build times, and BuildTime= changes build times without changing costs.
Paying for it
Section titled “Paying for it”The price is charged in installments as the steps advance. Each installment is the unpaid balance divided by the number of steps remaining, so rounding never gains or loses credits, and the balance is exactly zero when the object is finished.
A build stalls while the next installment is more than the house’s credits plus its stored Tiberium. That step is undone, nothing is charged, and the step is tried again after the next interval, so the build continues as soon as the money arrives. A house may start or resume a build it cannot yet afford. The build makes no progress until the money is there.
Putting a build on hold charges nothing and keeps the step it had reached.
Canceling a build refunds what has been paid so far: the price minus the unpaid balance. It also deletes the unfinished object and frees its production slot. The refund uses the price at the moment of canceling, so if a price multiplier changed during the build, the refund does not match what was paid.
The queue
Section titled “The queue”Only a player’s production slots have queues. A computer house’s factory holds one object with nothing behind it.
An order placed while its slot is busy joins that slot’s queue. The queue holds up to MaximumQueuedObjects entries, so at most one more than that number of objects of one category can be on order. An order is dropped if the queue is full or the type has reached its build limit, and a player-controlled house then hears ScoldSound.
A slot on hold also queues new orders. The exception is the type on hold: ordering it again resumes the held build instead of queuing a second one.
When the object in progress leaves the factory, is canceled, or becomes unbuildable, the first queued type starts as if it had just been ordered.
Structures never queue. The sidebar refuses a second structure order while another is outstanding, whether it is building, on hold, or finished and waiting to be placed. While a structure is on order, every other structure cameo on the sidebar is drawn darkened.
Leaving the factory
Section titled “Leaving the factory”After the last step the finished object waits in its slot. How it leaves depends on whether a player or a computer house built it.
A player’s finished vehicle, aircraft or infantryman is announced and immediately tries to leave through a factory. A finished structure is announced and waits; clicking its cameo enters placement mode.
While every factory of its kind is switched off, a finished vehicle, aircraft or infantryman keeps waiting. Clicking its cameo then only repeats the exit attempt, which fails the same way.
If no factory of the house could build the object any more, even a switched-off one, clicking its cameo cancels and refunds the order, and EVA reports that there is no factory.
An exit attempt either succeeds, is temporarily blocked, or fails permanently. Success releases the object and clears the slot. For a player’s vehicle, aircraft or infantryman, either kind of failure cancels and refunds the order, even a blockage the factory would soon have cleared. A structure is never canceled this way; it stays in the slot until it is placed.
A structure placed by hand appears on the chosen cell, plays the placement sound and clears the placement cursor. A firestorm wall, or a structure that lays a wall overlay, also fills the gap between itself and a nearby wall of the same house. If the chosen cell refuses the structure, it stays in the slot.
How a factory lets an object out depends on the factory:
- An aircraft appears on its pad. If the pad is already in radio contact with another aircraft, the new one appears at the edge of the playable area and flies in instead. During an ion storm, it appears on a nearby cell.
- A
WeaponsFactory=yesstructure opens its door and clears whatever stands on its exit cell. While it is still unloading the previous object, it passes the next one to another idle structure of the same type, which lets it out through its own exit. If no such structure is free, the attempt is temporarily blocked. - Every other factory moves the object out of its footprint to an exit cell beside it. If it finds no exit cell, the attempt fails permanently. A
GDIBarracks=yesorNODBarracks=yesstructure starts the object at itsExitCoordoffset when the exit cell is its door cell. - A factory lets out one vehicle or infantryman at a time. While it is still in radio contact with the last object to leave, the next attempt is temporarily blocked.
Hospital=yes,Armory=yesandWeaponsFactory=yesstructures are exempt. - A refinery or weeder cannot release what it produces. A vehicle briefly appears south-west of it and heads off to harvest, but the order is then canceled and refunded, which removes the vehicle again. Infantry fail the same way.
A jumpjet infantryman whose route to the rally point calls for flight skips the exit cell and flies straight to the rally point. It releases the factory’s radio contact at once, so the next object can leave. Other infantry, and jumpjets with a nearby rally point or none, walk to the exit cell as usual.
For a computer house, a vehicle or infantryman leaving through an exit cell (from any factory except a WeaponsFactory=yes one) moves to that cell first. The base position its house chooses for it is queued next and becomes the area it guards. If the house has no valid position, the object only clears the factory.
A computer house’s factories retry exits on their own and treat the outcomes differently:
- A temporary blockage waits
PlacementDelayminutes before the next attempt. - A permanent failure cancels and refunds the order.
A computer factory never keeps a build on hold. If its build is put on hold or suspended, the factory cancels and refunds it.
An idle computer factory starts the house’s next choice for its category once the house has more than 10 credits, counting stored Tiberium.
Buildup
Section titled “Buildup”A newly placed structure plays its construction animation before it opens. It tells the structure that built it when construction begins, which starts a ConstructionYard=yes structure’s PreProductionAnim. It tells the builder again when the animation ends, and then opens.
BuildupTime sets the animation’s length in minutes. It is divided evenly across the animation’s steps: half the number of frames in the buildup art, or GateStages plus one for a Gate=yes type. Like the build times above, the minutes are counted at 15 frames a second. A type with no buildup art opens at once.
A structure hands over what comes with it only when it opens. A FreeUnit vehicle or infantryman appears beside the structure, and a free aircraft appears on the structure itself. If a free object cannot be placed anywhere, the house gets its price back instead.
A structure present at scenario start hands over no FreeUnit.
A HoverPad=yes structure also receives the first PadAircraft entry, unless SeparateAircraft=yes is set or the structure’s FreeUnit is an aircraft. A captured structure hands over neither.
Rally points
Section titled “Rally points”A structure whose Factory= is UnitType, InfantryType or AircraftType can hold a rally point. Select it and click the ground to set one. Holding the force-move key instead gives the structure a move order, which packs up a structure that names an UndeploysInto type. AltToRally=yes swaps the two.
The rally point is not always the clicked cell. The engine records the nearest cell to it where infantry could stand, or where an aircraft could fly for an aircraft factory, searched within the structure’s movement zone. If there is no such cell, no rally point is set.
The cursor refuses some cells outright: any cell outside the playable area and, except for an aircraft factory, a cell in another movement zone or on ground that is not passable land.
What the departing object does with the rally point depends on the factory:
- An aircraft heads for it as soon as it appears, whether on its pad or at the edge of the playable area. During an ion storm the aircraft appears on a nearby cell and ignores the rally point.
- A
WeaponsFactory=yesstructure passes it to the vehicle, which heads for it once it has cleared the building. A harvester or weeder then starts harvesting from there. - A barracks,
Hospital=yesorArmory=yesstructure passes it to the infantryman, who walks to the exit cell first and heads for the rally point the next time he is idle. - Every other factory ignores it. A
Factory=UnitTypestructure withWeaponsFactory=noaccepts a rally point, but the vehicles it releases stop on the exit cell.
If a departing object belongs to a house a player controls and its type cannot be ordered into the shroud, the object ignores a rally point that is still shrouded for that player and leaves as if the factory had no rally point. That covers a type with MoveToShroud=no, the default for aircraft types, and a subterranean type while AllowShroudedSubteranneanMoves=no. The check is made as each object leaves, so the rally point works again once the player uncovers that ground.
A structure stores its rally point as its move destination, so a structure that undeploys passes the rally point to the vehicle it becomes.
When a factory is lost
Section titled “When a factory is lost”Destroying a computer house’s factory cancels and refunds whatever that factory was building. For a player, the build in the matching slot is canceled and refunded only if no remaining structure of the house could build it.
Capturing a factory cancels whatever it was building for a computer house before the transfer. The factory then moves from one house’s factory count to the other’s.
A house re-examines its production slot for a category when a factory of that category is placed, leaves the map, is captured, or is switched on or off. A capture makes both houses re-examine the slot. Only a player’s production slots are re-examined, and these rules apply in order:
- Queued types that nothing the house owns could build, even in theory, are dropped from the queue.
- An object in progress that nothing could build any more is canceled and refunded, and the queue advances.
- An object that could be built in theory but not now, because every factory that could build it is switched off, is suspended. It keeps its step and the credits already paid.
- An object that can be built again restarts, unless the player put it on hold.
A slot left with nothing in progress and nothing queued is then discarded.
A computer house’s factory production is not re-examined. It ends when the structure is destroyed or captured, or when the factory cancels a build that has stopped making progress.
When a computer house cannot make money, it sells its base for a replacement refinery or harvester and cancels every build it has running. Handing a house over to the computer cancels its builds as well.
Related settings
36 of 36
| Key | Description | Value | When omitted |
|---|---|---|---|
AltToRallyclient settings | Makes the force-move key set a factory's rally point and the plain click move the structure. | boolean | no |
ArmoryBuildingType | Admits one infantry at a time and promotes it when the servicing delay elapses. | boolean | no |
BuildLimitAircraftType, BuildingType, InfantryType, UnitType | The cap on how many of the type a house may build, with the sign choosing which tally it is compared against. | integer | 2147483647 |
BuildSpeedglobal rules | The multiplier that turns an object's cost into its base build time. | floating point | 1 |
BuildTimeHouseType, difficulty settings | The build-time multiplier a country applies to everything it produces, or the one a difficulty setting applies. | floating point | Varies by type |
BuildupTimeglobal rules | The length of a structure's construction animation, in game minutes. | floating point | .05 |
ConstructionYardBuildingType | A BuildingType with this flag animates while a structure it built is going up, refuses ordinary undeploy orders, and starts a computer house's base when an MCV deploys into it. | boolean | no |
Cost6 applicable types | The credit price of one object of this type, or the multiplier a country or a difficulty applies to every price it pays. | integer | Varies by type |
DoubleOwnedAircraftType, BuildingType, InfantryType, UnitType | Opens the type's production to every country, outside campaign games only. | boolean | no |
FactoryBuildingType | The kind of object the BuildingType produces. | RTTIType | none |
FreeUnitBuildingType | The vehicle, infantry or aircraft type a structure gives its owner when its buildup finishes. | UnitType, InfantryType or AircraftType | none |
GameSpeedBiasglobal rules | The multiplier on every house's build time and ground movement speed. | floating point | 1 |
GateBuildingType | Makes the BuildingType a gate that opens for allied units wanting to pass. | boolean | no |
GateStagesBuildingType | The number of door frames a gate animates through. | integer | 9 |
HospitalBuildingType | Admits one damaged infantry at a time and heals it to full strength. | boolean | no |
MaximumQueuedObjectsglobal rules | The most entries a production queue may hold. | integer | 5 |
MinProductionSpeedglobal rules | The floor the low-power production multiplier is held to. | floating point | .5 |
MultipleFactoryglobal rules | The build-time multiplier each factory past the first applies to production of its category. | floating point | 1 |
MultipleFactoryCapglobal rules | integer | 0 | |
OwnerAircraftType, BuildingType, InfantryType, UnitType | The countries that may own the type. | list of HouseTypes | (empty) |
PadAircraftglobal rules | The AircraftTypes bundled into the price of the pad they dock at. | typelist | (empty) |
PlacementDelayglobal rules | Minutes a factory waits before trying again when the object it finished cannot leave yet. | floating point | .05 |
PrerequisiteAircraftType, BuildingType, InfantryType, UnitType | The structures a house must own before the type appears on its build list. | list of BuildingTypes | (empty) |
PrerequisiteBarracksglobal rules | The BuildingTypes that satisfy a BARRACKS prerequisite. | list of BuildingTypes | (empty) |
PrerequisiteFactoryglobal rules | The BuildingTypes that satisfy a FACTORY prerequisite. | list of BuildingTypes | (empty) |
PrerequisiteGDIFactoryglobal rules | The BuildingTypes that satisfy a GDIFACTORY prerequisite. | list of BuildingTypes | (empty) |
PrerequisiteNodFactoryglobal rules | The BuildingTypes that satisfy a NODFACTORY prerequisite. | list of BuildingTypes | (empty) |
PrerequisitePowerglobal rules | The BuildingTypes that satisfy a POWER prerequisite. | list of BuildingTypes | (empty) |
PrerequisiteRadarglobal rules | The BuildingTypes that satisfy a RADAR prerequisite. | list of BuildingTypes | (empty) |
PrerequisiteTechglobal rules | The BuildingTypes that satisfy a TECH prerequisite. | list of BuildingTypes | (empty) |
ScoldSoundglobal rules | The sound played when the interface refuses a request. | sound | none |
SeparateAircraftglobal rules | Whether pad aircraft are bought separately from the pads they dock at. | boolean | no |
TechLevelNo effect in some scopes7 applicable types | The level an object type requires, the level a house holds, the starting value of the tech level setting for skirmish and network games, or a TeamType level that nothing reads. | integer | Varies by type |
WallBuildingType, OverlayType, WarheadType | Turns a BuildingType into a wall segment, marks an OverlayType as wall, or lets a WarheadType destroy walls. | boolean | no |
WallBuildSpeedCoefficientglobal rules | The multiplier applied to a wall's build time. | floating point | .5 |
WeaponsFactoryBuildingType | Sends a finished object out through a door sequence instead of an ordinary exit cell. | boolean | no |
No keys match the current filters.
History
- Changed0.1.0
- Changed0.1.0
- Changed0.2.0In development
- Changed0.2.0In development
- Changed0.2.0In development
- Changed0.2.0In development
Make the multiple-factory discount cumulative, as in Red Alert 2
- Changed0.2.0In development
Keep units that cannot enter the shroud from rallying into it
- Changed0.2.0In development
- Changed0.2.0In development