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 ^^
The dynamic civ naming is done byHow, though?
It is complicated as it is mainly code with lots of ifs, the important function being newNameByCivics.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?"
<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>
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>
Well, I can expose a lot of data to the expression system (and get that power at the same time for other expressions).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, 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.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, in the XML it triggers asserts in the debug builds if something is missing.And will be completely missed the next time civics change![]()
<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>
<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>
<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>
<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>
<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>
<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>