Module:Ships data

From Corsair Cove Official Wiki
Revision as of 23:23, 5 August 2026 by Aeredor (talk | contribs) (Created to serve up ship data through public api (see bottom of module file for functions))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Ship data for Corsair Cove: 29 ships, schema validated at load time.

Use from other modules and templates via #invoke or require:

local ships_data = require("Module:Ships_data")

Functions

Important: Do not mutate returned tables. To save performance, the tables are not copied first. Modifications to the returned values will contaminate other uses of those tables.

get_ship_by_name

Returns one ship record, or nil if the name isn't found.

local ship = ships_data.get_ship_by_name("Landlubber")

Name must match exactly, including spaces, for example "Iron Fist".

get_ship_by_index

Returns the ship record at that position in canonical order, or nil if out of range. Canonical order is from Tier 1 to 6, clockwise starting from the top around the Compass.

local ship = ships_data.get_ship_by_index(1)

get_all_ships

Returns the full array of ship records, in canonical order. Canonical order is from Tier 1 to 6, clockwise starting from the top around the Compass.

for i, ship in ipairs(ships_data.get_all_ships()) do
  ...
end

get_count_of_ships

Returns the number of ships.

for i = 1, ships_data.get_count_of_ships() do
  local ship = ships_data.get_ship_by_index(i)
end

get_ship_class_description

Flavour text for the class of ship, aligned with the Principle Paths. Pass in the class or hybrid_class field from a ship record to get its description. (The method ignores any trailing plus signs for the hybrid ships. Returns nil for unknown classes.

local flavour_text = ships_data.get_ship_class_description("Destroyer+")

Types

The module's exported functions and returned records are typed using LuaCATS-style annotations in the module's source. These aren't enforced at runtime, but document the exact shape of every value the module returns.

ShipRecord

A single ship's full data. See Ship record shape below for field-by-field details.

ShipResourceAmount

A { resource, qty } pair used in construction_costs.

ShipCrewAmount

A { type, qty } pair used in crew_types.

ShipStatAmount

A { stat, qty } pair used in stats_base and stats_crew_bonuses.

ShipUnlockAmount

A { path, qty } pair used in unlock_points.

ShipsDataModule

The shape of the table returned by require("Module:Ships_data") — i.e. the functions documented above.

Ship record shape

Each record in ships_data is a table with the following fields:

Field Type Note
name string Display name
tier number 1..6, inclusive
principle_path string Primary Principle Path alignment of the class of ship
class string Primary class of the ship, with an trailing plus sign for hybrids, similar to their in-game display, for example "Notoriety"
hybrid_path string Secondary Principle Path alignment of the class of ship, according to the unlock requirement on the Compass (never has a trailing plus sign)
icon_filename string The filename, including the extension, of the image of the ship, for example, "T_Ship_Starter.png"
pier string The pier required to build the ship, for example, "Shallow Pier"
description string The English-language flavour text of the ship
construction_costs array of ShipResourceAmount pairs of { resource, qty } mini-tables, where the resource is the name of the construction material, for example, "Naval Gun"
crew_types array of ShipCrewAmount pairs of { type, qty } mini-tables, where the type is the name of the crew as spelled in-game, for example, "Crow's Eyes"
stats_base array of ShipStatAmount pairs of { stat, qty } mini-tables, where stat is the name of the stat as spelled in-game, for example, "Gun Damage" or "Manoeuvrability"
stats_crew_bonuses map of arrays of ShipStatAmount by crew_type's type, each returns an array of { stat, qty } like stats_base but showing the marginal bonus per additional individual crew member of that type
stats_max array of ShipStatAmount calculated table of the maximum stats with the most number of advanced crew, similar structure to stats_base
unlock_points array of ShipUnlockAmount calculated pairs of { path, qty } mini-tables based on the ship's principle_path and hybrid_path

Nested pairs

Construction, crew, and stats use ordered arrays of pairs of data: The first field is a resource's, crew type's , or stat's name, as spelled in-game, and the second field is the quantity.

  • ship.construction_costs is an array of ShipResourceAmount, resource–qty pairs.
  • ship.crew_types is an array of ShipCrewAmount, type–qty pairs.
  • ship.stats_base is an array of ShipStatAmount, stat–qty pairs.
  • ship.stats_crew_bonuses is several arrays of ShipStatAmount, stat–qty pairs.
  • ship.stats_max is an array of ShipStatAmount, stat-qty pairs.
  • ship.unlock_points is an array of ShipUnlockAmount, path-qty pairs.

Crew bonuses

The bonuses are first keyed by the crew type's name. Keys match that ship's crew_types types. Typed in the table are fractional values of what is shown in-game divided by the number of crew. This means when working with this data, each individual value in the stat–qty pair is the marginal additional stat that one crew member contributes to the ship.

local bonuses = ship.stats_crew_bonuses["Scallywags"]

To get the highest possible maximum stats, use ship.stats_max instead, which is pre-calculated.


--#region: Data validation schema

--- Build a set of allowed field names from an ordered list.
local function build_allowed_set(valid_fields)
  local allowed = {}
  for _, field_name in ipairs(valid_fields) do
    allowed[field_name] = true
  end
  return allowed
end

--- Ordered list of valid field names for ship data.
local REQUIRED_SHIP_FIELDS = {
  "name",
  "tier",
  "principle_path",
  "class",
  "hybrid_path",
  "icon_filename",
  "pier",
  "description",
  "construction_costs",
  "crew_types",
  "stats_base",
  "stats_crew_bonuses",
}
local REQUIRED_SHIP_FIELDS_ALLOWED_NAMES = build_allowed_set(REQUIRED_SHIP_FIELDS)

--- Ordered list of valid field names for ship construction costs.
local VALID_SHIP_CONSTRUCTION_COSTS = {
  "Planks",
  "Rope",
  "Sails",
  "Figurehead",
  "Pitch",
  "Fittings",
  "Jolly Roger",
  "Naval Gun",
  "Steel Chain",
  "Silver Lining",
  "Copper Lamp",
}
local VALID_SHIP_CONSTRUCTION_COSTS_ALLOWED_NAMES = build_allowed_set(VALID_SHIP_CONSTRUCTION_COSTS)

--- Ordered list of valid field names for ship crew types.
local VALID_SHIP_CREW_TYPES = {
  "Swabbies",
  "Scallywags",
  "Picaroons",
  "Bombardiers",
  "Crow's Eyes",
  "Buccaneers",
  "Navigators",
  "Renegades",
  "Marauders",
  "Corsairs",
}
local VALID_SHIP_CREW_TYPES_ALLOWED_NAMES = build_allowed_set(VALID_SHIP_CREW_TYPES)

--- Ordered list of valid field names for ship stats.
local REQUIRED_SHIP_STATS = {
  "health",
  "crew",
  "supplies",
  "gun_damage",
  "boarding_damage",
  "speed",
  "manoeuvrability",
  "armour",
}
local REQUIRED_SHIP_STATS_ALLOWED_NAMES = build_allowed_set(REQUIRED_SHIP_STATS)

local HEALTH =          "health"
local CREW =            "crew"
local SUPPLIES =        "supplies"
local GUN_DAMAGE =      "gun_damage"
local BOARDING_DAMAGE = "boarding_damage"
local SPEED =           "speed"
local MANOEUVRABILITY = "manoeuvrability"
local ARMOUR =          "armour"

--- Set of valid class names.
local VALID_CLASS_NAMES = {
  Special = true,
  Prowler = true,
  Destroyer = true,
  Hunter = true,
  Reaver = true,
}

--- Set of valid Principle Paths.
local VALID_PRINCIPLE_PATHS = {
  None = true,
  Notoriety = true,
  Empire = true,
  Seafaring = true,
  Wealth = true,
}

--- Set of valid pier building names.
local VALID_PIERS = {
  ["Shallow Pier"] = true,
  ["Trade Pier"] = true,
  ["Deep-water Pier"] = true,
}

local RESOURCE = "resource"
local TYPE = "type"
local STAT = "stat"

local all_fields_are_required = true
local some_fields_may_be_missing = false

--#endregion



--#region: Data validation functions

--- Scan table against valid fields for (a) presence and (b) no extras.
local function assert_scalars(tbl, valid_fields, allowed_fields, are_all_required, message_context)
  if are_all_required then
    for _, field_name in ipairs(valid_fields) do
      assert(tbl[field_name] ~= nil,    message_context .. " missing field: " .. field_name)
    end
  end
  for field_name, _ in pairs(tbl) do
    assert(allowed_fields[field_name],  message_context .. " unexpected field: " .. field_name)
  end
end

--- Validate an ordered list of { name_field = "...", qty = n } entries.
local function assert_nested_list(entries, nested_field_name, valid_fields, allowed_fields, are_all_required, message_context)
  assert(type(entries) == "table",                                    message_context .. " must be a table")
  local seen = {}
  for index, entry in ipairs(entries) do
    local message_context_index = message_context .. "[" .. index .. "]"
    assert(type(entry) == "table",                                    message_context_index .. " must be a table")
    assert(entry[nested_field_name] ~= nil,                           message_context_index .. " missing " .. nested_field_name)
    assert(entry.qty ~= nil,                                          message_context_index .. " missing qty")
    assert(type(entry.qty) == "number",                               message_context_index .. " qty must be a number")
    for field_name, _ in pairs(entry) do
      assert(field_name == nested_field_name or field_name == "qty",  message_context_index .. " unexpected field: " .. field_name)
    end
    local name = entry[nested_field_name]
    assert(allowed_fields[name],                                      message_context_index .. " invalid " .. nested_field_name .. ": " .. tostring(name))
    assert(not seen[name],                                            message_context_index .. " duplicate " .. nested_field_name .. ": " .. tostring(name))
    seen[name] = true
  end
  if are_all_required then
    for _, field_name in ipairs(valid_fields) do
      assert(seen[field_name],                                        message_context .. " missing " .. nested_field_name .. ": " .. field_name)
    end
  end
end

--- Validate bonuses subtable, passing each crew type to assert_nested_list.
local function assert_bonuses_table(crew_types, bonuses, message_context)
  assert(type(bonuses) == "table", message_context .. " must be a table")
  local seen = {}
  for _, crew_type in ipairs(crew_types) do
    assert(bonuses[crew_type.type] ~= nil, message_context .. " missing bonuses for crew type: " .. crew_type.type)
    assert_nested_list(bonuses[crew_type.type], STAT, REQUIRED_SHIP_STATS, REQUIRED_SHIP_STATS_ALLOWED_NAMES, all_fields_are_required, message_context .. "[" .. crew_type.type .. "]")
    seen[crew_type.type] = true
  end
  for bonus_crew_type, _ in pairs(bonuses) do
    assert(seen[bonus_crew_type], message_context .. " unexpected crew type: " .. bonus_crew_type)
  end
end

--- Scan all ships in table against valid fields and nested fields.
local function validate_ships(ships_list, ships)
  assert(type(ships_list) == "table", "ships_list must be a table")
  assert(type(ships) == "table", "ships must be a table")
  assert(#ships_list == 29, "ships_list must contain 29 ships")
  for index, ship in ipairs(ships_list) do
    local message_context = "ships_list[" .. index .. "]"
    assert(index == ships[ship.name],                     message_context .. " name and lookup index mismatch")
    assert(VALID_PRINCIPLE_PATHS[ship.principle_path],    message_context .. " invalid principle path: " .. ship.principle_path)
    assert(VALID_CLASS_NAMES[ship.class:gsub("%+$", "")], message_context .. " invalid class: " .. ship.class)
    assert(VALID_PRINCIPLE_PATHS[ship.hybrid_path],          message_context .. " invalid hybrid class: " .. ship.hybrid_path)
    assert(VALID_PIERS[ship.pier],                        message_context .. " invalid pier: " .. ship.pier)
    assert_scalars(ship, REQUIRED_SHIP_FIELDS, REQUIRED_SHIP_FIELDS_ALLOWED_NAMES, all_fields_are_required, message_context)
    assert_nested_list(ship.construction_costs, RESOURCE, VALID_SHIP_CONSTRUCTION_COSTS,  VALID_SHIP_CONSTRUCTION_COSTS_ALLOWED_NAMES, some_fields_may_be_missing, message_context .. ".construction_costs")
    assert_nested_list(ship.crew_types,         TYPE,     VALID_SHIP_CREW_TYPES,          VALID_SHIP_CREW_TYPES_ALLOWED_NAMES,         some_fields_may_be_missing, message_context .. ".crew_types")
    assert_nested_list(ship.stats_base,         STAT,     REQUIRED_SHIP_STATS,            REQUIRED_SHIP_STATS_ALLOWED_NAMES,           all_fields_are_required,    message_context .. ".stats_base")
    assert_bonuses_table(ship.crew_types, ship.stats_crew_bonuses, message_context .. ".stats_crew_bonuses")
  end
  local seen = {}
  for name, index in pairs(ships) do
    local message_context = "ships[" .. name .. "]"
    assert((index ~= nil) or (type(index) == "number") and (index ~= 0), message_context .. " missing or invalid lookup index")
    assert(not seen[index],                                              message_context .. " duplicate lookup index: " .. index)
    assert(ships_list[index] and ships_list[index].name == name,         message_context .. " lookup index and name mismatch")
    seen[index] = true
  end
end

--#endregion



--#region: Primary data tables

--[[
Lua table for ships.

Fields include: name, tier, principle path, class, hybrid class, icon filename, 
pier, construction cost materials and quantities, possible crew types and 
quantities, and base stats (health #, crew #, supplies #, gun damage, boarding 
damage, speed, manoeuvrability, and armour), then finally the bonuses applied 
to each base stat by each crew types.
]]
local ships_list = {
  {
    name           = "Landlubber",
    tier           = 1,
    principle_path = "None",
    class          = "Special",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Starter.png",
    pier           = "Shallow Pier",
    description    = "The Landlubber is not a good ship: she's slow, underpowered, and doesn't have much space for a crew. But she's more than enough to learn the rudiments of sailing, fighting and plundering.",
    construction_costs = {
      { resource = "Planks", qty = 15 },
    },
    crew_types = {
      { type = "Swabbies", qty = 15 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 20 },
      { stat = CREW,     qty = 15 },
      { stat = SUPPLIES, qty = 20 },
      { stat = GUN_DAMAGE,      qty = 2 },
      { stat = BOARDING_DAMAGE, qty = 2 },
      { stat = SPEED,           qty = 2 },
      { stat = MANOEUVRABILITY, qty = 2 },
      { stat = ARMOUR,          qty = 2 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
    },
  },
  {
    name           = "Moonlight",
    tier           = 2,
    principle_path = "Notoriety",
    class          = "Prowler",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Smuggler_Tier1.png",
    pier           = "Shallow Pier",
    description    = "Moonlight drifts through the ocean, unseen and untouchable. Her agility makes her the perfect vessel for smuggling goods where none else dare venture. Silent, swift, and gone before dawn.",
    construction_costs = {
      { resource = "Planks", qty = 10 },
      { resource = "Rope",   qty = 20 },
    },
    crew_types = {
      { type = "Swabbies",   qty =  8 },
      { type = "Scallywags", qty = 15 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 70 },
      { stat = CREW,     qty = 15 },
      { stat = SUPPLIES, qty = 32 },
      { stat = GUN_DAMAGE,      qty = 2 },
      { stat = BOARDING_DAMAGE, qty = 5 },
      { stat = SPEED,           qty = 2 },
      { stat = MANOEUVRABILITY, qty = 13 },
      { stat = ARMOUR,          qty = 2 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Scallywags = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  2 /15 },
        { stat = BOARDING_DAMAGE, qty =  5 /15 },
        { stat = SPEED,           qty =  2 /15 },
        { stat = MANOEUVRABILITY, qty = 13 /15 },
        { stat = ARMOUR,          qty =  2 /15 },
      },
    },
  },
  {
    name           = "Iron Fist",
    tier           = 2,
    principle_path = "Empire",
    class          = "Destroyer",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Destroyer_Tier1.png",
    pier           = "Shallow Pier",
    description    = "Iron Fist is a formidable vessel. Built to crush all those who oppose her, while withstanding even the most punishing of assaults. Strong and powerful, few ships have the power to stand against her.",
    construction_costs = {
      { resource = "Planks", qty = 10 },
      { resource = "Rope",   qty = 20 },
    },
    crew_types = {
      { type = "Swabbies",  qty =  8 },
      { type = "Picaroons", qty = 15 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 82 },
      { stat = CREW,     qty = 15 },
      { stat = SUPPLIES, qty = 24 },
      { stat = GUN_DAMAGE,      qty = 13 },
      { stat = BOARDING_DAMAGE, qty = 2 },
      { stat = SPEED,           qty = 2 },
      { stat = MANOEUVRABILITY, qty = 2 },
      { stat = ARMOUR,          qty = 13 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Picaroons = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 13 /15 },
        { stat = BOARDING_DAMAGE, qty =  2 /15 },
        { stat = SPEED,           qty =  2 /15 },
        { stat = MANOEUVRABILITY, qty =  2 /15 },
        { stat = ARMOUR,          qty = 13 /15 },
      },
    },
  },
  {
    name           = "Tide Runner",
    tier           = 2,
    principle_path = "Seafaring",
    class          = "Hunter",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Hunter_Tier1.png",
    pier           = "Shallow Pier",
    description    = "Tide Runner glides across the ocean with unmatched grace. A sleek vessel built for stealth and pursuit. Her agile design makes her perfect for chasing down prey or slipping away unnoticed.",
    construction_costs = {
      { resource = "Planks", qty = 10 },
      { resource = "Rope",   qty = 20 },
    },
    crew_types = {
      { type = "Swabbies",   qty = 10 },
      { type = "Scallywags", qty = 20 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 70 },
      { stat = CREW,     qty = 20 },
      { stat = SUPPLIES, qty = 24 },
      { stat = GUN_DAMAGE,      qty =  5 },
      { stat = BOARDING_DAMAGE, qty =  2 },
      { stat = SPEED,           qty = 13 },
      { stat = MANOEUVRABILITY, qty =  2 },
      { stat = ARMOUR,          qty =  2 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Scallywags = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  5 /20 },
        { stat = BOARDING_DAMAGE, qty =  2 /20 },
        { stat = SPEED,           qty = 13 /20 },
        { stat = MANOEUVRABILITY, qty =  2 /20 },
        { stat = ARMOUR,          qty =  2 /20 },
      },
    },
  },
  {
    name           = "Sharktooth",
    tier           = 2,
    principle_path = "Wealth",
    class          = "Reaver",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Raider_Tier1.png",
    pier           = "Shallow Pier",
    description    = "Sharktooth is a ship that will take whatever she wants, whenever she wants it. Slow but relentless, she is a deadly predator of the ocean waves, sinking her fangs into every ship she targets. Her bite is deadly and few can escape it.",
    construction_costs = {
      { resource = "Planks", qty = 10 },
      { resource = "Rope",   qty = 20 },
    },
    crew_types = {
      { type = "Swabbies",  qty = 10 },
      { type = "Picaroons", qty = 20 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 82 },
      { stat = CREW,     qty = 20 },
      { stat = SUPPLIES, qty = 24 },
      { stat = GUN_DAMAGE,      qty =  2 },
      { stat = BOARDING_DAMAGE, qty = 13 },
      { stat = SPEED,           qty =  2 },
      { stat = MANOEUVRABILITY, qty =  2 },
      { stat = ARMOUR,          qty =  5 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Picaroons = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  2 /20 },
        { stat = BOARDING_DAMAGE, qty = 13 /20 },
        { stat = SPEED,           qty =  2 /20 },
        { stat = MANOEUVRABILITY, qty =  2 /20 },
        { stat = ARMOUR,          qty =  5 /20 },
      },
    },
  },
  {
    name           = "Azimuth",
    tier           = 2,
    principle_path = "Notoriety",
    class          = "Prowler+",
    hybrid_path    = "Empire",
    icon_filename  = "T_Ship_Smuggler_Tier1_dot25.png",
    pier           = "Shallow Pier",
    description    = "Azimuth was built for adventure, and thus features many small improvements compared to its smaller sibling Moonlight. A bit more of everything can never hurt when chasing the many terrible wonders of the Seven Seas.",
    construction_costs = {
      { resource = "Planks", qty = 50 },
      { resource = "Rope",   qty = 50 },
    },
    crew_types = {
      { type = "Swabbies",   qty =  9 },
      { type = "Scallywags", qty = 18 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 82 },
      { stat = CREW,     qty = 18 },
      { stat = SUPPLIES, qty = 32 },
      { stat = GUN_DAMAGE,      qty =  9 },
      { stat = BOARDING_DAMAGE, qty =  5 },
      { stat = SPEED,           qty =  4 },
      { stat = MANOEUVRABILITY, qty = 13 },
      { stat = ARMOUR,          qty =  4 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Scallywags = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  9 /18 },
        { stat = BOARDING_DAMAGE, qty =  5 /18 },
        { stat = SPEED,           qty =  4 /18 },
        { stat = MANOEUVRABILITY, qty = 13 /18 },
        { stat = ARMOUR,          qty =  4 /18 },
      },
    },
  },
  {
    name           = "Steel Edge",
    tier           = 2,
    principle_path = "Empire",
    class          = "Destroyer+",
    hybrid_path    = "Seafaring",
    icon_filename  = "T_Ship_Destroyer_Tier1_dot25.png",
    pier           = "Shallow Pier",
    description    = "An improved design on the Iron Fist, devised in many drunken nights of scheming and plotting. The Steel Edge's slightly larger frame allows for more crew and weaponry, which can make all the difference in the heat of battle.",
    construction_costs = {
      { resource = "Planks", qty = 50 },
      { resource = "Rope",   qty = 50 },
    },
    crew_types = {
      { type = "Swabbies",  qty =  9 },
      { type = "Picaroons", qty = 18 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 94 },
      { stat = CREW,     qty = 18 },
      { stat = SUPPLIES, qty = 28 },
      { stat = GUN_DAMAGE,      qty = 13 },
      { stat = BOARDING_DAMAGE, qty =  4 },
      { stat = SPEED,           qty =  7 },
      { stat = MANOEUVRABILITY, qty =  4 },
      { stat = ARMOUR,          qty = 13 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Picaroons = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 13 /18 },
        { stat = BOARDING_DAMAGE, qty =  4 /18 },
        { stat = SPEED,           qty =  7 /18 },
        { stat = MANOEUVRABILITY, qty =  4 /18 },
        { stat = ARMOUR,          qty = 13 /18 },
      },
    },
  },
  {
    name           = "Huracán",
    tier           = 2,
    principle_path = "Seafaring",
    class          = "Hunter+",
    hybrid_path    = "Wealth",
    icon_filename  = "T_Ship_Hunter_Tier1_dot25.png",
    pier           = "Shallow Pier",
    description    = "Huracán is based on the Tide Runner's blueprints, but has been lovingly tweaked and refined by our passionate shipwrights. Many tiny improvements make her a terrifying predator of the sea. Merchants beware.",
    construction_costs = {
      { resource = "Planks", qty = 50 },
      { resource = "Rope",   qty = 50 },
    },
    crew_types = {
      { type = "Swabbies",   qty = 10 },
      { type = "Scallywags", qty = 20 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 82 },
      { stat = CREW,     qty = 20 },
      { stat = SUPPLIES, qty = 28 },
      { stat = GUN_DAMAGE,      qty =  5 },
      { stat = BOARDING_DAMAGE, qty =  7 },
      { stat = SPEED,           qty = 13 },
      { stat = MANOEUVRABILITY, qty =  4 },
      { stat = ARMOUR,          qty =  5 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Scallywags = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  5 /20 },
        { stat = BOARDING_DAMAGE, qty =  7 /20 },
        { stat = SPEED,           qty = 13 /20 },
        { stat = MANOEUVRABILITY, qty =  4 /20 },
        { stat = ARMOUR,          qty =  5 /20 },
      },
    },
  },
  {
    name           = "Goldseeker",
    tier           = 2,
    principle_path = "Wealth",
    class          = "Reaver+",
    hybrid_path    = "Notoriety",
    icon_filename  = "T_Ship_Raider_Tier1_dot25.png",
    pier           = "Shallow Pier",
    description    = "Goldseeker comes well equipped to haul treasure and plunder alike. Her extra large cargo deck can store weeks worth of booty and gives her an edge over the Sharktooth.",
    construction_costs = {
      { resource = "Planks", qty = 50 },
      { resource = "Rope",   qty = 50 },
    },
    crew_types = {
      { type = "Swabbies",  qty = 10 },
      { type = "Picaroons", qty = 20 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 88 },
      { stat = CREW,     qty = 20 },
      { stat = SUPPLIES, qty = 28 },
      { stat = GUN_DAMAGE,      qty =  4 },
      { stat = BOARDING_DAMAGE, qty = 13 },
      { stat = SPEED,           qty =  4 },
      { stat = MANOEUVRABILITY, qty =  9 },
      { stat = ARMOUR,          qty =  5 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Picaroons = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  4 /20 },
        { stat = BOARDING_DAMAGE, qty = 13 /20 },
        { stat = SPEED,           qty =  4 /20 },
        { stat = MANOEUVRABILITY, qty =  9 /20 },
        { stat = ARMOUR,          qty =  5 /20 },
      },
    },
  },
  {
    name           = "Nightshade",
    tier           = 3,
    principle_path = "Notoriety",
    class          = "Prowler",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Smuggler_Tier1_dot5.png",
    pier           = "Shallow Pier",
    description    = "Nightshade is as elusive as they come. The perfect vessel for moving goods or navigating danger. She will outmanoeuvre all those who oppose her and vanish into the night long before anyone catches up.",
    construction_costs = {
      { resource = "Planks", qty = 50 },
      { resource = "Rope",   qty = 50 },
      { resource = "Sails",  qty = 30 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 15 },
      { type = "Scallywags",  qty = 20 },
      { type = "Crow's Eyes", qty = 20 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 105 },
      { stat = CREW,     qty =  40 },
      { stat = SUPPLIES, qty =  34 },
      { stat = GUN_DAMAGE,      qty =  3 },
      { stat = BOARDING_DAMAGE, qty =  8 },
      { stat = SPEED,           qty =  3 },
      { stat = MANOEUVRABILITY, qty = 20 },
      { stat = ARMOUR,          qty =  3 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Scallywags = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  0.94 /20 },
        { stat = BOARDING_DAMAGE, qty =  1.41 /20 },
        { stat = SPEED,           qty =  0.5  /20 },
        { stat = MANOEUVRABILITY, qty = 17.33 /20 },
        { stat = ARMOUR,          qty =  2.4  /20 },
      },
      ["Crow's Eyes"] = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  2.06 /20 },
        { stat = BOARDING_DAMAGE, qty =  6.59 /20 },
        { stat = SPEED,           qty =  2.5  /20 },
        { stat = MANOEUVRABILITY, qty =  2.67 /20 },
        { stat = ARMOUR,          qty =  0.6  /20 },
      },
    },
  },
  {
    name           = "Yoke Breaker",
    tier           = 3,
    principle_path = "Empire",
    class          = "Destroyer",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Destroyer_Tier1_dot5.png",
    pier           = "Shallow Pier",
    description    = "Yoke Breaker is a force on the high seas. Her heavy broadside cannons give her the advantage in every battle she fights. She may be a little slower than most, but she is devastating when she arrives.",
    construction_costs = {
      { resource = "Planks", qty = 50 },
      { resource = "Rope",   qty = 50 },
      { resource = "Sails",  qty = 30 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 15 },
      { type = "Picaroons",   qty = 20 },
      { type = "Bombardiers", qty = 20 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 123 },
      { stat = CREW,     qty =  40 },
      { stat = SUPPLIES, qty =  26 },
      { stat = GUN_DAMAGE,      qty = 20 },
      { stat = BOARDING_DAMAGE, qty =  3 },
      { stat = SPEED,           qty =  3 },
      { stat = MANOEUVRABILITY, qty =  3 },
      { stat = ARMOUR,          qty = 20 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Picaroons = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  2.86 /20 },
        { stat = BOARDING_DAMAGE, qty =  0.75 /20 },
        { stat = SPEED,           qty =  1.3  /20 },
        { stat = MANOEUVRABILITY, qty =  1.8  /20 },
        { stat = ARMOUR,          qty = 16    /20 },
      },
      Bombardiers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 17.14 /20 },
        { stat = BOARDING_DAMAGE, qty =  2.25 /20 },
        { stat = SPEED,           qty =  1.7  /20 },
        { stat = MANOEUVRABILITY, qty =  1.2  /20 },
        { stat = ARMOUR,          qty =  4    /20 },
      },
    },
  },
  {
    name           = "Tempest",
    tier           = 3,
    principle_path = "Seafaring",
    class          = "Hunter",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Hunter_Tier1_dot5.png",
    pier           = "Shallow Pier",
    description    = "Tempest is designed to rip merchant ships apart before they even know what hit them. What she lacks in hull strength, she more than makes up for in firepower. She is as fast as she is deadly.",
    construction_costs = {
      { resource = "Planks", qty = 50 },
      { resource = "Rope",   qty = 50 },
      { resource = "Sails",  qty = 30 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 25 },
      { type = "Scallywags",  qty = 30 },
      { type = "Bombardiers", qty = 30 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 105 },
      { stat = CREW,     qty =  60 },
      { stat = SUPPLIES, qty =  26 },
      { stat = GUN_DAMAGE,      qty =  8 },
      { stat = BOARDING_DAMAGE, qty =  3 },
      { stat = SPEED,           qty = 20 },
      { stat = MANOEUVRABILITY, qty =  3 },
      { stat = ARMOUR,          qty =  3 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Scallywags = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  2.35 /30 },
        { stat = BOARDING_DAMAGE, qty =  1    /30 },
        { stat = SPEED,           qty =  2.67 /30 },
        { stat = MANOEUVRABILITY, qty =  2.05 /30 },
        { stat = ARMOUR,          qty =  2.4  /30 },
      },
      Bombardiers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  5.65 /30 },
        { stat = BOARDING_DAMAGE, qty =  2    /30 },
        { stat = SPEED,           qty = 17.33 /30 },
        { stat = MANOEUVRABILITY, qty =  0.95 /30 },
        { stat = ARMOUR,          qty =  0.6  /30 },
      },
    },
  },
  {
    name           = "Wolfhound",
    tier           = 3,
    principle_path = "Wealth",
    class          = "Reaver",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Raider_Tier1_dot5.png",
    pier           = "Shallow Pier",
    description    = "Once Wolfhound sets her sights on you, escape is a fool's hope. With a crew built for boarding, she will swarm enemy decks and take everything in her path. Wolfhound is inevitable.",
    construction_costs = {
      { resource = "Planks", qty = 50 },
      { resource = "Rope",   qty = 50 },
      { resource = "Sails",  qty = 30 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 25 },
      { type = "Picaroons",   qty = 30 },
      { type = "Crow's Eyes", qty = 30 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 123 },
      { stat = CREW,     qty =  60 },
      { stat = SUPPLIES, qty =  26 },
      { stat = GUN_DAMAGE,      qty =  3 },
      { stat = BOARDING_DAMAGE, qty = 20 },
      { stat = SPEED,           qty =  3 },
      { stat = MANOEUVRABILITY, qty =  3 },
      { stat = ARMOUR,          qty =  8 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Picaroons = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  0.46 /30 },
        { stat = BOARDING_DAMAGE, qty =  2.5  /30 },
        { stat = SPEED,           qty =  1.5  /30 },
        { stat = MANOEUVRABILITY, qty =  2.45 /30 },
        { stat = ARMOUR,          qty =  6.4  /30 },
      },
      ["Crow's Eyes"] = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  2.54 /30 },
        { stat = BOARDING_DAMAGE, qty = 17.5  /30 },
        { stat = SPEED,           qty =  1.5  /30 },
        { stat = MANOEUVRABILITY, qty =  0.55 /30 },
        { stat = ARMOUR,          qty =  1.6  /30 },
      },
    },
  },
  {
    name           = "Rogue",
    tier           = 4,
    principle_path = "Notoriety",
    class          = "Prowler",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Smuggler_Tier2.png",
    pier           = "Trade Pier",
    description    = "The black pitch used to treat Rogue's timber also gave birth to her name. A true smugglers' vessel, Rogue is said to blend into the shadows of the ocean, making her near impossible to track.",
    construction_costs = {
      { resource = "Planks",     qty = 75 },
      { resource = "Rope",       qty = 75 },
      { resource = "Sails",      qty = 50 },
      { resource = "Figurehead", qty = 10 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 20 },
      { type = "Crow's Eyes", qty = 25 },
      { type = "Buccaneers",  qty = 35 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 175 },
      { stat = CREW,     qty =  60 },
      { stat = SUPPLIES, qty =  52 },
      { stat = GUN_DAMAGE,      qty =  5 },
      { stat = BOARDING_DAMAGE, qty = 13 },
      { stat = SPEED,           qty =  5 },
      { stat = MANOEUVRABILITY, qty = 33 },
      { stat = ARMOUR,          qty =  5 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      ["Crow's Eyes"] = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  3.31 /25 },
        { stat = BOARDING_DAMAGE, qty = 10    /25 },
        { stat = SPEED,           qty =  2.08 /25 },
        { stat = MANOEUVRABILITY, qty =  3.27 /25 },
        { stat = ARMOUR,          qty =  0.66 /25 },
      },
      Buccaneers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  1.69 /35 },
        { stat = BOARDING_DAMAGE, qty =  3    /35 },
        { stat = SPEED,           qty =  2.92 /35 },
        { stat = MANOEUVRABILITY, qty = 29.73 /35 },
        { stat = ARMOUR,          qty =  4.34 /35 },
      },
    },
  },
  {
    name           = "Sea Dragon",
    tier           = 4,
    principle_path = "Empire",
    class          = "Destroyer",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Destroyer_Tier2.png",
    pier           = "Trade Pier",
    description    = "Sea Dragon is a fortress on water. Her thick armoured hull and impressive firepower make her the vanguard of any fleet, able to withstand and deal out incredible damage. Once she's in range, there's no escaping her wrath.",
    construction_costs = {
      { resource = "Planks", qty = 75 },
      { resource = "Rope",   qty = 75 },
      { resource = "Sails",  qty = 50 },
      { resource = "Pitch",  qty = 60 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 20 },
      { type = "Bombardiers", qty = 25 },
      { type = "Buccaneers",  qty = 35 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 205 },
      { stat = CREW,     qty =  60 },
      { stat = SUPPLIES, qty =  30 },
      { stat = GUN_DAMAGE,      qty = 33 },
      { stat = BOARDING_DAMAGE, qty =  5 },
      { stat = SPEED,           qty =  5 },
      { stat = MANOEUVRABILITY, qty =  5 },
      { stat = ARMOUR,          qty = 33 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Bombardiers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 22.5  /25  },
        { stat = BOARDING_DAMAGE, qty =  2.94 /25 },
        { stat = SPEED,           qty =  2.41 /25 },
        { stat = MANOEUVRABILITY, qty =  1.24 /25 },
        { stat = ARMOUR,          qty =  4.38 /25 },
      },
      Buccaneers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 10.5  /35 },
        { stat = BOARDING_DAMAGE, qty =  2.06 /35 },
        { stat = SPEED,           qty =  2.59 /35 },
        { stat = MANOEUVRABILITY, qty =  3.76 /35 },
        { stat = ARMOUR,          qty = 28.62 /35 },
      },
    },
  },
  {
    name           = "Fortune",
    tier           = 4,
    principle_path = "Seafaring",
    class          = "Hunter",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Hunter_Tier2.png",
    pier           = "Trade Pier",
    description    = "Fortune's pace is a sight to behold. A frigate built for speed and precision, her sleek design allows her to outpace almost any ship on the seas. As fast as she is lethal; merchant vessels don't stand a chance. Her name is said to bring luck to all those who sail her.",
    construction_costs = {
      { resource = "Planks",   qty = 75 },
      { resource = "Rope",     qty = 75 },
      { resource = "Sails",    qty = 50 },
      { resource = "Fittings", qty = 50 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 30 },
      { type = "Bombardiers", qty = 35 },
      { type = "Navigators",  qty = 45 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 175 },
      { stat = CREW,     qty =  80 },
      { stat = SUPPLIES, qty =  30 },
      { stat = GUN_DAMAGE,      qty = 13 },
      { stat = BOARDING_DAMAGE, qty =  5 },
      { stat = SPEED,           qty = 33 },
      { stat = MANOEUVRABILITY, qty =  5 },
      { stat = ARMOUR,          qty =  5 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Bombardiers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  5.43 /35 },
        { stat = BOARDING_DAMAGE, qty =  2.69 /35 },
        { stat = SPEED,           qty = 23.65 /35 },
        { stat = MANOEUVRABILITY, qty =  1.59 /35 },
        { stat = ARMOUR,          qty =  0.71 /35 },
      },
      Navigators = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  7.57 /45 },
        { stat = BOARDING_DAMAGE, qty =  2.31 /45 },
        { stat = SPEED,           qty =  9.35 /45 },
        { stat = MANOEUVRABILITY, qty =  3.41 /45 },
        { stat = ARMOUR,          qty =  4.29 /45 },
      },
    },
  },
  {
    name           = "Providence",
    tier           = 4,
    principle_path = "Wealth",
    class          = "Reaver",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Raider_Tier2.png",
    pier           = "Trade Pier",
    description    = "Providence always sets sail in pursuit of wealth. With a hold made for plunder and a crew ready to raid, whatever ship she targets can kiss goodbye to its booty. When Providence sets sail, riches are sure to follow.",
    construction_costs = {
      { resource = "Planks",   qty = 75 },
      { resource = "Rope",     qty = 75 },
      { resource = "Sails",    qty = 50 },
      { resource = "Fittings", qty = 50 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 30 },
      { type = "Crow's Eyes", qty = 35 },
      { type = "Navigators",  qty = 45 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 205 },
      { stat = CREW,     qty =  80 },
      { stat = SUPPLIES, qty =  30 },
      { stat = GUN_DAMAGE,      qty =  5 },
      { stat = BOARDING_DAMAGE, qty = 33 },
      { stat = SPEED,           qty =  5 },
      { stat = MANOEUVRABILITY, qty =  5 },
      { stat = ARMOUR,          qty = 13 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      ["Crow's Eyes"] = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  1.98 /35 },
        { stat = BOARDING_DAMAGE, qty = 24.13 /35 },
        { stat = SPEED,           qty =  3.3  /35 },
        { stat = MANOEUVRABILITY, qty =  0.67 /35 },
        { stat = ARMOUR,          qty =  1.86 /35 },
      },
      Navigators = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  3.02 /45 },
        { stat = BOARDING_DAMAGE, qty =  8.87 /45 },
        { stat = SPEED,           qty =  1.7  /45 },
        { stat = MANOEUVRABILITY, qty =  4.33 /45 },
        { stat = ARMOUR,          qty = 11.14 /45 },
      },
    },
  },
  {
    name           = "Vulture",
    tier           = 4,
    principle_path = "Notoriety",
    class          = "Prowler+",
    hybrid_path    = "Empire",
    icon_filename  = "T_Ship_Smuggler_Tier2_dot25.png",
    pier           = "Trade Pier",
    description    = "Vulture is outfitted with a high-cleat rigging system, allowing her to maintain speed and manoeuvrability even in the most changeable of winds. A system of sliding floor panels in the storage hold enables the crew to stash and retrieve plunder with startling efficiency.",
    construction_costs = {
      { resource = "Planks",     qty = 100 },
      { resource = "Rope",       qty =  75 },
      { resource = "Sails",      qty =  75 },
      { resource = "Figurehead", qty =  15 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 30 },
      { type = "Crow's Eyes", qty = 35 },
      { type = "Buccaneers",  qty = 35 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 205 },
      { stat = CREW,     qty =  70 },
      { stat = SUPPLIES, qty =  52 },
      { stat = GUN_DAMAGE,      qty = 23 },
      { stat = BOARDING_DAMAGE, qty = 13 },
      { stat = SPEED,           qty = 10 },
      { stat = MANOEUVRABILITY, qty = 33 },
      { stat = ARMOUR,          qty = 10 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      ["Crow's Eyes"] = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 16.87 /35 },
        { stat = BOARDING_DAMAGE, qty = 10.71 /35 },
        { stat = SPEED,           qty =  5    /35 },
        { stat = MANOEUVRABILITY, qty =  4.4  /35 },
        { stat = ARMOUR,          qty =  1.76 /35 },
      },
      Buccaneers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  6.13 /35},
        { stat = BOARDING_DAMAGE, qty =  2.29 /35},
        { stat = SPEED,           qty =  5    /35 },
        { stat = MANOEUVRABILITY, qty = 28.6  /35 },
        { stat = ARMOUR,          qty =  8.24 /35 },
      },
    },
  },
  {
    name           = "Ravager",
    tier           = 4,
    principle_path = "Empire",
    class          = "Destroyer+",
    hybrid_path    = "Seafaring",
    icon_filename  = "T_Ship_Destroyer_Tier2_dot25.png",
    pier           = "Trade Pier",
    description    = "Ravager's cannons are cast from cold-forged iron, hammered into shape at lower temperatures—ensuring higher tolerances, greater accuracy, and greater damage with each cannon she fires. Her hull is reinforced with layered iron plates, designed to absorb and deflect incoming fire.",
    construction_costs = {
      { resource = "Planks", qty = 100 },
      { resource = "Rope",   qty =  75 },
      { resource = "Sails",  qty =  75 },
      { resource = "Pitch",  qty =  90 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 25 },
      { type = "Bombardiers", qty = 40 },
      { type = "Buccaneers",  qty = 30 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 235 },
      { stat = CREW,     qty =  70 },
      { stat = SUPPLIES, qty =  44 },
      { stat = GUN_DAMAGE,      qty = 33 },
      { stat = BOARDING_DAMAGE, qty = 10 },
      { stat = SPEED,           qty = 18 },
      { stat = MANOEUVRABILITY, qty = 10 },
      { stat = ARMOUR,          qty = 33 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Bombardiers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 26.4  /40 },
        { stat = BOARDING_DAMAGE, qty =  7.27 /40 },
        { stat = SPEED,           qty = 11.41 /40 },
        { stat = MANOEUVRABILITY, qty =  3.81 /40 },
        { stat = ARMOUR,          qty =  7.33 /40 },
      },
      Buccaneers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  6.6  /30 },
        { stat = BOARDING_DAMAGE, qty =  2.73 /30 },
        { stat = SPEED,           qty =  6.59 /30 },
        { stat = MANOEUVRABILITY, qty =  6.19 /30 },
        { stat = ARMOUR,          qty = 25.67 /30 },
      },
    },
  },
  {
    name           = "Catshark",
    tier           = 4,
    principle_path = "Seafaring",
    class          = "Hunter+",
    hybrid_path    = "Wealth",
    icon_filename  = "T_Ship_Hunter_Tier2_dot25.png",
    pier           = "Trade Pier",
    description    = "The Catshark's hull is treated with a unique blend of tallow and pine oil allowing her to effortlessly cut through the water. Her sails are a lightweight, wax-coated linen, made to catch even the slightest breeze. No wonder she's faster than ships twice her size.",
    construction_costs = {
      { resource = "Planks",   qty = 100 },
      { resource = "Rope",     qty =  75 },
      { resource = "Sails",    qty =  75 },
      { resource = "Fittings", qty =  75 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 35 },
      { type = "Bombardiers", qty = 45 },
      { type = "Navigators",  qty = 40 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 205 },
      { stat = CREW,     qty =  85 },
      { stat = SUPPLIES, qty =  44 },
      { stat = GUN_DAMAGE,      qty = 13 },
      { stat = BOARDING_DAMAGE, qty = 18 },
      { stat = SPEED,           qty = 33 },
      { stat = MANOEUVRABILITY, qty = 10 },
      { stat = ARMOUR,          qty = 13 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Bombardiers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  6.62 /45 },
        { stat = BOARDING_DAMAGE, qty = 11.3  /45 },
        { stat = SPEED,           qty = 25.91 /45 },
        { stat = MANOEUVRABILITY, qty =  4.03 /45 },
        { stat = ARMOUR,          qty =  2.53 /45 },
      },
      Navigators = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  6.38 /40 },
        { stat = BOARDING_DAMAGE, qty =  6.7  /40 },
        { stat = SPEED,           qty =  7.09 /40 },
        { stat = MANOEUVRABILITY, qty =  5.97 /40 },
        { stat = ARMOUR,          qty = 10.47 /40 },
      },
    },
  },
  {
    name           = "Bedlam",
    tier           = 4,
    principle_path = "Wealth",
    class          = "Reaver+",
    hybrid_path    = "Notoriety",
    icon_filename  = "T_Ship_Raider_Tier2_dot25.png",
    pier           = "Trade Pier",
    description    = "The Bedlam has been custom-built to endure even the most arduous of raids, while her spring-loaded grappling hooks ensure a fast and secure latch onto enemy ships. The crew quarters are tight, but that only serves to strengthen the bond of those aboard. (We hope.)",
    construction_costs = {
      { resource = "Planks",   qty = 100 },
      { resource = "Rope",     qty =  75 },
      { resource = "Sails",    qty =  75 },
      { resource = "Fittings", qty =  75 },
    },
    crew_types = {
      { type = "Swabbies",    qty = 30 },
      { type = "Crow's Eyes", qty = 50 },
      { type = "Navigators",  qty = 35 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 220 },
      { stat = CREW,     qty =  85 },
      { stat = SUPPLIES, qty =  44 },
      { stat = GUN_DAMAGE,      qty = 10 },
      { stat = BOARDING_DAMAGE, qty = 33 },
      { stat = SPEED,           qty = 10 },
      { stat = MANOEUVRABILITY, qty = 23 },
      { stat = ARMOUR,          qty = 13 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      ["Crow's Eyes"] = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  5.47 /50 },
        { stat = BOARDING_DAMAGE, qty = 27.5  /50 },
        { stat = SPEED,           qty =  7.81 /50 },
        { stat = MANOEUVRABILITY, qty =  5.11 /50 },
        { stat = ARMOUR,          qty =  3.05 /50 },
      },
      Navigators = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  4.53 /35 },
        { stat = BOARDING_DAMAGE, qty =  5.5  /35 },
        { stat = SPEED,           qty =  2.19 /35 },
        { stat = MANOEUVRABILITY, qty = 17.89 /35 },
        { stat = ARMOUR,          qty =  9.95 /35 },
      },
    },
  },
  {
    name           = "Eclipse",
    tier           = 5,
    principle_path = "Notoriety",
    class          = "Prowler",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Smuggler_Tier2_dot5.png",
    pier           = "Trade Pier",
    description    = "Eclipse is outfitted with sophisticated 'self-tensioning' lines—a rigging system that automatically adjusts the sails for optimal wind resistance. She has a unique pivoting keel that turns with the rudder, allowing her to maintain speed even through the sharpest of turns.",
    construction_costs = {
      { resource = "Planks",      qty = 125 },
      { resource = "Rope",        qty = 125 },
      { resource = "Sails",       qty = 100 },
      { resource = "Figurehead",  qty =  20 },
      { resource = "Jolly Roger", qty = 100 },
    },
    crew_types = {
      { type = "Swabbies",   qty = 45 },
      { type = "Buccaneers", qty = 50 },
      { type = "Renegades",  qty = 70 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 280 },
      { stat = CREW,     qty = 120 },
      { stat = SUPPLIES, qty =  78 },
      { stat = GUN_DAMAGE,      qty =  8 },
      { stat = BOARDING_DAMAGE, qty = 20 },
      { stat = SPEED,           qty =  8 },
      { stat = MANOEUVRABILITY, qty = 52 },
      { stat = ARMOUR,          qty =  8 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Buccaneers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  1.36 /50 },
        { stat = BOARDING_DAMAGE, qty =  2.36 /50 },
        { stat = SPEED,           qty =  2.99 /50 },
        { stat = MANOEUVRABILITY, qty = 43.78 /50 },
        { stat = ARMOUR,          qty =  5    /50 },
      },
      Renegades = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  6.64 /70 },
        { stat = BOARDING_DAMAGE, qty = 17.64 /70 },
        { stat = SPEED,           qty =  5.01 /70 },
        { stat = MANOEUVRABILITY, qty =  9.22 /70 },
        { stat = ARMOUR,          qty =  3    /70 },
      },
    },
  },
  {
    name           = "Warlord",
    tier           = 5,
    principle_path = "Empire",
    class          = "Destroyer",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Destroyer_Tier2_dot5.png",
    pier           = "Trade Pier",
    description    = "Warlord is fitted with a laminated timber hull, reinforced with iron bands at key structural points. This revolutionary combination enables her to survive greater damage than was previously thought possible.",
    construction_costs = {
      { resource = "Planks",    qty = 125 },
      { resource = "Rope",      qty = 125 },
      { resource = "Sails",     qty = 100 },
      { resource = "Pitch",     qty = 120 },
      { resource = "Naval Gun", qty =  40 },
    },
    crew_types = {
      { type = "Swabbies",   qty = 45 },
      { type = "Buccaneers", qty = 50 },
      { type = "Marauders",  qty = 70 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 328 },
      { stat = CREW,     qty = 120 },
      { stat = SUPPLIES, qty = 46 },
      { stat = GUN_DAMAGE,      qty = 52 },
      { stat = BOARDING_DAMAGE, qty =  8 },
      { stat = SPEED,           qty =  8 },
      { stat = MANOEUVRABILITY, qty =  8 },
      { stat = ARMOUR,          qty = 52 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Buccaneers = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  7.88 /50 },
        { stat = BOARDING_DAMAGE, qty =  2.11 /50 },
        { stat = SPEED,           qty =  2.47 /50 },
        { stat = MANOEUVRABILITY, qty =  4.56 /50 },
        { stat = ARMOUR,          qty = 34.67 /50 },
      },
      Marauders = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 44.12 /70 },
        { stat = BOARDING_DAMAGE, qty =  5.89 /70 },
        { stat = SPEED,           qty =  5.53 /70 },
        { stat = MANOEUVRABILITY, qty =  3.44 /70 },
        { stat = ARMOUR,          qty = 17.33 /70 },
      },
    },
  },
  {
    name           = "Stalker",
    tier           = 5,
    principle_path = "Seafaring",
    class          = "Hunter",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Hunter_Tier2_dot5.png",
    pier           = "Trade Pier",
    description    = "Stalker's hull is built around a ribbed frame structure, making her both lightweight and incredibly resilient. The tight weave of her hemp sails reduces air loss, allowing them to catch the wind more effectively. This combination of speed and strength makes Stalker a vessel like no other.",
    construction_costs = {
      { resource = "Planks",    qty = 125 },
      { resource = "Rope",      qty = 125 },
      { resource = "Sails",     qty = 100 },
      { resource = "Fittings",  qty = 100 },
      { resource = "Naval Gun", qty =  40 },
    },
    crew_types = {
      { type = "Swabbies",   qty = 65 },
      { type = "Navigators", qty = 70 },
      { type = "Marauders",  qty = 90 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 280 },
      { stat = CREW,     qty = 160 },
      { stat = SUPPLIES, qty =  46 },
      { stat = GUN_DAMAGE,      qty = 20 },
      { stat = BOARDING_DAMAGE, qty =  8 },
      { stat = SPEED,           qty = 52 },
      { stat = MANOEUVRABILITY, qty =  8 },
      { stat = ARMOUR,          qty =  8 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Navigators = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  7.74 /70 },
        { stat = BOARDING_DAMAGE, qty =  2.73 /70 },
        { stat = SPEED,           qty =  8.47 /70 },
        { stat = MANOEUVRABILITY, qty =  4.21 /70 },
        { stat = ARMOUR,          qty =  5.48 /70 },
      },
      Marauders = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 12.26 /90 },
        { stat = BOARDING_DAMAGE, qty =  5.27 /90 },
        { stat = SPEED,           qty = 43.53 /90 },
        { stat = MANOEUVRABILITY, qty =  3.79 /90 },
        { stat = ARMOUR,          qty =  2.52 /90 },
      },
    },
  },
  {
    name           = "Thingum",
    tier           = 5,
    principle_path = "Wealth",
    class          = "Reaver",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Raider_Tier2_dot5.png",
    pier           = "Trade Pier",
    description    = "Thingum is an experiment in chaos. While most of the crew boards enemy ships conventionally, others are launched into the air by a complex system of pulleys and springs, sending them tumbling onto enemy decks before anyone knows what's happened. Injuries are expected, but the surprise is worth the cost.",
    construction_costs = {
      { resource = "Planks",      qty = 125 },
      { resource = "Rope",        qty = 125 },
      { resource = "Sails",       qty = 100 },
      { resource = "Fittings",    qty = 100 },
      { resource = "Steel Chain", qty =  50 },
    },
    crew_types = {
      { type = "Swabbies",   qty = 65 },
      { type = "Navigators", qty = 70 },
      { type = "Renegades",  qty = 90 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 328 },
      { stat = CREW,     qty = 160 },
      { stat = SUPPLIES, qty =  46 },
      { stat = GUN_DAMAGE,      qty =  8 },
      { stat = BOARDING_DAMAGE, qty = 52 },
      { stat = SPEED,           qty =  8 },
      { stat = MANOEUVRABILITY, qty =  8 },
      { stat = ARMOUR,          qty = 20 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Navigators = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  3.35 /70 },
        { stat = BOARDING_DAMAGE, qty =  8.47 /70 },
        { stat = SPEED,           qty =  1.65 /70 },
        { stat = MANOEUVRABILITY, qty =  6.36 /70 },
        { stat = ARMOUR,          qty = 12.89 /70 },
      },
      Renegades = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  4.65 /90 },
        { stat = BOARDING_DAMAGE, qty = 43.53 /90 },
        { stat = SPEED,           qty =  6.35 /90 },
        { stat = MANOEUVRABILITY, qty =  1.64 /90 },
        { stat = ARMOUR,          qty =  7.11 /90 },
      },
    },
  },
  {
    name           = "Wraith",
    tier           = 6,
    principle_path = "Notoriety",
    class          = "Prowler",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Smuggler_Tier3.png",
    pier           = "Deep-water Pier",
    description    = "Wraith's hull is crafted from lightweight, tar-slick timbers, allowing her to slip through the seas with unmatched grace. Her rigging system is the culmination of years of research, allowing her to change direction in an instant. Wraith moves through the water like a shadow—smooth, swift and impossibly fast.",
    construction_costs = {
      { resource = "Planks",        qty = 175 },
      { resource = "Rope",          qty = 175 },
      { resource = "Sails",         qty = 150 },
      { resource = "Figurehead",    qty =  30 },
      { resource = "Jolly Roger",   qty = 150 },
      { resource = "Silver Lining", qty =  30 },
    },
    crew_types = {
      { type = "Swabbies",  qty = 105 },
      { type = "Renegades", qty = 110 },
      { type = "Corsairs",  qty = 140 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 420 },
      { stat = CREW,     qty = 250 },
      { stat = SUPPLIES, qty = 104 },
      { stat = GUN_DAMAGE,      qty = 12 },
      { stat = BOARDING_DAMAGE, qty = 30 },
      { stat = SPEED,           qty = 12 },
      { stat = MANOEUVRABILITY, qty = 78 },
      { stat = ARMOUR,          qty = 12 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Renegades = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  5.08 /110 },
        { stat = BOARDING_DAMAGE, qty = 13.68 /110 },
        { stat = SPEED,           qty =  4.63 /110 },
        { stat = MANOEUVRABILITY, qty =  7.4  /110 },
        { stat = ARMOUR,          qty =  2.87 /110 },
      },
      Corsairs = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  6.92 /140 },
        { stat = BOARDING_DAMAGE, qty = 16.32 /140 },
        { stat = SPEED,           qty =  7.37 /140 },
        { stat = MANOEUVRABILITY, qty = 70.6  /140 },
        { stat = ARMOUR,          qty =  9.13 /140 },
      },
    },
  },
  {
    name           = "Wrath Bringer",
    tier           = 6,
    principle_path = "Empire",
    class          = "Destroyer",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Destroyer_Tier3.png",
    pier           = "Deep-water Pier",
    description    = "Wrath Bringer is a war machine like no other. Her hull is reinforced with triple-layered iron plates, each layer tempered to withstand even the heaviest cannon fire. Her cannons are precision-bored for maximum damage, capable of levelling fortresses with a single broadside. The embodiment of pure destruction.",
    construction_costs = {
      { resource = "Planks",      qty = 175 },
      { resource = "Rope",        qty = 175 },
      { resource = "Sails",       qty = 150 },
      { resource = "Pitch",       qty = 180 },
      { resource = "Naval Gun",   qty =  60 },
      { resource = "Copper Lamp", qty =  75 },
    },
    crew_types = {
      { type = "Swabbies",  qty = 105 },
      { type = "Marauders", qty = 110 },
      { type = "Corsairs",  qty = 140 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 492 },
      { stat = CREW,     qty = 250 },
      { stat = SUPPLIES, qty =  60 },
      { stat = GUN_DAMAGE,      qty = 78 },
      { stat = BOARDING_DAMAGE, qty = 12 },
      { stat = SPEED,           qty = 12 },
      { stat = MANOEUVRABILITY, qty = 12 },
      { stat = ARMOUR,          qty = 78 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Marauders = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 35.56 /110 },
        { stat = BOARDING_DAMAGE, qty =  2.87 /110 },
        { stat = SPEED,           qty =  5.47 /110 },
        { stat = MANOEUVRABILITY, qty =  3.22 /110 },
        { stat = ARMOUR,          qty = 16.19 /110 },
      },
      Corsairs = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 42.44 /140 },
        { stat = BOARDING_DAMAGE, qty =  9.13 /140 },
        { stat = SPEED,           qty =  6.53 /140 },
        { stat = MANOEUVRABILITY, qty =  8.78 /140 },
        { stat = ARMOUR,          qty = 61.81 /140 },
      },
    },
  },
  {
    name           = "Neptune",
    tier           = 6,
    principle_path = "Seafaring",
    class          = "Hunter",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Hunter_Tier3.png",
    pier           = "Deep-water Pier",
    description    = "Neptune is the pinnacle of hunting vessels, designed for speed, precision, and ruthless efficiency. Her hull is crafted from lightweight ironwood and treated with a unique blend of whale oil and resin that reduces water friction to near zero. Her sails are the highest quality sun-cured flax making Neptune untouchable on the open sea.",
    construction_costs = {
      { resource = "Planks",        qty = 175 },
      { resource = "Rope",          qty = 175 },
      { resource = "Sails",         qty = 150 },
      { resource = "Fittings",      qty = 150 },
      { resource = "Naval Gun",     qty =  60 },
      { resource = "Silver Lining", qty =  30 },
    },
    crew_types = {
      { type = "Swabbies",  qty = 130 },
      { type = "Marauders", qty = 135 },
      { type = "Corsairs",  qty = 165 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 420 },
      { stat = CREW,     qty = 300 },
      { stat = SUPPLIES, qty =  60 },
      { stat = GUN_DAMAGE,      qty = 30 },
      { stat = BOARDING_DAMAGE, qty = 12 },
      { stat = SPEED,           qty = 78 },
      { stat = MANOEUVRABILITY, qty = 12 },
      { stat = ARMOUR,          qty = 12 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Marauders = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 13.98 /135 },
        { stat = BOARDING_DAMAGE, qty =  2.96 /135 },
        { stat = SPEED,           qty = 36.35 /135 },
        { stat = MANOEUVRABILITY, qty =  3.32 /135 },
        { stat = ARMOUR,          qty =  2.57 /135 },
      },
      Corsairs = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 16.02 /165 },
        { stat = BOARDING_DAMAGE, qty =  9.04 /165 },
        { stat = SPEED,           qty = 41.65 /165 },
        { stat = MANOEUVRABILITY, qty =  8.68 /165 },
        { stat = ARMOUR,          qty =  9.43 /165 },
      },
    },
  },
  {
    name           = "Loki",
    tier           = 6,
    principle_path = "Wealth",
    class          = "Reaver",
    hybrid_path    = "None",
    icon_filename  = "T_Ship_Raider_Tier3.png",
    pier           = "Deep-water Pier",
    description    = "Loki is built to conquer and claim, boasting custom-forged grappling arms that extend far faster than a traditional boarding system ever could. Her decks are designed to hold maximum plunder, while her wide hull enables a crew twice the size of a standard brig. Loki stands unrivalled as the ultimate raiding vessel.",
    construction_costs = {
      { resource = "Planks",      qty = 175 },
      { resource = "Rope",        qty = 175 },
      { resource = "Sails",       qty = 150 },
      { resource = "Fittings",    qty = 150 },
      { resource = "Steel Chain", qty =  75 },
      { resource = "Copper Lamp", qty =  75 },
    },
    crew_types = {
      { type = "Swabbies",  qty = 130 },
      { type = "Renegades", qty = 135 },
      { type = "Corsairs",  qty = 165 },
    },
    stats_base = {
      { stat = HEALTH,   qty = 492 },
      { stat = CREW,     qty = 300 },
      { stat = SUPPLIES, qty =  60 },
      { stat = GUN_DAMAGE,      qty = 12 },
      { stat = BOARDING_DAMAGE, qty = 78 },
      { stat = SPEED,           qty = 12 },
      { stat = MANOEUVRABILITY, qty = 12 },
      { stat = ARMOUR,          qty = 30 },
    },
    stats_crew_bonuses = {
      Swabbies = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty = 0 },
        { stat = BOARDING_DAMAGE, qty = 0 },
        { stat = SPEED,           qty = 0 },
        { stat = MANOEUVRABILITY, qty = 0 },
        { stat = ARMOUR,          qty = 0 },
      },
      Renegades = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  5.2  /135 },
        { stat = BOARDING_DAMAGE, qty = 36.35 /135 },
        { stat = SPEED,           qty =  4.75 /135 },
        { stat = MANOEUVRABILITY, qty =  1.18 /135 },
        { stat = ARMOUR,          qty =  7.4  /135 },
      },
      Corsairs = {
        { stat = HEALTH,   qty = 0 },
        { stat = CREW,     qty = 0 },
        { stat = SUPPLIES, qty = 0 },
        { stat = GUN_DAMAGE,      qty =  6.8  /165 },
        { stat = BOARDING_DAMAGE, qty = 41.65 /165 },
        { stat = SPEED,           qty =  7.25 /165 },
        { stat = MANOEUVRABILITY, qty = 10.82 /165 },
        { stat = ARMOUR,          qty = 22.6  /165 },
      },
    },
  }
}



local ships = {
  ["Landlubber"]    =  1,
  ["Moonlight"]     =  2,
  ["Iron Fist"]     =  3,
  ["Tide Runner"]   =  4,
  ["Sharktooth"]    =  5,
  ["Azimuth"]       =  6,
  ["Steel Edge"]    =  7,
  ["Huracán"]       =  8,
  ["Goldseeker"]    =  9,
  ["Nightshade"]    = 10,
  ["Yoke Breaker"]  = 11,
  ["Tempest"]       = 12,
  ["Wolfhound"]     = 13,
  ["Rogue"]         = 14,
  ["Sea Dragon"]    = 15,
  ["Fortune"]       = 16,
  ["Providence"]    = 17,
  ["Vulture"]       = 18,
  ["Ravager"]       = 19,
  ["Catshark"]      = 20,
  ["Bedlam"]        = 21,
  ["Eclipse"]       = 22,
  ["Warlord"]       = 23,
  ["Stalker"]       = 24,
  ["Thingum"]       = 25,
  ["Wraith"]        = 26,
  ["Wrath Bringer"] = 27,
  ["Neptune"]       = 28,
  ["Loki"]          = 29,
}

--#endregion



--#region: Auxiliary data enrichment table

local ship_class_descriptions = {
  ["Special"]   = "Some ships are able to fulfil multiple roles. Sometimes they are just bad at everything, and sometimes they are just out of this world.",
  ["Prowler"]   = "Slick as an eel and sporting vast cargo holds, Prowlers are the ship of choice for shady business like Smuggling Runs. They're not made for attacking problems head on, but their supplies last long, and their nimble frame lets them stay out of sight until it's time to strike.",
  ["Destroyer"] = "Armed to the teeth and plated with thick armour, Destroyers excel at cracking fortified targets like Crown Ports. They lumber into view with the grace of a sea cow, but once they get in range, they pelt their opponent with heavy cannons and shrug off any attacks that come their way.",
  ["Hunter"]    = "Fast as a tiger shark and able to carry a big crew, Hunters are unmatched at hit-and-run attacks on Merchant Ships and the like. There may be stronger or stealthier predators out there, but if you want to be the top of the food chain in the Seven Seas, nothing beats speed and sheer tenacity.",
  ["Reaver"]    = "Built for combat and carrying a vast raiding party, Reavers are able to plunder well-guarded locations like Treasure Caves. They might lack armour or finesse, but through sheer aggression and bloodthirst, their opponents might surrender before they even get into boarding range.",
}

--#endregion



--#region: Data validation call

validate_ships(ships_list, ships)

--#endregion



--#region: Public API to ships_data

--- Public API to ships data.
local p = {}

--- Get a ship record by name.
function p.get_ship_by_name(name)
  local index = ships[name]
  if index then
    return ships_list[index]
  end
  return nil
end

--- Get a ship record by its canonical order:
--- from Tier 1 to Tier 6 clockwise from top around the Compass.
function p.get_ship_by_index(index)
  return ships_list[index]
end

--- Get all ship records, in canonical order:
--- from Tier 1 to Tier 6 clockwise from top around the Compass.
function p.get_all_ships()
  return ships_list
end

--- Get a ship class description by class name.
function p.get_ship_class_description(class)
  return ship_class_descriptions[class:gsub("%+$", "")]
end

function p.get_count_of_ships()
  return #ships_list
end

return p

--#endregion