Table of Contents

NPC Pirate Ships & Ship Encounters

Where are the NPC pirate ships?

They exist as NPC captains that spawn their own ships, crew, cannons, and hold supplies.

In the naval code, the encounter “system” is primarily driven by:

This means: when the captain spawns (usually via a spawner/zone system), the captain then builds the encounter ship.

How an encounter ship is created

When an encounter captain initializes without an existing ship:

  1. The captain spawns a ship at its location (if it can fit).
  2. The ship becomes owned by the captain.
  3. The ship is given a random ship name.
  4. The ship is painted (ghost ships use a specific hue; others random in a range).
  5. The ship's cannon capacity is set between StartingMaxCannons and MaxCannons.
  6. The ship automatically adds cannons (AutoAddCannons).
  7. A crew is spawned onto the ship.

If the ship cannot fit, the ship and captain delete (failed spawn).

Crew & combat behavior

Crew count

Encounter captains spawn a crew of about 3–5 members onto the deck.

Shooting frequency scales with crew

Encounter captains scale their cannon cadence based on crew:

(Internally it’s a seconds value that bottoms out at 2 seconds and tops out at 10 seconds.)

Loot & supplies (ship hold)

Encounter ships typically spawn with hold supplies like: