Wiki / Player Guide / Buildings / Transport Wharf

Transport Wharf

The Transport Wharf berths a transport ship used to ferry army companies across navigable water. A newly built, staffed wharf orders a ship from a Shipwright; once the ship is delivered it docks at the wharf and waits for embarkation orders from the Military advisor.

Unlike fishing wharves or warship wharves, a Transport Wharf does not produce resources or fight — its only job is to house one transport ship and keep it reachable from the river. The building needs road access, labor, and a straight stretch of coastline with clear water approaches so ships can navigate in and out.

Citizens dislike living next to naval yards: the wharf carries a noticeable negative desirability. Keep it away from housing you want to evolve.

Stats

2×2Size
5Workers
−8Desirability

Cost (Normal)
100 Db
Cost by difficulty
VE 40 · Easy 70 · Normal 100 · Hard 150 · VH 300
Labor category
Military
Fire / damage risk
Low
Placement
Shoreline + open water access
Ship
1 × Transport Ship
Advisor
Military
Transport Wharf → Orders ship (monthly) → Shipwright builds Transport Ship → Ship docks / waits at wharf → Loads troops · sails · unloads

Overview

Egyptian armies moved along the Nile as readily as on land. Transport ships let companies cross water that would otherwise force a long march around, or reach landing sites on the far bank during campaigns. In Pharaoh this is modelled as a dedicated naval berth: one wharf, one ship, controlled through the Military advisor alongside forts and warships.

The Transport Wharf unlocks alongside other naval buildings on missions that need river crossings — for example Meidum and Buhen. It is smaller and cheaper than a Warship Wharf, needs fewer workers, and does not require timber at the wharf itself (the Shipwright consumes timber when building the hull).

Mechanics

Ship order

Each month, a staffed Transport Wharf with open water access and no live boat in its boat slot raises a city-wide transport-ship request. The Shipwright polls those requests and builds a transport 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 transport ship, the wharf clears the slot and will request a replacement on a later month.

Transport Ship Naval figure · berths at this wharf · carries one company of troops
Actions: Waiting (211) · Going to wharf (212) · Docked (213) · Sailing (214)

Labor & coverage

The wharf belongs to the Military labor category and needs 5 workers. Like other service buildings 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 transport ship is waiting or docked at the wharf, the building switches to the moored “wait” ambient animations for its facing. When the ship is away (sailing or en route), 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 174 (entry 1) when the building has road access; otherwise the generic “no road access” string is shown.

vs. Warship Wharf

Transport WharfWarship Wharf
Size2×23×3
Workers515
Cost (Normal)100 Db200 Db
Desirability−8−4
Ship typeTransport ship (troop ferry)Warship (combat)
Shipwright requestTransport hullWarship hull
CombatNoYes
ShorelineRequiredRequired

Build Transport Wharves when you need to move companies; build Warship Wharves when you need to fight on the water. Both share the same Shipwright pipeline and the same shoreline placement rules.

Placement

The planner requires shoreline and water access. Put the wharf on a straight stretch of coast so docking points stay clear — awkward bends and blocked channels stop ships from reaching the berth. Orientation is relative to the water edge.

Road access is mandatory for labor. Connect the wharf to the city road network, but keep a buffer from housing because of the −8 desirability. Pair it with a Shipwright that has timber (and preferably its own road connection to the same labor pool).

When selected, the game highlights the two water-access / docking tiles in green so you can verify navigability.

Tips

Developer reference

All paths relative to the repository root. Logic mirrors original Pharaoh spawn_wharf / shipwright request counters.

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

Definition lives in src/scripts/building/transport_wharf.js (lines 1–49).

building_transport_wharf = {
  animations : {
    preview : { pack:PACK_TERRAIN, id:17 },
    base    : { pack:PACK_TERRAIN, id:17 },
    work_* / wait_*  // ambient water / moored sprites by facing
  },
  building_size : 2,
  planner_update_rule : { relative_orientation: 1 },
  meta : { text_id: 174, help_link:"message_building_transport_wharf" },
  needs : { water_access : true, shoreline : true },
  labor_category : LABOR_CATEGORY_MILITARY,
  // OG spawn_wharf: generate_labor_seeker when houses_covered < 51
  min_houses_coverage : 50,
  cost: [ 40, 70, 100, 150, 300 ],
  desirability : { value:[-8], step:[2], step_size:[2], range: [4] },
  laborers:[5], fire_risk:[1], damage_risk: [1]
}

update_graphic calls building_wharf_update_graphic_moored when the boat is in ACTION_211_TRANSPORT_SHIP_WAITING or ACTION_213_TRANSPORT_SHIP_DOCKED. highlight_waypoints paints both water-access tiles green.

Behavior — src/building/building_transport_wharf.cpp

C++ class building_transport_wharf (lines 1–55) extends building_wharf:

  • clear_invalid_boat — drops BUILDING_SLOT_BOAT if the figure is dead or not FIGURE_TRANSPORT_SHIP
  • spawn_figure — labor problem check, clear stale boat, labor seeker via min_houses_coverage
  • update_day — base wharf day tick + clear invalid boat
  • update_month — if staffed + open water + no valid boat → g_city.buildings.request_transport_ship(); refresh docking points
  • on_undo — clears the boat slot

Headers: src/building/building_transport_wharf.h. Shared wharf helpers: src/building/building_wharf.cpp.

Transport ship — src/figuretype/figure_transport_ship.*

Figure implementation: src/figuretype/figure_transport_ship.cpp (~1242 lines), src/figuretype/figure_transport_ship.h, JS meta src/scripts/figure/transport_ship.js.

Action constants (also exported to JS in src/js/js_constants.cpp):

ACTION_211_TRANSPORT_SHIP_WAITING
ACTION_212_TRANSPORT_SHIP_GOING_TO_WHARF
ACTION_213_TRANSPORT_SHIP_DOCKED
ACTION_214_TRANSPORT_SHIP_SAILING

Integral coverage: tests/261_transport_wharf_og.js.

Info window — src/scripts/ui_transport_wharf_info_window.js

Imported from src/scripts/ui.js. Layout inherits building_info_window; first advisor is ADVISOR_MILITARY.

[es=building_info_window]
transport_wharf_info_window {
    first_advisor    : ADVISOR_MILITARY
    related_buildings [BUILDING_TRANSPORT_WHARF]
    ui : baseui(building_info_window, {
        background   : outer_panel({size: [29, 16]}),
    })
}

// init: lang group meta_text_id (174) entry 1, or #building_no_road_access
window.warning_text.text = __loc(reason)
building_info_window_setup_advisors(window)
Game messages — src/scripts/game_messages_en.js
KeyIDLineWhen shown
message_building_transport_wharf 357 4057 Help panel (help_link). Covers Shipwright order, road/labor/coastline requirements, desirability, and links to transport-ship / military history entries.

Building name / status strings: text group 174 (text_id: 174). Entry 0 is the building name; entry 1 is the info-window description.