• 📚 Admin Project Update: Added a new feature to PictureBooks.io called Story Worlds. It lets your child become the hero of beloved classic tales! Choose from worlds like Alice in Wonderland, Wizard of Oz, Peter Pan, The Jungle Book, Treasure Island, Arabian Nights, or Robin Hood. Give it a try and let me know what you think!

Vassal/capitulation questions.

6K Man

Bureaucrat
Joined
Jul 17, 2007
Messages
2,455
Location
in a Gadda Da Vida
Simply put - are there trigger points that make an AI vassal to other AIs, or vassal to the human? Is it simply based on attitude/relative strength, or are there other factors to consider?

I try to avoid taking vassals due to the cultural/motherland happiness issues, and in any event, I prefer to capture the best cities for myself before taking a vassal. But in my current game, I broke that self-imposed rule and I'm wondering if I needed to.

I was sharing a continent with Hatshepsut, Hannibal, Tokugawa, and Shaka. Shaka killed and ate Hatty very early. He predictably DOWed me a bit later - took a city, which I recaptured several turns later. I killed his offensive stack and set out with a stack of new Maces/Catapults to take some of his cities, and Hannibal - who was pleased/friendly with me - declared war on Shaka as well.

It looked like Hannibal was seeking easy pickings - but he instead lost 2 cities quickly, and then I saw that Carthage had fallen. Hannibal made peace with Shaka, and shortly afterwards, he offered to be my vassal.

Now - on the one hand, I wanted Carthage, and he had a double holy city for the only 2 religions on the continent; I wanted that too. My plan was to beat down Shaka, and eventually take Hannibal's and Toku's cities. But I was worried that if I turned down Hannibal's offer, that Hanny would instead capitulate to Shaka, and I'd be fighting both of them. Was that a reasonable assumption to make?

Also - is a civ more likely to capitulate or vassalize after losing its capital? Does it need to drop below a certain percentage of land/power before it considers capitulation, or is it solely based on its relative strength compared to other nations?

Hannibal vassalized to me voluntarily. Since then, I've increased by territory by about 50% or more (took many of Shaka's cities). Is Hannibal likely to break free? Under what circumstances would he renounce the vassal agreement?

Thanks for your help.
 
You (or an AI) need to have double land, double pop, 1.5x their power to capitulate. They also need to be below the average in power in the map. Many things muddle this up though, such as refusal to speak and them having vassals. Usually if a Civ is in a losing position and considers capitulating to someone, he can also capitulate to that someone's war allies, so yes it was a reasonable assumption. :)

For peacevassaling you (in addition to all the above) need to pass an attitude threshold. For most this is Friendly, but for some it's as low as Cautious. There's an additional bonus for this limit - the more powerful that Civs land targets are, the more you can be below that attitude limit and still be eligible for getting a peacevassal offer. For example, Churchill's peacevassal limit is Friendly (+10) but if he's neighboring a very strong Gandhi (don't laugh, this is a real scenario :D) something like +6 diplo or even lower can be enough for him to be willing to peacevassal to you.
 
You (or an AI) need to have double land, double pop, 1.5x their power to capitulate. They also need to be below the average in power in the map. Many things muddle this up though, such as refusal to speak and them having vassals. Usually if a Civ is in a losing position and considers capitulating to someone, he can also capitulate to that someone's war allies, so yes it was a reasonable assumption. :)
Adding to this, you need to be perceived as being winning the war. This is measured by the war success variable. The issue is that the way the war success count is made makes that the AI perceives being winning a war if you sacrifice a lot of units , even if you take a good chunk of cities... And to add, no one, including your vassals, must have a bigger war success in that war than you ( a consequence of the rule Firaxis putted to disallow civs that had done little or nothing in the war to capitulate the civ )
 
Adding to this, you need to be perceived as being winning the war. This is measured by the war success variable. The issue is that the way the war success count is made makes that the AI perceives being winning a war if you sacrifice a lot of units , even if you take a good chunk of cities... And to add, no one, including your vassals, must have a bigger war success in that war than you ( a consequence of the rule Firaxis putted to disallow civs that had done little or nothing in the war to capitulate the civ )

I don't think that's right. I'm almost certain I've seen my war target capitulate to someone else when both my absolute war success and relative (kills/deaths) was #1 by far.

Nukes are a fixed 10 war success per hit by the way, so they're a great way to put up lots of war success w/o actually dirtying your hands. Just spray them with like 40 tacticals on turn 1 of the war and have a good power lead (if your tacticals killed their units, likely). Then you just need to be big enough.

Well, you're probably over the pop threshold...
 
40 tac nukes? Don't you mean 4 ? ;)

The "can't cap unless to the guy that has better war success" was introduced only in 3.13 IIRC, so I'm not surprised if you remember otherwise.
 
The "can't cap unless to the guy that has better war success" was introduced only in 3.13 IIRC, so I'm not surprised if you remember otherwise.

So you say that only 1 guy at a time has the option to capitulate someone, the one with the biggest war success? I'm also fairly certain (not 100% certain, though) I've seen evidence to the contrary, and I started playing at 3.17 :D
 
Ok, I rechecked the code and indeed there is no hard rule vs a civ that doesn't have the biggest war success being able to cap someone, just a bias against it:

From CvTeamAI::AI_surrenderTrade
Code:
		int iTotalPower = GC.getGameINLINE().countTotalCivPower();
		int iAveragePower = iTotalPower / std::max(1, GC.getGameINLINE().countCivTeamsAlive());
		int iMasterPower = GET_TEAM(eTeam).getPower(false);
		int iVassalPower = (getPower(true) * (iPowerMultiplier + iPersonalityModifier / std::max(1, iMembers))) / 100;

		if (isAtWar(eTeam))
		{
			int iTheirSuccess = std::max(10, GET_TEAM(eTeam).AI_getWarSuccess(getID()));
			int iOurSuccess = std::max(10, AI_getWarSuccess(eTeam));
			int iOthersBestSuccess = 0;
			for (int iTeam = 0; iTeam < MAX_CIV_TEAMS; ++iTeam)
			{
				if (iTeam != eTeam && iTeam != getID())
				{
					CvTeam& kLoopTeam = GET_TEAM((TeamTypes)iTeam);

					if (kLoopTeam.isAlive() && kLoopTeam.isAtWar(getID()))
					{
						int iSuccess = kLoopTeam.AI_getWarSuccess(getID());
						if (iSuccess > iOthersBestSuccess)
						{
							iOthersBestSuccess = iSuccess;
						}
					}
				}
			}

			[COLOR="Red"][B]// Discourage capitulation to a team that has not done the most damage
			if (iTheirSuccess < iOthersBestSuccess)
			{
				iOurSuccess += iOthersBestSuccess - iTheirSuccess;
			}[/B][/COLOR]

			iMasterPower = (2 * iMasterPower * iTheirSuccess) / (iTheirSuccess + iOurSuccess);

			if (AI_getWorstEnemy() == eTeam)
			{
				iMasterPower *= 3;
				iMasterPower /= 4;
			}
		}
		else
		{
			if (!GET_TEAM(eTeam).AI_isLandTarget(getID()))
			{
				iMasterPower /= 2;
			}
		}
 
How much does a city capture repressent for "war success"? Is this value easy to modify (is it python or SDK changes?)


And does that code you posted above say that if I am the worst enemy of the target then my power is taken as 3/4? That might explain things.
 
That intel is in the link I gave in post #3:
It looks like he thinks he's doing better in the war than you are. This check is performed if the power check hasn't denied you already:

Code:
if (AI_getWarSuccess(eTeam) + 4 * GC.getDefineINT("WAR_SUCCESS_CITY_CAPTURING") > GET_TEAM(eTeam).AI_getWarSuccess(getID()))
{
	return DENIAL_JOKING;
}

WAR_SUCCESS_CITY_CAPTURING is 10 by default. The war success numbers just add up the wins and losses of units and cities.

WAR_SUCCESS_DEFENDING: 3
WAR_SUCCESS_ATTACKING: 4
WAR_SUCCESS_UNIT_CAPTURING: 1 (Workers/Settlers)
WAR_SUCCESS_CITY_CAPTURING: 10

So yes, the solution is to take more cities. If you both start out at 0, you can see that it takes 40 success points assuming you win every battle and lose no cities. All losses must be offset by equal gains.
The WAR_SUCCESS_CITY_CAPTURING is defined in the XML , namely in GlobalDefines.XML, as well as WAR_SUCCESS_DEFENDING, WAR_SUCCESS_ATTACKING, WAR_SUCCESS_NUKE ( not mentioned above, but with the value of 10 by default ) and WAR_SUCCESS_UNIT_CAPTURING
 
That intel is in the link I gave in post #3:
The WAR_SUCCESS_CITY_CAPTURING is defined in the XML , namely in GlobalDefines.XML, as well as WAR_SUCCESS_DEFENDING, WAR_SUCCESS_ATTACKING, WAR_SUCCESS_NUKE ( not mentioned above, but with the value of 10 by default ) and WAR_SUCCESS_UNIT_CAPTURING

I said the 10 WS for nukes thing above ;).

And I meant 40, not 4. I guess really sissy AIs might cap immediately following a 4 nuke drubbing, but if they're that soft I'm usually not waiting for nukes.
 
So if a civ has 4 cities and very few units and you have no nukes , it is highly likely they will fight to the death. Interesting.

I might play around with this code to get it more to my liking.
 
In the code above when it is looping to find iOthersBestSuccess, what is considered a "team"? For example, if your vassal is doing really well in the war (better than you), is he considered a seperate team and thus it will result in triggering "if (iTheirSuccess < iOthersBestSuccess)" as true?

In other words, if your vassal is doing better than you will it make it harder to get the enemy to capitulate?
 
As TMIT said. Vassals are only considered part of the master "team" for diplo effects ( note, not team in terms of game coding ), so yes, a ( extremely unlikely ) useful vassal that kills a lot of units of your enemy can make you look bad in the decision table :D
 
As TMIT said. Vassals are only considered part of the master "team" for diplo effects ( note, not team in terms of game coding ), so yes, a ( extremely unlikely ) useful vassal that kills a lot of units of your enemy can make you look bad in the decision table :D

Some people advocate gifting vassals a slew of crap units for cheap upgrades. I guess its not a bad ides if you have a bajillion leftover horse archers or something that would otherwise waste space.

I've never tried it, but I wonder how early colony (one of those coast starts with AIs on another landmass) + SPAM gift warriors would work out on high levels? The AI only gets a 50% cost reduction on BTS upgrades, but on imm+ that's still relative chump change. I bet it could make a lot of axes that way...
 
If I capture a city but then raze it, is this still considered for WAR_SUCCESS_CITY_CAPTURING?
 
is it possible to have a vassal who already has a vassal and for your vassal to keep his vassal? i know its kind of a goofy question but i was just wondering
 
Back
Top Bottom