Modding Vassals

AltheusLRP

Chieftain
Joined
Jun 17, 2012
Messages
14
How would I go about modding the game so that vassals have the option to be offered cities? (not just liberated ones)
I still want vassals to be able to say no to accepting a city (i.e. highlighted in red with a reason) What I want is for vassals to have the same trading options on cities as non vassals.
 
Hi, it's easy to do it through the DLL.

In CvPlayer.cpp under

bool CvPlayer::canTradeItem(PlayerTypes eWhoTo, TradeData item, bool bTestDenial) const

you can find the next chunk of code:

Code:
case TRADE_CITIES:
		{
			CvCity* pCityTraded = getCity(item.m_iData);

			if (NULL != pCityTraded && pCityTraded->getLiberationPlayer(false) == eWhoTo)
			{
				return true;
			}

			if (GET_PLAYER(eWhoTo).canReceiveTradeCity())
			{
				if (0 == GC.getGameINLINE().getMaxCityElimination())
				{
					[B][I][U]if (!GET_TEAM(getTeam()).isAVassal() && !GET_TEAM(GET_PLAYER(eWhoTo).getTeam()).isVassal(getTeam()))[/U][/I][/B]
					{
						pOurCapitalCity = getCapitalCity();
						if (pOurCapitalCity != NULL)
						{
							if (pOurCapitalCity->getID() != item.m_iData)
							{
								return true;

Comment the underlined/bold/in italic line out or less advisably delete it and vassals will have the same options as every other player (I have personally tried and my vassal had his cities in red and I could gift him my cities he had interest in.

It's the easier way to do it, just two slashes before the line (//) and problem solved. :)
 
Back
Top Bottom