Skip to content

Cities (DARKLAND.CTY)

City-specific data: names for every location within each city, coordinates, dock connections, building inventory, and shop quality ratings. Non-city locations are in DARKLAND.LOC.

Extension
DARKLAND.CTY
Location
Game root
Byte order
Mixed — <code>city_contents</code> word is big-endian; all other fields are little-endian
Size
57,225 B — 1-byte count (92) + 92 × 622-byte city records
Compression
None
Magic
None — num_cities byte = 0x5C at 0x00
Status
Partial
Source
Wendigo — darkland.cty.xml; partially correlated with in-game city content
Partial. Two name slots are not fully resolved: +0x18E (populated in 6 cities as Munzenplatz / German Reichsmuenzstaette — likely maps to $imperialMint variable, but not runtime-proven) and +0x1CE (gate/tower names; correlates with city_contents bit 0x2000 in 31/34 cases). The city_contents word must be treated as big-endian — earlier little-endian readings shift all flags and produce wrong results.

Canonical source: darkland.cty.xml (Wendigo’s Darklands repo)

File Layout

Offset 0x00:  byte      num_cities = 0x5C (92)
Offset 0x01:  city[92]  cities

City order here is the definitive ordering; the full name is the best unique identifier.

city struct (622 bytes = 0x26E)

OffsetSizeFieldDescription
+0x0032short_nameShort city name
+0x2032full_nameFull city name
+0x4046city_dataCoordinates, dock info, flags, shop qualities (see below)
+0x6E32leader_nameName of the city leader
+0x8E32ruler_nameName of the ruler
+0xAE32(unknown)Possibly unused
+0xCE32polit_nameName of the political centre / town square
+0xEE32town_hall_nameName of the town hall
+0x10E32fortress_nameName of the city fortress or castle
+0x12E32cathedral_nameName of the cathedral
+0x14E32church_nameName of the church
+0x16E32market_nameName of the marketplace
+0x18E32(unknown)In the stock file this is non-empty in exactly 6 cities, and every populated value is Munzenplatz
+0x1AE32slum_nameName of the slums
+0x1CE32(unknown)Many populated values are Zeughaus, gate names ending in -tor, or tower names ending in -turm
+0x1EE32pawnshop_nameName of the Leihhaus (pawnshop); either Leifhaus or empty
+0x20E32kloster_nameName of the Kloster (church law/administration)
+0x22E32inn_nameName of the inn
+0x24E32university_nameName of the university

city_data substruct (46 bytes = 0x2E)

OffsetSizeFieldDescription
+0x002city_sizeCity size: 3 (small) to 8 (Koln)
+0x024entry_coordsMap coordinates when entering the city
+0x064exit_coordsMap coordinates when leaving the city (chosen to avoid untenable positions)
+0x0A8dock_destinations[4]Indices of cities reachable via this city’s docks; 0xFFFF = no connection
+0x122(unknown)Coastal side: 0xFFFF = inland, 0 = north of river, 1 = south; flood risk indicator
+0x142(constant)Always 4
+0x162(pseudo-ordinal)Runs 0-0x5B with gaps; probably unused
+0x182city_typeRuler type (see enum below)
+0x1A2(unknown)Values 0, 1, 2, or 3
+0x1C2(constant)Always 0
+0x1E2city_contentsBuilding-presence bitmask (see below)
+0x202(constant)Always 0
+0x221qual_blackQuality of the blacksmith (0 = not present)
+0x231qual_merchQuality of the merchant
+0x241qual_swordQuality of the swordsmith
+0x251qual_armorQuality of the armorer
+0x261(unknown)
+0x271qual_bowQuality of the bowyer
+0x281qual_tinkQuality of the tinker
+0x291(unknown)
+0x2A1qual_clothQuality of the clothing merchant
+0x2B1(constant)Always 0
+0x2C1(unknown)Often paired with the next byte; may be half of a word-like value
+0x2D1(unknown)Usually 0 or 1

Quality note: A zero value means the city does not have that shop. Non-zero values are relative - a higher number does not equal an item quality number directly, but a city with a higher value than another offers equal or greater quality items. Example: Nuernberg has 0x31 for the armory but offers quality 37 (0x25) armor.

city_contents bitmask

Byte-order note: city_contents is stored as a big-endian 16-bit word in the file. Earlier little-endian interpretations shift the flags and produce the wrong mapping.

MaskFlagMeaning
0x8000is_klosterHas a Kloster
0x4000is_slumsHas a slums district
0x2000(unknown)Strongly correlates with the unknown name slot at +0x1CE
0x1000is_cathedralHas a cathedral
0x0800(constant)Set in all stock cities
0x0400is_fortressHas a city fortress
0x0200is_town_hallHas a town hall
0x0100is_politHas a political centre
0x0080(constant)Zero in all stock cities
0x0040(constant)Zero in all stock cities
0x0020(constant)Zero in all stock cities
0x0010(constant)Zero in all stock cities
0x0008docksHas docks
0x0004(unknown)Matches the second unknown name slot at +0x18E (Munzenplatz) exactly in the stock file
0x0002is_pawnshopHas a Leihhaus (pawnshop)
0x0001is_universityHas a university

Validation notes from the KB:

  • is_fortress now behaves like a positive fortress flag, not a reversed boolean
  • is_kloster, is_cathedral, and is_town_hall match their corresponding name fields across all 92 stock cities
  • is_polit, docks, is_pawnshop, and is_university each have a single known stock-city mismatch
  • the +0x18E slot is populated in Koln, Freiberg, Mainz, Frankfurt am Main, Trier, and Prag
  • the German edition preserves the same six populated +0x18E cities, but translates the value as Reichsmuenzstaette
  • that German rendering is a much stronger semantic clue than the English Munzenplatz; it points specifically toward an imperial mint / imperial mint site
  • the executable variable table includes $imperialMint, which now looks like the strongest candidate mapping for the +0x18E slot
  • no shipped English or German MSGFILES card references $imperialMint, so the linkage is still not runtime-proven
  • the 0x2000 flag correlates strongly with the +0x1CE slot (31/34 exact matches); the flagged-but-empty exceptions are Groningen, Koblenz, and Basel
  • the German edition preserves the specific gate/tower names in +0x1CE, but translates many generic Zeughaus entries as Kaserne
  • that pushes 0x2000 toward a garrison/barracks/fortification-landmark reading rather than a simple armory label
  • all cities with populated +0x1CE strings also have both a political center and a fortress name
  • both +0x18E and +0x1CE look more like CTY-only landmark labels than ordinary visitable LOC records or widely exercised message-card variables

ruler enum (city_type)

ValueNameNote
0Free CityApproach message 7
1Ruled CityApproach message 1
2CapitalApproach message 6

Message indices refer to $CITYE00.msg.

Confidence

Medium-high. Confirmed by darkland.cty.xml; partially correlated with city content in play.