Dynamic City Naming

Xyth

History Rewritten
Joined
Jul 14, 2004
Messages
4,106
Location
Aotearoa
Dynamic city naming is something I've wanted to implement ever since I started playing Civ, and I've decided to tackle it for 1.19 as I think my Python skills are up to the task now.

In Civ4 (and thus HR), citylists are static; you found the first city on a civilization's list, then the next, and so on. This is not only boring, it makes for many ahistorical situations with certain leaders, eras, and other factors. Here's a list of what I hope to achieve with this feature:


  • Leaders in the same civilization can have different capitals. For example, Agamemnon would start with Mykenai, Pericles with Athens, Leonidas with Sparta, Alexander with Pella.

  • Cities (or groups of cities) can have different priorities for different leaders. Goslar is much more likely to be founded by Karolus or Maxmillian than it is by Frederick or Bismarck. Peter and Catherine are much more likely to found the Siberian cities than Yaroslav.

  • The era you are in can also alter the priority for a city or group of cities. The Nubians are unlikely to found Khartoum in the early eras, but are very likely to from the Industrial era onwards. The chance for the Persians to found Ctesiphon diminishes after the Medieval era. Era-appropriate barbarian cities too.

  • Cities that belonged to several different civilizations won't get founded more than once. The Greeks won't found Byzantium and the Turks won't found Istanbul if the Byzantines have already founded Constantinople.

  • Cities can have different names under different leaders or eras. Stalin will found Stalingrad but the other Russian leaders will found Tsaritsyn - unless it's the Modern Era in which case it'll be founded as Volgograd instead.

I've made good progress so far and I'll probably also release this as a module for other modders to use - which will also help with finding and fixing bugs. Cities and city groups can be added in XML format so it's easily tailored to suit. it will also fall back on the standard citylists whenever a civilization's priority list is empty, so there's no need to convert entire citylists at once.

Let me know what you think or if you have any suggestions.
 
That sounds very interesting.

From what I gather, which name gets used is now based on a set of factors and left to some chance rather than picked of off a list, right?
 
That sounds like an excellent plan.
 
That sounds very interesting.

From what I gather, which name gets used is now based on a set of factors and left to some chance rather than picked of off a list, right?

Pretty much. Each player will have an internal list of cities it is eligible to found, and each city in this list has an assigned 'priority' value which is determined by leader or civilization choice. When the player builds a city, priorities are adjusted for the current era, and the highest priority city is selected from the list. In most cases there will be several such cities at the same priority so one of them is chosen randomly.

Cities can have several different names assigned to them so the one that best matches the player's civ, leader, and the current era is chosen. Finally, once the city is built and named the city is removed from the eligibility list of all other players (if on any), so it can't be built again, even if destroyed.

Capitals are chosen in the same way, but only some cities are flagged as capitals so its a much smaller list to choose from.
 
Dynamic city naming is something I've wanted to implement ever since I started playing Civ, and I've decided to tackle it for 1.19 as I think my Python skills are up to the task now.

Finally, once the city is built and named the city is removed from the eligibility list of all other players (if on any), so it can't be built again, even if destroyed.

Let me know what you think or if you have any suggestions.

This sounds good, and ambitious to implement!


Check: It precludes assigning one's own names, yes? No more founding "Donaldduckville" and no more renaming cities at will? If I can assign my own names, then, even if I am not English, I can name a city "York" and stop England from using the name.

Corollary: After conquest, cities cannot be renamed, even if the majority of their culture is of the conqueror. That's a pity!


Request: Could the founding of each new city come with a pull-down menu listing the top (say) 20 currently-available name choices?
 
This idea is very good, but for the beginning I think you should rewrite all citylists (that you haven't rewrite yet).
 
Check: It precludes assigning one's own names, yes? No more founding "Donaldduckville" and no more renaming cities at will? If I can assign my own names, then, even if I am not English, I can name a city "York" and stop England from using the name.

Corollary: After conquest, cities cannot be renamed, even if the majority of their culture is of the conqueror. That's a pity!

I haven't yet worked out how city renaming will (or won't) fit into the system. Once I'm a bit further along I'll let you know, there's a few technical hurdles to jump first.

Request: Could the founding of each new city come with a pull-down menu listing the top (say) 20 currently-available name choices?

That idea crossed my mind but such a popup can break multiplayer if not coded well. I won't attempt it at this stage in order to avoid the added complexity. Perhaps later though.
 
This idea is very good, but for the beginning I think you should rewrite all citylists (that you haven't rewrite yet).

That's actually the motivation for creating this system. I started reviewing a few citylists for 1.19 and found the limitations of a sequential list frustrating. Once I've got it working, reviewing citylists becomes a lot more flexible and fun!
 
And here is the return of the Holy Roman citylist!

A great idea!
Brilliant!

Now you can divide the Turks, can divide Sumeria, can make Susa a city of 3 civs, and divide the celts and the Phoenicians!

But you'll have alot of work in China and India! XD

If you need, I can help you setting three ages of Israeli citylist:
- Ancient and biblical.
- Hellenist era (2nd temple). Maybe unique for Herod(?).
- Modern Zionist cities.


I would also like to see what you will do with Perisa. I'm very interested in their post-Achaemenid history.

But you can't make Peter and Cathrine find Siberian cities. They'll have to find Moscow or Kiev before that. I think the Siberian cities will have to be at least 6th or 7th in the list. If not more than that.
 
Excellent!

I didn't mention this in my Annal but the city names for India are less than ideal:
Delhi, Bombay, Vijayanagara, Pataliputra, Varanasi, Agra...
They're all over the place: geographically and chronologically!

I'm looking forward to dynamic city naming.
 
Now you can divide the Turks, can divide Sumeria, can make Susa a city of 3 civs, and divide the celts and the Phoenicians!

Yep! The system will make a big difference for civs like these.

But you'll have alot of work in China and India! XD

Indeed. It will probably take several versions of HR to work through every civ.

If you need, I can help you setting three ages of Israeli citylist:
- Ancient and biblical.
- Hellenist era (2nd temple). Maybe unique for Herod(?).
- Modern Zionist cities.

Help like this is certainly welcome.

I would also like to see what you will do with Perisa. I'm very interested in their post-Achaemenid history.

Yeah, a lot to sort there. I'd like to add a fourth Persian leader at some point too, one from a later period of history.

But you can't make Peter and Cathrine find Siberian cities. They'll have to find Moscow or Kiev before that. I think the Siberian cities will have to be at least 6th or 7th in the list. If not more than that.

The Siberian cities wouldn't have higher priority than the key western cities, but they'd be set to higher priority for Peter and Catherine than they would for Yaroslav.

I didn't mention this in my Annal but the city names for India are less than ideal:
Delhi, Bombay, Vijayanagara, Pataliputra, Varanasi, Agra...
They're all over the place: geographically and chronologically!

Yep, HR still uses the terrible Firaxis city list for India, I never got very far in remaking it. That should change once this system is in place.

Does the dynamic city naming factors in wether the city is on the coast or not?

No, but it could, as well as other geographical factors. These are things that could be added at a later time; best to keep the system straight forward to begin with.
 
Progress on this is going very well, the system is written and fully functional. Renaming of cities is supported. The one problem still existing is that certain non-standard ASCII characters in a city's name can sometimes throw errors. Working on it.
 
Very, very cool!

I would note that there are LOTS of possible iterations regarding the current New World civs. The Sioux, in particular, need some help.
 
What are your plans regarding to the Persian city list?

The important Achaemenid cities were Pasargadae, Ecbatana, Persepolis and Susa.
Asaak and Ctesiphon rose to prominence in the Parthian era.
So are you willing to include all of those in the "ancient era" list, and divide it between the leaders?
I suggest this:
Cyrus's list: Pasargadae, Susa, Ecbatana, ...(the rest can be other cities from the existing list)..
Darius's list: Persepolis, Susa, Pasargadae, ...(the rest can be other cities from the existing list)..
Chosroes's list: Ctesiphon, and other cities like Nisbis, Herat, Nishapur, Bishapur...

But the most important thing is to add at least one Islamic leader.
You can add Mahmud of Ghazni, Muhammad Ghori, Abbas I, and maybe Nader Shah.
A citylist for these eras should be reconsidered only after another leader is added.
 
I haven't done a lot of work on the Persian list yet, but what I have done matches your suggestions. The list needs considerable reworking; as usual, Firaxis have made some very unusual or blatantly incorrect selections. I definitely want to add a 4th leader to Persia, most probably Abbas I.

In general, I'm not going to have time to completely rework most city lists for 1.19, but I'll at least try and have capitals and a few key cities set for each leader.
 
This is a great idea, I like it very much!

Would it be possible to have cities dynamically rename? Say, when certain eras begin, Civics change, or events such as city capture happen? St Petersburg, London, York and Istanbul are all obvious candidates that come to mind.
 
This is a great idea, I like it very much!

Would it be possible to have cities dynamically rename? Say, when certain eras begin, Civics change, or events such as city capture happen? St Petersburg, London, York and Istanbul are all obvious candidates that come to mind.

It doesn't currently but it wouldn't be too difficult to add such functionality in the future. Eras and change of ownership at least; while name changes with civics are possible, it's a lot more complex.
 
Back
Top Bottom