AddShipByDefinition() / SpawnShipByDefinition()

These commands add a new ship to the map, based on a ship definition from shipdefinitions.xml. AddShipByDefinition() adds the ship via map coordinates, SpawnShipByDefinition() adds the ship at a given spawn location.
The function calls look like this:

AddShipByPlayerShipId() / SpawnShipByPlayerShipId()

These commands add a new ship to the map, based on an Id of a ship players brought into the mission (e.g. to copy or reconstruct ships). AddShipByPlayerShipId() adds the ship via map coordinates, SpawnShipByPlayerShipId() adds the ship at a given spawn location.
The function calls look like this: