Editing dynamic civ names?

Mouthwash

Escaped Lunatic
Joined
Sep 26, 2011
Messages
9,370
Location
Hiding
Is there any way I could edit/make them myself?
 
Why? I love the actual naming ^^
Maybe with a litle add with the religion name with some civics, like "Voodoo Tribe of Arabia"
Or Premier of Head Hunter Republic (with Single Party, like "Premier of Soviet Union")
Or "Holy" with Divine Right : Holy Duchy of Egyptian

or special cambo : Kemetism + Divine Right + Monarchy/Despotism = Pharaonat ; Islam + Intolerant + %onarchy = Califat
Naming can be fun ^^
 
Why? I love the actual naming ^^
Maybe with a litle add with the religion name with some civics, like "Voodoo Tribe of Arabia"
Or Premier of Head Hunter Republic (with Single Party, like "Premier of Soviet Union")
Or "Holy" with Divine Right : Holy Duchy of Egyptian

Naming can be fun ^^

How, though?
 
It seems very complicated to me. How do I make, say, a Civ with Tribalism or Chiefdom be called the "Tribes of Rome" or "Roman Tribes?"
 
It seems very complicated to me. How do I make, say, a Civ with Tribalism or Chiefdom be called the "Tribes of Rome" or "Roman Tribes?"
It is complicated as it is mainly code with lots of ifs, the important function being newNameByCivics.
As far as I see it also relies on some revolution information that probably needs updating to the new civics.
 
Alright. Well you guys should consider implementing what I just said and also maybe calling pre-tribalism Civs "Roman Peoples?"
 
I've been thinking the same thing for a while, actually. That, and avoiding calling anything a "City State", "Empire" or anything but "People/s" or "Tribe/s" (depending on city number) before Sedentary Lifestyle.
 
Hmm, what about rewriting that so there is a new XML file which consists of expressions and names. Would that make it easier for you to edit it?

Something like this:
Code:
<CivName>
  <bIsPrefix>0</bIsPrefix>
  <bIsAffix>0</bIsAffix>
  <iNumPrefix>0</iNumPrefix>
  <iNumAffix>0</iNumAffix>
  <Condition>
    <And>
      <Has>
        <GOMType>GOM_CIVIC</GOMType>
        <ID>CIVIC_FEDERAL</ID>
      </Has>
      <Has>
        <GOMType>GOM_CIVIC</GOMType>
        <ID>CIVIC_CLERGY</ID>
      </Has>
    </And>
  </Condition>
  <Name>TXT_KEY_NAME_HOLY_FEDERATION</Name>
</CivName>
 
Can be fun and more easy to edit, because in some era, nearly everyone have the same names... So more affix can be used (and maybe Suffix and not Affix tag?)

EDIT :
I take a loon at the .py file...
And now I remember why I dont like python

But some condition look like hard to put in such a XML File, because naming use vassal or not, rank, number of city, random, era, and some functions I dont know (like getReligiousFreedom, even if I think I can understand the idea behind)... Even lenght of your only city is used Oo
 
Hmm, what about rewriting that so there is a new XML file which consists of expressions and names. Would that make it easier for you to edit it?

Something like this:
Code:
<CivName>
  <bIsPrefix>0</bIsPrefix>
  <bIsAffix>0</bIsAffix>
  <iNumPrefix>0</iNumPrefix>
  <iNumAffix>0</iNumAffix>
  <Condition>
    <And>
      <Has>
        <GOMType>GOM_CIVIC</GOMType>
        <ID>CIVIC_FEDERAL</ID>
      </Has>
      <Has>
        <GOMType>GOM_CIVIC</GOMType>
        <ID>CIVIC_CLERGY</ID>
      </Has>
    </And>
  </Condition>
  <Name>TXT_KEY_NAME_HOLY_FEDERATION</Name>
</CivName>

:love:
 
Can be fun and more easy to edit, because in some era, nearly everyone have the same names... So more affix can be used (and maybe Suffix and not Affix tag?)

EDIT :
I take a loon at the .py file...
And now I remember why I dont like python

But some condition look like hard to put in such a XML File, because naming use vassal or not, rank, number of city, random, era, and some functions I dont know (like getReligiousFreedom, even if I think I can understand the idea behind)... Even lenght of your only city is used Oo
Well, I can expose a lot of data to the expression system (and get that power at the same time for other expressions).
The question is if it is worth it and if there will be someone to do the work of writing the naming XML file.
 
Would it not be "better" to have at least part of the naming convention in the civics XML?
Well, there likely are several variants and some names are the same for more than one civic while others might only be used if a certain combination of civics and other conditions are true and that is not expressable well in the civics XML.
 
Well, there likely are several variants and some names are the same for more than one civic while others might only be used if a certain combination of civics and other conditions are true and that is not expressable well in the civics XML.

And will be completely missed the next time civics change :mischief:
 
The code for this should be finished some time this weekend.
What it needs then is some people writing naming XML.
This is done in the new CIV4CivNameInfos.xml.
Some example entries:

Spoiler :
Code:
<CivNameInfo>
      <Type>CIVNAME_HOLY_FEDERATION</Type>
      <bPrefix>0</bPrefix>
      <bSuffix>0</bSuffix>
      <iNumPrefix>0</iNumPrefix>
      <iNumSuffix>0</iNumSuffix>
      <bUsesCapital>0</bUsesCapital>
      <bUsesCiv>1</bUsesCiv>
      <bUsesLeader>0</bUsesLeader>
      <PlayerCondition>
        <And>
          <Has>
            <GOMType>GOM_CIVIC</GOMType>
            <ID>CIVIC_FEDERAL</ID>
          </Has>
          <Has>
            <GOMType>GOM_CIVIC</GOMType>
            <ID>CIVIC_CLERGY</ID>
          </Has>
        </And>
      </PlayerCondition>
      <Name>TXT_KEY_NAME_HOLY_FEDERATION</Name>
</CivNameInfo>
Neither bPrefix nor bSuffix is set so this is a base name, not a prefix or a suffix for another base name.
iNumPrefix and iNumSuffix are 0 so it does not use a prefix or suffix.
bUsesCiv is 1, so it uses the civ and the text key will get that as first parameter.
The player condition makes this name only valid if the player has both the federal and the clergy civic.

Spoiler :
Code:
<CivNameInfo>
      <Type>CIVNAME_PREFIX_HOLY</Type>
      <bPrefix>1</bPrefix>
      <bSuffix>0</bSuffix>
      <iNumPrefix>0</iNumPrefix>
      <iNumSuffix>0</iNumSuffix>
      <bUsesCapital>0</bUsesCapital>
      <bUsesCiv>0</bUsesCiv>
      <bUsesLeader>0</bUsesLeader>
      <PlayerCondition>
        <Has>
          <GOMType>GOM_CIVIC</GOMType>
          <ID>CIVIC_CLERGY</ID>
        </Has>
      </PlayerCondition>
      <Name>TXT_KEY_NAME_PREFIX_HOLY</Name>
</CivNameInfo>
bPrefix means that this is a prefix for another name, in this case a holy prefix if the player has the clergy civic (it will only be used as part of a base name that allows for at least one prefix and the base name governs where it is placed).
Mind that a prefix or suffix can use a prefix or suffix as well, not only a base name.

Spoiler :
Code:
<CivNameInfo>
      <Type>CIVNAME_PREFIX_ENGLISH_CULTURE</Type>
      <bPrefix>1</bPrefix>
      <bSuffix>0</bSuffix>
      <iNumPrefix>0</iNumPrefix>
      <iNumSuffix>0</iNumSuffix>
      <bUsesCapital>0</bUsesCapital>
      <bUsesCiv>0</bUsesCiv>
      <bUsesLeader>0</bUsesLeader>
      <PlayerCondition>
        <Has>
          <GOMType>GOM_BUILDING</GOMType>
          <ID>BUILDING_ENGLISH_EMBASSY</ID>
        </Has>
      </PlayerCondition>
      <Name>TXT_KEY_NAME_PREFIX_ENGLISH_CULTURE</Name>
</CivNameInfo>
This prefix queries if the player has the english culture wonder somewhere and yields some english prefix.

Spoiler :
Code:
<CivNameInfo>
      <Type>CIVNAME_SUFFIX_FOREST</Type>
      <bPrefix>0</bPrefix>
      <bSuffix>1</bSuffix>
      <iNumPrefix>0</iNumPrefix>
      <iNumSuffix>0</iNumSuffix>
      <bUsesCapital>0</bUsesCapital>
      <bUsesCiv>0</bUsesCiv>
      <bUsesLeader>0</bUsesLeader>
      <CapitalCondition>
        <Greater>
          <IntegrateCount>
		      <RelationType>RELATION_WORKING</RelationType>
		      <GameObjectType>GAMEOBJECT_PLOT</GameObjectType>
		      <Has>
		        <GOMType>GOM_FEATURE</GOMType>
		        <ID>FEATURE_FOREST</ID>
		      </Has>
	    </IntegrateCount>
	    <Constant>5</Constant>
	</Greater>
      </CapitalCondition>
      <Name>TXT_KEY_NAME_SUFFIX_FOREST</Name>
</CivNameInfo>
This suffix uses CapitalCondition, which means that the capital is queried. In this case it is a suffix for civs whose capital is in an area with a lot of forest.

Spoiler :
Code:
<CivNameInfo>
      <Type>CIVNAME_SUFFIX_MOUNTAINS</Type>
      <bPrefix>0</bPrefix>
      <bSuffix>1</bSuffix>
      <iNumPrefix>0</iNumPrefix>
      <iNumSuffix>0</iNumSuffix>
      <bUsesCapital>0</bUsesCapital>
      <bUsesCiv>0</bUsesCiv>
      <bUsesLeader>0</bUsesLeader>
      <CapitalCondition>
        <Greater>
          <IntegrateCount>
		      <RelationType>RELATION_WORKING</RelationType>
		      <GameObjectType>GAMEOBJECT_PLOT</GameObjectType>
		      <Is>TAG_PEAK</Is>
	    </IntegrateCount>
	    <Constant>3</Constant>
	</Greater>
      </CapitalCondition>
      <Name>TXT_KEY_NAME_SUFFIX_MOUNTAINS</Name>
</CivNameInfo>
This one is similar but requires that the capital has more than 3 peaks in its working area.

Spoiler :
Code:
<CivNameInfo>
      <Type>CIVNAME_TRIBE</Type>
      <bPrefix>0</bPrefix>
      <bSuffix>0</bSuffix>
      <iNumPrefix>1</iNumPrefix>
      <iNumSuffix>1</iNumSuffix>
      <bUsesCapital>0</bUsesCapital>
      <bUsesCiv>0</bUsesCiv>
      <bUsesLeader>0</bUsesLeader>
      <PlayerCondition>
        <And>
          <Has>
            <GOMType>GOM_TECH</GOMType>
            <ID>TECH_TRIBALISM</ID>
          </Has>
          <Not>
            <Has>
              <GOMType>GOM_TECH</GOMType>
              <ID>TECH_SEDENTARY_LIFESTYLE</ID>
            </Has>
          </Not>
        </And>
      </PlayerCondition>
      <Name>TXT_KEY_NAME_TRIBE</Name>
</CivNameInfo>
This base name is valid from tribalism until sedentary lifestyle and uses both a prefix and a suffix.

The Name field in each case specifies a text key from the XML/Text folder that has the actual text. It gets a parameter for capital, civ and leader if it says that it uses them and then for each prefix or suffix it uses.

The rebel naming code or the naming during anarchy and similar will be kept as is for now. So it is just the naming by civic that uses this.

I'd be happy for any civ name contribution.
 
This is just freaking brilliant! I'd love to see what y'all come up with with these. I'll be trying to think of some suggestions but I'm a little lost in semantics on some of this.

Also, a question, what determines priority if you have overlapping qualifications for renaming on a given portion? For example, if my civ prefix qualifies for two adjusted 'names', which one gets the spotlight?
 
Back
Top Bottom