Fleet Management

In X4: Foundations, the player can buy a large number of ships and either directly control them, or give them orders to execute, ranging from going to dock in a specific station to auto-trading a variety of goods between stations in a zone.

The following section describes how to buy, customize and then give orders to ships. For direct control, please refer to how to: pilot.

## Buying & Selling

### Buying a new ship

#### Where to buy ships

Ships can be bought in wharfs and shipyards. It can be done either by talking to the ship dealer, selecting the option once docked or **directly from the map** using right-click. The player does not have to be physically present to order a new ship.

Ships come in four sizes: S, M, L and XL.

* S and M ships are bought in a Wharf
* L and XL ships are bought in a Shipyard

Wharfs and Shipyards ship offers are dependent on the controlling faction. Some ships cannot be bought at the start of the game (marked with a star), and will require the player to raise his reputation and rank with the controlling faction.

#### How to buy a new ship

Once in the ship ordering interface, select the desired size and model in the top bar. The next list offers default configurations for the ship, as well as custom ones previously saved.

The ship will appear in the preview part. At the left side of the screen, the modules selection is displayed. Red categories means you need to pick a module of this category. Not all modules types are mandatory. The bar on the left of the category displays how many of the maximum number of modules of this category have been selected.

Select everything you need, including consumables (missiles, mines, resource beacons, satellites...) and crew. Add the result to your shopping list, to see the impact on your account and the time to build. Confirm when ready. After some time, your new ship will be ready !

### Selling a ship

An easy way to sell a ship is to select it, then right click on a wharf/shipyard/equipment dock and select the "Sell ship at" option.

## Repairing & Outfitting

Ships can be repaired and outfitted in wharfs, shipyards and equipment docks. Simply dock the ship there and choose the relevant option, directly or through the map. Also, with a ship selected on the map, right clicking on a wharf/shipyard/equipment dock will display an "upgrade/repair at" option.

Outfitting is done in the same way as building. Modified modules will cost the difference between the price of the current one and the desired one.

Repairing is a the option displayed at the bottom on the modules category. Add it to the shopping list like anything else.

### Paint jobs

Paint jobs and company's logo can be changed in the character menu for the whole fleet, or on any one docked ship. To do this for one ship, go to the console in front of the landing pad, and choose the desired paint job.

## Giving orders

### Direct orders

To give a direct order to a ship, select it on the map, right click on the destination (empty space, station, other ship...) and a contextual menu will appear. Choose the proper order and the ship will start following it.

It is possible to buy/sell products, retrofit and transfer crew once a ship is docked.

### Default orders

Default orders will be applied when a ship is not given direct orders for some time. They are very useful to automate actions. They can be selected in a ship's info screen, under the orders tab.

### Behaviours

Behaviours will tell ships how to react to different situations, like pirate harassment or discovering a lockbox. They can be set for the whole fleet in the "Player Information" menu under the "Global Orders" tab, or on a per-ship basis in the ship's info screen under the "Individual Instructions" tab.

**TODO: make a table with behaviours and options, explanations. Add picture.**