Celtic Mod v1.0 Release

-It is unknown at this time whether the Celts will respawn after nationalism in Ireland (defined as its "normal" area) should they be defeated earlier. If anyone can confirm or deny this I would also be very appreciative.
I should probably have tested this already so I did a dirty little test by giving a Civ Nationalism with the World Builder and enabling respawns on every turn (in RiseAndFAll.py) as I ran autoplay. Sure enough, after a couple of turns the Green Island became... green! :king:

Sure, this still needs to be verified in actual play. But the Normal Area (the respawn zone if you like) does indeed work as intended. :goodjob:
 

Attachments

  • Civ4ScreenShot0054.JPG
    Civ4ScreenShot0054.JPG
    266.5 KB · Views: 99
no, it only counts as a failure if you lose any city to either Romans or English.
As I'm interpreting the actual Python it seems that the UHV requirement is only failed if the Celtic player loses a city to Rome or England in war (as in "conquest"). Could someone verify that trading cities or losing them in spawns (or by cultural pressure) doesn't count as a failure?

Do you have a preference for how this should work?
 
I once tested founding and/or taking rome, and then relinquishing it to the romans when they popped up and indeed they lost the UHV. (I know I tested this by founding it myself and letting it flip, I don't quite remember if I tested it by taking rome and then assenting to the flip on respawn.

Also, I couldn't figure out how to code for taking a specific city that wouldn't exist by the time they started. In reality, they can't get there in time to found the city before the Romans pop up (they are one or two turns too late). I believe that any city the Romans found in that region would be named "Rome," same goes for the Greeks and the Celts themselves ("An Róimh"), so regardless of how they get their hands on it, it will be "Rome."
 
I once tested founding and/or taking rome, and then relinquishing it to the romans when they popped up and indeed they lost the UHV. (I know I tested this by founding it myself and letting it flip, I don't quite remember if I tested it by taking rome and then assenting to the flip on respawn.
I'm not sure what you mean, but your post did however make me realize something: There's actually no code for failing the first Celtic UHV! :eek:

This is what the code should look like (changed lines in red):
Code:
                elif (iPlayer == iCeltia):
                        if (pCeltia.isAlive()):


                                if (iGameTurn <= i450AD):                                              
                                        if (self.checkOwnedArea(iCeltia, tRoimhTL, tRoimhBR, 1)):
                                                self.setGoal(iCeltia, 0, 1)
[COLOR="Red"]                                elif (iGameTurn == i450AD and self.getGoal(iCeltia, 0) == -1):
                                        self.setGoal(iCeltia, 0, 0)[/COLOR]
                                        
                                              
                                if (iGameTurn <= i200AD):                                              
                                        if (self.checkOwnedArea(iCeltia, tBritishIslesTL, tBritishIslesBR, 3)):
                                                self.setGoal(iCeltia, 1, 1)
                                elif (iGameTurn == i200AD and self.getGoal(iCeltia, 1) == -1):
                                        self.setGoal(iCeltia, 1, 0)

                                #if (self.getGoal(iCeltia, 1) == -1):
                                #        if (iGameTurn == i350AD+1):
                                #                self.setGoal(iCeltia, 1, 0)

                                if (iGameTurn == i1700AD):      
                                        if (self.getGoal(iCeltia, 2) == -1): #see onCityAcquired()
                                                self.setGoal(iCeltia, 2, 1)
I've attached a updated Victory.py - someone should really test all these UHVs properly and also try to achieve a Historical Victory. Just so what we know its possible with the code we have.
 

Attachments

  • Victory.zip
    12.5 KB · Views: 72
I once tested founding and/or taking rome, and then relinquishing it to the romans when they popped up and indeed they lost the UHV. (I know I tested this by founding it myself and letting it flip, I don't quite remember if I tested it by taking rome and then assenting to the flip on respawn.
Ok, so I read your post one more time and now I actually get what you were referring to...

This would mean that losing a city in a spawn equates to it being conquered. I think I'll delve into the code to see why this is...

Which way would you prefer it, by the way?

Personally I think it could be cool to have a multi regional UHV for the Celts, requiring them to control all of Britain. (One city on Ireland, one in Whales, one in England and maybe one in Scotland.) This way London (or its predecessor) would likely already be founded once the English spawn. If the Celtic capitol has moved onto the Isles that city won't flip, but London would and also other cities within the English spawn area.

The rest of the UHVs could be worked around this scenario also. Just another idea... Because you wanted the focus of your mod to be the conflict between the Celts and the English (Saxons?). The Picts would then be the Barbarians in Scotland?
 
As far as I can follow the code (it got me though 4-5 different .py files) a spawn flip is not regarded as a city conquest as far as the game is concerned. So a Celtic city flipping to the British or the Romans shouldn't fail the third UHV.

A simple practical test confirmed this. Although there are exceptions in the code for capitols, cities on the tiles of capitols, and capitols of the human player (to avoid exploits).

It would thus also be possible to have a Celtic UHV concerning the British Isles be about keeping any number or configuration of cities on the isles all through the English spawn and beyond, until some specified turn. The Celtic player might lose a city or two to the spawning English, but those loses wouldn't count towards failing the UHV about not losing any cities.

The same could be achieved with a Celtic Civ spanning from the Atlantic to the Black Sea. Sure, the Romans would take a city when they spawn, but that wouldn't equate to losing the third UHV.

I'm just saying what could be done. If you see possibilities with something you like and come up with a specific request I'd try to code that for you.
 
added, thanks.

As for the settlement issue, here's what I've come up with:

The Celts were a bunch of disunited tribes, which is why they were easy pickins for the Romans and the English. One group of tribes really managed to "pull it together," albeit too late - the Gaels (Irish and Scots). If the Gaels had been able to consolidate power sooner, they might have resisted the English more successfully.

So here's my thought: forget about trying to make the AI or the human player move their capital (a permanent stability hit) and instead have them spawn, not as a Gaulish tribe but a Gaelic one. If I move the spawn point to Ireland, they settle there, and tend to sail their second settler to northwestern France (Brittany), which is fine, and somewhat historically accurate as the Celts, after having started in Europe and colonizing Britain, had tribes come from Britain and re-settle northwest Gaul (hence the name, "Brittany").

I've changed the Barbarian city spawns to Independents, which eventually do flip to the Celts just like Mediolanum, Ludgunum and Burdigala were intended to for the Romans.

The only problem with this, is that it gives away a free UHV. So I'm thinking that perhaps the UHV could be something like this: "Control six cities on the British Isles, two in western France and one in Spain before 800 AD." Better yet, it could simply be "control ten cities before 1000AD"...given the AI maps, if they settle anywhere, it will be within those areas. If they settle outside those areas, well, there are few places in Europe where a Celtic settlement of *some* age would be that out of place (they even settled central Turkey in 280 BC, so....). I'm actually leaning toward the 10 city UHV as it will not only be easier to code, but also easier for a human to interpret.

Thoughts?
 
You have some interesting ideas here...

I read on Wikipedia about Celtic influences in Britain in 600BC or something, so that could be a starting date for the Gaelic Celtic Civ then. The rest of the Celtic tribes would be independents spread over continental Europe. Those will be picked off not only by the Celtic player but also by Rome and Greece, and later on France and other Medieval Civs.

To control a set number of cities at some defined date could become a game of conquest rather than colonization, and that condition would also make the "not lose any cities" one superfluous, as the game isn't defensive and about colonization anymore, but rather about expansion in general. The goal would be to create a united Celtic Empire that never was, that would take the role of the Roman Empire in actual history.

And if the Celtic AI doesn't even leave Britain the independent Celts would still be there, representing all those tribes that eventually got absorbed into the various empires that historically formed on the continent.

Just to remind you that you don't need to feel at all restricted by the current set of UHVs. For the next release we could make any you like! :king:

What about the players out there? What do they want the Celtic Civ and the Celtic game to be about? What would be most fun to play?
 
I'm watching the third autoplay with the changes and I'm very happy. In one, the Celts failed and collapsed Before the French popped up, in the next, they've managed to hold on through the other eurospawns althoughthey seem to be on the brink of collapse now at turn 235. Good, varied performance there.

I'm trying to code this myself right now: Control four cities on the British Isles, two cities in France and one city in Spain before 500 AD

If they're smart in capital settlement, they'll get the four british cities free (like the romans get most of France), but they do have a short timeline for the rest of the expansion without overstretching themselves and forcing collapse. Even more tricky if they're going to try to raise a continental army to sack Rome, which falls before the same deadline...
 
Also, I believe that the Iceni tribe was both prominent and located in the English spawn area. Nor the human player or the Celtic AI should shun the English areas as those are actually as much Celtic areas than they are "English" (whatever that name even means). I don't know how the stability maps and the such are configured, so I don't know if two Civs can even share a Core Area (in the stability sense).

If the modmod is to be enjoyable for the Roman player also, maybe the Celtic AI should get some sort of spawn in France and Northern Italy, after all. Because, a Celtic AI will only amount to a bunch of disunited tribes anyway...

It could be done so that the city spawns are conditional; If the Celtic player is human, then the continental cities spawn as Independents (for conquest). And if the AI is the Celts, the cities spawn as Celts (but don't really add up to the UHV requirement). It doens't have to be more complicated than that.
 
The former Celtic spawns on the continent are now Independent and represent independent celtic tribes. I'm cool with that. The Celts start with two settlers (but i may up it to three, in line with some other civs). The AI likes to take that one directly to france, and so it amounts to a second spawn point in europe. The human player can do whatever he/she wants.
 
I'm watching the third autoplay with the changes and I'm very happy. In one, the Celts failed and collapsed Before the French popped up, in the next, they've managed to hold on through the other eurospawns althoughthey seem to be on the brink of collapse now at turn 235. Good, varied performance there.
I can recommend that you look at the PythonDbg.log also. A lot of valuable information is posted there during play/autoplay. Like why collapses occur - there are in fact several types. Why cities change owners, or what the stability of Civs actually are (in numbers).

I'm trying to code this myself right now: Control four cities on the British Isles, two cities in France and one city in Spain before 500 AD
Ok, good luck! :goodjob: I can see you're actually learning this stuff now. :king:

Don't be in any haste to post a second release now that the first one is online and working as it should (?). If you rework everything you'd better be sure its tested enough before you release it. I can take a look at your code once you feel you're done, just so you haven't missed anything obvious. And give me a holler if you need any assistance, like with debugging or interpreting errors.
 
once I define tGaul and tIberia does it look like this will work?


Control four cities on the British Isles, two cities in France and one city in Spain before 500 AD



if (iGameTurn == i500AD):
if (self.getGoal(iCeltia, 1) == -1):
self.setGoal(iCeltia, 1, 0)






elif (iPlayer == iCeltia):
if (iGameTurn <= i500AD):
if (self.getGoal(iCeltia, 1) == -1):
bIsles = self.checkOwnedArea(iCeltia, tBritishIslesTL, tBritishIslesBR, 4)
bGaul = self.checkOwnedArea(iCeltia, tGaulTL, tGaulBR, 2)
bIberia = self.checkOwnedArea(iCeltia, tIberiaTL, tIberiaBR, 1)
if (bIsles and bGaul and bIberia):
self.setGoal(iCeltia, 1, 0)
 
You know what, I'm going to go for a domination with the Celts and bypass the UHV, since you seem not to have made up your mind about the Celts' exact domain yet. At least it'll be a good challenge. :lol:
It would help if you can point to where the Celtic stability map is.
 
Useful tip #1: Use the {code} tags when you post Python, since the indentation gets lost in the translation to HTML (or whatever) otherwise. And indentation is about everything with Python.

Useful tip #2: This bit of code actually makes the UHV fail:
Code:
                                                self.setGoal(iCeltia, 1, 0)
The first value after iCeltia is the UHV id (goes from 0 to 2). This would be the second UHV then. The second value is what you wanna set the UHV (or "goal") to: -1 is default/undecided, 1 is completed and 0 is failed.

You use the setGoal() function to set the UHV values and you use the getGoal() function to read them (as they are stored values in the game). In the latter case the numerical value is the UHV number and the function returns the current goal value (default, completed, failed).

So, your code should look something like this:
Code:
                        if (iGameTurn <= i500AD):
                                bIsles = self.checkOwnedArea(iCeltia, tBritishIslesTL, tBritishIslesBR, 4)
                                bGaul = self.checkOwnedArea(iCeltia, tGaulTL, tGaulBR, 2)
                                bIberia = self.checkOwnedArea(iCeltia, tIberiaTL, tIberiaBR, 1)
                                if (bIsles and bGaul and bIberia):
                                        self.setGoal(iCeltia, 1, 1)

                        elif (iGameTurn == i500AD):
                                if (self.getGoal(iCeltia, 1) == -1):
                                        self.setGoal(iCeltia, 1, 0)
You should be able to read the logic in this code, or so I think. What part or what change would make no sense to you? Because I'll try and explain. :p
 
You know what, I'm going to go for a domination with the Celts and bypass the UHV, since you seem not to have made up your mind about the Celts' exact domain yet. At least it'll be a good challenge. :lol:
It would help if you can point to where the Celtic stability map is.
I wouldn't know where the settler maps are either, but with the first release I'm betting on France and Britain being inside the Core Area, at least.
 
The core area is Ireland (all), Scotland (everything north of the "neck" of britain), and the Cornish peninsula in SW Britain, Brittany and the one strip of tiles that run all the way down France's west coast, and the northernmost strip of Spain. The Normal areas also include England as far east as Scotland's easternmost point (a couple columns of tiles) and the Broader area includes all of that as far east as the coast of Norway.

As a note, England's core area was amended so that it is all of Britain east of Wales and south of Scotland (this prevents Scotland and Wales from automatically flipping), but the rest of their coordinates remain unchanged, so they should want to conquer the Celts. The Spanish and the French remain unchanged, so Celtic cities *will* be in their flip zones.
 
The core area is Ireland (all), Scotland (everything north of the "neck" of britain), and the Cornish peninsula in SW Britain, Brittany and the one strip of tiles that run all the way down France's west coast, and the northernmost strip of Spain. The Normal areas also include England as far east as Scotland's easternmost point (a couple columns of tiles) and the Broader area includes all of that as far east as the coast of Norway.

As a note, England's core area was amended so that it is all of Britain east of Wales and south of Scotland (this prevents Scotland and Wales from automatically flipping), but the rest of their coordinates remain unchanged, so they should want to conquer the Celts. The Spanish and the French remain unchanged, so Celtic cities *will* be in their flip zones.
Are you referring to the first release that is publicly available or what you're working on right now? And there is a difference between the stability maps and the areas that are defined in the Python (in Consts.py)?
 
I'm referring to the one that's available for download now (although this will not change in the new release, I just need to define new areas in victory.py so that the game has a name for them when trying to determine UHV city settlement). The map in C++ is for tile settlement desirability for the AI, not stability. Adherence to and incursion into the core/normal/broader causes stability hits and collapses.

a
 
Before I play further, I must protest the large barb cities in Ireland and Scotland. The largest city in those days should be no more than size 2 (my capital in Spain was only size 6 with 2 fish, 1 cow and 1 sheep) and Rome was a measly size 4 (due to wars with me and Greece). I conquered Greece thinking that I was just going to send settlers over to Ireland from Paris but wasn't expecting a fully fledged society there!

Also, Rome is not sending out any Praetorians to conquer Greece--just sitting in their capital with settlers.
 
Top Bottom