Cities
Add a real city from OpenStreetMap, set its currency and population, and extend the name pools.
The world map is built at runtime from an OpenStreetMap extract. Any real place can become a Underlives city, with no editor and no import step.
Add a city
- On openstreetmap.org, zoom on the area you want, click Export, then Manually select a different area and draw a box. A few districts (roughly 2 × 2 km) is plenty; the site refuses areas over 50,000 nodes (use Overpass Turbo or a Geofabrik extract for bigger ones).
- Save it as
Cities/<CityName>.osmin your mod. The file name is the city's name in game. - Add
Cities/<CityName>.ulcitynext to it (below) for its currency and population. - Start the game: the city is in the city list of the map's settings screen, or launch with
-City=<CityName>.
Buildings, roads and venues come from the OSM tags. An area with few tagged shops and bars gives a city with few places to go, although the generator guarantees at least one building of every venue type marked ensure in amenities.json.
That guarantee needs one building per venue type (about 130 in the base game). An extract with fewer buildings than that cannot hold them all: the city screen warns the player in amber, with the count, and the missing venues take their jobs, people and scenes with them. Export a bigger area.
A mod's .osm with the same name as a shipped city replaces it.
Water and parks
An .osm extract usually carries roads and buildings only. Rivers, lakes and parks come from a second file, Cities/<CityName>.landuse.json, which the map draws under the roads in the style's water_color and park_color. Generate it from the same area:
python Tools/CityMap/fetch_landuse.py <your mod>/Cities/<CityName>.osm
The tool downloads the water and green areas of the .osm's bounding box from OpenStreetMap (Overpass), clips them to it, and writes the polygons already projected into the map's space. A city without the file simply has no water or parks.
The .ulcity file
iniDisplayName: Lyon
Currency: €
OneDollarEquals: 0.92
Phenotype: southwesterneuropean
MajorityPercent: 0.8
CostOfLiving: 150
SexualFreedom: 70
Climate: mediterranean
| Key | Meaning |
|---|---|
DisplayName |
Name shown in the city list |
Currency, OneDollarEquals |
Symbol and exchange rate: content prices are in dollars and shown converted |
Phenotype |
The majority population's phenotype, from Cities/Phenotypes.txt |
MajorityPercent |
Share of generated people with that phenotype (0–1); the rest are mixed |
CostOfLiving |
Scales prices, rents and salaries (Central London is about 230) |
SexualFreedom |
0–100, read by content (Game:GetBuiltin("SexualFreedom")) |
Names |
The name culture of its people, a folder of Names/ (french, japanese...); default english. See Names |
Climate |
Its weather: a climate from Weather/*.ulweather (oceanic, continental, mediterranean, desert, tropical...); default oceanic. See Weather and seasons |
Hemisphere |
south for a city south of the equator: December is summer |
ul_Base/Cities/ holds settings for about 280 cities from the legacy game. Only those with an .osm next to them are playable today (London ships with one): drop the matching .osm in a mod to play any of the others.
Phenotypes
Cities/Phenotypes.txt maps each phenotype to an ethnicity for character generation and a display name:
text# <phenotype>: <Ethnicity> | <Display name>
african: Black | African
northwesterneuropean: Caucasian | North-Western European
Ethnicities: Caucasian, Black, Asian, Hispanic, MiddleEastern, Indian. A mod can add phenotypes with its own Phenotypes.txt.
Names
Names come in cultures: Names/<culture>/first_female.txt, first_male.txt and last.txt, one name per line, # for comments. ul_Base ships about thirty (french, german, spanish, latinamerican, japanese, chinese, arabic, african, indian...). The root Names/first_female.txt, first_male.txt and last.txt are the english culture, which also fills in for a culture missing one of its three lists. Every enabled mod's lists are merged, so a mod adds names (or a whole new culture) by shipping its own files with just the new names.
Who gets which names:
- A person of the city's majority ethnicity, or of no known ethnicity, is named from the city's culture: the
Names:line of its.ulcity(Names: french). - Anyone else is named from their ethnicity's mix in
Names/cultures.txt, except alocal_shareof them (0.35) who carry local names.
# Names/cultures.txt
local_share: 0.35
Black: african 70, english 20, french 10
Asian: chinese 45, japanese 15, korean 15, filipino 10, thai 5, indonesian 5, malay 5
A mod replaces an ethnicity's mix by shipping its own line for it.
City looks
Building colours, street lamps and road colours are city styles in Map/city_styles.json: see Map and venues.