Thinis — The Dawn of Civilization
- Mission
- 1 of 38 — second mission of the campaign
- Era
- Pre-Dynasty · ~3100 BC
- Classical name
- Tjeni (This)
- 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
- Bast (unlocked after first gold delivery)
- Trade
- None
- Previous mission
- Nubt — A Village is Born
- Next mission
- Perwadjyt
- Status
- Implemented
Briefing
The mission opens with a historical briefing and the message_gold_and_crime tutorial popup, which introduces gold mining and the crime system:
Having proved your worth at Nubt, your family now leads the settlement of Thinis — a more ambitious city on the Nile. Gold deposits lie close to the surface here. Mine them, fill your treasury, and attract enough settlers to build a prosperous city. But with wealth comes danger: criminals prey on growing towns. Build a Palace and keep Police Stations nearby to maintain order.
Thinis (ancient Tjeni, modern Girga) was the capital of the first two dynasties of pharaonic Egypt and home to the legendary founders Narmer and Menes. Although the site itself has never been conclusively identified, ancient sources place it in Upper Egypt near Abydos. As the first city in the campaign where religion, crime, and gold extraction all appear together, Thinis functions as the transition from the bare-survival tutorial of Nubt to the full civic simulation that defines the rest of the game.
Objectives
- Housing count 10 occupied plots
- Housing level All ten must reach housing level 5 or higher
Housing level 5 requires food (Bazaar + Granary), clean water (Water Supply), religion access (Temple or Shrine of Bast), and entertainment (Booth). All ten plots must satisfy every service simultaneously — the conditions are checked as a combined state, not a peak. In addition the scripted milestones below must be reached before the game grants victory.
Tutorial sequence
Unlike Nubt, most buildings are available from the start. Religion and entertainment unlock progressively as the city develops. Advisors are disabled at mission start and re-enabled one by one as milestones are reached.
Strategy
Thinis is the first mission that combines housing evolution with scripted progression gates. Victory requires advancing through three distinct phases in order.
Phase 1 — Establish the city
Build 10–12 Vacant Lots connected to the kingdom road. Place a Firehouse and a Police Station near the housing cluster. The Police Station should also be close to the Village Palace, which is the primary source of criminal activity. Build a Hunting Lodge near the oasis, a Granary to receive game meat, and a Bazaar to distribute food. Without a Granary, population caps at 150 — place one early to let immigrants keep arriving.
Phase 2 — Mine gold and unlock religion
Place Gold Mines on the gold ore deposits visible on the map (look for the lighter ground texture). Once the mines deliver 500 deben of gold income, the Temple of Bast, Shrine of Bast, and Festival Square unlock. Build a Temple of Bast and at least one or two Shrines in range of your housing block. Bast is the patron deity of this city — a second or third temple and regular festivals will keep her mood high and prevent divine wrath penalties.
Phase 3 — Entertainment and evolution
Once the Temple of Bast is active, the Booth and Juggler's School unlock. Build a Juggler's School and then a Booth within its walker's range of housing. A Water Supply must also cover all ten plots. With food, water, religion, and entertainment all satisfied, housing will evolve to level 5. The Booth's juggler must physically reach each plot — a single Booth covers roughly 20–25 tiles on a road. Use the entertainment overlay to verify coverage.
Tips
- Gold Mine workers must walk to the mine from a housing cluster — place housing within walker range of the mines, or the mines will be understaffed.
- Police Stations send constables on roaming patrols; keep one near the Palace and another near the densest housing block.
- Shrines of Bast are cheap and count toward deity happiness. Placing two or three around housing gives Bast bonus mood between festivals.
- Bazaars and Granaries reduce nearby desirability. Push them to the edge of the housing cluster or onto separate side-roads.
- The victory cooldown is only 4 days — once all flags are set and housing reaches level 5, the mission ends very quickly.
Available buildings
Most buildings are available from mission start. Religion and entertainment unlock through scripted events:
| Building | Available |
|---|---|
| Vacant Lot · Clear Land · Road | Mission start |
| Architect's Post | Mission start |
| Firehouse | Mission start |
| Police Station | Mission start |
| Bazaar | Mission start |
| Granary | Mission start |
| Water Supply | Mission start |
| Gold Mine | Mission start |
| Village Palace | Mission start |
| Hunting Lodge | Mission start |
| Temple of Bast · Shrine of Bast · Festival Square | After 500 deben gold income |
| Booth · Juggler's School | After first Temple of Bast placed |
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_1_thinis.js
The entire mission — configuration block, variables, and all event handlers — lives in one file:
src/scripts/mission_1_thinis.js
This file is imported by src/scripts/missions.js. The mission1 { … } block at the top is the static configuration parsed at startup:
// lines 3 – 39 (mission_1_thinis.js)
mission1 {
start_message : "message_gold_and_crime" // intro popup: gold + crime
env {
has_animals : true
gods_least_mood : 50
marshland_grow : default_marshland_grow
tree_grow : default_tree_grow
hide_nilometer : true
}
player_rank : 0
hide_won_screen : true // skip victory screen, proceed to next mission
initial_funds [7500, 5000, 3750, 2500, 2000] // Very Easy … Very Hard
rescue_loans [7500, 5000, 3750, 2500, 2000]
buildings [
BUILDING_HOUSE_VACANT_LOT, BUILDING_CLEAR_LAND, BUILDING_ROAD,
BUILDING_ARCHITECT_POST, BUILDING_FIREHOUSE, BUILDING_POLICE_STATION,
BUILDING_BAZAAR, BUILDING_GRANARY, BUILDING_WATER_SUPPLY,
BUILDING_GOLD_MINE, BUILDING_VILLAGE_PALACE, BUILDING_HUNTING_LODGE,
] // temples / entertainment unlock via events
win_criteria {
housing_count { enabled : true, goal : 10 }
housing_level { enabled : true, goal : 5 } // housing level 5
}
vars {
gold_mined : 500 // deben threshold to unlock religion
victory_last_action_delay : 4
nogranary_population_cap : 150 // pop cap without a granary
// boolean flags — persist across saves
gold_mined_handled : false
temples_built : false
booth_built : false
juggler_school_built : false
last_action_time : 0
}
}
To change the gold threshold that unlocks religion, edit gold_mined. To adjust the population cap enforced before a Granary is built, edit nogranary_population_cap.
Event handlers — all functions in mission_1_thinis.js
Each function is bound to a game event via an attribute annotation. Handlers fire only while mission=mission1 is active.
-
event_mission_start
line 54
Hides all advisors except Population on fresh start. On load/restart, re-unlocks any buildings whose event was already fired (religion if
gold_mined_handled, entertainment iftemples_built), restoring mid-mission state correctly. mission1_on_start -
event_advance_day · gold check
line 77
Checks daily whether
city.finance.this_year.income.gold_delivered ≥ 500. When reached, setsgold_mined_handled = true, unlocks Temple of Bast / Shrine of Bast / Festival Square, enables Religion Advisor, and showsmessage_tutorial_the_gods_of_egypt. Runs only once (guard ongold_mined_handled). mission1_check_gold_mined -
event_migration_update
line 99
Caps immigration when no Granary exists: calls
migration.set_population_cap("no_granary_population_cap", 150). Lifted to 0 (no cap) as soon as any active Granary is present. mission1_handle_population_cap - event_update_victory_state line 107 Evaluates all four milestone flags plus a 4-day cooldown since the last event. All must be true before victory can be granted. Also sets named reasons for the UI tooltip that describes what remains to be done. mission1_handle_victory_state
-
event_advance_day · temple check
line 118
Polls daily for an active Temple of Bast. When found, sets
temples_built = true, unlocks Booth and Juggler's School, enables Entertainment Advisor, showsmessage_tutorial_entertainment. Runs only once. mission1_on_build_temple -
event_advance_day · booth check
line 140
Polls daily for an active Booth. Sets
booth_built = trueon first detection. Runs only once. mission1_on_build_booth -
event_advance_day · juggler school check
line 155
Polls daily for an active Juggler's School. Sets
juggler_school_built = trueon first detection. Runs only once. mission1_on_build_juggler_school
The goal tooltip function mission1_get_goal_tooltip() (line 41) 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 | When shown |
|---|---|
message_gold_and_crime |
start_message — first popup on mission load, introduces gold mining and the crime system |
message_tutorial_the_gods_of_egypt |
Shown by mission1_check_gold_mined when 500 deben of gold has been delivered; introduces religion and Bast |
message_tutorial_entertainment |
Shown by mission1_on_build_temple when the first Temple of Bast is placed; introduces entertainment buildings |
Save file and map data
The original Pharaoh save file that provides the map layout, terrain, gold ore deposits, and starting positions for Thinis is:
bin_x64/Missions/mission_01.sav
This binary file is loaded by the engine before the JS script runs. It encodes the tile map, Nile course, gold deposit positions, predefined animal spawn zones, 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_1_thinis.js by path. If you rename or move the file, update the import there.