Requesting following features

well I guess when I have a few more done we can start working on the code and discuss distribution rules (that is when a tile doesn't have a name), then I can add more later.
 
Precisely :D

Have you given the only-being-able-to-build-in-historical-areas suggestion from earlier any more thought?
 
I am not so sure about it tbh because it restricts game play, If possible it should be based on a radius thing.... if tile has no name it should adopt the name of the nearest named tile
 
Just keep it min mind when testing the scenario, because you might end up with AIs founding cities in all the wrong places. In that case it would be possible to restrict city founding by looking up domestic city names for that tile - or any adjacent tile. It might end up being a nice touch, actually. You could also implement this for the AI only, if you like.
 
actually that is good
the AI should be only able to found historical tiles only!

However, players can found anywhere.

also, I'm not sure I completly understood what you said :p:
In that case it would be possible to restrict city founding by looking up domestic city names for that tile - or any adjacent tile.
what does that mean? does it mean what I just said at the beginning of this post?

edit: what you said about ai's not founding on desert struck me... for 2.1 the ai parthia will need to found in desert and it is based in desert! it's power will grant food on desert so thats fine... I think also that maybee the ai's should be able to found on desert anyway just sticking to those historical sites. is it possible with python to make founding on desert/building on desert possible (if it isn't that is)

another thing is that I doubt I will get many names for the desert so we could always have it so that is the player tries to found within certain coords only historical founding is available. I will fully draw up these rules when I have time and I am finished making the coords into a dictionary. (I will even make an illastration showing what areas of the map the human has restricted founding in to help with understanding :p)
 
I actually haven't looked at the restricted founding yet, but as far as I can tell we could implement this, yes. I'll have to get back to you with this also.
 
Try this (CustomFeatures):
Code:
peaceMessage = "TXT_KEY_CUSTOM_FEATURES_PEACE"
peaceSoundPath = "Jamie'sRome1.3\Assets\Sound\TheirMakePeace.wav"
Code:
def addPeaceMessage(bWar, eTeam1, eTeam2):
        if not bWar:
                addMessage(peaceMessage, (instance(eTeam1).getName(), instance(eTeam2).getName()), eGreen, peaceSoundPath)
Then, in CvEventManager:
Code:
	def onChangeWar(self, argsList):
		'War Status Changes'
		bIsWar = argsList[0]
		iTeam = argsList[1]
		iRivalTeam = argsList[2]

		if not gc.getGame().isFinalInitialized(): return

		CC.status(*argsList)
		[COLOR="Red"]Custom.addPeaceMessage(*argsList)[/COLOR]
I actually haven't done anything with art or sound in CivIV yet, so you're probably better equipped to debug any possible issues... :p Let me know how its going though. I might just learn something. :lol:

Once we get this working we can tackle the dynamic city naming and founding restriction. I'm actually looking forward to it. I wonder if we wanna make a new module for this or slap all of it in CustomFeatures? I'm thinking that the data-structure will be somewhat large, not?

As a side-note we could put the data in a module of its own, or we could simply store it in a text file and parse it line by line at initialization. That might slow the process down, however. :dunno:
 
I have already made a module :p I have finished listing names now (I still have like 50 Tiles I want to name though) and currently I am finding coords for all 209 historical names :p)
Spoiler :

Code:
#Historical City names Manager by Baldyr and J_mie6
cityNameDict = {
#Britain
(1, 45); ("Gaoth Dobhair"),
(4, 44); ("Dublinii", "Dublin"),
(4, 48); ("Briagh Mor"),
(7, 48); ("Glasguae", "Glasgow"), 
(8, 50); ("Invernessa", "Inverness"),
(10, 49); ("Aberdonia", "Aberdeen"),
(8, 48); ("Dalriada"),
(9, 46); ("Eburacum", "York"),
(7, 45); ("Bancor"),
(8, 43); ("Oxonia", "Oxford"),
(10, 44); ("Norwico", "Norwich"),
(11, 43); ("Cantabrigia", "Cambridge"),
(7, 42); ("Bristollie", "Bristol"),
(11, 41); ("Londinium", "London"),
#Italy
(25, 24); ("Roma", "Rome"),
(23, 26); ("Pisae", "Pisa"),
(25, 26); ("Arretium"),
(26, 27); ("Bononia", "Bologne"), 
(27, 27); ("Veronae", "Verona"),
(27, 28); ("Patavium", "Padua"),
(28, 26); ("Ravenna"),
(28, 28); ("Venetia", "Venice"),
(27, 24); ("Capua"),
(27, 23); ("Capua"),
(24, 29); ("Mediolanum", "Milan"),
(23, 28); ("Augusta Taurinorum", "Turin"),
(22, 28); ("Genua", "Genoa"),
(27, 21); ("Neapolis", "Naples"),
(28, 19); ("Croton"),
(29, 19); ("Croton"),
(30, 22); ("Tarentum"),
(28, 17); ("Rhegium"),
(29, 24); ("Corfinium"),
(27, 26); ("Ariminum"), #Arriminum?
#France
(14, 38); ("Lutetia", "Paris"),
(14, 34); ("Pictavium", "Poitiers"),
(17, 36); ("Alesia"),
(20, 37); ("Bruxellae", "Brussels"), 
(18, 32); ("Lugdunum", "Lyons"),
(12, 33); ("Bourges"),
(12, 39); ("Cadomum", "Caen"),
(10, 31); ("Burdigala", "Bordeaux"),
(17, 34); ("Turonensis"),
(11, 34); ("Lemovicis"),
(5, 38); ("Geoscribate", "Brest"),
(14, 37); ("Aureliae", "Orleans"),
(14, 29); ("Tolosa", "Toulouse"),
(10, 37); ("Andegavi"),
(8, 38); ("Gwenea"),
(6, 38); ("Civitas Redonum"),
(16, 38); ("Noviomagus"),
(19, 38); ("Damme"),
(15, 28); ("Narbo"),
(16, 31); ("Gergovia"),
(18, 28); ("Massilia", "Marseille"),
(19, 28); ("Massilia", "Marseille"),
(20, 31); ("Berna"),
(20, 34); ("Viberi"),
#Spain 
(8, 24); ("Matritum", "Madrid"),
(13, 24); ("Barcino", "Barcelona"),
(13, 23); ("Nova Carthago"),
(10, 20); ("Hispalis", "Seville"), 
(8, 22); ("Toletum", "Toledo"),
(8, 27); ("Caesaraugusta", "Zaragoza"),
(7, 28); ("Flaviobriga"),
(13, 21); ("Valentina", "Valencia"),
(4, 19); ("Gades"),
(3, 21); ("Viananensis"),
(10, 24); ("Numantia"),
(5, 23); ("Segovia"),
(12, 27); ("Osca"),
(7, 18); ("Corduba", "Cordoba"),
(2, 23); ("Ulisaypo"),
(3, 25); ("Asturica"),
#Scandanavia
(17, 41); ("Amstelodamum", "Amsterdam"),
(26, 41); ("Hafnia", "Copenhagen"),
(26, 48); ("Sveaby"),
(31, 48); ("Holmia", "Stockholm"), 
(19, 44); ("Vicus Cimbri"),
(18, 42); ("Bordesholm"),
#Germany and Surroundings
(29, 36); ("Berolinum", "Berlin"),
(23, 39); ("Germania Superior"),
(25, 34); ("Bremensis", "Bremen"),
(22, 36); ("Metis", "Metz"), 
(27, 37); ("Vicus Marcomanni"),
(26, 33); ("Francofurtum", "Frankfurt"),
(34, 33); ("Pragae", "Prague"), 
(35, 37); ("Campus Lazyges"),
(27, 32); ("Odio", "Munich"),
(28, 34); ("Luvalum"),
(33, 35); ("Oduba"),
(35, 40); ("Locus Gepidae"),
(29, 40); ("Vicus Gothi"),
(23, 32); ("Turicum", "Zurich"),
(38, 44); ("Vicus Aestui"),
#North africa COORDS
(0, 0); ("Carthage"),
(0, 0); ("Cirta"),
(0, 0); ("Capsa"),
(0, 0); ("Thapsus"), 
(0, 0); ("Hippo Regius"),
(0, 0); ("Utica"),
(0, 0); ("Hadrumentum"), 
(0, 0); ("Icosium"),
(0, 0); ("Moulucha"),
(0, 0); ("Tingi"),
(0, 0); ("Dimmidi"),
(0, 0); ("Nepte"),
(0, 0); ("Cidamus"),
(0, 0); ("Lipcis Magna"),
#Med Islands
(15, 23); ("Palma"),
(19, 21); ("Caralitanus", "Cagliari"),
(19, 23); ("Nora"),
(25, 15); ("Syracuse", "Siracuse"), 
(24, 17); ("Messina"),
(21, 16); ("Lilybaeum"),
(19, 25); ("Aleria"),
(27, 14); ("Melite"),
#Greece COORDS
(0, 0); ("Athens"),
(0, 0); ("Sparta"),
(0, 0); ("Corinth"),
(0, 0); ("Thermon"), 
(0, 0); ("Larissa"),
(0, 0); ("Thessalonica"),
(0, 0); ("Pella"), 
(0, 0); ("Plilippi"), #Philippi?
(0, 0); ("Maronia"),
(0, 0); ("Byzantium", "Constaninople"), #To Baldr: can this be used in connection to ERE?
(0, 0); ("Elis"),
#Greek Islands
(49, 18); ("Rhodes"),
(46, 13); ("Kydonia"),
(49, 12); ("Hieraptyna"),
(63, 13); ("Salamis"),
(60, 13); ("Palaepaphos"),
#Desert COORDS
(0, 0); ("Babylon"),
(0, 0); ("Seleuceia"),
(0, 0); ("Arsakia"),
(0, 0); ("Phraaspa"), 
(0, 0); ("Dura Europos"),
(0, 0); ("Epiphaneia"),
(0, 0); ("Susa"), 
(0, 0); ("Dumatha"),
(0, 0); ("Dhofar"),
#Egypt COORDS
(0, 0); ("Damsci", "Damascus"),
(0, 0); ("Palmyra"),
(0, 0); ("Bostra"),
(0, 0); ("Laodicea"), 
(0, 0); ("Sidon"),
(0, 0); ("Tyre"),
(0, 0); ("Dium"), 
(0, 0); ("Jerusalem"),
(0, 0); ("Jerusalem"),
(0, 0); ("Gaza"),
(0, 0); ("Petra"),
(0, 0); ("Thebes"),
(0, 0); ("Memphis"),
(0, 0); ("Ptolemais Hormos"), 
(0, 0); ("Cairus", "Cairo"),
(0, 0); ("Alexandra"),
(0, 0); ("Siwa"), 
(0, 0); ("Cyrene"),
#Pontus COORDS
(0, 0); ("Nicomedia"),
(0, 0); ("Abydos"),
(0, 0); ("Pergamum"),
(0, 0); ("Halicarnassus"), 
(0, 0); ("Prusa"),
(0, 0); ("Pessinus"),
(0, 0); ("Ancyra"), 
(0, 0); ("Arsinoe"),
(0, 0); ("Smyrna"),
(0, 0); ("Sardis"),
(0, 0); ("Adana"),
(0, 0); ("Side"),
(0, 0); ("Lacus"),
(0, 0); ("Sinope"), 
(0, 0); ("Euseheia"),
(0, 0); ("Heracleia"),
(0, 0); ("Eupatoria"), 
(0, 0); ("Pharnacia"),
(0, 0); ("Trapezus"),
(0, 0); ("Armavir"),
(0, 0); ("Kotais"),
(0, 0); ("Tarsa"),
(0, 0); ("Hieropolis"),
(0, 0); ("Apameia"), 
(0, 0); ("Atraxarta"),
(0, 0); ("Nisibis"),
(0, 0); ("Edessa"), 
(0, 0); ("Antioch"),
(0, 0); ("Seleuceia Pieria"),
(0, 0); ("Samosata"),
(0, 0); ("Nicopotis"),
#Eastern Europe COORDS
(0, 0); ("Aquincum", "Budapest"),
(0, 0); ("Tylis"),
(0, 0); ("Debeltos"),
(0, 0); ("Bylazora"), 
(0, 0); ("Ratiaria"),
(0, 0); ("Vicus Venedae"),
(0, 0); ("Sarmisegetusa"), 
(0, 0); ("Campus Getae"),
(0, 0); ("Anchialus"),
(0, 0); ("Khersones"),
(0, 0); ("Kerkenitida"),
#Salona Region
(35, 26); ("Scondra"),
(35, 23); ("Apollinia"),
(32, 27); ("Salona"),
(38, 24); ("Antigonea"), 
(30, 29); ("Aquileia"),
(32, 30); ("Segestica"),
(34, 30); ("Delmatia")
}

the commented areas are just to help me cut down the huge task of find the coords. There is a message hidden in there for you btw. We can do the main code beneath the dictionary!

If your sound code doesn't work I will try using my function if it still doesn't work I will try and root out the problem. urg idependance sucks :p
 
I have already made a module :p I have finished listing names now (I still have like 50 Tiles I want to name though) and currently I am finding coords for all 209 historical names :p)
What are you calling your module?

Regarding the data, the key should be separated by a colon (not a semi-colon) from the values on each line. Also, every single value tuple needs to have a comma - to indicate that the parenthesis are used to define a tuple (with only one value entry):
Code:
(4, 44)[B][COLOR="Red"]:[/COLOR][/B] ("Dublinii", "Dublin"),
(4, 48)[B][COLOR="Red"]:[/COLOR][/B] ("Briagh Mor"[B][COLOR="Red"],[/COLOR][/B]),
What are those names representing? The first one is what form and the second one? What if there is only one name? What are the rules here?

We can do the main code beneath the dictionary!
Or, rather, I'll put the code first and the data last. Because it would be somewhat awkward to scroll several hundreds of lines of data entries just to find some line of code. You can always reverse the order once the code is tested and debugged - so that you don't need to scroll through some hundred lines of codes to get to the data you need to edit... :p

The order of data vs code is actually arbitrary in this case.

If your sound code doesn't work I will try using my function if it still doesn't work I will try and root out the problem. urg idependance sucks :p
I'm not worried about the code not working - this should be the default way of adding sound to messages. Rather unsure on how to point to the correct sound file path. :p (You should probably tinker with it to figure out how exactly it works.)
 
I knew it should be a : but in your example you put in a ; 209 ctrl + V coming up (urg)

Does it really need a , after? I would have though ("hi") on it's own woulnd't affect it

Module is called HistoricalCities.py

first is Latin/ native and the second is english (really only there for reference, but could come in handy eventually like the Byzantium, Constantinople pair could be use in the ere code)
 
Does it really need a , after? I would have though ("hi") on it's own woulnd't affect it
This is a tuple containing one value:
Code:
(True,)
This is the value True inside a set of parenthesis, which actually do nothing:
Code:
(True)
This is evaluated exactly the same as this:
Code:
True
So there is a huge difference.

first is Latin/ native and the second is english (really only there for reference, but could come in handy eventually like the Byzantium, Constantinople pair could be use in the ere code)
So we don't really need the second one, then? Lets not complicate things when we don't need to!
 
sigh... Keep the second one :p Damascus will be used as the egypt name for Damasci so alls good in having them :lol:

here:

Spoiler :
Code:
#Historical City names Manager by Baldyr and J_mie6
cityNameDict = {
#Britain
(1, 45): ("Gaoth Dobhair",),
(4, 44): ("Dublinii", "Dublin"),
(4, 48): ("Briagh Mor",),
(7, 48): ("Glasguae", "Glasgow"), 
(8, 50): ("Invernessa", "Inverness"),
(10, 49): ("Aberdonia", "Aberdeen"),
(8, 48): ("Dalriada",),
(9, 46): ("Eburacum", "York"),
(7, 45): ("Bancor",),
(8, 43): ("Oxonia", "Oxford"),
(10, 44): ("Norwico", "Norwich"),
(11, 43): ("Cantabrigia", "Cambridge"),
(7, 42): ("Bristollie", "Bristol"),
(11, 41): ("Londinium", "London"),
#Italy
(25, 24): ("Roma", "Rome"),
(23, 26): ("Pisae", "Pisa"),
(25, 26): ("Arretium",),
(26, 27): ("Bononia", "Bologne"), 
(27, 27): ("Veronae", "Verona"),
(27, 28): ("Patavium", "Padua"),
(28, 26): ("Ravenna",),
(28, 28): ("Venetia", "Venice"),
(27, 24): ("Capua",),
(27, 23): ("Capua",),
(24, 29): ("Mediolanum", "Milan"),
(23, 28): ("Augusta Taurinorum", "Turin"),
(22, 28): ("Genua", "Genoa"),
(27, 21): ("Neapolis", "Naples"),
(28, 19): ("Croton",),
(29, 19): ("Croton",),
(30, 22): ("Tarentum",),
(28, 17): ("Rhegium",),
(29, 24): ("Corfinium",),
(27, 26): ("Ariminum",), #Arriminum?
#France
(14, 38): ("Lutetia", "Paris"),
(14, 34): ("Pictavium", "Poitiers"),
(17, 36): ("Alesia",),
(20, 37): ("Bruxellae", "Brussels"), 
(18, 32): ("Lugdunum", "Lyons"),
(12, 33): ("Bourges",),
(12, 39): ("Cadomum", "Caen"),
(10, 31): ("Burdigala", "Bordeaux"),
(17, 34): ("Turonensis",),
(11, 34): ("Lemovicis",),
(5, 38): ("Geoscribate", "Brest"),
(14, 37): ("Aureliae", "Orleans"),
(14, 29): ("Tolosa", "Toulouse"),
(10, 37): ("Andegavi",),
(8, 38): ("Gwenea",),
(6, 38): ("Civitas Redonum",),
(16, 38): ("Noviomagus",),
(19, 38): ("Damme",),
(15, 28): ("Narbo",),
(16, 31): ("Gergovia",),
(18, 28): ("Massilia", "Marseille"),
(19, 28): ("Massilia", "Marseille"),
(20, 31): ("Berna",),
(20, 34): ("Viberi",),
#Spain 
(8, 24): ("Matritum", "Madrid"),
(13, 24): ("Barcino", "Barcelona"),
(13, 23): ("Nova Carthago",),
(10, 20): ("Hispalis", "Seville"), 
(8, 22): ("Toletum", "Toledo"),
(8, 27): ("Caesaraugusta", "Zaragoza"),
(7, 28): ("Flaviobriga",),
(13, 21): ("Valentina", "Valencia"),
(4, 19): ("Gades",),
(3, 21): ("Viananensis",),
(10, 24): ("Numantia",),
(5, 23): ("Segovia",),
(12, 27): ("Osca",),
(7, 18): ("Corduba", "Cordoba"),
(2, 23): ("Ulisaypo",),
(3, 25): ("Asturica",),
#Scandanavia
(17, 41): ("Amstelodamum", "Amsterdam"),
(26, 41): ("Hafnia", "Copenhagen"),
(26, 48): ("Sveaby",),
(31, 48): ("Holmia", "Stockholm"), 
(19, 44): ("Vicus Cimbri",),
(18, 42): ("Bordesholm",),
#Germany and Surroundings
(29, 36): ("Berolinum", "Berlin"),
(23, 39): ("Germania Superior",),
(25, 34): ("Bremensis", "Bremen"),
(22, 36): ("Metis", "Metz"), 
(27, 37): ("Vicus Marcomanni",),
(26, 33): ("Francofurtum", "Frankfurt"),
(34, 33): ("Pragae", "Prague",), 
(35, 37): ("Campus Lazyges",),
(27, 32): ("Odio", "Munich"),
(28, 34): ("Luvalum",),
(33, 35): ("Oduba",),
(35, 40): ("Locus Gepidae",),
(29, 40): ("Vicus Gothi",),
(23, 32): ("Turicum", "Zurich"),
(38, 44): ("Vicus Aestui",),
#North africa
(18, 15): ("Carthage",),
(10, 13): ("Cirta",),
(15, 9): ("Capsa",),
(18, 11): ("Thapsus",), 
(13, 14): ("Hippo Regius",),
(15, 15): ("Utica",),
(20, 13): ("Hadrumentum",), 
(7, 14): ("Icosium",),
(8, 9): ("Moulucha",),
(5, 14): ("Tingi",),
(5, 8): ("Dimmidi",),
(13, 2): ("Nepte",),
(20, 5): ("Cidamus",),
(23, 10): ("Lipcis Magna",),
#Med Islands
(15, 23): ("Palma",),
(19, 21): ("Caralitanus", "Cagliari"),
(19, 23): ("Nora",),
(25, 15): ("Syracuse", "Siracuse"), 
(24, 17): ("Messina",),
(21, 16): ("Lilybaeum",),
(19, 25): ("Aleria",),
(27, 14): ("Melite",),
#Greece
(45, 19): ("Athens",),
(40, 16): ("Sparta",),
(41, 19): ("Corinth",),
(38, 22): ("Thermon",), 
(41, 23): ("Larissa",),
(42, 25): ("Thessalonica",),
(42, 27): ("Pella",), 
(43, 26): ("Plilippi",), #Philippi?
(44, 26): ("Maronia",),
(46, 27): ("Byzantium", "Constaninople"), #To Baldr: can this be used in connection to ERE?
(36, 19): ("Elis",),
#Greek Islands
(49, 18): ("Rhodes",),
(46, 13): ("Kydonia",),
(49, 12): ("Hieraptyna",),
(63, 13): ("Salamis",),
(60, 13): ("Palaepaphos",),
#Desert
(82, 20): ("Babylon",),
(86, 21): ("Seleuceia",),
(84, 24): ("Arsakia",),
(77, 24): ("Phraaspa",), 
(79, 19): ("Dura Europos",),
(81, 25): ("Epiphaneia",),
(87, 14): ("Susa",), 
(82, 9): ("Dumatha",),
(78, 1): ("Dhofar",),
#Egypt
(71, 15): ("Damasci", "Damascus"),
(74, 16): ("Palmyra",),
(70, 12): ("Bostra",),
(67, 14): ("Laodicea",), 
(66, 13): ("Sidon",),
(66, 12): ("Tyre",),
(68, 11): ("Dium",), 
(64, 9): ("Jerusalem",),
(65, 8): ("Jerusalem",),
(62, 6): ("Gaza",),
(60, 2): ("Petra",),
(55, 4): ("Thebes",),
(55, 2): ("Memphis",),
(54, 1): ("Ptolemais Hormos"), 
(55, 0): ("Cairus", "Cairo"),
(51, 4): ("Alexandra",),
(40, 3): ("Siwa",), 
(40, 8): ("Cyrene",),
#Pontus
(52, 26): ("Nicomedia",),
(48, 24): ("Abydos",),
(49, 22): ("Pergamum",),
(54, 19): ("Halicarnassus",), 
(52, 24): ("Prusa",),
(54, 23): ("Pessinus",),
(56, 23): ("Ancyra",), 
(57, 20): ("Arsinoe",),
(52, 21): ("Smyrna",),
(54, 21): ("Sardis",),
(59, 22): ("Adana",),
(60, 20): ("Side",),
(62, 24): ("Lacus",), #Check on map
(55, 30): ("Sinope",), 
(59, 25): ("Euseheia",),
(53, 29): ("Heracleia",),
(58, 27): ("Eupatoria",), 
(59, 30): ("Pharnacia",),
(62, 28): ("Trapezus",),
(65, 27): ("Armavir",),
(67, 27): ("Kotais",),
(63, 19): ("Tarsa",),
(68, 22): ("Hieropolis",),
(69, 20): ("Apameia",), 
(70, 25): ("Atraxarta",),
(75, 22): ("Nisibis",),
(73, 20): ("Edessa",), 
(69, 17): ("Antioch",),
(67, 17): ("Seleuceia Pieria",),
(72, 23): ("Samosata",),
(71, 19): ("Nicopotis",),
#Eastern Europe
(41, 33): ("Aquincum", "Budapest"),
(44, 33): ("Tylis",),
(47, 32): ("Debeltos",),
(41, 30): ("Bylazora",), 
(38, 35): ("Ratiaria",),
(37, 39): ("Vicus Venedae",),
(39, 38): ("Sarmisegetusa",), 
(43, 37): ("Campus Getae",),
(47, 35): ("Anchialus",),
(54, 34): ("Khersones",),
(57, 35): ("Kerkenitida",),
#Salona Region
(35, 26): ("Scondra",),
(35, 23): ("Apollinia",),
(32, 27): ("Salona",),
(38, 24): ("Antigonea",), 
(30, 29): ("Aquileia",),
(32, 30): ("Segestica",),
(34, 30): ("Delmatia",)
}

All yours! I will get to testing the peace messages (have to make the message first forgot about that :p)
 
But what are the rules? I can't script anything at all before I know what the logic should be.

So the first name is always used, then? Except in some very special cases? What special cases? Be extremely specific about those, please.
 
Right, ok.... I'm not prepared for this :p

as I have no real coords for this use some dummy coords I will edit it later but anyway in a box defined by 2 coords the Human player city founding is restricted to historical sities only (this is in the eastern desert, but maybe in southern areas of the map)

Damascus is the Egyptian name for Damasci and for the moment is the only exception... This is unless you can make it so that if rome takes Constantinople from the ERE it is renamed Byzantium. and if egypt takes damasci from rome it becomes damascus. If this is possible these rules are followed

Rome -> ERE
Byzantium -> Constantinople

Rome -> Egypt
Damasci -> Damascus

and these work in reverse too

the AI can only found on historical tiles (including desert historical tiles)

If the player founds on a non named tiles the program should ideally find the nearest name to adopt... (I could help develop this)

That should be enough for the moment I think unless you have any suggestions/questions
 
Damascus is the Egyptian name for Damasci and for the moment is the only exception... This is unless you can make it so that if rome takes Constantinople from the ERE it is renamed Byzantium. and if egypt takes damasci from rome it becomes damascus. If this is possible these rules are followed

Rome -> ERE
Byzantium -> Constantinople

Rome -> Egypt
Damasci -> Damascus
I see. But if these are the only exceptions we don't need to include this in the master data. We can implement a handful of such special cases later, no problem.

But if we end up making these special cases for all or most city locations, then we need to rethink our approach now. Otherwise this will never be completed.

So either we expand the data to accommodate various city name version. Or we take them out completely. Then we can add the two special cases by hard-coding them.

If the player founds on a non named tiles the program should ideally find the nearest name to adopt... (I could help develop this)
You mean the human player? Its a matter of looking up the adjacent tiles for names, and if none are found, then you look one additional tile away. And if that doesn't work, you extend the search further and further away. But, this will become ridiculous very fast, so the human player should probably just be prompted to name his cities on founding, not?

I don't think any names/suggestions should go beyond the adjacent tile.
That should be enough for the moment I think unless you have any suggestions/questions
I'm doing another project right now, but as soon as I get the time I'm gonna sink my teeth into this. In the meanwhile, please update the data-structure to this single entry setup:
Code:
(4, 44): "Dublinii",
(4, 48): "Briagh Mor",
So only one name entry per line, and no parenthesis, or extra dummy commas inside those.
 
ok..... urg...

also I just discovered that originally 2 different peace messages are used... one saying:

You have made peace with
and
Washington has made peace with

how should this be handled?

I guess we hard code those exceptions... Maybee 2 tiles away from the unnamed then revert to stanard naming...

edit: text used for peace is this:

<English>%s1_PlyrName has made peace with %s2_PlyrName!</English>

will this work with your code? I gues I can't use isHuman() for the second message as the human needs to be a string not an enumerated value, so eTeam1 can't be used
 
also I just discovered that originally 2 different peace messages are used... one saying:

You have made peace with
and
Washington has made peace with

how should this be handled?
Like this?
Code:
def addPeaceMessage(bWar, eTeam1, eTeam2):
        if not bWar[COLOR="Red"] and eTeam1 != Game.getActivePlayer() != eTeam2[/COLOR]:
                addMessage(peaceMessage, (instance(eTeam1).getName(), instance(eTeam2).getName()), eGreen, peaceSoundPath)
Maybee 2 tiles away from the unnamed then revert to stanard naming...
2 tiles it is! :king:
 
there
Spoiler :

Code:
#Historical City names Manager by Baldyr and J_mie6
cityNameDict = {
#Britain
(1, 45): "Gaoth Dobhair",
(4, 44): "Dublinii", #Dublin
(4, 48): "Briagh Mor",
(7, 48): "Glasguae", #Glasgow
(8, 50): "Invernessa", #Inverness
(10, 49): "Aberdonia", #Aberdeen
(8, 48): "Dalriada",
(9, 46): "Eburacum", #York
(7, 45): "Bancor",
(8, 43): "Oxonia", #Oxford
(10, 44): "Norwico", #Norwich
(11, 43): "Cantabrigia", #Cambridge
(7, 42): "Bristollie", #Bristol
(11, 41): "Londinium", #London
#Italy
(25, 24): "Roma", #Rome
(23, 26): "Pisae", #Pisa
(25, 26): "Arretium",
(26, 27): "Bononia", #Bologne
(27, 27): "Veronae", #Verona
(27, 28): "Patavium", #Padua
(28, 26): "Ravenna",
(28, 28): "Venetia", #Venice
(27, 24): "Capua",
(27, 23): "Capua",
(24, 29): "Mediolanum", #Milan
(23, 28): "Augusta Taurinorum", #Turin
(22, 28): "Genua", #Genoa
(27, 21): "Neapolis", #Naples
(28, 19): "Croton",
(29, 19): "Croton",
(30, 22): "Tarentum",
(28, 17): "Rhegium",
(29, 24): "Corfinium",
(27, 26): "Ariminum", #Arriminum?
#France
(14, 38): "Lutetia", #Paris
(14, 34): "Pictavium", #Poitiers
(17, 36): "Alesia",
(20, 37): "Bruxellae", #Brussels 
(18, 32): "Lugdunum", #Lyons
(12, 33): "Bourges",
(12, 39): "Cadomum", #Caen
(10, 31): "Burdigala", #Bordeaux
(17, 34): "Turonensis",
(11, 34): "Lemovicis",
(5, 38): "Geoscribate", #Brest
(14, 37): "Aureliae", #Orleans
(14, 29): "Tolosa", #Toulouse
(10, 37): "Andegavi",
(8, 38): "Gwenea",
(6, 38): "Civitas Redonum",
(16, 38): "Noviomagus",
(19, 38): "Damme",
(15, 28): "Narbo",
(16, 31): "Gergovia",
(18, 28): "Massilia", #Marseille
(19, 28): "Massilia", #Marseille
(20, 31): "Berna",
(20, 34): "Viberi",
#Spain 
(8, 24): "Matritum", #Madrid
(13, 24): "Barcino", #Barcelona
(13, 23): "Nova Carthago",
(10, 20): "Hispalis", #Seville
(8, 22): "Toletum", #Toledo
(8, 27): "Caesaraugusta", #Zaragoza
(7, 28): "Flaviobriga",
(13, 21): "Valentina", #Valencia
(4, 19): "Gades",
(3, 21): "Viananensis",
(10, 24): "Numantia",
(5, 23): "Segovia",
(12, 27): "Osca",
(7, 18): "Corduba", #Cordoba
(2, 23): "Ulisaypo",
(3, 25): "Asturica",
#Scandanavia
(17, 41): "Amstelodamum", #Amsterdam
(26, 41): "Hafnia", #Copenhagen
(26, 48): "Sveaby",
(31, 48): "Holmia", #Stockholm
(19, 44): "Vicus Cimbri",
(18, 42): "Bordesholm",
#Germany and Surroundings
(29, 36): "Berolinum", #Berlin
(23, 39): "Germania Superior",
(25, 34): "Bremensis", #Bremen
(22, 36): "Metis", #Metz
(27, 37): "Vicus Marcomanni",
(26, 33): "Francofurtum", #Frankfurt
(34, 33): "Pragae", #Prague 
(35, 37): "Campus Lazyges",
(27, 32): "Odio", #Munich
(28, 34): "Luvalum",
(33, 35): "Oduba",
(35, 40): "Locus Gepidae",
(29, 40): "Vicus Gothi",
(23, 32): "Turicum", #Zurich
(38, 44): "Vicus Aestui",
#North africa
(18, 15): "Carthage",
(10, 13): "Cirta",
(15, 9): "Capsa",
(18, 11): "Thapsus", 
(13, 14): "Hippo Regius",
(15, 15): "Utica",
(20, 13): "Hadrumentum", 
(7, 14): "Icosium",
(8, 9): "Moulucha",
(5, 14): "Tingi",
(5, 8): "Dimmidi",
(13, 2): "Nepte",
(20, 5): "Cidamus",
(23, 10): "Lipcis Magna",
#Med Islands
(15, 23): "Palma",
(19, 21): "Caralitanus", #Cagliari
(19, 23): "Nora",
(25, 15): "Syracuse", #Siracuse
(24, 17): "Messina",
(21, 16): "Lilybaeum",
(19, 25): "Aleria",
(27, 14): "Melite",
#Greece
(45, 19): "Athens",
(40, 16): "Sparta",
(41, 19): "Corinth",
(38, 22): "Thermon", 
(41, 23): "Larissa",
(42, 25): "Thessalonica",
(42, 27): "Pella", 
(43, 26): "Plilippi", #Philippi?
(44, 26): "Maronia",
(46, 27): "Byzantium", #Constaninople To Baldr: can this be used in connection to ERE?
(36, 19): "Elis",
#Greek Islands
(49, 18): "Rhodes",
(46, 13): "Kydonia",
(49, 12): "Hieraptyna",
(63, 13): "Salamis",
(60, 13): "Palaepaphos",
#Desert
(82, 20): "Babylon",
(86, 21): "Seleuceia",
(84, 24): "Arsakia",
(77, 24): "Phraaspa", 
(79, 19): "Dura Europos",
(81, 25): "Epiphaneia",
(87, 14): "Susa", 
(82, 9): "Dumatha",
(78, 1): "Dhofar",
#Egypt
(71, 15): "Damasci", #Damascus
(74, 16): "Palmyra",
(70, 12): "Bostra",
(67, 14): "Laodicea", 
(66, 13): "Sidon",
(66, 12): "Tyre",
(68, 11): "Dium", 
(64, 9): "Jerusalem",
(65, 8): "Jerusalem",
(62, 6): "Gaza",
(60, 2): "Petra",
(55, 4): "Thebes",
(55, 2): "Memphis",
(54, 1): "Ptolemais Hormos", 
(55, 0): "Cairus", #Cairo
(51, 4): "Alexandra",
(40, 3): "Siwa", 
(40, 8): "Cyrene",
#Pontus
(52, 26): "Nicomedia",
(48, 24): "Abydos",
(49, 22): "Pergamum",
(54, 19): "Halicarnassus", 
(52, 24): "Prusa",
(54, 23): "Pessinus",
(56, 23): "Ancyra", 
(57, 20): "Arsinoe",
(52, 21): "Smyrna",
(54, 21): "Sardis",
(59, 22): "Adana",
(60, 20): "Side",
(62, 24): "Lacus", #Check on map
(55, 30): "Sinope", 
(59, 25): "Euseheia",
(53, 29): "Heracleia",
(58, 27): "Eupatoria", 
(59, 30): "Pharnacia",
(62, 28): "Trapezus",
(65, 27): "Armavir",
(67, 27): "Kotais",
(63, 19): "Tarsa",
(68, 22): "Hieropolis",
(69, 20): "Apameia", 
(70, 25): "Atraxarta",
(75, 22): "Nisibis",
(73, 20): "Edessa", 
(69, 17): "Antioch",
(67, 17): "Seleuceia Pieria",
(72, 23): "Samosata",
(71, 19): "Nicopotis",
#Eastern Europe
(41, 33): "Aquincum", #Budapest
(44, 33): "Tylis",
(47, 32): "Debeltos",
(41, 30): "Bylazora", 
(38, 35): "Ratiaria",
(37, 39): "Vicus Venedae",
(39, 38): "Sarmisegetusa", 
(43, 37): "Campus Getae",
(47, 35): "Anchialus",
(54, 34): "Khersones",
(57, 35): "Kerkenitida",
#Salona Region
(35, 26): "Scondra",
(35, 23): "Apollinia",
(32, 27): "Salona",
(38, 24): "Antigonea", 
(30, 29): "Aquileia",
(32, 30): "Segestica",
(34, 30): "Delmatia",
}

to be your player solution makes no sense.. I see it as if the change is peace and the first team is not the human and neither is the the second.... oh... right that makes some sense :p
 
um... exception which is suprisingly overly descriptive...

Traceback (most recent call last):

File "<string>", line 1, in ?

File "Helpers", line 287, in giveGold

AttributeError: 'NoneType' object has no attribute 'getGold'
Traceback (most recent call last):

File "CvEventInterface", line 23, in onEvent

File "CvEventManager", line 187, in handleEvent

File "CvEventManager", line 857, in onChangeWar

File "CustomFeatures", line 176, in addPeaceMessage

File "Helpers", line 179, in addMessage

ArgumentError: Python argument types in
CyInterface.addMessage(CyInterface, int, bool, int, unicode, str, CvPythonExtensions.InterfaceMessageTypes, str, int, str, str, bool, bool)
did not match C++ signature:
addMessage(class CyInterface {lvalue}, int, bool, int, class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >, char const *, int, char const *, int, int, int, bool, bool)
ERR: Python function onEvent failed, module CvEventInterface

While you attempt to decipher this I am going to try my function :p I KNOW that one works just to see... Though mine will play the sound externally :p
 
Back
Top Bottom