I think it is a single change in the CvUnit::canPillage function. Something like removing the part marked in red from this piece of the code:
Code:
if (pPlot->isOwned())
{
if (!potentialWarAction(pPlot))
{
if ([B][COLOR="DarkRed"](pPlot->getImprovementType() == NO_IMPROVEMENT) || [/COLOR][/B](pPlot->getOwnerINLINE() != getOwnerINLINE()))
{
return false;
}
}
}
You can also remove one set of parenthesis around the remaining condition.
Then, of course, you have to recompile the DLL. Then test it to make sure that it works... (I may have missed something somewhere else that also blocks it.)
For a more complex way of doing it, there is a modcomp by TheLopez (the Route Pillage Mod) that adds a Pillage Route command which is separate from the regular Pillage command, and it is evidently set up to work in your own territory (it also allows you to pillage the route out from under an improvement, leaving the improvement). I don't know if it includes any AI modifications to let it to use this.
Note that, as per the last sentence in that last paragraph above, the AI will also not take advantage of the change I suggest above to enable this. Human-only options give an advantage to someone who does not need one.
Given it a go. It's halfway there in that now the icon to pillage road/railroad comes up in game, but when you click it it doesn't actually do anything. Any ideas?
An nearly identical change needs to be made up near the beginning of CvUnit:illage, in this code:
Code:
if (pPlot->isOwned())
{
// we should not be calling this without declaring war first, so do not declare war here
if (!isEnemy(pPlot->getTeam(), pPlot))
{
if ([COLOR="DarkRed"][B](pPlot->getImprovementType() == NO_IMPROVEMENT) ||[/B][/COLOR] (pPlot->getOwnerINLINE() != getOwnerINLINE()))
{
return false;
}
}
}
The red marked stuff, identical to the one in canPillage, is once again the thing that blocks it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.