Perwadjyt — The Precarious Nile
- Mission
- 2 of 38 — third mission of the campaign
- Era
- Pre-Dynasty · ~3100 BC
- Classical name
- Buto (Tell el-Fara'in)
- Starting funds
-
Very Easy 7 500 Db Easy 5 000 Db Normal 3 750 Db Hard 2 500 Db Very Hard 2 000 Db
- Patron deity
- Osiris
- Trade
- None
- Previous mission
- Thinis — The Dawn of Civilization
- Next mission
- Nekhen — The First Pharaoh
- Status
- Implemented Tutorial
Briefing
The mission opens with a history panel (message_history_perwadjyt) and the message_farming_along_the_nile tutorial popup, which introduces floodplain farming and Work Camps:
The Thinite nobles still struggle to unite the lands of the Nile under one supreme ruler. To aid them in their cause, it is hoped that you will endeavor to establish a thriving community at Perwadjyt, in the humid Delta region of Lower Egypt, thus spreading their influence throughout the length of the sacred river. To support a population larger than that of a village, you must learn to use agriculture.
Egyptian farmers have begun to exploit the rich, fertile soil deposited by the annual Inundation of the Nile river for growing crops. The Nile can be hazardous, however. Many dangers lurk along its banks and in its waters, such as deadly crocodiles, hippopotamuses and malaria-carrying mosquitoes.
Perwadjyt (Per-Wadjet, "House of Wadjet") is modern Tell el-Fara'in in the western Nile Delta, Kafr el-Sheikh Governorate. It was a major cult centre of the cobra goddess Wadjet — one of the Two Ladies whose image adorned the pharaonic double crown — and the pre-dynastic capital of the 6th nome of Lower Egypt. The site was excavated by Dorothy Charlesworth in the 1960s and confirmed as an early urban centre with stratified pre-dynastic occupation. As the first mission set in the Delta, Perwadjyt introduces the Nile floodplain farming system that will be central to the rest of the campaign.
Objectives
- Population 600 citizens
- Housing count 10 occupied plots
- Housing level All ten must reach Ordinary Cottage (level 6) or higher
Ordinary Cottages require food, clean water, pottery, religion access (Temple or Shrine of Osiris), and entertainment (Booth). All three conditions must be met simultaneously. In addition, the three scripted industry milestones below must be reached before victory is granted — pottery production and beautification must both be unlocked and the health crisis resolved.
Tutorial sequence
Perwadjyt continues the progressive-unlock format of the previous missions. Core infrastructure, entertainment, and Osiris worship are available from the start; industry, beautification, and healthcare unlock through gameplay events. The Population Advisor, Entertainment Advisor, and Religion Advisor are active at mission start; Labor and Health Advisors unlock later.
message_tutorial_industry).
message_tutorial_municipal_structures).
message_basic_healthcare).
Strategy
Perwadjyt is the first mission where food comes from farms rather than hunted game. The floodplain farming cycle — one harvest per year, Work Camps supplying field labor — requires more forward planning than hunting lodges. The pottery production chain must also be established to unlock the population growth needed to hit 600 citizens.
Phase 1 — Settle and farm
Place 10–12 Vacant Lots near the kingdom road. Build a Firehouse and a Police Station near housing, and a Village Palace somewhere with access to ground water (grassy terrain). Identify the floodplain tiles along the Nile — they appear darker and more fertile — and place Fig Farms directly on them. Each farm needs peasant labor supplied by a Work Camp; keep Work Camps within walking distance of the farms so peasants do not waste time in transit. Build a Granary to receive the harvest and a Bazaar to distribute figs to housing. Figs are the only food source until the mission ends, so build enough Granaries to buffer an entire year's supply.
Phase 2 — Industry and pottery
The population cap of 500 stays in place until 100 pottery units are in Storage Yards. Once a Granary holds 800 figs, Clay Pit, Pottery Workshop, and Storage Yard unlock. Place the Clay Pit close to a water source (the Nile bank), a Pottery Workshop nearby to receive clay, and a Storage Yard to hold finished pottery and surplus clay. One Clay Pit can supply two Pottery Workshops. Workers from the Bazaar will collect pottery from the Storage Yard and distribute it to houses — pottery access is required for housing to evolve beyond level 4. Once 100 pottery is stored the cap lifts; at 200 pottery, decorative buildings (Statues, Gardens, Plazas, Bridges, Ferries) unlock, which can boost desirability enough to push houses to level 6.
Phase 3 — Religion, entertainment, and growth
Temples and Shrines of Osiris are available from the start, but building them early is wise — Osiris's mood affects the Nile flood intensity, which directly impacts farm yields. Build a Festival Square and hold regular festivals for Osiris to maintain goodwill. A Booth (with a nearby Juggler's School) must be within walker range of all ten housing plots. With food, water, pottery, religion, and entertainment all covered, housing will evolve toward level 6 and population will climb toward 600.
Phase 4 — Healthcare
At some point a disease event will strike. This unlocks Apothecary and Physician. An Apothecary reduces malaria risk for nearby housing (malaria risk is elevated near the Nile and marshland — this is especially relevant on the Delta map). A Physician reduces disease risk. Both are needed for the health of a dense housing block and, once unlocked, should be placed promptly to prevent a second outbreak from wiping out a housing cluster.
Tips
- Figs farms only harvest once per year. Size your Granary capacity before the harvest season — if Granaries are full when peasants arrive, food is lost.
- Work Camps are the bottleneck for farm output. Each Work Camp can service a limited number of farms; add a second one if peasants are walking excessively long distances.
- The population cap of 500 is lifted only after 100 pottery is stored, not after production starts. Make sure a Storage Yard is in place and accepting pottery so the counter advances.
- Malaria risk is high near the Nile and marshland. Build Water Supplies on grassy ground and keep housing slightly away from the riverbank where possible.
- Osiris temples raise farm productivity indirectly via flood mood — prioritise Osiris worship even before the entertainment chain is fully built.
- Once statues, gardens, and plazas unlock (200 pottery), a row of Plazas along the main road and small gardens between housing blocks can provide the desirability boost needed to push the last few houses to level 6.
Available buildings
Core infrastructure, farming, entertainment, and Osiris worship are available from the start. Industry and beautification unlock progressively; healthcare unlocks on disease:
| Building | Available |
|---|---|
| Vacant Lot · Clear Land · Road | Mission start |
| Firehouse | Mission start |
| Architect's Post | Mission start |
| Police Station | Mission start |
| Village Palace | Mission start |
| Water Supply | Mission start |
| Figs Farm · Work Camp | Mission start |
| Bazaar · Granary | Mission start |
| Booth · Juggler's School | Mission start |
| Temple of Osiris · Shrine of Osiris · Festival Square | Mission start |
| Clay Pit · Pottery Workshop · Storage Yard | Granary holds 800 figs |
| Road Block · Small / Medium / Large Statue · Gardens · Plaza · Low Bridge · Ferry | Storage Yards hold 200 pottery total |
| Apothecary · Physician | First city disease event |
Developer reference
Collapsed sections below show exactly where each part of this mission lives in the source tree. All paths are relative to the repository root.
Mission script — src/scripts/mission/m_002_perwadjyt.js
The entire mission — configuration block, variables, and all event handlers — lives in one file:
src/scripts/mission/m_002_perwadjyt.js
This file is imported by src/scripts/missions.js. The mission2 { … } block at the top is the static configuration parsed at startup:
// lines 3 – 47 (m_002_perwadjyt.js)
mission2 {
start_message : "message_farming_along_the_nile" // intro popup: farming + Work Camps
selection_title : "Perwadjyt"
env {
has_animals : true
gods_least_mood : 50
marshland_grow : default_marshland_grow
tree_grow : default_tree_grow
}
player_rank : 0
initial_funds [7500, 5000, 3750, 2500, 2000] // Very Easy … Very Hard
rescue_loans [7500, 5000, 3750, 2500, 2000]
house_tax_multipliers [300, 200, 150, 100, 75]
buildings [ // available at start
BUILDING_FIREHOUSE, BUILDING_ARCHITECT_POST, BUILDING_POLICE_STATION,
BUILDING_VILLAGE_PALACE, BUILDING_WATER_SUPPLY,
BUILDING_FIGS_FARM, BUILDING_WORK_CAMP,
BUILDING_BOOTH, BUILDING_JUGGLER_SCHOOL,
BUILDING_BAZAAR, BUILDING_GRANARY,
BUILDING_TEMPLE_OSIRIS, BUILDING_SHRINE_OSIRIS, BUILDING_FESTIVAL_SQUARE
] // industry / deco / health unlock via events
win_criteria {
population { enabled : true, goal : 600 }
housing_count { enabled : true, goal : 10 }
housing_level { enabled : true, goal : 6 } // level 6 = Ordinary Cottage
}
vars {
figs_stored : 800 // figs threshold to unlock pottery
pottery_step1_stored : 100 // pottery stored to lift pop cap
pottery_step1_population_cap : 500 // pop cap until step1 reached
pottery_step2_stored : 200 // pottery stored to unlock deco buildings
victory_last_action_delay : 3
figs_stored_handled : false
disease_handled : false
pottery_step1_stored_handled : false
pottery_step2_stored_handled : false
}
}
To change the figs threshold that unlocks pottery, edit figs_stored. To adjust the population cap enforced until pottery production begins, edit pottery_step1_population_cap.
Event handlers — all functions in m_002_perwadjyt.js
Each function is bound to a game event via an attribute annotation. Handlers fire only while mission=mission2 is active.
-
event_migration_update
line 49
Enforces the pottery population cap. While
pottery_step1_stored_handledis false, callsmigration.set_population_cap("pottery_not_produced_population_cap", 500). Lifted to 0 (no cap) once 100 pottery is stored. mission2_handle_population_cap -
event_mission_start
line 71
Enables the empire map, then hides all advisors. Re-enables Population, Entertainment, and Religion advisors unconditionally. On load/restart, re-unlocks industry buildings if
figs_stored_handledis already set, decorative buildings ifpottery_step2_stored_handledis set, and health buildings ifdisease_handledis set — restoring mid-mission state correctly. mission2_on_start -
event_granary_resource_added
line 109
Fires when food is added to any Granary. Once a single Granary holds ≥ 800 figs (configurable via
figs_stored), setsfigs_stored_handled = true, unlocks Clay Pit / Pottery Workshop / Storage Yard, enables Labor Advisor, and showsmessage_tutorial_industry(ID 259). Runs only once. mission2_on_filled_granary -
event_warehouse_filled (step 1)
line 134
Fires when a Storage Yard receives goods. Once the city's total pottery across all Storage Yards reaches ≥ 100 units (configurable via
pottery_step1_stored), setspottery_step1_stored_handled = true, which lifts the population cap viaevent_migration_update. Runs only once. mission2_warehouse_pottery_1_check -
event_warehouse_filled (step 2)
line 149
After step 1 is complete, watches for total pottery ≥ 200 units (configurable via
pottery_step2_stored). Setspottery_step2_stored_handled = true, unlocks Road Block / all Statues / Gardens / Plaza / Low Bridge / Ferry, and showsmessage_tutorial_municipal_structures(ID 256). Runs only once. mission2_warehouse_pottery_2_check -
event_city_disease
line 179
Fires on the first epidemic. Sets
disease_handled = true, unlocks Apothecary and Physician, enables Health Advisor, and showsmessage_basic_healthcare(ID 250). Runs only once. mission2_on_disease -
event_update_victory_state
line 197
Checks all three scripted flags (
figs_stored_handled,pottery_step1_stored_handled,pottery_step2_stored_handled) plus a 3-day cooldown after the last event. All must be true before the core win criteria (population 600, 10 houses at level 6+) can grant victory. mission2_handle_victory_state
The goal tooltip function mission2_get_goal_tooltip() (line 55) returns a different hint string depending on which milestone is still pending — it is called by city.goal_tooltip to drive the in-game objective display.
Game messages — src/scripts/game_messages_en.js
Popup dialogs and the opening history panel are defined in src/scripts/game_messages_en.js. To edit text, find the entry by key and change the text: field inside its content { … } block.
| Key | ID | Line | When shown |
|---|---|---|---|
message_history_perwadjyt |
202 | 2461 | History briefing shown before mission starts (narrator text — "The Precarious Nile") |
message_farming_along_the_nile |
242 | 3077 | start_message — first popup on mission load, explains floodplain farming and Work Camps |
message_tutorial_industry |
259 | 3268 | Shown by mission2_on_filled_granary when granary holds 800 figs; introduces Clay Pit and Pottery Workshop |
message_tutorial_municipal_structures |
256 | 3236 | Shown by mission2_warehouse_pottery_2_check when 200 pottery stored; introduces statues, gardens, road blocks, and water crossings |
message_basic_healthcare |
250 | 3175 | Shown by mission2_on_disease on first epidemic; introduces Apothecary, Physician, malaria, and disease overlays |
A second history entry message_history_perwadjyt_3 (ID 238, line 3031, subtitle "The Banks of the Nile") is used when Perwadjyt appears later in the campaign and describes the mastaba requirement and Canaanite warships. It is not used by mission 2.
Save file and map data
The original Pharaoh save file that provides the map layout, terrain, Nile course, and floodplain tiles for Perwadjyt is:
bin_x64/Missions/mission_02.sav
This binary file is loaded by the engine before the JS script runs. It encodes the tile map, Nile layout (including floodplain bounds), predefined animal spawn zones, and the kingdom road entry point. The floodplain tiles are embedded in the map data — their exact positions determine where Fig Farms can be placed and how large a harvest the player can achieve. To replace the map, swap the .sav file; the JS script will still apply on top of it.
The scripting system is loaded from src/scripts/missions.js, which imports mission/m_002_perwadjyt.js by path. If you rename or move the file, update the import there.