Both units and buildings can produce units internally (that is, as cargo). Additionally, units can also construct units externally (that is, on a field next to the producing unit).
Features = Vehicle_Production Construction { VehiclesInternally = 1-3;7 } Construction
This defines a factory with production lines for the VehicleTypes with id 1, 2, 3 and 7.
If you want to prevent the option to add or remove production lines of the factory, add NoProductionCustomization to Features.
The production cost is specified in the produced unit's definition. But the factory can modify the production cost by specifying a production efficiency:
Features = Vehicle_Production Construction { VehiclesInternally = 1-3;7 ProductionEfficiency = [ 1.5 0 0 0 1.5 0 0 0 1.5 ] } Construction
This example make production 50% more expansive in this factory.
If you want to produce inside a unit that doesn't have any energy supply, you can use this method to convert to different resources:
ProductionEfficiency = [ 0 0 2 0 1 0 0 0 1 ]In this example, no energy is used for production, but for each energy unit specified as production cost, the factory will use 2 units of fuel.
Features = construct_vehicles Construction { Vehicles = 17 } Construction
You can add the Produce_Units_that_cannot_leave tag to the features of the factory, which results that you can produce units that will not be able to directly leave the factory. This allows for example an orbiting mothership to produce tanks, which can only be moved out by putting them into a landing craft.
Ammo_Production is another feature that is highly useful for factories, to avoid the hassle of manually supplying the newly produced units with ammo.
Last change: Thu, 2008-01-10 10:57