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
- 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
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.
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 Wharf | Transport Wharf | |
|---|---|---|
| Size | 3×3 | 2×2 |
| Workers | 15 | 5 |
| Cost (Normal) | 200 Db | 100 Db |
| Desirability | −4 | −8 |
| Ship type | Warship (combat) | Transport ship (troop ferry) |
| City limit | 6 | none |
| Combat | Yes | No |
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
- One wharf = one warship. Need a fleet? Build more wharves (up to six) and enough Shipwright capacity.
- If a wharf stays empty, check staffing, open water access, Shipwright timber, and whether another request is already queued.
- Issue hunt / patrol / repair orders from the Military advisor or the warship figure window.
- Demolishing or undoing a wharf clears its boat link; any orphaned ship will need a new home wharf.
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— dropsBUILDING_SLOT_BOATif the figure is dead or notFIGURE_WARSHIPspawn_figure— labor problem check, clear stale boat, labor seeker viamin_houses_coverageupdate_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
| Key | ID | When shown |
|---|---|---|
message_building_warship_wharf |
356 | Help panel (help_link) |