1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

How to make roads Pillage-able

Discussion in 'Civ4 - Creation & Customization' started by Refar, Dec 8, 2007.

  1. Refar

    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 ?
     
  2. Fanatic Demon

    Fanatic Demon Student in Wizardry

    Joined:
    Aug 6, 2004
    Messages:
    403
    Location:
    The Netherlands
    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:
     
  3. Gaius Octavius

    Gaius Octavius Deity

    Joined:
    Jul 28, 2006
    Messages:
    4,016
    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. ;)
     
  4. Refar

    Refar Deity

    Joined:
    Apr 10, 2005
    Messages:
    4,608
    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.
     
  5. Vital1

    Vital1 Chieftain

    Joined:
    May 30, 2007
    Messages:
    14
    And will the AI be able to use this ability this way?
     
  6. Gaius Octavius

    Gaius Octavius Deity

    Joined:
    Jul 28, 2006
    Messages:
    4,016
    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.
     

Share This Page