Celtic Mod v2.0 Release

how is it determined when leaders are replaced with later leaders?
I took a closer look at the code (found in RiseAndFall.py) and the leader switch seems to be triggered by Anarchy, mostly. The settings for leaders are found in Consts.py and there are three sets of these. The code differentiates between "early" and "late" leaders, and there are actually dates associated for each "late" leader:
Code:
tLateLeaders = ( #all up to 300 turns earlier because the switch is triggered after a few years
(iRamesses,), 
(iGandhi, i1700AD, 5, 4),
(iMing_Tai_Zu, i1400AD, 10, 3, iMao, i1800AD, 10, 5),
(iHammurabi, i1600BC, 10, 1),
(iAlexander, i10BC, 5, 2),
(iDarius, i10BC, 5, 2),
(iBrennus,),
tRomanLateLeaders,
(iTokugawa,),
(iZara_Yaqob,),
(iPacal,),
(iRagnar,),
(iSaladin,),
(iSuryavarman,),
(iIsabella,),
(iNapoleon, i1700AD, 10, 4, iDe_Gaulle, i1940AD, 10, 5),
(iVictoria, i1600AD, 15, 3, iChurchill, i1930AD, 10, 5),
(iFrederick, i1500AD, 10, 3, iBismarck, i1760AD, 10, 4),
(iCatherine, i1600AD, 15, 4, iStalin, i1800AD, 15, 5),
(iWillem_Van_Oranje,),
(iMansa_Musa,),
(iJoao,),
(iHuayna_Capac,),
(iKublai_Khan, i1500AD, 10, 3),
(iMontezuma,),
(iSuleiman, i1500AD, 10, 3),
(iLincoln, i1800AD, 15, 5, iFranklin_Roosevelt, i1900AD, 15, 5))
Just like the commenting says on the first line, the dates are actually not historical but rather based upon the randomness of the game mechanics involved (Anarchy, depression, instability and plague). You could use the dates above as a guideline, as they give you the earlies possible switch for each leader.

The current code only allows for two "late" leaders per Civ (for a total of 3 per Civ), but the code itself could always be expanded to make room for more. :D It should be a piece of cake, actually.

What the numerical values do is a bit sketchy for the moment, but as far as I can tell - without analyzing the code in great detail - these seem to be the percentile probability for the leader to actually switch, and the era at which that leader would be twice as probable to show up, respectively.

So start the groundwork on this and well make it happen, eventually. :king:
 
The leader switch happens during anarchy, switching to a random early leader early in the game and a random late leader late in the game. This is controlled by game turn, not era.
I checked and there was actually more to it than I would have thought. So, based on mere observation of the gameplay I would have thought your answer was fairly accurate, but it turns out there is far less randomness to it and that the eras actually do matter.

Heck, I might just make that Brennus guy appear as the default (early) Russian leader, after all. Since I've already figured most of this stuff out its no longer a pipe dream. :king:

I'm learning tons of stuff just trying to answer antaines questions the best I can! :goodjob:
 
Ah- I wasn't reading the whole thing. The distinction between early and late is by game turn only, but which late leader is picked is affected by era.
Incidentally, initial anarchy (in the first 3 turns) is exempted from any leader change.
 
Incidentally, initial anarchy (in the first 3 turns) is exempted from any leader change.
Yeah? This actually has some implications for my own modding... (As there is much, much more Anarchy in my game.) Thanks for pointing this out, as I would have surely missed it otherwise. Its not like I would notice leader switching in autoplay anyway...
 
The current code only allows for two "late" leaders per Civ (for a total of 3 per Civ), but the code itself could always be expanded to make room for more. :D It should be a piece of cake, actually.

I have done the relevant code in an earlier leaderhead discussion.

Spoiler :
Code:
                if (len(tLeaders[iPlayer]) > 1):
                        if (len(tLateLeaders[iPlayer]) > 9):
                                if (iGameTurn >= tLateLeaders[iPlayer][9]):
                                        self.switchLateLeaders(iPlayer, 8)
                                elif (iGameTurn >= tLateLeaders[iPlayer][5]):
                                        self.switchLateLeaders(iPlayer, 4)
                                elif (iGameTurn >= tLateLeaders[iPlayer][1]):
                                        self.switchLateLeaders(iPlayer, 0)
                        elif (len(tLateLeaders[iPlayer]) > 5):
                                if (iGameTurn >= tLateLeaders[iPlayer][5]):
                                        self.switchLateLeaders(iPlayer, 4)
                                elif (iGameTurn >= tLateLeaders[iPlayer][1]):
                                        self.switchLateLeaders(iPlayer, 0)
                        else:
                                if (iGameTurn >= tLateLeaders[iPlayer][1]):
                                        self.switchLateLeaders(iPlayer, 0)

This can be iterated for multiple leader switches.
 
I'm yet to actually test your modmod :rolleyes: but I ran some autoplay on this latest version I really liked what i saw. :goodjob: (The Celts actually founded a city in Bretagne, and flipped Whales. Very nice!)

My only real issue is with this feature:

A barbarian Londinium (London) representing the Roman settlement (the Roman AI never makes the attempt to settle there) will also pop up.
It doesn't make any kind of sense to me. I'm all for not having a unpopulated England before the English, but shouldn't there be Celtic tribes (independents) in that area?

Sure, I wouldn't argue with giving the Roman Civ a free city in England if they actually controlled an Atlantic port (and this could be coded). That would make sense.

Also, I guess you've noticed how the Celtic Civ always collapses into different Independents, and not just one variety? This is how I believe Rhye has intended tribal societies to be represented. Thus your city spawns should also be of the two independent variants. It makes a lot of sense and is in line with the rest of the design. (Could someone agree with me on this point?)

I'm not gonna look at your Python this time around, unless you have some issues you actually need help with... :p
 
I am playing your mod right now and am unable to achieve the 2nd UHV. Even went into world builder, moving cities around, and was unable to get it. I would assume that cities in France and Spain's spawns would count, but didn't work for me. Do you have a map or a clear description of the uhv areas?
 
I am playing your mod right now and am unable to achieve the 2nd UHV. Even went into world builder, moving cities around, and was unable to get it. I would assume that cities in France and Spain's spawns would count, but didn't work for me. Do you have a map or a clear description of the uhv areas?
It would be helpful if you attached a save file from the game.

Otherwise you could describe the circumstances in some detail.

antaine: You can tell me when I need to check your actual code. ;)
 
I am on my laptop right now, so I don't have the savegame, but I had the capital built on spot, bordeaux, a coastal city in northern France(near Calais), and a city on the horse next to madrid, the two cities that flip from capital, and the city in scotland (inverness?)...should've triggered, right?
 
It sounds like your Spanish city is one or two tiles too far south. This is how I've got it set up (to the best of my recollection, see attached picture).

I used Londinium for two reasons, first, there's no Celtic settlement of note in the area. Yes, they provided the population, but I don't have anything else city-wise to put on that spot and name. The other reason is that left to its own devices, the Celtic AI makes no effort to spawn a settler and put it anywhere on either island.

I did have Londinium spawn with Gallic Warriors to represent the Celtic tribes in the area, but I would be amenable to providing barbarian Roman units or simply giving the Romans a free city, but I tried to shy away from simply handing a city over even to the AI. As it is I only begrudgingly gave sure-to-flip cities to the Celts, but felt a little more comfortable as Rhye gave the Romans two or three of them himself.

So, I'm open to suggestions...how would you, as players, like to see me handle the great open space in southeast Britain? I suppose I could always leave that blank and allow Cornwal, Wales, York and Scotland be it for the auto spawns.

As for the independent/independent2/barb spawns, you are right, they should be different; I'll go in and mix them up now.
 
I'm browsing through a book on prehistoric London and in the timeline there are four "Middle Iron Age" (600-400 BC) settlements noted: Rainham, Dawley, Bedfond and Heathrow. A caption inside the book tells me about the temple in Heathrow pictured in an illustration.

Around the year 200 BC there is a mention of the "Occupation of Uphall Camp". The settlement in question is described as a trading outpost in yet another caption adjacent to a picture of a hillfort.

I'd suggest searching the Wikipedia on these settlements to find out more. (Dates and the such.)

Another suggestion would be to call the city "Thames", or any Celtic equivalent to the river's name. According to my source, the plot has been populated since long before recorded history. Actually well before the advent of Homo Sapiens.
 
awesome. I will check into that and adjust the name accordingly. I also have to do the North American additions for everybody likely to beat the US to the continent (so that the names will be predictable for the dynamic names). I'm still going to keep the Celtic dynamic name as Londain, since that is the modern Irish name for the city and it should be renamed that if captured from the English, who would have named it London, but I'll come up with something suitable as a spawn name and tell the English to rename whatever makes the final cut London. That way, if the Celts take it from the Barbs, they'll keep the spawn name, but if they capture it from the english they'll change it from London to Londain.
 
Also, is there a way to disable the "don't spawn if a unit is in an adjacent square" thing? Or is there a truly compelling reason that should be left in?
 
I took another look at the leader switch code- it's quite squirrely. Since it's a digression, I'll hide it in a spoiler.

Spoiler :
There are up to four leaders for each civ: an initial leader (in WB save, first in leaders list), an early leader, and up to two late leaders. In practice, the initial leader is always either the early leader or one of the late leaders - but there's nothing in the code forcing this.
In the WB save, everyone is the initial leader.
When the game starts, for everyone that's not human, switch to the early leader.
At the beginning of the turn, if it's more than 3 and less than 50 turns after spawning and the civ is in anarchy, switch to the initial leader.
In any other anarchy, if it's after the first late leader's date, switch to that late leader. (This block is entirely redundant, as the next switch condition always triggers)
At the beginning of the turn, if it's after one of the late leader's dates and the civ is in anarchy/plague/depression or just randomly (chance dependent on leader and era), switch to that late leader. This late switch can also trigger the Soviet city names.

Example: Russia's initial leader is Stalin, their early leader is Peter, and their late leaders are Catherine (1600) and Stalin (1800).
A hypothetical path: The AI Russians spawn in 860 AD led by Peter (their early leader). They immediately switch civics, triggering no leader change. That egotist founds his city Sankt-Petersburg. Twenty turns later, a religion spreads to one of their cities. They convert, and become Stalin. In 1620 AD, they go into anarchy and become Catherine. In 1814 AD, the 15% random chance hits and Stalin takes over again. Sankt-Petersburg is renamed Leningrad.

There's no randomness in the choice of leaders; the only random component is the chance to switch when nothing special is happening. It's a good enough chance (5-15%, doubled if it's that leader's era or later) that those switches should account for most late leader changes.

As for the early switches- they only ever change anything for the human if you started as another civ and took over midgame.
 
alright, I think I have looked at this thouroughly, and I don't see why the 2nd uhv hasnt triggered, I think this is a genuine problem, but I may be a little mixed up (good green around)
 

Attachments

found the problem...I hadn't saved a change I made to the definition of "Gaul." In the version you have "Gaul" only extends as far east as the Cherbourg peninsula (one tile west of Paris). La Tene is east of that. I have fixed the code and it will cover all of France in the next (which should be "final") release.

If you'd like to fix it yourself in the meantime, simply replace the coordinates in Victory.py (in Assets/Python) to read:
tGaulTL = (51, 47)
tGaulBR = (56, 52)
You should only have to change tGaulBR.

In addition, it was my mistake, but I've found that tGalicia extends one row farther south than I indicated in the drawing (one row of tiles south of the river), but stops one column west of it (at the middle, instead of the easternmost of the Pyrenees). That gives more area, but does not include the tiles right on the Mediterranean. Sorry for the mixup there, I was drawing the map from memory.
 
Also, it looks like you might have v2.0 instead of v2.1. There have been some changes to naming and city spawns. I plan to release the final version (v3.0) within the next two weeks (hopfully sooner than that). You're welcome to download 2.1 in the meantime or simply continue playing 2.0 until the final release. There shouldn't be any other changes or versions before that.
 
The following quotes come from wikipedia

"Rainham as it is known today has grown from a Roman village, which is now at the centre of the town. Until occupation by the Romans, Rainham itself had neither a name or identity."

"Referred to in the Domesday Book as “Bedefunde”, the name is thought to be derived from Anglo-Saxon Bedfunta = "Bed’s spring", or Bydenfunta = "spring provided with a drinking-vessel"."

I can't find a Celtic name connection for Dawley or Heathrow.

I'm going to follow your advice and use the name of the Thames
 
alright, so I'm done with the city name and autospawn tweaking and am not going to mess with the leaders. As far as I'm concerned, this mod is done. I'll give a preliminary release that I expect to officially become the final release in about two weeks (I want to give time for bugs and imbalances to pop up.

preliminary final release:
http://www.filefactory.com/file/b00g3dc/n/RFC_with_Celts.zip
 
Back
Top Bottom