@England
Not sure why you have to define new args
Isn't it enough to just use "iPreviousOwner,iNewOwner,pCity,bConquest,bTrade = argsList" provided?
Also, I won't bother to check if city has the religion or not, I will just cut some if statements and add the religion to the city without checking if the city has it or not.
If the city has the religion, then nothing is going to change when you try to add the religion to it anyway, why bother to check.
Spiritual Trait
@France
I assume iFrenchRelation is 1?
It is hard to judge whether the codes are correct or not because, it depends what you want.
If France has no religion, and England has no religion, do they have +1 relation?
Also, is it supposed to be one-sided boost or 2 ways?
Means if France has Hindu, and England has hindu.
England definitely has +1 towards France, but does France have +1 towards England?
Something similar may be
Lotus Temple, although that one uses Happiness
@Spain
As I mentioned before, Traits should not use "Team" because they will go haywire if you have games where there are > 1 member in the same team.
For example, if I start a game where Spain, England and France are in the same team, not only will Spain get the movement bonus, England and France will get it as well.
Edits:
Also, codes are in on GameStart only.
This means that if Spain does not exist initially, but is later liberated as a new colony, Spain gets nothing
Of course, if your mod is only playable as a scenario where neither of these will happen, then that's fine.
@HRE
onCityBuildingBuilding will trigger every time you choose to build the particular building.
In this case, you are adding production to the city every time the city chooses to build XXX.
So if I choose to build XXX, Y hammers are added.
Then I just switch to build YYY, cancel the XXX, hammers are still kept. Exploit number 1.
Then I switch back to XXX, hammers are added again. Exploit number 2...
You might as well use getBuildingCost and reduce it.
changeDistanceMaintenanceModifier and changeNumCitiesMaintenanceModifier, are there such functions? I assume these are new ones you defined, so how I know if they work lol
@Byzantine
Since I dunno what is iByzantineCulture, no idea
Creative Trait
@Egypt
Same, no idea what setReligiousModifier is supposed to do, so can't tell.
Edit:
Although I not sure what setReligiousModifier does, an obvious error is that this is defined in on Unit Built.
There are cases where you get Units without Building. Drafting is one example.
Use on Unit Created, although that requires callback.
But for the GameStart part, it is always better to use the while loop method rather than for loop.
Sometimes for loop point to units which are None, reason I don't know
@Turkey
Never use countTotalCultureTimes100 before, so not sure of the outcome.
But looking at the max comparison, there is definitely a logic error.
If pCity.getCultureTimes100(eTurkey) is the bigger number, like Turkey owns 90% of the culture, then max will choose this number.
Then pCity.setCultureTimes100 is going to set it to the same culture that Turkey has already owned.
In other words, none of the 10% of foreign culture is going to be converted.
Helsinki Cathedral
@Italy
You know... there is this changeCoastalTradeRoutes function, which adds the coastal trade route to ALL Coastal cities of the player itself.
Just do it once on Game Start, and on First Contact for newly liberated ones, and you are done.
Organized Trait
@Viking
def doPillageGold and def doCityCaptureGold
You may want to use these in CvGameUtils instead.
Then you can adjust the captured/pillage gold by a % easier
Himiji Castle
@Mongol
I don't really get this part.
You are defining it on City Acquire
if iNewOwner == eMongols and pCity.isCapital():
Then when will this be true?
I don't think on CA codes are activated when you build a city.
Thus, when will you ever capture a city and that city is actually a capital?
It will not be YOUR capital because you obviously have one.
It will not be THEIR capital because it is shifted before on CA codes are activated.
Anyway, this "Horse always present at capital" is hard to code.
Because when I build my first city, it is my capital, so lets say a horse is now planted in one of the plots there, yeah happy.
Now I build a palace in my second city, the capital is now shifted.
So what now, do I lose my horse in the first city, and do I get a new source of horse in the second city?
Anyway, there are only codes in on CA, no codes elsewhere.
So, shifting of capital is not going to trigger any of the codes