Civ Illustrated #1 (Know Your Enemy)

Awwwwwwesome. Thank you all very much for your hard work! You should pester somebody to put an announcement on the main CivFanatics page and get a link in the War Academy. Maybe Kossin (as a CFC staff member) is the person to make the request? And at the risk of being greedy, are there plans to package all this info in a pdf file for printing? :mischief: You could easily fit two pages on one sheet, maybe even 4. We older digital non-native types prefer things on paper, you know. ;)

(And thanks again to dj anion for his guide, not least for his absolutely professional layout and graphic design. It's been my primary reference for several years.)

Glad you liked it! :D

The idea has been batted around to put it into .pdf form, but there is no real enthusiasm yet to do so. If it happens, it will be over a month from now. :sad: Too many SGOTM players and time commitments right now.

We are still hammering out analysis sections for all the leaders. So far only Sitting Bull has one. :crazyeye:
 
Great job :thumbsup:
 
Really excellent :goodjob:

If you'd like, there are a few AI for whom I can write an analysis. This or these can then be tweaked and changed by you guys, or rejected entirely. I'd be fine with analyzing:

Charlemagne
Elizabeth
Gilgamesh
Hammurabi
Isabella
Julius Caesar
Justinian
Mehmed II
Montezuma
Shaka
Tokugawa
Wang Kong
Willem

I wouldn't want to do more than two. Maybe Willem and one other?
 
Really excellent :goodjob:

If you'd like, there are a few AI for whom I can write an analysis. This or these can then be tweaked and changed by you guys, or rejected entirely. I'd be fine with analyzing:

Charlemagne
Elizabeth
Gilgamesh
Hammurabi
Isabella
Julius Caesar
Justinian
Mehmed II
Montezuma
Shaka
Tokugawa
Wang Kong
Willem

I wouldn't want to do more than two. Maybe Willem and one other?


Sure :cool:. We'd love to see forum members give us their thoughts on a particular leader. Post it in this thread when you read it over and like it.

We aren't recruiting any new members into Civ Illustrated right now because Seraiel is on hiatus, but if you write a short summary and we modify/include it into our guide then we will give you "Analysis Proofreading Contributor" in the Credits.



Right now we have analysis outlines on 12 leaders that are mostly done and are looking around the forums for other peoples' impressions to pick up some additional clues. See here, here, and here.

If anyone thinks Montezuma is the devil a crazy nutter a maniac, Catherine is a demanding passive-aggressive backstabber, or Zara expands too fast we'd love to hear your impressions on these AI. :crazyeye:
 
I've tried to see if there were a specific XML value that determines the weigh of certain units; yes there is one to my surprise. Was sad afterwards there is not a single UNITAI_SETTLE (that is settlers). That would explain Zara, Gilgamesh and most non-IMP expands so much.

There's likely no singular parameter that defines super expanders other than a combination of win parameters:

  • Land Quality: Faster opening means faster expansion.
  • Creative: AI city locations are pretty stiff and creative permits to ease settlements that leave resources outside inner culture ring. Imagine an AI doing that and avoiding Mysticism for a long time; no better to thwart itself.
  • UnitProb: Obvious parameter and most ultra ReXer have high unitprobs.
  • WonderRand: Wonderhoggers tend to cripple themselves. Big investments in the wrong time period. E.G. Ramesses.
  • Trait: IMP. Obvious is obvious.
  • Peaceweight: Mid peaceweights tend to help the AI to avoid crippling wars and to make friends on both bad faction and good one for more trade possibilities.
  • Starting techs: depending of the difficulty level, some techs are indeed not helping the AI to expand fast. A noble Izzy will beeline stupid religion and while having corns, she delays her expansion. On deity, she receives many freebee techs for a total of Fising, Wheel, Agri, Mysticism, Hunting, Archery. That helps a lot to alleviate her unbalanced script.
  • Flavors: Help the AI to focus on certain units, buildings or techs goal.

My goal was to see if there's a way to rank AI's in term of Rexing. That should help the inexperienced player if REXing hard is that important.
IMP leaders are obvious, but cases like Zara are definitely harder to understand without in-game experience.
 
Having been part of this team since the beginning and putting in lots of research and work then, I think it's amazing to finally see it go live. Kaitzilla has done an amazing job to put it all together. Without him it's highly likely this would just have fizzled out. Very impressed by your work, and you deserve quite some boon for getting this published.

When the final touches are done, especially if we get in the analysis sections, this should of course go into the War Academy (he said totally unbiased :D). It puts together a lot of research from knowledgeable people over the years, and there are many great links people can follow if they want even more in-depth information into various parts of the game, or even code.

Maybe it will turn into an easily downloadable (and printable!) PDF with time, but right now it's more important to get some feedback and hopefully finish up the analysis sections too.

Happy to see it go live :)
 
I've tried to see if there were a specific XML value that determines the weigh of certain units; yes there is one to my surprise. Was sad afterwards there is not a single UNITAI_SETTLE (that is settlers). That would explain Zara, Gilgamesh and most non-IMP expands so much.

There's likely no singular parameter that defines super expanders other than a combination of win parameters:

  • Land Quality: Faster opening means faster expansion.
  • Creative: AI city locations are pretty stiff and creative permits to ease settlements that leave resources outside inner culture ring. Imagine an AI doing that and avoiding Mysticism for a long time; no better to thwart itself.
  • UnitProb: Obvious parameter and most ultra ReXer have high unitprobs.
  • WonderRand: Wonderhoggers tend to cripple themselves. Big investments in the wrong time period. E.G. Ramesses.
  • Trait: IMP. Obvious is obvious.
  • Peaceweight: Mid peaceweights tend to help the AI to avoid crippling wars and to make friends on both bad faction and good one for more trade possibilities.
  • Starting techs: depending of the difficulty level, some techs are indeed not helping the AI to expand fast. A noble Izzy will beeline stupid religion and while having corns, she delays her expansion. On deity, she receives many freebee techs for a total of Fising, Wheel, Agri, Mysticism, Hunting, Archery. That helps a lot to alleviate her unbalanced script.
  • Flavors: Help the AI to focus on certain units, buildings or techs goal.

My goal was to see if there's a way to rank AI's in term of Rexing. That should help the inexperienced player if REXing hard is that important.
IMP leaders are obvious, but cases like Zara are definitely harder to understand without in-game experience.

A rank of AI's speed of rapidly expanding would be amazing! Then people could know who the worst offenders for grabbing all the good land spots are. I've always considered Zara Yaqob a very fast expander, but now that I look I see he doesn't get cheap Imperialistic Settlers. :hmm:

Maybe it is because he gets the 3 out of the 4 most important buildings (Granary, Lighthouse, Courthouse, Library) for half price and is free to build more units like settlers and workers than other AI. Half price civics also helps to keep the economy from crashing due to overexpanding.
 
A simple summary about "Close borders spark tensions between our nations!".

Based on XML constants defined individually for each leader and defines their territorial instinct.
Those XML constants are modified by 2 modifiers:
  1. Add 40 is we are a land target. It's prolly the definition of being an accessible target for war.
    It's basically fulfilling two conditions: sharing 8 or more tiles and having cities in their primary lands, that is either their capital+cities or a group of three cities. (Still need to delve into those concepts though)
  2. A minimum function that either returns the number of stolen BFC tiles from an AI (outside are not counted) and is maxed out to 60. Each stolen tile are worth three times in percentage up 60% as I did mention. If the count tiles give 61, then 60 is returned because min function returns the lowest value.

Indeed, 40+60 equals 100% if you have figured it out.
It is possible to be culturally crushed, but still annoy the AI!
Yes, that 40 coming from land target definition (mostly pangaea mapscript for instance) makes the least tolerant AI's to be already pissed off.

Here are the XML values: red ones are those who will be pissed off by your presence if you're a valid land target.

Spoiler :
ALEXANDER: -4
ASOKA: -2
AUGUSTUS: -4
BISMARCK: -4
BOUDICA: -3

BRENNUS: -2
CATHERINE: -4
CHARLEMAGNE: -3

CHURCHILL: -2
CYRUS: -2
DARIUS: -2
DE GAULLE: -2
ELIZABETH: -3
FREDERICK: -2
GANDHI: -2
GENGHIS KHAN: -4
GILGAMESH: -3
HAMMURABI: -2
HANNIBAL: -3
HATSHEPSUT: -2
HUAYNA CAPAC: -3
ISABELLA: -3
JOAO: -2
JULIUS CAESAR: -4
JUSTINIAN: -4
KUBLAI KHAN: -3
LINCOLN: -2
LOUIS XIV: -4
MANSA MUSA: -2
CHINESE LEADER: -2
MEHMED: -2
MONTEZUMA: -4

NAPOLEON: -3
PACAL: -2
PERICLES: -2
PETER: -3
QIN SHI HUANG: -4

RAMESSES: -2
RAGNAR: -2
FRANKLIN ROOSEVELT: -3
SALADIN: -3
SHAKA: -4
SITTING BULL: -4

STALIN: -2
SULEIMAN: -2
SURYAVARMAN: -3
TOKUGAWA: -3

VICTORIA: -2
WANGKON: -2
WASHINGTON: -2
WILLEM VAN ORANJE: -1
ZARA YAQOB: -2


Why mainly those with max -3 or -4 negmods.
40% of those two numbers respectively give -1.2 and -1.6.
Both numbers are rounded down because the game only deals with integers.

So, those AI's are angry even without grabbing their land culturally. Those jerks...

================================================================

Here's the source code about attitude change coming from close borders.
Spoiler :
Code:
int CvPlayerAI::AI_getCloseBordersAttitude(PlayerTypes ePlayer) const
{
	if (m_aiCloseBordersAttitudeCache[ePlayer] == MAX_INT)
	{
	int iPercent;

	if (getTeam() == GET_PLAYER(ePlayer).getTeam() || GET_TEAM(getTeam()).isVassal(GET_PLAYER(ePlayer).getTeam()) || GET_TEAM(GET_PLAYER(ePlayer).getTeam()).isVassal(getTeam()))
	{
		return 0;
	}

	iPercent = std::min(60, (AI_calculateStolenCityRadiusPlots(ePlayer) * 3));

	if (GET_TEAM(getTeam()).AI_isLandTarget(GET_PLAYER(ePlayer).getTeam()))
	{
		iPercent += 40;
	}

		m_aiCloseBordersAttitudeCache[ePlayer] = ((GC.getLeaderHeadInfo(getPersonalityType()).getCloseBordersAttitudeChange() * iPercent) / 100);
	}

	return m_aiCloseBordersAttitudeCache[ePlayer];
}

Here's the strip of code calculating stolen plots.
Spoiler :
Code:
int CvPlayerAI::AI_calculateStolenCityRadiusPlots(PlayerTypes ePlayer) const
{
	PROFILE_FUNC();

	CvPlot* pLoopPlot;
	int iCount;
	int iI;

	FAssert(ePlayer != getID());

	iCount = 0;

	for (iI = 0; iI < GC.getMapINLINE().numPlotsINLINE(); iI++)
	{
		pLoopPlot = GC.getMapINLINE().plotByIndexINLINE(iI);

		if (pLoopPlot->getOwnerINLINE() == ePlayer)
		{
			if (pLoopPlot->isPlayerCityRadius(getID()))
			{
				iCount++;
			}
		}
	}

	return iCount;
}

AI_isLandTarget() function is getting deeper:
Spoiler :


Basically saying we are a possible land target for war if we have cities in his primary area AND we have 8 of more tiles bordering his.
Why the need to fulfill both conditions is simply if one is fulfilled, the function return "we are not a land target". Take it like doors you have to pass through, so the function can return "true".
Code:
bool CvTeamAI::AI_isLandTarget(TeamTypes eTeam) const
{
	if (!AI_hasCitiesInPrimaryArea(eTeam))
	{
		return false;
	}

	if (AI_calculateAdjacentLandPlots(eTeam) < 8)
	{
		return false;
	}

	return true;
}

!AI_hasCitiesInPrimaryArea(eTeam) means hereunder function returns false, and without pushing too far the "infinite" serie of called functions, it means we do not have cities in his primary area. Supposedly, a primary area is defined by either capital or a group of 3 cities. I need to search further, but I won't in the short term.
If we get AI_hasCitiesInPrimaryArea=true and enough adjacent tiles, then we are a land target.
Code:
bool CvTeamAI::AI_hasCitiesInPrimaryArea(TeamTypes eTeam) const
{
	CvArea* pLoopArea;
	int iLoop;

	FAssertMsg(eTeam != getID(), "shouldn't call this function on ourselves");

	for(pLoopArea = GC.getMapINLINE().firstArea(&iLoop); pLoopArea != NULL; pLoopArea = GC.getMapINLINE().nextArea(&iLoop))
	{
		if (AI_isPrimaryArea(pLoopArea))
		{
			if (GET_TEAM(eTeam).countNumCitiesByArea(pLoopArea))
			{
				return true;
			}
		}
	}

	return false;
}

Code:
 
I'll second that assessment from Pangaea, this is essentially all due to the work of Kaitzilla. As someone who's observed this over the past few months, the project only came to life when he took the helm, organized it, and then proceeded to write the majority of the content. Excellent work. :goodjob:

I half-jokingly suggest it should have Kaitzilla's name in giant, flashing, multi-colored letters at the top of it. Credit where credit is due.
 
This is a great compilation of knowledge, both in the individual hyperlinked posts and the wealth of information that has been released by forum-users over the years. I've gotten many questions for my recorded videos about how I know X or how I can reason Y. Now I can point them to this. Excellent work.
 
A simple summary about "Close borders spark tensions between our nations!".

Based on XML constants defined individually for each leader and defines their territorial instinct.
Those XML constants are modified by 2 modifiers:
  1. Add 40 is we are a land target. It's prolly the definition of being an accessible target for war.
    It's basically fulfilling two conditions: sharing 8 or more tiles and having cities in their primary lands, that is either their capital+cities or a group of three cities. (Still need to delve into those concepts though)
  2. A minimum function that either returns the number of stolen BFC tiles from an AI (outside are not counted) and is maxed out to 60. Each stolen tile are worth three times in percentage up 60% as I did mention. If the count tiles give 61, then 60 is returned because min function returns the lowest value.

Indeed, 40+60 equals 100% if you have figured it out.
It is possible to be culturally crushed, but still annoy the AI!
Yes, that 40 coming from land target definition (mostly pangaea mapscript for instance) makes the least tolerant AI's to be already pissed off.

Here are the XML values: red ones are those who will be pissed off by your presence if you're a valid land target.

Spoiler :
ALEXANDER: -4
ASOKA: -2
AUGUSTUS: -4
BISMARCK: -4
BOUDICA: -3

BRENNUS: -2
CATHERINE: -4
CHARLEMAGNE: -3

CHURCHILL: -2
CYRUS: -2
DARIUS: -2
DE GAULLE: -2
ELIZABETH: -3
FREDERICK: -2
GANDHI: -2
GENGHIS KHAN: -4
GILGAMESH: -3
HAMMURABI: -2
HANNIBAL: -3
HATSHEPSUT: -2
HUAYNA CAPAC: -3
ISABELLA: -3
JOAO: -2
JULIUS CAESAR: -4
JUSTINIAN: -4
KUBLAI KHAN: -3
LINCOLN: -2
LOUIS XIV: -4
MANSA MUSA: -2
CHINESE LEADER: -2
MEHMED: -2
MONTEZUMA: -4

NAPOLEON: -3
PACAL: -2
PERICLES: -2
PETER: -3
QIN SHI HUANG: -4

RAMESSES: -2
RAGNAR: -2
FRANKLIN ROOSEVELT: -3
SALADIN: -3
SHAKA: -4
SITTING BULL: -4

STALIN: -2
SULEIMAN: -2
SURYAVARMAN: -3
TOKUGAWA: -3

VICTORIA: -2
WANGKON: -2
WASHINGTON: -2
WILLEM VAN ORANJE: -1
ZARA YAQOB: -2


Why mainly those with max -3 or -4 negmods.
40% of those two numbers respectively give -1.2 and -1.6.
Both numbers are rounded down because the game only deals with integers.

So, those AI's are angry even without grabbing their land culturally. Those jerks...

================================================================

Here's the source code about attitude change coming from close borders.
Spoiler :
Code:
int CvPlayerAI::AI_getCloseBordersAttitude(PlayerTypes ePlayer) const
{
	if (m_aiCloseBordersAttitudeCache[ePlayer] == MAX_INT)
	{
	int iPercent;

	if (getTeam() == GET_PLAYER(ePlayer).getTeam() || GET_TEAM(getTeam()).isVassal(GET_PLAYER(ePlayer).getTeam()) || GET_TEAM(GET_PLAYER(ePlayer).getTeam()).isVassal(getTeam()))
	{
		return 0;
	}

	iPercent = std::min(60, (AI_calculateStolenCityRadiusPlots(ePlayer) * 3));

	if (GET_TEAM(getTeam()).AI_isLandTarget(GET_PLAYER(ePlayer).getTeam()))
	{
		iPercent += 40;
	}

		m_aiCloseBordersAttitudeCache[ePlayer] = ((GC.getLeaderHeadInfo(getPersonalityType()).getCloseBordersAttitudeChange() * iPercent) / 100);
	}

	return m_aiCloseBordersAttitudeCache[ePlayer];
}

Here's the strip of code calculating stolen plots.
Spoiler :
Code:
int CvPlayerAI::AI_calculateStolenCityRadiusPlots(PlayerTypes ePlayer) const
{
	PROFILE_FUNC();

	CvPlot* pLoopPlot;
	int iCount;
	int iI;

	FAssert(ePlayer != getID());

	iCount = 0;

	for (iI = 0; iI < GC.getMapINLINE().numPlotsINLINE(); iI++)
	{
		pLoopPlot = GC.getMapINLINE().plotByIndexINLINE(iI);

		if (pLoopPlot->getOwnerINLINE() == ePlayer)
		{
			if (pLoopPlot->isPlayerCityRadius(getID()))
			{
				iCount++;
			}
		}
	}

	return iCount;
}

AI_isLandTarget() function is getting deeper:
Spoiler :


Basically saying we are a possible land target for war if we have cities in his primary area AND we have 8 of more tiles bordering his.
Why the need to fulfill both conditions is simply if one is fulfilled, the function return "we are not a land target". Take it like doors you have to pass through, so the function can return "true".
Code:
bool CvTeamAI::AI_isLandTarget(TeamTypes eTeam) const
{
	if (!AI_hasCitiesInPrimaryArea(eTeam))
	{
		return false;
	}

	if (AI_calculateAdjacentLandPlots(eTeam) < 8)
	{
		return false;
	}

	return true;
}

!AI_hasCitiesInPrimaryArea(eTeam) means hereunder function returns false, and without pushing too far the "infinite" serie of called functions, it means we do not have cities in his primary area. Supposedly, a primary area is defined by either capital or a group of 3 cities. I need to search further, but I won't in the short term.
If we get AI_hasCitiesInPrimaryArea=true and enough adjacent tiles, then we are a land target.
Code:
bool CvTeamAI::AI_hasCitiesInPrimaryArea(TeamTypes eTeam) const
{
	CvArea* pLoopArea;
	int iLoop;

	FAssertMsg(eTeam != getID(), "shouldn't call this function on ourselves");

	for(pLoopArea = GC.getMapINLINE().firstArea(&iLoop); pLoopArea != NULL; pLoopArea = GC.getMapINLINE().nextArea(&iLoop))
	{
		if (AI_isPrimaryArea(pLoopArea))
		{
			if (GET_TEAM(eTeam).countNumCitiesByArea(pLoopArea))
			{
				return true;
			}
		}
	}

	return false;
}

Code:

Superb work Tachywaxon! I think I understand what "our close borders spark tensions" means now. Funny to see Willem Van Oranje be such a wimp.

So with Genghis Khan, being a valid land target will show a -1 "our close borders spark tensions" and then stealing 10 tiles that should have been his but aren't because those tiles are in the human's culture gets the penalty to -2? Stealing the maximum 60 tiles and being a valid target would get to -4?

Border tensions seem to be a bigger deal in huge maps in that case. Glad to see you gave it a look as this mechanic doesn't seem to be very well explained anywhere else on the forums.


@AbsoluteZero, SamSniped, and Grimith: glad you enjoyed the guide! :D
 
@Kaitzilla

Willem has peculiarities compared to most leaders. He likes leaders with better ranks than him and dislikes those who are lower than him. Most leaders are liking weaklings. Or are indifferent.
Not sure how it is linked with the real Willem of RL.
Yes, he was deeply religious, but also comprehensive of other believers.
He was a warmonger because he was against the king of Spain.
Most behaviours are well reported, but that one regarding better or worse ranks, I don't know.

You got the mechanics about Genghis.

Note: There may be another good XML value to include: complete immunity for demanding resources from capitulee. For peacevassal, notice how the vassal becomes out of the blue friendly; there's a reason and it is tied to the fact to neutralize vassal treaty breaking.

When I will get time on it, I will finish that study and I know that is a really important value. How many times I got surprising situations where the AI decided to break the capitulation just for some resource demands.
 
14) Attitude Thresholds are the diplomatic relations you must reach with an AI before they will perform a certain action. Please note that unusual cases like Gandhi who is always willing to trade techs doesn't apply if you are his worst enemy. When an AI is annoyed at you, then you are potentially their worst enemy unless they hate somebody else more. So Gandhi will trade techs with you at Furious only if he is more furious with somebody else. Also, a vassal is freed from all attitude thresholds and will do whatever you wish.

You probably meant Mansa Musa instead of Gandhi above.

Sun Tzu Wu
 
Tech trades required to receive +1 "shared your technological discoveries with us"

This item requires the player to trade a certain # of technologies to the AI which varies with each AI. The thresholds occur at:

5
7
10
20

I noticed several AIs requiring 10 technologies in this article, whereas the XML file implies only 7. The AIs affected (* = big maybe I'm wrong) include:

Boudica*
Catherine*
Elizabeth
Frederick
Gilgamesh*
Hannibal*
Joao II*
Justinian I*
Kubai Khan*
Lincoln
Montezuma*
Willem v Oranje*

The * (asterisk) indicates AIs that I haven't personally tested against enough to verify the threshold. I'm almost certainly wrong about the one's with an asterisk behind them, but I know for certain that the technology threshold for Elizabeth, Frederick and Lincoln is only 7. Also, I believe I've gotten Frederick up to +3 for this bonus by trading him 23 technologies (knowledge of two three technology trades decayed).

EDIT: Boudica, Catherine and Elizabeth have just been verified by the test games in post #81

Sun Tzu Wu
 
This item requires the player to trade a certain # of technologies to the AI which varies with each AI. The thresholds occur at:

5
7
10
20

I noticed several AIs requiring 10 technologies in this article, whereas the XML file implies only 7. The AIs affected (* = big maybe I'm wrong) include:

Boudica*
Catherine*
Elizabeth
Frederick
Gilgamesh*
Hannibal*
Joao II*
Justinian I*
Kubai Khan*
Lincoln
Montezuma*
Willem v Oranje*

The * (asterisk) indicates AIs that I haven't personally tested against enough to verify the threshold. I'm almost certainly wrong about the one's with an asterisk behind them, but I know for certain that the technology threshold for Elizabeth, Frederick and Lincoln is only 7. ...

I'm in the process of creating 4 test games with 13 AIs each to independently test this diplomacy item for the article. Please allow that to be my small contribution to it.

At this time, I can say that I have verified that Boudica, Catherine and Elizabeth do indeed give +1 for "shared your technological discoveries with us" after giving them exactly 7 Technologies.

Sun Tzu Wu
 
Top Bottom