Automatic Max espionage benefits on Vassals

Admiral Armada

The Admiral of Armadas
Joined
Sep 11, 2004
Messages
462
Location
Terra
Just like it sounds.:)
I found it annoying that when i either vassalize an AI or create a colony i cant see what they are building or the entirety of their territory. I would like to be able to see this so i can see why they are not developing for example, what units i should give them to make them expand etc. And maybe even to steal techs when they wont trade them to me, which i do not belive is supposed to happen.
 
I thought of a way this might be done, basically find the code that the GS executes when he does a mission that gives you a bunch of EP, and paste it into the code that becomes a vassal state, sound feasible? Now i just have to dig around and see if those pieces actually exist...
 
This will have side effects.
It will increase your total espionage count giving you advantages vs. other - non vassalized and hance not related - civs as well.
 
You should be able to avoid the side effects since there are both a CyTeam.changeEspionagePointsAgainstTeam (TeamType eIndex, INT iChange) and a CyTeam.changeEspionagePointsEver (INT iChange) and negative numbers are allowed for each. Note that you would also need to reverse the point increase if the vassal civ breaks away from the master.

If you are going the SDK route, it might be a better approach to simply add some extra code in CvPlayer::getEspionageMissionCostModifier to make all missions run against a vassal be very cheap; you could even have it based on a global define like other modifiers.
 
Hmm, Im going to give the SDK route a shot, my knowledge of programming at this level is fairly limited, but lets see how it goes.
 
Ok, looking at this, what it looks like i want to do is put a line like this
Code:
if (GET_TEAM(getTeam()).isAVassal())
        iMissionCost /= 100;
into
this function
Code:
int CvPlayer::getEspionageMissionCost(EspionageMissionTypes eMission, PlayerTypes eTargetPlayer, const CvPlot* pPlot, int iExtraData, const CvUnit* pSpyUnit) const
{
	int iMissionCost = getEspionageMissionBaseCost(eMission, eTargetPlayer, pPlot, iExtraData, pSpyUnit);

	if (-1 == iMissionCost)
	{
		return -1;
	}

	iMissionCost *= getEspionageMissionCostModifier(eMission, eTargetPlayer, pPlot, iExtraData, pSpyUnit);
	iMissionCost /= 100;

	// Multiply cost of mission * number of team members
	iMissionCost *= GET_TEAM(getTeam()).getNumMembers();

	return std::max(0, iMissionCost);
Look about right?
 
Back
Top Bottom