Executive officer
There is no official designation of 'commanding officer' on a ship. Each and every Officer (or Senior Officer, or Captain) can take any officerly action on a ship at any time.
However, it is a common convention for each voyage on the high seas to have a designated Commanding Officer - also referred to as the 'officer in charge' for that voyage.
Sometimes one mate will set out on a voyage and run into Real Life troubles, and be forced to log out quickly or otherwise become distracted. The idea of having a Commanding Officer is to ameliorate the complete failure of a voyage.
The Commanding Officer has no official responsibilities, and their exact form might differ from Crew to Crew, but the basics are that the CO:
- gets to assign crewmates to stations (such as Guns and Duty Navigation) - is responsible for checking that stations are well manned - has to handle the posting of invitations - gets to decide who to hire and who to plank - generally has to stay until the end of the trip - is commonly the one divvying the booty
Sometimes COs will take several other tasks on, such as doing a duty station at the same time, as well as battle navigating the boat and possibly filling their own guns.