Dynamic Civ Names not working?

Elitech

Chieftain
Joined
Apr 1, 2013
Messages
16
I apologize in advance if this has been covered... I did a quick search, didnt find anything. Went to the chat room, there was noone there. So...

It appears DynamicCivNames is not working for me. I installed everything and its all been working fine until recently when I changed my civics. Now my civ name stays as "Croatian Provisional Government" constantly. Whats worse, even the AI's civ name has started being funky, so one AI also has the Provisional Government tag permanently.

Do I have to do something in the BUG options or is it a known "bug"/feature? Or is it that way only for certain civics (or a combination of them)?

Thank you for your time and (hopefully) answer(s).

Btw, AWESOME mod :D

Elitech
 
We know it is not working.;) The guy working on it has had real life issues and we have no idea when he or some one else will be able to get time to look at it.
 
Maybe the combination of civics you picked doesn't have a specific title for it in Dynamic Civ Names?
 
Maybe the combination of civics you picked doesn't have a specific title for it in Dynamic Civ Names?

Quite possible (it is also one of the reasons listed in my original post). I just wanted to hear an answer from somebody more...involved. Which brings me to...

We know it is not working.;) The guy working on it has had real life issues and we have no idea when he or some one else will be able to get time to look at it.

I believe that is all the answer I need ;)
 
I Was hoping the Dynamic Civ Name System would just rename your country to the era you are in say Gaul>Franks>France (bit of a crude sketch but should transfer the message)
 
i know, but that little piece of history and rolplaying would be neat
 
I'm pretty sure it's due to civic combinations - during my current game at one point all of the civs were provisional governments for hundreds of turns until new technologies got them to change into different civics.
 
I Was hoping the Dynamic Civ Name System would just rename your country to the era you are in say Gaul>Franks>France (bit of a crude sketch but should transfer the message)

That will be part of the Adopt A Culture mod project I have on the agenda. Will be a bit before I can get to that but it should be pretty cool once done. You'll be able to adopt your culture as if it were a civic (but one that carries a very large anarchy period.) We need a better culture spread mechanism first though.
 
The reason it doesn't work at the moment is because C2C has different civics to the mod that Dynamic Names comes from.

To make it easier to keep updated it was intended to move the text into the civic XML and the rest into the dll.
 
I think this part of DynamicCivNames.py is outdated:

Spoiler :

def newNameByCivics( self, iPlayer, bVerbose = True, bForceUpdate = False ) :
# Assigns a new name to a player based on their civics choices

pPlayer = gc.getPlayer(iPlayer)
capital = pPlayer.getCapitalCity()
playerEra = pPlayer.getCurrentEra()
pTeam = gc.getTeam(pPlayer.getTeam())

cityString = None
if( not capital == None and not capital.isNone() ) :
try :
# Silly game to force ascii encoding now
cityString = pPlayer.getCivilizationDescription(0)
cityString += "&" + CvUtil.convertToStr(capital.getName())
cityString = cityString.split('&',1)[-1]
except :
pass

curDesc = pPlayer.getCivilizationDescription(0)
curShort = pPlayer.getCivilizationShortDescription(0)
curAdj = pPlayer.getCivilizationAdjective(0)

origDesc = ""
if (pPlayer.getCivilizationType() >= 0):
civInfo = gc.getCivilizationInfo(pPlayer.getCivilizationType())
origDesc = civInfo.getDescription()

eLeader = pPlayer.getLeaderType()

bFemaleLeader = self.isFemaleLeader(eLeader)

iLanguage = gc.getGame().getCurrentLanguage()
bFrench = iLanguage == 1 #0 - English, 1 - French, 2 - German, 3 - Italian, 4 - Spanish

eGovCivic = pPlayer.getCivics(gc.getInfoTypeForString("CIVICOPTION_GOVERNMENT"))
ePowerCivic = pPlayer.getCivics(gc.getInfoTypeForString("CIVICOPTION_POWER"))
bNoRealElections = (gc.getInfoTypeForString("CIVIC_HEREDITARY_RULE") == eGovCivic or gc.getInfoTypeForString("CIVIC_HEREDITARY_RULE") == eGovCivic or gc.getInfoTypeForString("CIVIC_DESPOTISM") == eGovCivic or gc.getInfoTypeForString("CIVIC_FASCIST") == eGovCivic)

bFederal = (gc.getInfoTypeForString("CIVIC_FEDERAL") == eGovCivic and (ePowerCivic == gc.getInfoTypeForString("CIVIC_SENATE") or ePowerCivic == gc.getInfoTypeForString("CIVIC_PARLIAMENT") or ePowerCivic == gc.getInfoTypeForString("CIVIC_PRESIDENT")))
bConfederation = (not bFederal and (gc.getInfoTypeForString("CIVIC_FEDERAL") == eGovCivic))

bPacifist = (pPlayer.getCivics(gc.getInfoTypeForString("CIVICOPTION_MILITARY")) == gc.getInfoTypeForString("CIVIC_PACIFISM"))

if( not game.isOption(GameOptionTypes.GAMEOPTION_LEAD_ANY_CIV) ) :
if( pPlayer.getLeaderType() in LeaderCivNames.LeaderCivNames.keys() ) :
[curDesc,curShort,curAdj] = LeaderCivNames.LeaderCivNames[pPlayer.getLeaderType()]

newName = curDesc
if( SDTK.sdObjectExists( "Revolution", pPlayer ) ) :
revTurn = SDTK.sdObjectGetVal( "Revolution", pPlayer, 'RevolutionTurn' )
else :
revTurn = None

if( SDTK.sdObjectExists( "BarbarianCiv", pPlayer ) ) :
barbTurn = SDTK.sdObjectGetVal( "BarbarianCiv", pPlayer, 'SpawnTurn' )
else :
barbTurn = None

if( not pPlayer.isAlive() ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player is not alive")
newName = localText.getText("TXT_KEY_MOD_DCN_REFUGEES", ())%(curAdj)
return [newName, curShort, curAdj]

if( pPlayer.isRebel() ) :
# Maintain name of rebels from Revolution Mod
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player is rebel, keeping current name")
if( bForceUpdate ) :
return self.nameForNewPlayer(iPlayer)
else :
return [curDesc, curShort, curAdj]
elif( pPlayer.isMinorCiv() and not barbTurn == None ) :
# Maintain minor civ name
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player is Minor Barb Civ, keeping current name")
if( bForceUpdate ) :
return self.nameForNewPlayer(iPlayer)
else :
return [curDesc, curShort, curAdj]
elif( not barbTurn == None and game.getGameTurn() - barbTurn < 20 and pPlayer.getNumCities() < 4 ) :
# Maintain name of BarbarianCiv created player
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player is BarbCiv, keeping current name")
if( bForceUpdate ) :
return self.nameForNewPlayer(iPlayer)
else :
return [curDesc, curShort, curAdj]


# Special options for teams and permanent alliances
if( self.bTeamNaming and pTeam.getNumMembers() > 1 ) : # and pTeam.getPermanentAllianceTradingCount() > 0 ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - Multiple players on team")
if( self.LOG_DEBUG and bVerbose and pTeam.getPermanentAllianceTradingCount() > 0 ) : CvUtil.pyPrint("Names - Player in Permanent Alliance")
if( pTeam.getNumMembers() == 2 ) :
iLeader = pTeam.getLeaderID()
newName = gc.getPlayer(iLeader).getCivilizationAdjective(0) + "-"
for idx in range(0,gc.getMAX_CIV_PLAYERS()):
if( not idx == iLeader and gc.getPlayer(idx).getTeam() == pTeam.getID() ) :
newName += gc.getPlayer(idx).getCivilizationAdjective(0)
break
newName += u" " + localText.getText("TXT_KEY_MOD_DCN_ALLIANCE", ())
return [newName,curShort,curAdj]
else :
iLeader = pTeam.getLeaderID()
newName = gc.getPlayer(iLeader).getCivilizationAdjective(0)[0:4]
for idx in range(0,gc.getMAX_CIV_PLAYERS()):
if( not idx == iLeader and gc.getPlayer(idx).getTeam() == pTeam.getID() ) :
newName += gc.getPlayer(idx).getCivilizationAdjective(0)[0:3]
newName += u" " + localText.getText("TXT_KEY_MOD_DCN_ALLIANCE", ())
return [newName,curShort,curAdj]

sSocRep = localText.getText("TXT_KEY_MOD_DCN_SOC_REP", ()).replace('%s','').strip()
sPeoplesRep = localText.getText("TXT_KEY_MOD_DCN_PEOPLES_REP", ()).replace('%s','').strip()

#Anarchy Naming
if (pPlayer.isAnarchy and pPlayer.getAnarchyTurns() > 1):
if( 75 > game.getSorenRandNum(100,'Rev: Naming') ) :
newName = localText.getText("TXT_KEY_MOD_DCN_PROVISIONAL_GOV", ())%(curAdj)
else:
newName = localText.getText("TXT_KEY_MOD_DCN_PROVISIONAL_AUTH", ())%(curAdj)
return [newName, curShort, curAdj]

# AIAndy: New XML based Civ naming
if (gc.getDefineBOOL("USE_XML_BASED_CIV_NAMING")):
newName = pPlayer.getNewCivName()
if (len(newName) > 0):
return [newName, curShort, curAdj]

# Main naming conditions
if( RevUtils.isCommunism(iPlayer) ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player is communist")
if( RevUtils.isCanDoElections(iPlayer) and not bNoRealElections) :
if( not bForceUpdate and (sSocRep in curDesc or sPeoplesRep in curDesc) ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - keeping prior name")
newName = curDesc
elif( 50 > game.getSorenRandNum(100,'Rev: Naming') ) :
newName = localText.getText("TXT_KEY_MOD_DCN_SOC_REP", ())%(curShort)
else :
newName = localText.getText("TXT_KEY_MOD_DCN_PEOPLES_REP", ())%(curShort)
elif( RevUtils.getDemocracyLevel(iPlayer)[0] == -8 ) :
if( localText.getText("TXT_KEY_MOD_DCN_RUSSIAN_MATCH", ()) in curAdj ) :
curAdj = localText.getText("TXT_KEY_MOD_DCN_SOVIET", ())
newName = localText.getText("TXT_KEY_MOD_DCN_UNION", ())%(curAdj)
else :
newName = localText.getText("TXT_KEY_MOD_DCN_PEOPLES_REP", ())%(curShort)
elif( RevUtils.isCanDoElections(iPlayer) and not bNoRealElections) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player can do elections")
sRepOf = localText.getText("TXT_KEY_MOD_DCN_REPUBLIC_OF", ()).replace('%s','').strip()
sRepublic = localText.getText("TXT_KEY_MOD_DCN_REPUBLIC", ())

if( pPlayer.getNumCities() == 1 ) :
if( not bForceUpdate and (curDesc.startswith(localText.getText("TXT_KEY_MOD_DCN_FREE", ())) or ((sRepOf in curDesc or sRepublic in curDesc) and cityString in curDesc)) ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - keeping prior name")
newName = curDesc
elif( 40 > game.getSorenRandNum(100,'Rev: Naming') ) :
newName = localText.getText("TXT_KEY_MOD_DCN_FREE_STATE", ())%(curAdj)
else :
if( not cityString == None and len(cityString) < 10 and len(cityString) > 0) :
if( cityString in curAdj or cityString in curShort ) :
newName = localText.getText("TXT_KEY_MOD_DCN_THE_REPUBLIC_OF_CITY", ())%(cityString)
else :
newName = localText.getText("TXT_KEY_MOD_DCN_REPUBLIC_OF_CITY", ())%(curAdj,cityString)
else :
newName = localText.getText("TXT_KEY_MOD_DCN_FREE_REPUBLIC", ())%(curAdj)
else :
if( not bFederal and not bConfederation and not bForceUpdate and (sRepublic in curDesc and not sPeoplesRep in curDesc and not sSocRep in curDesc and curDesc.startswith(localText.getText("TXT_KEY_MOD_DCN_FREE", ()))) ) :
if( len(curDesc) < 17 and 20 > game.getSorenRandNum(100,'Rev: Naming') and not localText.getText("TXT_KEY_MOD_DCN_NEW", ()) in curDesc ) :
newName = localText.getText("TXT_KEY_MOD_DCN_NEW", ()) + curDesc
else :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - keeping prior name")
newName = curDesc
elif (bFederal):
if (pPlayer.getCivilizationType() == gc.getInfoTypeForString("CIVILIZATION_UNITED_STATES")):
newName = localText.getText("TXT_KEY_MOD_DCN_UNITED_STATES", ())%(curShort)
elif ( 50 > game.getSorenRandNum(100,'Rev: Naming') ):
newName = localText.getText("TXT_KEY_MOD_DCN_FEDERATED_STATES", ())%(curShort)
else:
newName = localText.getText("TXT_KEY_MOD_DCN_FEDERATION", ())%(curAdj)
elif (bConfederation):
if (50 > game.getSorenRandNum(100,'Rev: Naming')):
newName = localText.getText("TXT_KEY_MOD_DCN_CONFEDERATION", ())%(curAdj)
else:
newName = localText.getText("TXT_KEY_MOD_DCN_CONFEDERATION_STATES", ())%(curShort)
elif( 50 > game.getSorenRandNum(100,'Rev: Naming') ) :
newName = localText.getText("TXT_KEY_MOD_DCN_REPUBLIC", ())%(curAdj)
elif( 33 > game.getSorenRandNum(100,'Rev: Naming') ) :
newName = localText.getText("TXT_KEY_MOD_DCN_THE_COMMONWEALTH_OF", ())%(curShort)
else :
newName = localText.getText("TXT_KEY_MOD_DCN_THE_REPUBLIC_OF", ())%(curShort)

if( RevUtils.isFreeSpeech(iPlayer) and RevUtils.getLaborFreedom(iPlayer)[0] > 9 ) :
if( len(newName) < 16 and not localText.getText("TXT_KEY_MOD_DCN_FREE", ()) in newName and not localText.getText("TXT_KEY_MOD_DCN_NEW", ()) in newName ) :
newName = localText.getText("TXT_KEY_MOD_DCN_FREE", ()) + ' ' + newName
elif( RevUtils.getDemocracyLevel(iPlayer)[0] == -8 ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player is police state")
empString = localText.getText("TXT_KEY_MOD_DCN_PLAIN_EMPIRE", ())
if( localText.getText("TXT_KEY_MOD_DCN_GERMAN_MATCH", ()) in curAdj ) :
empString = localText.getText("TXT_KEY_MOD_DCN_REICH", ())

if( not bForceUpdate and empString in curDesc ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - keeping prior name")
newName = curDesc
elif( 70 > game.getSorenRandNum(100,'Rev: Naming') and not localText.getText("TXT_KEY_MOD_DCN_REICH", ()) in empString ) :
newName = localText.getText("TXT_KEY_MOD_DCN_THE_BLANK_OF", ())%(empString,curShort)
else :

if (bFrench):
newName = empString + ' ' + curAdj
else:
newName = curAdj + ' ' + empString
else :
sGreat = localText.getText("TXT_KEY_MOD_DCN_GREAT_KINGDOM", ()).replace('%s','').strip()

iMinCitiesKingdom = 3
if (pPlayer.getNumCities() >= iMinCitiesKingdom):
if (bFemaleLeader):
sKingdom = localText.getText("TXT_KEY_MOD_DCN_QUEENDOM", ())
else:
sKingdom = localText.getText("TXT_KEY_MOD_DCN_KINGDOM", ())
else:
sKingdom = localText.getText("TXT_KEY_MOD_DCN_PRINCIPALITY", ())


if( RevUtils.getDemocracyLevel(iPlayer)[0] == -6 ) :

if( pTeam.isAVassal() ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player is a vassal")
sKingdom = localText.getText("TXT_KEY_MOD_DCN_DUCHY", ())
else :
if( localText.getText("TXT_KEY_MOD_DCN_PERSIAN_MATCH", ()) in curAdj or localText.getText("TXT_KEY_MOD_DCN_OTTOMAN_MATCH", ()) in curAdj or localText.getText("TXT_KEY_MOD_DCN_SUMERIAN_MATCH", ()) in curAdj ) :
sKingdom = localText.getText("TXT_KEY_MOD_DCN_SULTANATE", ())
elif( localText.getText("TXT_KEY_MOD_DCN_ARABIAN_MATCH", ()) in curAdj ) :
sKingdom = localText.getText("TXT_KEY_MOD_DCN_CALIPHATE", ())

if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player is in monarchy")
if( pPlayer.getNumCities() < 4 ) :
if( not cityString == None and len(cityString) < 10 and len(cityString) > 0 ) :
if( cityString in curAdj or cityString in curShort ) :
newName = localText.getText("TXT_KEY_MOD_DCN_THE_BLANK_OF_CITY", ())%(sKingdom,cityString)
else :
if (bFrench):
newName = localText.getText("TXT_KEY_MOD_DCN_BLANK_OF_CITY", ())%(sKingdom,curAdj,cityString)
else:
newName = localText.getText("TXT_KEY_MOD_DCN_BLANK_OF_CITY", ())%(curAdj,sKingdom,cityString)
else :
if (bFrench):
newName = sKingdom + ' ' + curAdj
else:
newName = curAdj + ' ' + sKingdom
elif( game.getPlayerRank(iPlayer) < game.countCivPlayersAlive()/7 and not pTeam.isAVassal() and (sGreat in curDesc or 40 > game.getSorenRandNum(100,'Rev: Naming')) ) :
if (bFrench):
newName = localText.getText("TXT_KEY_MOD_DCN_GREAT_KINGDOM", ())%(sKingdom,curAdj)
else:
newName = localText.getText("TXT_KEY_MOD_DCN_GREAT_KINGDOM", ())%(curAdj,sKingdom)
else :
sOf = localText.getText("TXT_KEY_MOD_DCN_THE_BLANK_OF", ()).replace('%s','')
if( not bForceUpdate and sKingdom in curDesc and (not sOf in curDesc or pPlayer.getNumCities < 6) and (not sGreat in curDesc) ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - keeping prior name")
newName = curDesc
elif( 50 > game.getSorenRandNum(100,'Rev: Naming') ) :
if (bFrench):
newName = sKingdom + ' ' + curAdj
else:
newName = curAdj + ' ' + sKingdom
else :
newName = localText.getText("TXT_KEY_MOD_DCN_THE_BLANK_OF", ())%(sKingdom,curShort)

elif( RevUtils.getDemocracyLevel(iPlayer)[0] == -10 or playerEra == 0 ) :

empString = localText.getText("TXT_KEY_MOD_DCN_PLAIN_EMPIRE", ())
if( playerEra < 2 and pPlayer.getNumCities() < 3 ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player has one city in early era")
empString = localText.getText("TXT_KEY_MOD_DCN_PLAIN_CITY_STATE", ())
if( pTeam.isAVassal() ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player is a vassal")

if( 50 > game.getSorenRandNum(100,'Rev: Naming') ) :
empString = localText.getText("TXT_KEY_MOD_DCN_FIEFDOM", ())
elif( 50 > game.getSorenRandNum(100,'Rev: Naming') ) :
empString = localText.getText("TXT_KEY_MOD_DCN_PROTECTORATE", ())
else:
empString = localText.getText("TXT_KEY_MOD_DCN_TERRITORY", ())

if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player is in despotism")
if( not bForceUpdate and empString in curDesc and not game.getGameTurn() == 0 ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - keeping prior name")
newName = curDesc
elif( 50 > game.getSorenRandNum(100,'Rev: Naming') ) :
if (bFrench):
newName = empString + ' ' + curAdj
else:
newName = curAdj + ' ' + empString
else :
newName = localText.getText("TXT_KEY_MOD_DCN_THE_BLANK_OF", ())%(empString,curShort)

else :
if( self.LOG_DEBUG and bVerbose ) :
CvUtil.pyPrint("Names - Error: player fits no government category ... ")
return [curDesc,curShort,curAdj]

sHoly = localText.getText("TXT_KEY_MOD_DCN_HOLY", ()) + ' '
if( RevUtils.getReligiousFreedom(iPlayer)[0] < -9 ) :
if( self.LOG_DEBUG and bVerbose ) : CvUtil.pyPrint("Names - player is theocracy")
if( len(newName) < 16 and not sHoly in newName and not sGreat in newName and not newName.startswith(localText.getText("TXT_KEY_MOD_DCN_HOLY_HRE_MATCH", ())) ) :
newName = sHoly + newName
elif( newName.startswith(sHoly) and not origDesc.startswith(sHoly) ) :
# Cut off any inappropriately saved 'Holy ' prefix
newName = newName[len(sHoly):]

if (bPacifist):
szPacifist = localText.getText("TXT_KEY_MOD_DCN_PACIFIST", ())
if(not szPacifist in newName and 50 > game.getSorenRandNum(100,'Rev: Naming') ) :
szPacifist = localText.getText("TXT_KEY_MOD_DCN_PEACEFUL", ())

if (not szPacifist in newName):
if (bFrench):
newName = newName + ' ' + szPacifist
else:
newName = szPacifist + ' ' + newName

return [newName, curShort, curAdj]

def resetName( self, iPlayer, bVerbose = True ) :

pPlayer = gc.getPlayer(iPlayer)

civInfo = gc.getCivilizationInfo(pPlayer.getCivilizationType())
origDesc = civInfo.getDescription()
origShort = civInfo.getShortDescription(0)
origAdj = civInfo.getAdjective(0)

if( not game.isOption(GameOptionTypes.GAMEOPTION_LEAD_ANY_CIV) ) :
if( not self.bLeaveHumanName or not (pPlayer.isHuman() or game.getActivePlayer() == iPlayer) ) :
if( pPlayer.getLeaderType() in LeaderCivNames.LeaderCivNames.keys() ) :
[origDesc,origShort,origAdj] = LeaderCivNames.LeaderCivNames[pPlayer.getLeaderType()]

newDesc = CvUtil.convertToStr(origDesc)
newShort = CvUtil.convertToStr(origShort)
newAdj = CvUtil.convertToStr(origAdj)

newDesc = remove_diacriticals(newDesc)
newShort = remove_diacriticals(newShort)
newAdj = remove_diacriticals(newAdj)

if( self.LOG_DEBUG ) :
CvUtil.pyPrint(" Name - Re-setting civ name for player %d to %s"%(iPlayer,newDesc))

gc.getPlayer(iPlayer).setCivName( newDesc, newShort, newAdj )


def isFemaleLeader( self, eLeader ):
bFemaleLeader = False

if (eLeader == -1):
return False

if (not bFemaleLeader):
bFemaleLeader = (eLeader == gc.getInfoTypeForString("LEADER_BOUDICA"))
if (not bFemaleLeader):
bFemaleLeader = (eLeader== gc.getInfoTypeForString("LEADER_ELIZABETH"))
if (not bFemaleLeader):
bFemaleLeader = (eLeader== gc.getInfoTypeForString("LEADER_HATSHEPSUT"))
if (not bFemaleLeader):
bFemaleLeader = (eLeader== gc.getInfoTypeForString("LEADER_VICTORIA"))
if (not bFemaleLeader):
bFemaleLeader = (eLeader== gc.getInfoTypeForString("LEADER_ATOTOZTLI"))
if (not bFemaleLeader):
bFemaleLeader = (eLeader== gc.getInfoTypeForString("LEADER_CLEOPATRA"))
if (not bFemaleLeader):
bFemaleLeader = (eLeader== gc.getInfoTypeForString("LEADER_DIDO"))
if (not bFemaleLeader):
bFemaleLeader = (eLeader== gc.getInfoTypeForString("LEADER_JOANOFARC"))
if (not bFemaleLeader):
bFemaleLeader = (eLeader== gc.getInfoTypeForString("LEADER_NEFERTITI"))
if (not bFemaleLeader):
bFemaleLeader = (eLeader== gc.getInfoTypeForString("LEADER_THEODORA"))
if (not bFemaleLeader):
bFemaleLeader = (eLeader== gc.getInfoTypeForString("LEADER_WU"))

return bFemaleLeader


Rest of the file is ok.
 
I don't think we use that python at all any more. As I said the functionality was being moved into the XML and dll. Getting the gender of the leader from the leader file and the civic text from a text variable in the civics XML. I don't know/remember how far AIAndy got with it.
 
There is also two files:

CIV4CivNameInfos.xml
in XM\Civilizations directory

and
DynamicCivNames_CIV4GameText.xml
in XM\Text directory

I presume second one is obsolete and first one is from AiAndy new system.
 
I don't think we use that python at all any more. As I said the functionality was being moved into the XML and dll. Getting the gender of the leader from the leader file and the civic text from a text variable in the civics XML. I don't know/remember how far AIAndy got with it.
I never completed that move to XML. There is incomplete code and an XML file for it but it is not working right yet.
 
Hi ! I try to improve the algorithm for the mod "A New Dawn" in french as the syntax is incorrect on some names. I just need to find out how to get use of "pPlayer.getCivilizationAdjective(0)".
The xml Gametext shows that we have 4 types of adjectives: male_singular:female_singular:male_plural:female_plural.
No matter what i use, i always get male_singular value. How to get the others in python ?
".getCivilizationAdjective(1)" doesn't seems to work :(

Thank you.
 
I've noticed you were trying to work that out but I don't know anything about that from the code end either. AIAndy or Alberts2 may have a more useful answer.
 
Hi ! I try to improve the algorithm for the mod "A New Dawn" in french as the syntax is incorrect on some names. I just need to find out how to get use of "pPlayer.getCivilizationAdjective(0)".
The xml Gametext shows that we have 4 types of adjectives: male_singular:female_singular:male_plural:female_plural.
No matter what i use, i always get male_singular value. How to get the others in python ?
".getCivilizationAdjective(1)" doesn't seems to work :(

Thank you.

Hi

I think you are calling the wrong function, try
Code:
gc.getCivilizationInfo(pPlayer.getCivilizationType()).getAdjective(1)
 
Thank for your help. I've tried to use:
Code:
pPlayer = gc.getPlayer(iPlayer)

    playerAdj0 = gc.getCivilizationInfo(pPlayer.getCivilizationType()).getAdjective(0)
    playerAdj1 = gc.getCivilizationInfo(pPlayer.getCivilizationType()).getAdjective(1)
    playerAdj2 = gc.getCivilizationInfo(pPlayer.getCivilizationType()).getAdjective(2)
    playerAdj3 = gc.getCivilizationInfo(pPlayer.getCivilizationType()).getAdjective(3)
... but each adjective seems to give the same output.

EDIT: I've finally managed to make it to work. I'll publish the french updated code for dynamicCiv here on completion.
 
Uhm with the v35. If you reload a save the names tend to be fixed until someone changes civs than it will be Provisional Governments again. I have had the common wealth one and republic too.

Im not sure if a reload from the main menu would work. (just been reloading games for those pesky sleep breaks. :king: )
 
Hi C2C devs,
Thank to your help, i've fixed the incorrect syntax in French for A New Dawn.
If there's any interest, you can check the modifications here:
DynamicCivNames.py revision 868
...of course, this is on pair with all the "TXT_KEY_MOD_DCN_*" XML french tags in this file.
:)
 
Top Bottom