nody
Emperor
I have a problem opening attachments in my e-mail.
Could you put it on fileshack.com (or something like it) and send me a link instead?
Could you put it on fileshack.com (or something like it) and send me a link instead?
Not exactly. The Civ specific names are always valid for that plot (unless restricted in an exception, which is displayed inside a parenthesis). The default name is used if the Civ in question doens't have a entry to call its own. So Vikings acquiring something in China would get the default name for that tile, which would probably be something in Chinese. Because that tile wouldn't have any city name alias specific to Vikings. As an example.Just to be sure about the iDefault names:
Is that the original name and the names behind it the names that it will be changed to if the forementioned civ aquires it?
Berlin will be the German name for that tile if:I also see a lot of things missing, but I guess they were already missing in the original file.
Like:
- Berlijn doesn't change back to Berlin if conquered by Germany, or does it, because Berlin is iDefault? I'm confused.
- I don't see Cicihar (Russian Qiqihaer) anywhere.
Can anyone else validate it also?I saw the raw data and it looks good.
Yeah, I'm not qualified to make these decisions without researching every single entry. And my script is either, for sure.1. Based on what you said, in order for this to work the redundant entries that duplicate a certain coordinate need to be eliminated. I assume that these redundant entries are present in the raw data because you want the community to decide together which entries to keep and which to eliminate.
There is no 3 entry rule. There only is a entry if 1. a city name appears in a city name map and 2. that same city name is used as a condition for city name change in the code.2. It seems that you have only retained three redundant entries. For example lines 535, 536 and 537 contain information pertaining to the tile with coordinates (59, 37) which is Tripoli, Libya. Line 535 uses the Roman Tripolis as default. Line 536 uses the Arab Tarabulus. Line 537 uses the Turkish Trablus. Tripoli is not an option for a default name; I assume it's because it only appears on the citynamemaps for the Western Euro Civs which spawn after the Romans & Arabs. I see that this "3 entry rule" is broken sometimes, but I haven't figured out why. I'm not 100% sure that this 3 entry rule is the real deal or just my hallucination.
Only if its necessary, because I think we'd wanna delete those later.3. Can you add a comment or something to demarcate which Civ is the source for the Default name?
That would be your job - to pick the default name you wanna use. Unless you can come up with a set of rules for this that I can code into my script. What would those be then?I agree with SR that some default names are inconsistent and should be 1 default 'language'.
Yes, exactly. But to make it absolutely clear:To be sure:
When a civ aquires a city that doesn't have a name for that city it gets the default name, right?
Long story (read the rest of the thread) but this is preliminary raw data only. Generated by script. Developers are supposed to process that data so there will only be one entry per tile. So view them as "alternatives".So, why are there 3 entries for each tile?
(22, 43): { iDefault:'Nueva Iberia', iEngland:'New Iberia', iFrance:'Nouvelle-Ibérie', iAmerica:'New Iberia' },
(22, 43): { iDefault:'Nouvelle Orléans', iPortugal:'Nova Orleães', iNetherlands:'New Orleans', iVikings:'New Orleans', iEngland:'New Orleans', iGermany:'New Orleans', iSpain:'Nueva Orleans', iAmerica:'New Orleans' },
(22, 43): { iDefault:'New Orleans', iPortugal:'Nova Orleães', iSpain:'Nueva Orleans', iFrance:'Nouvelle Orléans' },
(23, 42): { iDefault:'Nouvelle Orléans', iPortugal:'Nova Orleães', iNetherlands:'New Orleans', iVikings:'New Orleans', iEngland:'New Orleans', iGermany:'New Orleans', iSpain:'Nueva Orleans', iAmerica:'New Orleans' },
(23, 42): { iDefault:'New Orleans', iPortugal:'Nova Orleães', iSpain:'Nueva Orleans', iFrance:'Nouvelle Orléans' },
(23, 43): { iDefault:'Nouvelle Orléans', iPortugal:'Nova Orleães', iNetherlands:'New Orleans', iVikings:'New Orleans', iEngland:'New Orleans', iGermany:'New Orleans', iSpain:'Nueva Orleans', iAmerica:'New Orleans' },
(23, 43): { iDefault:'New Orleans', iPortugal:'Nova Orleães', iSpain:'Nueva Orleans', iFrance:'Nouvelle Orléans' },
(23, 43): { iDefault:'Nouvelle Orléans', iPortugal:'Nova Orleães', iNetherlands:'New Orleans', iVikings:'New Orleans', iEngland:'New Orleans', iGermany:'New Orleans', iSpain:'Nueva Orleans', iAmerica:'New Orleans' },
(23, 43): { iDefault:'New Orleans', iPortugal:'Nova Orleães', iSpain:'Nueva Orleans', iFrance:'Nouvelle Orléans' },
(22, 43): { iDefault:'Nueva Iberia', iEngland:'New Iberia', iFrance:'Nouvelle-Ibérie', iAmerica:'New Iberia' },
(22, 43): { iDefault:'Nouvelle Orléans', iPortugal:'Nova Orleães', iNetherlands:'New Orleans', iVikings:'New Orleans', iEngland:'New Orleans', iGermany:'New Orleans', iSpain:'Nueva Orleans', iAmerica:'New Orleans' },
(22, 43): { iDefault:'New Orleans', iPortugal:'Nova Orleães', iSpain:'Nueva Orleans', iFrance:'Nouvelle Orléans' },
(22, 43): { [COLOR="Red"]iDefault:'Nueva Iberia'[/COLOR], iEngland:'New Iberia', iFrance:'Nouvelle-Ibérie', iAmerica:'New Iberia' },
(22, 43): { [COLOR="Red"]iDefault:'Nouvelle Orléans'[/COLOR], iPortugal:'Nova Orleães', iNetherlands:'New Orleans', iVikings:'New Orleans', iEngland:'New Orleans', iGermany:'New Orleans', iSpain:'Nueva Orleans', iAmerica:'New Orleans' },
(22, 43): { [COLOR="Red"]iDefault:'New Orleans'[/COLOR], iPortugal:'Nova Orleães', iSpain:'Nueva Orleans', iFrance:'Nouvelle Orléans' },
(22, 43): { [COLOR="Red"]iDefault:'Nouvelle Orléans'[/COLOR], iPortugal:'Nova Orleães', iNetherlands:'New Orleans', iVikings:'New Orleans', iEngland:'New Orleans', iGermany:'New Orleans', iSpain:'Nueva Orleans', iAmerica:'New Orleans' },
(28, 46): { [COLOR="Red"]iDefault:'Nieuwer-Amstel'[/COLOR], iNetherlands:'Wilmington', [COLOR="Red"]iVikings:(iGermany, 'Fort Kristina')[/COLOR] },
(28, 46): { [COLOR="Red"]iDefault:'Nieuwer-Amstel'[/COLOR], iNetherlands:'Wilmington', [COLOR="Red"]iVikings:(iNetherlands, 'Fort Kristina')[/COLOR] },
(28, 46): { [COLOR="Red"]iDefault:'Washington'[/COLOR], iJapan:'Washinton', iRussia:'Vashington' },
(28, 46): { iDefault:'Washington', iJapan:'Washinton', iRussia:'Vashington', iVikings:'Fort Kristina' },
(106, 47): { iDefault:'Sanshan', iChina:(iChina, 'Dalian'), iJapan:'Dairen', iRussia:'Dal'nij' },
(106, 47): { iDefault:'Dairen', iChina:'Dalian', iRussia:'Dal'nij' },
(106, 47): { iDefault:'Dal'nij', iChina:'Dalian', iJapan:'Dairen' },
iDefault:'Sanshan', iRussia:'Dal'nij', iJapan:'Dairen', iRussia:(iChina, 'Dalian'), iJapan:(iChina, 'Dalian') },
Are you positive that its my script and not Rhye's code that is to blame? (If you are, then I need to investigate and nobody gets to do any actual work on this in the meantime.)OK, I finally had time to read the file, and I guess I got an issue.
The script might have messed up with some conquest-based renames.
So if you have already fixed this particular problem, what is the problem then? And who are these "people" you are referring to?To make it work, there should be something like this:
and it might not be very easy for people to do fixes like this, unless they are already familiar with these names.Code:iDefault:'Sanshan', iRussia:'Dal'nij', iJapan:'Dairen', iRussia:(iChina, 'Dalian'), iJapan:(iChina, 'Dalian') },
Are you positive that its my script and not Rhye's code that is to blame?
def conversion():
global index
index = open('index.dat', 'w')
for iX in range(124): #124
for iY in range(68): #68
tCoords = (iX, iY)
print tCoords
for ePlayer in range(27):
entry = tCityMap[ePlayer][67-iY][iX]
if entry != "-1":
print ePlayer, entry
composeEntry(entry, tCoords, ePlayer)
index.close()
doubleEntries()
def composeEntry(entry, tCoords, ePlayer):
string = getString(tCoords, entry)
entries, lAliases = lookupAlias(entry, tCoords)
entries = specialCases(entries, lAliases, tCoords, ePlayer)
string += processEntries(entries)
if len(entries) > 0:
writeEntry(string)
def getString(tCoords, data):
return "(" + str(tCoords[0]) + ", " + str(tCoords[1]) + "): { iDefault:'" + data + "', "
def processEntries(entries):
string = ""
for player in entries:
city = entries[player]
if isinstance(city, tuple):
string += player + ":(" + city[0] + ", '" + city[1] + "'), "
else:
string += player + ":'" + city + "', "
return string[:len(string)-2]
def lookupAlias(entry, tCoords):
entries = {}
lAliases = []
for ePlayer in range(27) + [30]:
alias = getAlias(entry, ePlayer)
print "alias", lPlayers[ePlayer], alias
if alias == "" or alias == entry: continue
entries[lPlayers[ePlayer]] = alias
if not alias in lAliases:
lAliases.append(alias)
lAliases.append(entry)
return entries, lAliases
def getAlias(name, ePlayer):
alias, dummy = CNM.renameCities(name, ePlayer)
return alias
def writeEntry(string):
index.write(string + " },\n")
def specialCases(entries, lAliases, tCoords, ePlayer):
if len(lAliases) == 0: return
specialCases = entries.copy()
for player in entries:
entry = entries[player]
for eCurrent in range(27):
alias = getAlias(entry, eCurrent)
if alias != "" and not alias in lAliases:
specialCases[lPlayers[eCurrent]] = (lPlayers[ePlayer], alias)
return specialCases
def doubleEntries():
index = open('index.dat', 'r')
final = open('final.dat', 'w')
previous = "start"
while True:
string = index.readline()
print string
if string == "": break
if string != previous:
final.write(string)
previous = string
final.close()
index.close()
(17, 37): { iDefault:'Tenochtitlán', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iMaya, 'Mekhiko'), iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(17, 37): { iDefault:'Ciudad de México', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iSpain, 'Mekhiko'), iEngland:'Mexico City', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(17, 37): { iDefault:'Mekhiko', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:'Mexico', iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(17, 37): { iDefault:'Tenochtitlán', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iAztecs, 'Mekhiko'), iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(17, 37): { iDefault:'Mexico City', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iAmerica, 'Mekhiko'), iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(17, 38): { iDefault:'Tenochtitlán', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iMaya, 'Mekhiko'), iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(17, 38): { iDefault:'Ciudad de México', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iSpain, 'Mekhiko'), iEngland:'Mexico City', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(17, 38): { iDefault:'Mekhiko', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:'Mexico', iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(17, 38): { iDefault:'Tenochtitlán', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iAztecs, 'Mekhiko'), iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(17, 38): { iDefault:'Mexico City', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iAmerica, 'Mekhiko'), iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Tenochtitlán', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iMaya, 'Mekhiko'), iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Ciudad de México', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iSpain, 'Mekhiko'), iEngland:'Mexico City', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Mekhiko', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:'Mexico', iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Tenochtitlán', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iAztecs, 'Mekhiko'), iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Mexico City', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iAmerica, 'Mekhiko'), iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Tenochtitlán', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iMaya, 'Mekhiko'), iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Ciudad de México', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iSpain, 'Mekhiko'), iEngland:'Mexico City', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Mekhiko', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:'Mexico', iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Tenochtitlán', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iAztecs, 'Mekhiko'), iEngland:'Mexico City', iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Mexico City', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iAmerica, 'Mekhiko'), iSpain:'Ciudad de México', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Ciudad de México', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:(iSpain, 'Mekhiko'), iEngland:'Mexico City', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
(18, 37): { iDefault:'Ciudad de México', iTurkey:'Mexico', iPortugal:'Cidade do México', iCeltia:'Mexicopolis', iRussia:'Mekhiko', iEngland:'Mexico City', iFrance:'Mexico', iRome:'Mexicopolis', iNetherlands:'Mexico-stad', iAmerica:'Mexico City', iGermany:'Mexiko-Stadt', iVikings:'Mexico' },
I think you did a good job of replicating my example. But lets not take away that Russian exception on a whim, because it could make sense. (They seldom do to me, but rather to those who actually know these things.) So that would have to be a judgment call, then. Who is judging these things, by the way?Ok, I've tried to do what you said. If I've did someting wrong, please say it.