How to make roads Pillage-able

Refar

Deity
Joined
Apr 10, 2005
Messages
4,608
I really dont like how you cant pillage roads within own cultural boarders. Is there any way to make removing roads possible ?
 
I really dont like how you cant pillage roads within own cultural boarders. Is there any way to make removing roads possible ?

Easy, you simply need to comment out some code in the function CvUnit::canPillage in CvUnit.cpp

simply change
Code:
if (pPlot->isOwned())
{
	if (!potentialWarAction(pPlot))
	{
		if ((pPlot->getImprovementType() == NO_IMPROVEMENT) || (pPlot->getOwnerINLINE() != getOwnerINLINE()))
		{
			return false;
		}
	}
}

into

Code:
/*
if (pPlot->isOwned())
{
	if (!potentialWarAction(pPlot))
	{
		if ((pPlot->getImprovementType() == NO_IMPROVEMENT) || (pPlot->getOwnerINLINE() != getOwnerINLINE()))
		{
			return false;
		}
	}
}
*/

and recompile the Dll :goodjob:
 
It never ceases to frustrate me how one miniscule change such as that requires an overhaul of the SDK, even if it is just commenting out code. Ridiculous.

And before you tell me that SDK modding is "not hard," it is for those of us without the proper program. ;)
 
Yes This is clearly something that should have been in XML...

But by now i have collected quiote a few things i want to change there. So i think i will have to go and see how to compile the stuff.
 
From the looks of it, I'd say the AI can use that ability, but whether it will understand when it is profitable to do so is another question entirely.
 
Back
Top Bottom