Any ideas on what <iVassalPowerModifier> means?

Watiggi

Deity
Joined
Feb 27, 2006
Messages
2,107
Anyone have an idea of what <iVassalPowerModifier> is? Everyone is 0 except:

Shaka 20
Napoleon 20
Mansa musa -20
Julius caesar 20
Genghis khan 50
Gandhi -20
Catherine -20
Augustus 20
Alexander 20
All other leaders are 0

There are so many different ways of interpreting these values based on who has them:

Does it modify the leaders power rating when THEY become a Vassal - so that Shaka's power rating will decrease 20% when they become a Vassal or Mansa's power rating will increase 20% when he becomes a Vassal?

Does it modify the leaders power rating when THEY acquire a Vassal through either a peaceful way or through capitulation - so Napoleon's power rating will increase 20% when they acquire a Vassal or Mansa's will decrease 20% when they acquire a Vassal? Or,

Does it simply mean a preference for acquiring or becomming a Vassal - Does Genghis have a dominant preference for wanting Vassals or does Mansa have a preference for wanting to be a Vassal?

Does anyone know what this value means?
 
Ok. I seem to have tracked down the code that takes into consideration the <iVassalPowerModifier>. I haven't been able to figure out the context of the code yet. This also seems to be the ONLY place in the whole game code that takes this value into consideration.

It is in the CvTeamAI.cpp file, in the AI_surrenderTrade() method for those who want to look. It calls a method called getVassalPowerModifier() which ultimately holds the value of <iVassalPowerModifier>.

For reference: getVassalPowerModifier() returns the value "m_iVassalPowerModifier", which appears to be initialised by a line in CvLeaderHeadInfo::read(CvXMLLoadUtility* pXML) in the CvInfo.cpp file. This looks to me like it is getting the raw <iVassalPowerModifier> value from the XML file.

Now on to what the code actually means...
 
So I take it that Firaxis never looks over these boards any more, correct? Is there some documenation somewhere that tells what changes are in Warlords, other than the sales oriented sites?

Did the programmers have to sign some contract that said "We will change ' the most moddable Civ EVER' , but we won't tell anyone what the changes are!"
 
That method, CvTeamAI::AI_surrenderTrade() appears to be the code that decides whether the AI will surrender or not.

Ok, these are the calculations where the variable is used:
Code:
	int iPersonalityModifier = 0;
	int iMembers = 0;
	for (int iI = 0; iI < MAX_PLAYERS; iI++)
	{
		if (GET_PLAYER((PlayerTypes)iI).isAlive())
		{
			if (GET_PLAYER((PlayerTypes)iI).getTeam() == getID())
			{
				[b]iPersonalityModifier[/b] += GC.getLeaderHeadInfo(GET_PLAYER((PlayerTypes)iI).getPersonalityType()).[b]getVassalPowerModifier()[/b];
				++iMembers;
			}
		}
	}

Code:
int iVassalPower = (getPower(true) * (iPowerMultiplier + [b]iPersonalityModifier[/b] / max(1, iMembers))) / 100;
and this what iVassalPower is used for (and the only thing, I might add):
Code:
if (4 * iVassalPower > 3 * iAveragePower || 3 * iVassalPower > 2 * iMasterPower)
	{
		return DENIAL_POWER_US;
	}


EDIT: I am having difficulty understanding the code, but I will hazzard a guess right now and say that it either makes the leader more resistant to surrendering (capitulating) or it multiplies their power rating so that they can get a surrender from another leader more easily. If the former is true, then that would mean that Mansa, Gandhi and Catherine are more prone to surrendering and Genghis is more resistant. If it is the latter, then that would mean that Mansa, Gandhi and Catherine would require a higher power rating to get a surrender and Genghis would require less of a power rating. I will look into it more at another time.
 
From that, it appears to deal with how easy it is to get them to become a vassal. Someone with a high value will need to be much weaker than the civ asking, while someone with a low value just needs to be a little weaker. That's if I'm reading that right, of course.
 
Back
Top Bottom