SGOTM 11 - One Short Straw

Question on founding religions: I should know this, because klarius detailed it in one of our SGs, but... Anyone know the formula for how CIV chooses which city to put the new religion into?

If we decide to grab the river city, it would be helpful to try to found our main religion there.

EDIT: Might as well copypaste it here and avoid the misinformation I spread in the latter part of the linked post!

Silu said:
Here's the raw truth for those interested:

Broken down for convenience the value is counted for each city as

(10 + POPULATION + RAND(1,10)) / (RELIGIONS_PRESENT + 1)

and further divided by 8 for the capital. The city with the biggest value gets chosen.

Spoiler wall of C++ :
Code:
for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))

	{

		if (!bStarting || !(pLoopCity->isHolyCity()))

		{

			iValue = 10;

			iValue += pLoopCity->getPopulation();

			iValue += GC.getGameINLINE().getSorenRandNum(GC.getDefineINT("FOUND_RELIGION_CITY_RAND"), "Found Religion");



			iValue /= (pLoopCity->getReligionCount() + 1);



			if (pLoopCity->isCapital())

			{

				iValue /= 8;

			}



			iValue = std::max(1, iValue);



			if (iValue > iBestValue)

			{

				iBestValue = iValue;

				pBestCity = pLoopCity;

			}

		}

	}
 
Well!!! That was service on a silver platter! Glad I asked. :goodjob:

So that random factor is way more important than population at this point in the game. But if we missed with CoL, we would have a far better chance with Philo if we get it before religion spread. In fact, we probalby could guarantee it.
 
If we decide to grab the river city, it would be helpful to try to found our main religion there.

What are the advantages of doing so? If we settle with cow in the first ring, the city is junk long term (and short term, it's like assuming a cow tile is better than two fish or stone /copper or...), otherwise, it's junk short term... It's not like Zara has room to expand into (which could have motivated an extreme blocking strategy).

second worker: no interest because you plan on whipping the cap for settler, but is this necesary? Won't it hurt the developement past the next 20 turns?
 
What are the advantages of doing so? If we settle with cow in the first ring, the city is junk long term (and short term, it's like assuming a cow tile is better than two fish or stone /copper or...), otherwise, it's junk short term... It's not like Zara has room to expand into (which could have motivated an extreme blocking strategy).
In my dotmap linked above, I place this city at 2W of cows. I don't care about the cows, basically. We can build a farm or two if we want, but this city has two strategic purposes:

1. It's a great cottage city long-term, if we start it soon enough, it's close to our capital, and has the hills to build lib-uni for Oxford. We'll need 6 unis.
2. At 150:culture:, we should become a land target of Zara (8 adjacent land tiles) and we'll have a much better chance of his DoWing us. The more we limit Zara in terms of space and commerce, the higher his unit spending percentage (USP) will go and the greater the likelihood he'll DoW us. I would like to eliminate him from the game, but if not, at least it would be another source of great general points. We also need to think about getting a level-four unit for the Heroic Epic.

Edit: Another point. If we keep him below 4 cities, then later on we could gift him a faraway hole-in-the-wall to increase his maintenance costs and further increase his USP.

Edit2: Maybe this shouldn't even be a footnote, but I think those extra silver may play a role in this game--trade bait for two of the resources we need. We don't want Zara to control those two silver tiles.
 
1. It's a great cottage city long-term, if we start it soon enough, it's close to our capital, and has the hills to build lib-uni for Oxford. We'll need 6 unis.

Well I think GPPs will be what matter, and cottages aren't my taste anyway, must explain our point of view about this city. I think city 2 should be built to help the global empire developement, starting cottages in a non capital city seems really marginal to me. (On another hand, the capital can be a more than decent bureau cottage city imo).

2. At 150:culture:, we should become a land target of Zara (8 adjacent land tiles) and we'll have a much better chance of his DoWing us. The more we limit Zara in terms of population and commerce, the higher his unit spending percentage will go and the greater the likelihood he'll DoW us. I would like to eliminate him from the game, but if not, at least it would be another source of great general points. We also need to think about getting a level-four unit for the Heroic Epic.

We can't kill any AI (:lol: yeah size 7 is a bit too much but i had never tested it)!!! and as for vassals, I would rather take a guy who will have more than two cities (to get more votes). Unlocking HE is a very valid concern I agree :)

Barbarian Alert!!!

The barb world population has grown from 4 to 8!!!

:run:
 
:lol: I don't seem to be the only one forgetting about that then :p

I'm not sure we can gift zara any city unless we find an island very close to his land. Then we could take all his cities on our landmass and vassallize him but I wouldn't bet on that. I wouldn't mind a century-lasting war, occasionnally killing some units for XP (GGs) and/or pillaging a few cottages while keeping zara choked.
 
Thanks, Ras. I confess I had forgotten that. I don't care THAAAAT much about eliminating him.

When an AI has less than four cities (or is it three? I don't think so), I'm pretty sure they take any city you offer them. If there's some exception to this, I don't know about it. I haven't studied any code on it. Anyway, even if it has to have a resource or two, no biggie.
 
Working for my keep o/

An AI is willing to accept a gift city from a human (some more checks between AIs to prevent AI in-team infinite gift loops) if ANY of the following apply

1) They have 1% or more culture on the city tile
2) They have owned the city at some point
3) They have 3 or fewer cities

If none of those apply, AIs only accept a gift city if ALL the following applies
i) They are not in financial trouble
ii) They have a city within a plot distance 9 (a diagonal step is 1.5)

Spoiler :
Code:
DenialTypes CvPlayerAI::AI_cityTrade(CvCity* pCity, PlayerTypes ePlayer) const
{
	CvCity* pNearestCity;

	FAssert(pCity->getOwnerINLINE() == getID());

	if (pCity->getLiberationPlayer(false) == ePlayer)
	{
		return NO_DENIAL;
	}

	if (!(GET_PLAYER(ePlayer).isHuman()))
	{
		if (GET_PLAYER(ePlayer).getTeam() != getTeam())
		{
			if ((pCity->plot()->calculateCulturePercent(ePlayer) == 0) && !(pCity->isEverOwned(ePlayer)) && (GET_PLAYER(ePlayer).getNumCities() > 3))
			{
				if (GET_PLAYER(ePlayer).AI_isFinancialTrouble())
				{
					return DENIAL_UNKNOWN;
				}

				pNearestCity = GC.getMapINLINE().findCity(pCity->getX_INLINE(), pCity->getY_INLINE(), ePlayer, NO_TEAM, true, false, NO_TEAM, NO_DIRECTION, pCity);

				if ((pNearestCity == NULL) || (plotDistance(pCity->getX_INLINE(), pCity->getY_INLINE(), pNearestCity->getX_INLINE(), pNearestCity->getY_INLINE()) > 9))
				{
					return DENIAL_UNKNOWN;
				}
			}
		}
	}

	if (isHuman())
	{
		return NO_DENIAL;
	}

	if (atWar(getTeam(), GET_PLAYER(ePlayer).getTeam()))
	{
		return NO_DENIAL;
	}

	if (GET_PLAYER(ePlayer).getTeam() != getTeam())
	{
		return DENIAL_NEVER;
	}

	if (pCity->calculateCulturePercent(getID()) > 50)
	{
		return DENIAL_TOO_MUCH;
	}

	return NO_DENIAL;
}

EDIT: And of course they always accept 'Liberated' cities even if they don't meet the criteria otherwise.
 
OK, My next experiment, philosofy from Oracle, GS used for academy.

Difference from previous, after writing-massonry-meditation Priesthood-Col.

Oracle chopped in second city to remove gp polution.

1575BC finish date.
 

Attachments

Can't open the save yet, where are the mids in this one Mut?
 
I don't think we need to worry about Zara getting the silver tiles as our capitals culture will block him very soon. This city can be delayed for a while.

I think we should try to make friends with Zara instead of trying to get him to DOW us. If we go for an early COL our state religion should spread to him so this should not be too difficult unless we try to confine him to a very small area. As the land around him (including the river city) is fairly poor this should not cost us much. This would allow us to focus on Rex/tech instead of getting bogged down in a costly war which won't gain us much.. Additionally we won't be able to vassalise him for a while and leaving a 1 city civ around would be a big risk as we need to keep them all alive. There is also a risk he would not DOW us if we went down this path in which case we would have invested significant resources building an army we would not use.

A 1525B.C CS slingshot could be done like this:

Warriors: 1 fog bust second city site, 1 explores to North, 1 Garrisons the capital, and scouts to S when this can be done without costing us happiness in the capital.

T37: move worker 1S and chop for 1 turn.

T38: move worker to silver and start building mine next turn. Grow size 4, start working silver, start settler.

T43: whip settler for 2 pop, work both corns.

T44: start barracks in capital.

T46: Found Bombay 1N of copper. Work the copper. Start Barracks there. Ensure capital still working both corn. Science at 80%

T47: Finish The Wheel. Start Pottery. Worker starts roading corn. The worker will get there 1T to early if we move it there straight after finishing the mine, so spend T46 prechooping the forest 1NW of Delhi for 1T.

T48: Capital gros to size 3, start working silver.

T50: Worker starts mining copper.

T53: Delhi grows size 4, start working forest hill.

T56: Start roading copper.

T57: Discover pottery, start Writing. Finish Barracks in capital, start building granaries in both cities.

T58: Delhi grows to size 5, whip granary for 2 pop, work 2 corns and silver.

T59: Build granary in capital, start axe. Worker starts chopping forest 2S of Bombay (ensure it is in Bombays ring).

T63: Bombay gows size 2, work forest 1SW. Delhi grows to size 4, works river grass. Worker moves to plains forest E of Bombay.

T64: Start prechopping forest.

T66: Delhi grows size 5, works grass forest.

T67: Build axe in Delhi. Start axe. Bombay now works copper and corn, capital switches from working northern corn to the grass forest to the south.

T69: Worker moves 1SE without chopping original tile, start chopping. Granary finished in Bombay, continues barracks.

T71: Discover writing, start libraries in both cities. worker moves back to plains forest and completes chop for Bombay.

T72: Delhi has grown to size 6, whip library for 3 pop. Work silver, corn, grass forest. Bombay grows size 3, works grass forest. Worker prechops forest 2N of Delhi.

T73: Library built in Delhi, continue axe.

T74: Finish axe in Delhi. Start axe. Worker moves to the forest 1N of Delhi and prechops.

T75: Bombay grows to size 4, whip library for 2 pop and work corn/copper.

T76: Library built in Bombay, continue barracks.

T77: Delhi grows to size 4, hire 2 scientists and work silver/corn. Worker moves to hill 1 NE of capital.

T78: Bombay grows to size 3, hire 2 scientists and work corn. Worker starts premining.

T79: Finish meditation, start priesthood.

T82: Finish priesthood, start COL.

T83: Finish axe in capital, start Oracle. Science goes to 100%.

T88: Bombay now at size 4, works copper. Finish barracks. Starts worker/settler, whichever we want next. Worker pauses it's premining (NOTE if we prechopped the plains forest 1S of this hill for 2T before moving to the hill we should gain 2 worker turns)

T90: GS born in Delhi. Bulb Maths, worker finishes mine.

T91: Fire 1 scientist to work the mine. Chop forest 1N of capital.

T92: Chop forest 2 N of capital.

T99, 1525B.C.: Finish COL, Build Oracle get CS.

Note:We would either need to spend 1T building something else, or to continue running the second scientist for a few turns in order for COL and the Oracle build times to coincide.

We will need copper hooked up and at least a couple of axes by T90 (unless we have really good fogbusting) as the barbs start crossing our borders at around this time in my tests.

As we are spiritual I think we should only stay in slavery when we need to whip something, and then to switch out to avoid the risk of slave revolts. (Unless we needed to whip something else before we could switch back of course.)

edit: I can confirm Mutineer's date of 1575 B.C. for philosophy vis Oracle via this method if the first GS is used for and academy. If we use our second GS for the academy we get it on T103
 
Mutineer, mdy has an interesting variation, settling next to the copper (N or NW). Since you don't research masonry for a while anyway, maybe this is much better, if you build a quick monument? Then Stone City (at copper N) could eventually work a cottage or two for Delhi, pre-Oxford.
 
Mutineer, mdy has an interesting variation, settling next to the copper (N or NW). Since you don't research masonry for a while anyway, maybe this is much better, if you build a quick monument?

I thought the only point to build next to the copper was to avoid building a monument right away? Well, it depends what wonder u start first anyway: Oracle in second city doesn't need monument (and mdy's variant is appealing), anything else would mean SE of stone and monument
 
his variation mostly come not from second city position, but from source of research. In my case cottages, in his second library.

Ok I did math experiment.

Reseach- well -pottery-writing-masonry-meditation-prieshood -col
Use GS for LB Mathematics.

Oracle in second city build for SC 1500BC
Mids build in capital 1350 BC

Cooper connected early enough and there always option of emergency whip, so I do not think it should be a factor.

Our capital border expand early enough.
 

Attachments

^^Seeing Mut's save, it doesn't sound as bad, both cities can go on with a settler each prolly. I had forgotten that COL removes the need for monument. With a two city variant, it means border pop in 3 turns, nice! Have u an idea about how many turns (if any) working copper are lost this way (compared to the situatino were u pop borders with a monument)?

edit: oh maybe it's capital's border pop which comes first ...
 
But do we want to sacrifice our REX with this 2-city variant?

This variant would delay our rex by about 7 turns. Whichever variant we used we would probably want to concentrate on expansion once we had finished, which would mean running few if any specialists, and our cities would not grow enough for the extra happiness to be needed. This early the chances of losing the Pyramids to the AI are also almost non existent, so on balance I think it would be better to expand quicker at the expense of delaying the Pyramids.

At a rough estimate we could have 6 cities/settlers, 4 workers and an extra axe and the Pyramids ready by around T130-135 if we focused on Rex after T100. (Production from cities 3-6 neglected)
 
Back
Top Bottom