City Names

Arkaeyn

King
Joined
Jan 12, 2005
Messages
936
Location
nomad, USA
I'd love to help out with some of the city naming systems in RAND. I think it's probably one of the closest I've found to what I want out of city naming in Civ4, and most of the modding work I've done was towards that end.

One of my main goals with my city names mod was to create a situation where any major city in history had the potential to appear in any game, and the most important cities for a civilization were founded first. So I did things like add Kyiv and Vienna to Russia and Germany, change the barbarian cities from tribe names to major cities which didn't belong to Civ4 civs, like Warsaw and Saigon, and I added cities which belonged to multiple civs to each of those lists, as I'd discovered that they wouldn't be founded twice. Thus, the Turks founded Constantinople, but if the Turks didn't, it was on the Greek list.

I always wanted to have context-sensitive city naming, which RAND does and I was never able to. So this is exciting to me. :lol:

RAND has done a lot of the first - the most important cities are founded first, and there don't seem to be massive oversights. :goodjob:

The second - having the non-civ cities - exists to some degree. Samarkand, Jerusalem, Tyre, Pagan, etc, all the cities from RFC. But the context-sensitive naming in RFC allowed other civs to found cities that weren't within their actual naming range. Like Russia could found Budapest if the plot was open.

Here's the list of independent cities I used in my city names mod. Note that it was for Warlords, so includes Babylonian and Sumerian cities that got added. Some of them are also colony names that RAND does have. But several others simply won't appear in RAND. If possible, I'd love to work having them added to a more randomized spawning of independent cities.

Spoiler :
<City>Saigon</City>
<City>Toronto</City>
<City>Ulundi</City>
<City>Edinburgh</City>
<City>Glasgow</City>
<City>Tirana</City>
<City>Longcheng</City>
<City>Tula</City>
<City>Teotihuacan</City>
<City>Hanoi</City>
<City>Manila</City>
<City>Veii</City>
<City>Melbourne</City>
<City>Monaco</City>
<City>Sydney</City>
<City>Casablanca</City>
<City>Bissandugu</City>
<City>Geneva</City>
<City>Little Big Horn</City>
<City>Bangkok</City>
<City>Luxembourg</City>
<City>Florence</City>
<City>Dublin</City>
<City>Torino</City>
<City>Bukhara</City>
<City>Rhapta</City>
<City>Sarkel</City>
<City>Atil</City>
<City>Kells</City>
<City>Calakmul</City>
<City>Mesa Verde</City>
<City>Cahokia</City>
<City>Cahuachi</City>
<City>Moche</City>
<City>Kampala</City>
<City>Helsinki</City>
<City>Bern</City>
<City>Sofia</City>
<City>Bucharest</City>
<City>Knossos</City>
<City>Dakar</City>
<City>Lagos</City>
<City>Kinshasa</City>
<City>Nairobi</City>
<City>Praetoria</City>
<City>Djibouti</City>
<City>Mogadishu</City>
<City>Zanzibar</City>
<City>Kathmandu</City>
<City>Kuala Lumpur</City>
<City>Singapore</City>
<City>Cacaxtla</City>
<City>Ghazna</City>
<City>Khartoum</City>
<City>Dar es Salaam</City>
<City>Napata</City>
<City>Meroe</City>
<City>Ugarit</City>
<City>Budapest</City>
<City>Krakow</City>
<City>Warsaw</City>
<City>Ugarit</City>
<City>Ur</City>
<City>Sumer</City>
<City>Byblos</City>
<City>Tyre</City>
<City>Babylon</City>



Finally, a few questions: where in the Python code are the city names? There are several other cities that I haven't seen yet, but may be in there. For example, Antioch/Antakya, which was a major city in the middle east for over a thousand of years. Or Syracuse, which I'd imagine is a Greek colony.

Second, how are the city name changes done? Is each city a variable, which has a different name for different names? Or is the name itself the variable?

Third, what triggers the switch to Soviet names for Russian cities, and can that be duplicated with Roman cities to Italian (there may be others which can do this, but I'm not certain of them now.)
 

Attachments

  • CityNameManager.rar
    32.8 KB · Views: 264
The city names can be found in CityNameManager.py. All the actual names are hard-coded in that file.

City name changes is pretty much the same as in RFC (and even Greek World for that matter). It's basically a very long if-else-then construct. For example: if civ A owns city B, rename B to C... etc.

The Soviet names are triggered on time (calendar year / gameturn). Adding new name changing for other civs can be added easily.

The city names for the independents are in Barbs.py. Modifying that one is a bit more tricky. I can say that it's clear a lot of the independent cities you know from RFC are not in RAND (they have been commented out in RAND for some reason).

EDIT: current list of independent city name in RAND. The ones that start their line with # are excluded.

Spoiler :

#self.foundCity(iIndependent, lUr, "Ur", iGameTurn, 1, con.iWarrior, 1)
self.foundCity(iIndependent2, lTyre, "Sur", iGameTurn, 1, con.iArcher, 1)
self.foundCity(iIndependent, lJerusalem, "Yerushalayim", iGameTurn, 2, con.iArcher, 3)
#self.foundCity(lBabylon, "Babel", iGameTurn, 1, con.iArcher, 1)
#self.foundCity(iIndependent2, lSusa, "Shushan", iGameTurn, 1, con.iArcher, 1)
#self.foundCity(lKnossos, "Knossos", iGameTurn, 1, con.iWarrior, 0)
self.foundCity(iBarbarian, lHattusas, "Hattusas", iGameTurn, 1, con.iChariot, 2)
self.foundCity(iIndependent, lSamarkand, "Samarkand", iGameTurn, 1, -1, -1) #RFCRAND Afrosiab
#self.foundCity(iBarbarian, lNineveh, "Nineveh", iGameTurn, 1, -1, -1)
#self.foundCity(lGadir, "Qart-Gadir", iGameTurn, 1, -1, -1)
#self.foundCity(lLepcis, "Lpqy", iGameTurn, 2, -1, -1)
#self.foundCity(lCarthage, "Qart-Hadasht", iGameTurn, 2, -1, -1)
#self.foundCity(iBarbarian, lGordion, "Gordion", iGameTurn, 1, con.iChariot, 1) #RFCRAND (commented as too many middle eatern)
#self.foundCity(lPalermo, "Ziz", iGameTurn, 2, con.iArcher, 1)
#self.foundCity(iCeltia, lMilan, "Melpum", iGameTurn, 2, con.iArcher, 2)
#self.foundCity(iBarbarian, lAugsburg, "Damasia", iGameTurn, 1, -1, -1)
#self.foundCity(lRusadir, "Rusadir", iGameTurn, 2, -1, -1)
#self.foundCity(iCeltia, lLyon, "Lugodunon", iGameTurn, 2, -1, -1)
#self.foundCity(iIndependent, lAxum, "Axum", iGameTurn, 1, -1, -1)
#self.foundCity(iCeltia, lBordeaux, "Burdigala", iGameTurn, 2, -1, -1)
#self.foundCity(lCartagena, "Qart Hadasht", iGameTurn, 1, -1, -1)
self.foundCity(iIndependent, lSeoul, "Hanseong", iGameTurn, 2, -1, -1)
self.foundCity(iIndependent2, lArtaxata, "Artashat", iGameTurn, 1, -1, -1)
#self.foundCity(iCeltia, lLutetia, "Lutetia", iGameTurn, 2, -1, -1)
#self.foundCity(iNative, lTikal, "Tikal", iGameTurn, 1, -1, -1)
self.foundCity(iIndependent, lSanaa, "Sana'a", iGameTurn, 1, -1, -1)
self.foundCity(iIndependent2, lPagan, "Pagan", iGameTurn, 2, -1, -1)
self.foundCity(iCeltia, lInverness, "Inbhir Nis", iGameTurn, 2, -1, -1)
#self.foundCity(iNative, lChichenItza, "Chichen Itza", iGameTurn, 1, -1, -1)
self.foundCity(iBarbarian, lBaku, "Bak&#252;", iGameTurn, 2, con.iArcher, -1)
self.foundCity(iBarbarian, lLhasa, "Lasa", iGameTurn, 2, -1, -1)
#if (bLhasaResult == False):
# self.foundCity(iBarbarian, (lLhasa[0] - 1, lLhasa[1] - 1, lLhasa[2], lLhasa[3]), "Lhasa", iGameTurn, 2, -1, -1) #try to found it nearby
#self.foundCity(iIndependent2, lAngkor, "Angkor", iGameTurn, 1, -1, -1)
self.foundCity(iBarbarian, lHanoi, "Hanoi", iGameTurn, 2, -1, -1)
self.foundCity(iNative, lTucume, "Tucume", iGameTurn, 1, -1, -1)
#self.foundCity(lJelling, "Jelling", iGameTurn, 1, -1, -1)
#if (gc.getPlayer(0).isPlayable()): #late start condition
# self.foundCity(iCeltia, lDublin, "&#193;th Cliath", iGameTurn, 1, -1, -1)
#else:
# self.foundCity(iIndependent, lDublin, "&#193;th Cliath", iGameTurn, 1, -1, -1)
#self.foundCity(lNidaros, "Nidaros", iGameTurn, 1, -1, -1)
#self.foundCity(iNative, lZimbabwe, "Zimbabwe", iGameTurn, 1, con.iZuluImpi, 1)
self.foundCity(iNative, lQuelimane, "Quelimane", iGameTurn, 1, con.iZuluImpi, 1)
#self.foundCity(lUppsala, "Upsala", iGameTurn, 1, -1, -1)
self.foundCity(iNative, lMombasa, "Mombasa", iGameTurn, 1, con.iZuluImpi, 1)
#self.foundCity(iBarbarian, lKazan, "Kazan", iGameTurn, 2, con.iHorseArcher, 1) #RFCRAND
self.foundCity(iNative, lKongo, "Mbanza Kongo", iGameTurn, 1, con.iZuluImpi, 1)
 
Okay. This is good in some ways, difficult in others.

1. Knowing that the variable is the city name and not the city itself is good to know, though it means that other additions are going to be more work - and that Rhye and others did a lot of very good work in getting it where it is.

2. The Roman/Italian city names is something that, I think, definitely should be added. Are there other civs for which that would be a good idea? The Egyptians, maybe? And I can think of a couple of cities in individual civs, like Chang'an to Xian (which, checking the file, I see already exists)

3. Most of the cities attached to specific civilizations are indeed in the file, but many of them are in situations where they're unlikely to appear. The colonies of ancient/classical civs are rarely used, and the inland colonies almost never appear. For example, when I redid the Greek city names in vanilla Civ4, I had Syracuse as their fourth-most important city. Now it's 9th on the list of colonies, of which I only ever see the first, Naxos.

4. In terms of city names simply not appearing, it looks like the main ones missing are important cities which end up kind of between civs - like Warsaw, for example (though Poland would be the first civ I would add to RAND....) These would probably be best added as indie or barbie cities. Which leads to...

5. Poking more through the barbs.py file, I notice that there is a second collection of cities, which indicates where they spawn and on what turn. Useful:

Spoiler :
# city coordinates, spawn 1st turn and retries
#RFCRAND coordinates are replaced by 1st and 2nd favourite civ group, to pick a region where it spawns
#lCivGroups: 0 Euro, 1 Asia, 2 Middle east, 3 Mediterranean, 4 Africa, 5 America
lUr = [2, 3, 0, 0] #3000BC
lJerusalem = [2, 3, 0, 0] #3000BC #should be 3,2, but it's too early for mediterranean civs
lBabylon = [2, 3, 0, 0] #3000BC
lSusa = [2, 3, 0, 0] #3000BC
lTyre = [2, 3, 0, 0] #2700BC #turn10 #should be 3,2, but it's too early for mediterranean civs
lKnossos = [3, 2, 13, 0] #2600BC
lHattusas = [2, 3, 34, 0] #2000BC
lSamarkand = [1, 2, 34, 0] #2000BC
lNineveh = [2, 3, 42, 0] #1800BC
lGadir = [3, 0, 70, 0] #1100BC
lLepcis = [0, 4, 70, 0] #1100BC
lCarthage = [0, 4, 86, 0] #814BC
lGordion = [2, 3, 87, 0] #800BC
lPalermo = [3, 0, 94-5, 0] #700BC
lMilan = [0, 3, 94-5, 0] #700BC
lAugsburg = [0, 3, 94-5, 0]
lRusadir = [0, 4, 97, 0] #650BC
lLyon = [0, 3, 117, 0] #350BC???
#lAxum = [4, 3, 121, 0] #300BC
lBordeaux = [0, 3, 121, 0] #300BC
lCartagena = [3, 0, 125, 0] #230BC
lArtaxata = [2, 1, 128,0] #190BC
lLutetia = [0, 3, 137, 0] #50BC
lSeoul = [6, 1, 139, 0] #25BC
#lTikal = [5, -1, 145, 0] #60AD
lSanaa = [2, 4, 147, 0] #100AD
lPagan = [1, 6, 148, 0] #107AD
lInverness = [0, 3, 167, 0] #400AD
#lChichenItza = [5, -1, 170, 0] #445AD
lBaku = [2, 1, 180, 0] #600AD ca
lLhasa = [1, 6, 184, 0] #633AD
#lAngkor = [1, -1, 201, 0] #802AD
lHanoi = [6, 1, 209, 0] #866AD
lTucume = [5, -1, 211, 0] #900AD
lJelling = [0, -1, 219, 0] #980AD
lDublin = [0, -1, 220, 0] #990AD
lNidaros = [0, -1, 221, 0] #1000AD
lZimbabwe = [4, -1, 221, 0] #1000AD
lQuelimane = [4, -1, 221, 0] #1000AD
lUppsala = [0, -1, 228, 0] #1070AD
lMombasa = [4, 2, 231, 0] #1100AD
lKazan = [1, 2, 241, 0] #1100AD
lKongo = [4, -1, 278, 0] #1483AD


So combined with the other list, I think we can see which cities spawn where. It's also pretty clear that a lot of these are leftovers from the Vanilla and Warlords versions of RFC - Viking, Babylonian, Maya, and Khmer cities are all there.

Are these cities founded every game? (seems to be yes) If so, would it be possible to add many more and randomize how many get spawned? Or, if many more were added, would the independents grow too powerful?

6. There actually seems to be a lot of leftover RFC stuff, unsurprisingly. For example, when I look up Helsinki, there's code to change the name to and from Helsingfors, but neither city will actually ever be founded. I may get ambitious and try to make a master list.

7. Most of this in the CityNameManager seems like it could be converted to vanilla BTS and other mods fairly easily. Am I mistaken?
 
On point 5:

From that list you posted you can see which of them get founded in RAND with the help of my list (which comes later in the Python script): Sur, Yerushalayim, Hattusas, Samarkand, Hanseong, Artashat, Sana'a, Pagan, Inbhir Nis, Baku, Lasa, Hanoi, Tucume, Quelimane, Mombasa, Mbanza Kongo.

So, probably less than you were expecting. I think the main reason to have less on the list compared to RFC, is ...well... randomness. Too much independent cities on semi-random locations (see #lCivGroups: 0 Euro, 1 Asia, 2 Middle east, 3 Mediterranean, 4 Africa, 5 America), would be unbalancing. Not so much that the independents would be stronger, but that other civs can conquer more independent cities.

On point 6:

There is a lot of leftover stuff and you might ask yourself why it hasn't been taken out, but that's just pragmatics. It's quicker to comment something out and leave it.

On point 7:

Yes, fairly easy, but why bother with vanilla BTS and other mods when you can play RAND? :)
 
On 5, I'm not sure it would make that huge of a difference. If there were a lot of ancient cities to be added, I think that could unbalance things. But if there were more medieval or even classical-era cities, I don't think it would make that huge of a difference, particularly because so many civs collapse and create independent cities around then anyway.

Still, it would be moot if they could be somewhat randomized. Jerusalem should be in every game, but a 50/50 chance for the others would be fine, I think.

6. Oh yes, it's entirely understandable. Just something I need to take note of if I do try to make a list or edits.

7. Theoretically, I don't believe that RFC/RAND fully replaces Civ4, in the way that ROC did fully replace Civ3. The historical spawn dates, fairly rigid playstyles based on which civ you choose, and lack of map choice prevent that, in my view.

On the other hand, in practice, I'm not sitting around actually playing vanilla Civ4 much. If stability could be implemented in a vanilla setting, I think that would change, though.
 
The Romans do not become Italians hence their cities should retain Latin names.
 
btw, because MANY of the contributors to city names did not follow rules, there are many double cities. The most obvious one, that was added with the last version which introduced independent cities, is Samarkand (independent, plus on Mongolian city list).
 
I'm bumping this, since I've started playing Civ4 again, and would love to see some city name improvements in the next version of RAND. I can work on it for the next month or so, if it takes that long. My BTS mod was virtually completed except for a couple civs that aren't in RAND.
 
I've started working on the city name lists, starting with Ancient and Classical civs. My guiding philosophy is: The more important the city to world and regional history, the more likely it should be to appear in the game. Several of the cities in the game are listed more in chronological order than in importance. I've attached the file to the original message here, if anyone wants to see it.

Here are some of the changes:

EGYPT: No change. I don't know much about Egyptian history, Rhye's names are different than what I have from my BTS name list, and what I can look at seems to be roughly the same as what I have.

INDIA: Changed the list to match modern importance a little bit more, but nothing significant.

CHINA: Moved cities for more modern importance than chronology, so Nanjing and Shanghai are more likely to be built.

BABYLON: Not many changes, moved Akkadian cities up slightly.

GREECE: Bigger changes here. I moved Thebes and Thessaloniki up, and added Pella, the Macedonian capital. I also changed their settler names. Greece will now found Seleucia, Antioch, and Pergamon as inland colonies, and their coastal colonies are now in order of importance rather than chronology, so Alexandria and Syracuse should appear. I also moved cities in Asia Minor to the colony list.

PERSIA: Persia was difficult. I moved Shushan/Susa to their list from Babylon. I was going to edit their coastal cities, but, uh, I've never heard of any of them. I'm thinking of maybe moving the Phoenician cities from Carthage to Persia so that the Achaemenids will have known coastal cities.

CARTHAGE: Only minor changes. Added Theveste, moved Lilybaeum better.

ROME: Rome was very problematic, and my main motivation for doing this now. Inland cities are now Capua, Mediolanum, and Bononia before Arretium, and Neapolis, Ostia, Ravenna, and Aquileia on the coast. I also fiddled with the colonies somewhat.

JAPAN: No major changes.

ETHIOPIA: I increased the importance of more modern cities relative to the Aksum cities.
 
Top Bottom