Nubt — A Village is Born

Nubt mission map overview
Map overview · Pre-Dynasty
Mission
0 of 38 — first mission of the campaign
Era
Pre-Dynasty · ~5000 BC
Classical name
Naqada
Starting funds
Very Easy 7 500 Db Easy 5 000 Db Normal 3 750 Db Hard 2 500 Db Very Hard 2 000 Db
Religion
Disabled
Trade
None
Next mission
Thinis — The Dawn of Civilization
Status
Implemented Tutorial

Briefing

The game opens with this historical introduction, read aloud by the narrator at the start of the campaign:

Welcome to ancient Egypt, land of the Pharaohs! Here you'll participate in the history of one of the greatest civilizations the world has ever seen, in an epic story that spans more than fifteen centuries and two dozen generations. You must lead one family, generation by generation, from its earliest beginnings in Egyptian pre-history, through the dawn of civilization — to the establishment of a unique and powerful empire — and beyond.

Our story begins more than five thousand years ago, along the banks of the Nile river, in an area known as Nubt. Here a small confederacy of clans struggles to eke out an existence in the harsh environment. With you at its head, your family leads this small settlement.

Nubt (modern Naqada, Upper Egypt) was one of the most significant pre-dynastic settlements on the Nile. Excavated by Flinders Petrie in 1894–95, the site gave its name to the Naqada culture — a series of cultural phases spanning roughly 4400–3000 BC that trace the emergence of the social complexity and craft specialisation that would culminate in the First Dynasty.

Objectives

Sturdy Huts require food access via a Bazaar. Both conditions must be met simultaneously — six occupied plots, all at level 2 or above. The win screen is suppressed (hide_won_screen: true); the game advances directly to the next mission.

Tutorial sequence

Nubt is a phased tutorial. Buildings are unlocked progressively as the city reaches each milestone. At mission start only three building types are available; the rest unlock through gameplay events.

Start Only Vacant Lots, Clear Land, and Roads are available. The first tutorial message explains road layout and immigrant pathfinding.
Pop 120 A fire breaks out in a random house. Firehouse unlocks. Tutorial message explains fire marshals and the fire risk overlay.
Pop 150 Hunting Lodge, Granary, and Bazaar unlock. Tutorial message on food distribution appears. Population Advisor becomes available.
Collapse When any building collapses from lack of maintenance, Architect's Post unlocks. Tutorial message on structural risk overlay.
400 meat When a Granary accumulates 400 units of game meat, Water Supply unlocks. Tutorial message on clean water and housing evolution to Meager Shanty.

Strategy

This is the simplest mission in the campaign — it exists to introduce the interface, not to challenge the player. The map is open and flat with a pack of ostriches in the south-east quadrant. There are no trade partners, no military threats, no religion requirements, and no taxation.

Phase 1 — Getting settlers

Place five or six Vacant Lots anywhere connected to the kingdom road via roads. Immigrants arrive quickly. Leave room around each lot for future service buildings. The population cap is 250 for this mission, so do not worry about over-building.

Phase 2 — Food and fire

Once population reaches 120, a house will catch fire. The Firehouse panel appears; build one near your housing cluster. Shortly after, at 150 citizens, the food chain unlocks. The ostriches are positioned at roughly (40, 60) on the map — place two Hunting Lodges within walking distance, a Granary to receive the meat, and a Bazaar to distribute it to housing. Bazaars reduce nearby desirability, so keep them on the edge of your housing block rather than in the centre.

Phase 3 — Water and evolution

Once the Granary holds 400 units of game meat the Water Supply unlocks. Build one on grassy ground (visible underground water) and it will dispatch water carriers to nearby houses. With food from the Bazaar and water from the Water Supply in reach, Sturdy Huts will evolve to Meager Shanties — satisfying the housing level objective. Six plots at level 2 or above finishes the mission.

Tips

Available buildings

Buildings are unlocked progressively through tutorial events. Final unlocked state:

BuildingUnlocked by
Vacant Lot · Clear Land · RoadMission start
FirehouseFire event (pop ≥ 120)
Hunting Lodge · Granary · BazaarPopulation reaches 150
Architect's PostFirst building collapse
Water SupplyGranary holds 400 game meat

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_0_nubt.js

The entire mission — configuration block, variables, and all event handlers — lives in one file:

src/scripts/mission_0_nubt.js

This file is imported by src/scripts/missions.js which loads all 38 campaign scripts. The mission0 { … } block at the top of the file is the static configuration parsed at startup:

// lines 3 – 45  (mission_0_nubt.js)
mission0 {
  start_message : "message_housing_and_roads"   // first popup (ID 249)
  env {
    has_animals       : true
    gods_least_mood   : 50
    marshland_grow    : default_marshland_grow
    tree_grow         : default_tree_grow
    hide_nilometer    : true        // hides flood meter
  }
  religion_enabled  : false
  hide_won_screen   : true         // skip victory screen, go straight to next mission
  player_rank       : 0

  initial_funds  [7500, 5000, 3750, 2500, 2000]  // Very Easy … Very Hard
  rescue_loans   [7500, 5000, 3750, 2500, 2000]

  buildings [                        // only these are available at start
    BUILDING_HOUSE_VACANT_LOT,
    BUILDING_CLEAR_LAND,
    BUILDING_ROAD
  ]

  win_criteria {
    housing_count { enabled : true, goal : 6 }
    housing_level { enabled : true, goal : 2 }  // level 2 = Sturdy Hut
  }

  vars {
    granary_open_population          : 150
    population_cap_firstfire         : 0
    granary_meat_stored              : 400
    victory_last_action_delay        : 4
    population_to_start_fire_event   : 120
    population_cap                   : 250
    // boolean flags persist across saves (resume mid-tutorial)
    tutorial_fire_handled      : false
    tutorial_collapsed_handled : false
    tutorial_firehouse_built   : false
    tutorial_granary_opened    : false
    tutorial_gamemeat_stored   : false
    granary_built              : false
    last_action_time           : 0
  }
}

To change difficulty starting money, edit the initial_funds array (index 0 = Very Easy, 4 = Very Hard). To adjust the population thresholds that trigger tutorial steps, edit the corresponding vars entries.

Event handlers — all functions in mission_0_nubt.js

Each function is bound to a game event via an attribute annotation on the line above it. Handlers are called by the scripting engine whenever that event fires, but only when mission=mission0 is active.

  • event_mission_start line 48 Restores mid-tutorial state on load/restart — re-unlocks any buildings whose tutorial step was already completed, so resuming a save never leaves the player without previously earned buildings. mission0_on_start
  • event_register_mission_animals line 80 Clears default animal spawns and places 4 ostriches at map position (40, 60) with a roam radius of 16 tiles. Edit here to move or change the prey type. mission0_register_animals
  • event_advance_week line 103 Polls weekly once population ≥ 120. Adds 2 000 fire damage to a random house to trigger the fire tutorial. Runs only once (guard on tutorial_fire_handled). mission0_handle_fire_event
  • event_fire_damage line 125 Responds to the fire; unlocks BUILDING_FIREHOUSE and shows message_fire_in_the_village (ID 252). Sets tutorial_fire_handled = true. mission0_handle_fire
  • event_collase_damage line 138 Unlocks BUILDING_ARCHITECT_POST and shows collapse tutorial message (ID 253) the first time any building collapses. Note: the event name has a typo in the engine (collase not collapse). mission0_handle_collapse
  • event_population_changed line 151 Triggers at population ≥ 150 (configurable via granary_open_population). Unlocks Hunting Lodge, Granary, and Bazaar; shows food tutorial (message ID 239); makes Population Advisor available. mission0_handle_population_for_granary
  • event_advance_day · build granary line 171 Watches daily for the first Granary to be placed. When found, enables the Population Advisor panel. mission0_on_build_granary
  • event_granary_resource_added line 188 Fires when food is added to any Granary. Once game meat in a single granary reaches 400 units (configurable via granary_meat_stored), unlocks BUILDING_WATER_SUPPLY and shows clean water tutorial (message ID 255). mission0_on_filled_granary
  • event_update_victory_state line 208 Called each tick to compute whether the win conditions are met. All four tutorial flags plus a cooldown since the last tutorial action must be true before victory is granted. Change victory_last_action_delay to shorten or lengthen the delay. mission0_handle_victory_state
  • event_migration_update line 219 Caps unemployment swing at ±10 percentage points, preventing the early city from stalling on a bad immigration roll. mission0_handle_population_cap
Game messages — src/scripts/game_messages_en.js

All popup dialogs and the opening history panel are defined in src/scripts/game_messages_en.js. Each entry has a numeric ID used by the C++ engine to look up translated strings. To edit text, find the entry by name and change the text: field inside content { … }.

KeyIDLineWhen shown
message_history_nubt 200 2429 History briefing shown before mission starts (narrator text)
message_housing_and_roads 249 3167 start_message — first popup on mission load, explains roads and immigration
message_fire_in_the_village 252 3196 Shown by mission0_handle_fire when first fire occurs
message_tutorial_collapsed_building 253 3204 Shown by mission0_handle_collapse on first collapse
message_tutorial_food_or_famine 239 3047 Shown by mission0_handle_population_for_granary at pop 150
message_tutorial_clean_water 255 3222 Shown by mission0_on_filled_granary when granary holds 400 meat

The classical-name variant of the history message (Naqada instead of Nubt) is a separate entry at line 4712, shown when the player enables classical city names in options.

Save file and map data

The original Pharaoh save file that provides the map layout, terrain, and starting positions for Nubt is:

bin_x64/Missions/mission_00.sav

This binary file is loaded by the engine before the JS script runs. It encodes the tile map, Nile course, predefined animal spawn zones (overridden by event_register_mission_animals in the script), and the kingdom road entry point. To replace the map entirely, 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_0_nubt.js by path. If you rename or move the file, update the import there.