Wiki / Player Guide / Buildings / Warship Wharf

Warship Wharf

The Warship Wharf berths a warship used to hunt enemy ships, patrol the river, and protect landings. A newly built, staffed wharf orders a hull from a Shipwright; once delivered the warship docks at the wharf and waits for Military advisor orders (hold, hunt, patrol, repair, return).

The building needs road access, labor, and a straight stretch of coastline with navigable approaches. Citizens dislike living next to naval yards — keep housing a short distance away.

Original Pharaoh caps a city at six Warship Wharves.

Stats

3×3Size
15Workers
−4Desirability

Cost (Normal)
200 Db
Cost by difficulty
VE 120 · Easy 150 · Normal 200 · Hard 300 · VH 400
Labor category
Military
Fire / damage risk
Low
Placement
Shoreline + open water · max 6 per city
Ship
1 × Warship
Advisor
Military
Warship Wharf → Orders ship (monthly) → Shipwright builds Warship → Ship docks / waits at wharf → Hunt · patrol · ram · repair

Overview

Warships are Egypt's answer to hostile river craft. Each Warship Wharf owns one combat ship that can hunt enemies in range, patrol around a hold point, ram transports, and return home for rest or repair. Timber is consumed at the Shipwright when the hull is built — the wharf itself does not store weapons or timber in the original game.

Mechanics

Ship order

Each month, a staffed Warship Wharf with open water access and no live boat in its boat slot raises a city-wide warship request. The Shipwright polls those requests and builds a warship hull when timber and labor allow. When the finished ship is created it is linked to the wharf (BUILDING_SLOT_BOAT) and sails to the docking points.

If the ship figure dies or is no longer a warship, the wharf clears the slot and will request a replacement on a later month.

Warship Naval combat figure · berths at this wharf
Actions: Waiting (8) · Hunting (10) · Docked (20) · Patrolling (23) · Attacking (24) · …

Labor & coverage

The wharf belongs to the Military labor category and needs 15 workers. It sends a labor seeker when nearby house coverage is below the threshold (min_houses_coverage: 50 — matching original Pharaoh, which generates a seeker when houses_covered < 51). Without road access the seeker cannot spawn and the wharf will not stay staffed.

Moored look

While a warship is waiting or docked at the wharf, the building switches to the moored “wait” ambient animations for its facing. When the ship is away, the working water animations play instead.

Info window

Right-clicking the wharf opens the Military advisor as the first linked advisor. The description comes from language text group 175 (entry 1) when the building has road access; otherwise the generic “no road access” string is shown — matching original draw_wharf.

vs. Transport Wharf

Warship WharfTransport Wharf
Size3×32×2
Workers155
Cost (Normal)200 Db100 Db
Desirability−4−8
Ship typeWarship (combat)Transport ship (troop ferry)
City limit6none
CombatYesNo

Placement

The planner requires shoreline, water access, and a route to open water (same sea-access check as docks). An inland lake with no river entry fails with #inland_lake_has_no_sea_access. Orientation is relative to the water edge. A city may have at most six Warship Wharves; attempting a seventh shows #full_complement_of_warship_wharves.

Road access is mandatory for labor. Pair the wharf with a Shipwright that has timber. When selected, the game highlights the two water-access / docking tiles in green.

Tips

Developer reference

All paths relative to the repository root. Logic mirrors original Pharaoh spawn_wharf / shipwright request counters / max-wharf placement rule.

Building config — src/scripts/building/warship_wharf.js

Definition lives in src/scripts/building/warship_wharf.js.

building_warship_wharf = {
  building_size : 3,
  meta : { text_id: 175, help_link:"message_building_warship_wharf" },
  needs : { water_access : true, shoreline : true },
  labor_category : LABOR_CATEGORY_MILITARY,
  min_houses_coverage : 50,
  cost: [ 120, 150, 200, 300, 400 ],
  laborers:[15]
}
// can_place / finalize_check refuse when count >= 6
Behavior — src/building/building_warship_wharf.cpp
  • clear_invalid_boat — drops BUILDING_SLOT_BOAT if the figure is dead or not FIGURE_WARSHIP
  • spawn_figure — labor problem check, clear stale boat, labor seeker via min_houses_coverage
  • update_month — if staffed + open water + no valid boat → request_warship_ship()
  • on_undo — clears the boat slot

Integral coverage: tests/262_warship_wharf_og.js, tests/270_warship_wharf_max_og.js.

Info window — src/scripts/ui_warshipwharf_info_window.js

OG draw_wharf: lang group 175 entry 1, or #building_no_road_access. First advisor ADVISOR_MILITARY.

Game messages — src/scripts/game_messages_en.js
KeyIDWhen shown
message_building_warship_wharf 356 Help panel (help_link)