Dynamic Civ Names

jdog5000

Revolutionary
Joined
Nov 25, 2003
Messages
2,601
Location
California
DynamicCivNames Description
Version 0.41
By jdog5000
For BTS 3.13

The goal:

This component renames civs based on their civics choices and other status factors. A civs names will change many times over the course of a game. While it has no actual effect on gameplay, it adds dynamic variety to the game.

How it works:

When a civ is created or changes their civics, they are potentially assigned a new name based on many factors. Civs spawned by either Revolution or BarbarianCiv will get temporary names indicating their status, like Mongolian Horde or Russian Rebels, until they're more firmly established. When a civ switches to Hereditary Rule their name will change to something like Kingdom of America, while under Representation or Universal Sufferage they would be the American Republic. Civs with only one city in the later stages of the game may have the city name included in their title, but their civ type will always be clarified as in the French Kingom of Paris. There are many different potential names, and even variations for civs with the same status to provide some flavor.

All of these civics determinations are made using the added Revolution flags in the civics xml file to support variations on the standard civics systems. Having a civic with the isCommunism bool set will cause Communist style names. In addition, some civs have special names like show up in certain circumstances, like the German Reich and Arabian Caliphate. These determinations are made by matching text in the civs adjective (ie German or Arabian).

This component has several features designed to support names of civs created by BarbarianCiv and Revolution, but will provides plenty of fun flavor name changes as a standalone mod or addition for other mods. It requires changes to the DLL to allow name changes to stick, but all name changes are generated in Python.

Feedback and suggestions for how to improve the names and add more variety would be great.

Download


Dynamic Civ Names

SDK Additions

To enable civ name changing, several new functions have been added to CvPlayer and exposed to Python in CyPlayer. The most important of these is:

setCivName(std::wstring szNewDesc, std::wstring szNewShort, std::wstring szNewAdj)

This function will assign the strings passed in to their respective fields for the player, description, short description, and adjective.

This component includes all of the SDK changes from the Revolution mod. It does not need all of them, but those it does not use have no effect on gameplay. The other changes this component makes use of are augmentation of the civics XML data to easily distinguish between different types of government and other civics without being hardcoded. Check out the Revolution mod sub-forum and help files in the Revolution download to learn about how to get custom civics to work with these new features.

The included DLL supports 34 civs.
 
I wish some of you'll who do this python stuff, would not use the square boxes at the end of a line, might be useful for some but some of us trying to figure out this stuff is almost impossible to read!! Just my opinion, is all!!
 
This sounds very nice (and seems to be what many have been asking for). Might I suggest providing more information as to how one may alter Dynamic Civ Names. In other words, have you exposed to python a function that changes the civ's name? What XML tags have you added? Etc.
 
I wish some of you'll who do this python stuff, would not use the square boxes at the end of a line, might be useful for some but some of us trying to figure out this stuff is almost impossible to read!! Just my opinion, is all!!

Check out notepad++ on sourceforge or use another editor that is UNIX file format savy and you won't see those boxes anymore.
 
It's definitely cool that the names vary between civics.

Does the mod let you evolve from their early civilization to their modern name? Like, Arabia-->United Arab Republic (Syria) ... or Rome-->Italy, or England-->United Kingdom?
 
I believe this one simply changes the names based on civics, however Zebra 9 is currently doing one that also changes them over time, so you get things like Germanic Tribes -> Holy Roman Empire -> Prussia -> German Empire.
 
It's definitely cool that the names vary between civics.

Does the mod let you evolve from their early civilization to their modern name? Like, Arabia-->United Arab Republic (Syria) ... or Rome-->Italy, or England-->United Kingdom?

It doesn't currently, but you could make it do that... you would just need to establish what would be triggers for name changes... civics? # of turns?
 
I think the safest thing is to have an "early name" and "modern name", with the transition point being, say, Nationalism. Maybe sooner.

Rome-->Italy
Hispania-->Spain
Franks-->French
England-->United Kingdom
New England-->United States of America
Aztec-->Mexico
Maya-->Guatemala
Inca-->Peru

I figure having multiple changes would be tough, since not all civilizations are old enough to warrant multiple changes.
 
I think the safest thing is to have an "early name" and "modern name", with the transition point being, say, Nationalism. Maybe sooner.

Rome-->Italy
Hispania-->Spain
Franks-->French
England-->United Kingdom
New England-->United States of America
Aztec-->Mexico
Maya-->Guatemala
Inca-->Peru

I figure having multiple changes would be tough, since not all civilizations are old enough to warrant multiple changes.

I think thats a horrible idea. specifically the Aztec/Inca/Maya to Mexico/Peru/Guatemala. Those 3 didnt "evolve" into the later, they were taken over by the Spanish which subsequently lost control and the later were granted independence.

I love the idea of this MOD, having the names change depending on civics. Hereditary Rule = Kingdom of _______, ______ Republic, or even a unique name depending on that civilizations period in History, specifically with Russia (Soviet Union with Police State, and so on. The civilization will still be represented, those other suggestions about changing the name to something modern, seems crazy.
 
This sounds very nice (and seems to be what many have been asking for). Might I suggest providing more information as to how one may alter Dynamic Civ Names. In other words, have you exposed to python a function that changes the civ's name? What XML tags have you added? Etc.

Added some details to the first post.
 
I love the idea of this MOD, having the names change depending on civics. Hereditary Rule = Kingdom of _______, ______ Republic, or even a unique name depending on that civilizations period in History, specifically with Russia (Soviet Union with Police State, and so on. The civilization will still be represented, those other suggestions about changing the name to something modern, seems crazy.

Good! This is exactly what this mod will do, mostly civics based names with a few cultural things for flavor here and there. My feeling is each game of civ is a sort of alternative history, and so it doesn't seem appropriate to marry the names too closely to history. However, nothing is stopping someone from using the pieces from this mod to have Incans become Peruvians if it suits them.
 
I guess that's part of the problem. A lot of civilizations, arguably, have gone extinct, or did not exist before clear borders had developed. One suggestion was to have Germanic Tribes -> Holy Roman Empire -> Prussia -> German Empire... but if even Aztec-->Mexico becomes an issue, it's hard to imagine how you'll come up with 4 "levels" for every civilization.
 
I guess that's part of the problem. A lot of civilizations, arguably, have gone extinct, or did not exist before clear borders had developed. One suggestion was to have Germanic Tribes -> Holy Roman Empire -> Prussia -> German Empire... but if even Aztec-->Mexico becomes an issue, it's hard to imagine how you'll come up with 4 "levels" for every civilization.

Well, although I don't like the idea of rigid historical names for civs, I'm absolutely certain you could come up with at least 4 names for each civ if you really want this in the game... I mean, virtually every civ in the game existed in a place that has been continuously occupied for thousands of years. You might have trouble if you went with "Aztec" as the first name.. you'd probably need to have the first name be one of the peoples that preceded the Aztecs.
 
Well, although I don't like the idea of rigid historical names for civs, I'm absolutely certain you could come up with at least 4 names for each civ if you really want this in the game... I mean, virtually every civ in the game existed in a place that has been continuously occupied for thousands of years. You might have trouble if you went with "Aztec" as the first name.. you'd probably need to have the first name be one of the peoples that preceded the Aztecs.

All you'd need to do is remove the current system of naming -- based on Nationalities -- and create one based on cultures. After all, the country "Mexico" is named for the region "Mexica," which the Aztecs and Maya both used. The "Roman" empire was just the named of an empire of many nationalities with Rome as the capital.

Now, if you had a culture-based system, you could have games with many "German" civs -- Bavarians, Prussians, Bohemians, Saxons, Franks -- who maybe need to fight eachother for the title "Germany." So once the other civs have been defeated, the remaining one could be renamed "Germany." Same goes for Italy. You could have Romans, Latins, Etruscans, Venetians, and so on, and if all are defeated, the survivor could become "Italy." Just a thought...
 
Would it be possible to make it so leaderheads change along with civic changes too? To do it properly it would take static leaderheads because it would take forever to make that many variations on animated leaderheads, but I always thought it would be neat if certain elements of the leaderheads changed depending on civics and religion type. (Say, for example, that Isabella under despotism looked more like a Barbarian Queen; when she adopts hereditary rule she looks more "dark-ages" like; when she adopts theocracy she looks close to how she looks now, etc.)
 
@ callicles:

Yes, it would be possible ... the easiest way would probably be to just create lots of duplicate leaderheads that just had different graphics. It might be possible to create a mechanic similar to the BTS flavor unit graphics, but that remains to be seen. However, the large art time investment will keep me from attempting it.
 
It's awesome! Can you install it separately from the Revolutions mod, maybe without all the code that allows for the BarbarianCiv and Rebellion civ names?

Bug(?) - Once I was playing against a well-established China (as a starting civ, no barbarians or rebellion) and it called them the Chinese Empire of Beijing, even though they had quite a few cities.

Also, how do you check what you are?
 
so how exactly do you add this component to a mod? sorry i'm not good with these things do i just extract the component to the mod or is there more to it?
 
It's awesome! Can you install it separately from the Revolutions mod, maybe without all the code that allows for the BarbarianCiv and Rebellion civ names?

Bug(?) - Once I was playing against a well-established China (as a starting civ, no barbarians or rebellion) and it called them the Chinese Empire of Beijing, even though they had quite a few cities.

Also, how do you check what you are?

Glad you like it! Not sure quite what you mean with your first question, I will post a BTS version soon. I don't really have time to pull the SDK portions out can create a separate DLL just for this, particularly because the other SDK doesn't change gameplay if not called by Revolution and BarbarianCiv python functions. The code that names rebel and barbarian civs is fairly small, and doesn't fire at all when those functions are not included.

As for the Chinese name, names are generally saved unless there's a good reason to change them. As soon as the Chinese switch to something other than Despotism, their name will change.

As for checking your own name, you should be able to mouseover your flag, next to the minimap at the bottom of the screen. I haven't added this into the BTS Revolution version yet, but it's in the Warlords version here.

so how exactly do you add this component to a mod? sorry i'm not good with these things do i just extract the component to the mod or is there more to it?

Depends very much on what the other mod is and how it works. You could simply copy over files if the other mod just changes XML files (you'd have to merge any that overlap). If the other mod changes Python code, you'll probably have to merge small bits of event handling. If the other mod has a custom DLL, then SDK source code would have to be merge and recompiled.

Note that the version posted here now works only for Warlords ... the BTS version is basically ready but I haven't pulled it out of the whole Revolution mod.
 
I will post a BTS version soon.
That's basically what I meant.

As for the Chinese name, names are generally saved unless there's a good reason to change them. As soon as the Chinese switch to something other than Despotism, their name will change.
What was weird about it was that it changed from a normal one - I didn't discover the Chinese Empire of Beijing, I discovered the Chinese Empire.

As for checking your own name, you should be able to mouseover your flag, next to the minimap at the bottom of the screen. I haven't added this into the BTS Revolution version yet, but it's in the Warlords version here.
No wonder - I was playing BtS Revolutions.
 
Top Bottom