The main function of a starbase is to build ships.
Every starbase has practically unlimited storage room for starship parts. You can build these parts if you have enough tech and resources; parts will appear in storage instantly. The base can then be ordered to mount them together to build a starship. As usual, parts cannot be scrapped, but see the dmp friendly code.
To build a ship, you first buy appropriate tech levels, then build all required parts, then give the ship build order. This can be done all in one turn (but doesn't have to), and many clients offer it as a one-step process.
Preconditions:
- starbase has all required parts in storage. Note that it's not required to have appropriate tech, you can also place parts in storage by recycling appropriate ships.
- no ship successfully attempts to clone at this base. Clones override regular builds.
Build Queue: The number of ships that can exist in the game is limited (NumShips). As long as there are free slots, the ship will be built immediately, and be available next turn. Otherwise, the global build queue decides which player and which base can build the next ship. This is a very important game mechanism and is described on its own page.
Once a build order has been entered in the build queue, it must be maintained until the ship is built. If you cancel the order, no ship will be built; the parts will remain in storage. Changing the build order will give a penalty, and your order will be delayed.
Relevant Config Options: AllowShipCloning, BuildQueue, NumShips, BuildChangeRelativePenalty.
See also: Build Queue, PBx friendly code.