Customizing 300BC scenario

The_Girlfriend

Chieftain
Joined
Nov 13, 2010
Messages
39
Location
Boston, MA
I'm playing the 300BC scenario and I have two questions:

I want to play it with city flipping disabled and be allowed to raze any city (even one that used to be mine).

To do this I'm using the Custom Scenario feature.

I checked off "No city flipping" but am wondering if this is working because I've already seen barbarian civs flip. Does this option really work but barbarian civs aren't affected?


Also, I want to make sure that I can raze any city so I left "No razing" unchecked. But since it was already unchecked it looks like that is the default. So I can't be sure that this will work for what I am looking for -- e.g., I want to be able to raze any city, even one that's been mine since I don't want to have to guard it. Are there different rules that govern cities that used to be mine?
 
To the second part, you can't raze your own cities unless somebody else takes it, and you take it back. It's a bit annoying.

Yes, exactly. So I've been playing the 300BC scenario and the situation you've described has happened a few times -- someone else has taken my city and then I take it back. And sometimes I can raze it and sometimes I can't. I've left "No city razing" unchecked, so I can't understand why I can't always raze it.
 
Try going into the worldbuilder file(open it with notepad) and take out the part that says "OPTION=NO_CITY_RAZING" or something like that.


I wasn't sure where the worldbuilder file was... thought that might be related to the CIV4GameOptionInfos.xml and did find this code:

Code:
        <GameOptionInfo>
            <Type>GAMEOPTION_NO_CITY_RAZING</Type>
            <Description>TXT_KEY_GAME_OPTION_NO_CITY_RAZING</Description>
            <Help>TXT_KEY_GAME_OPTION_NO_CITY_RAZING_HELP</Help>
            <bDefault>0</bDefault>
            <bVisible>1</bVisible>
        </GameOptionInfo>


Just to see if changing anything here would take, I changed the bDefault value to 1. But when I opened Civ and did Custom Scenario, the NO CITY RAZING option was still unchecked.

So then I changed the value back to 0 and changed the bVisible value to 0 and that DID take -- the whole option disappeared when I looked at the Custom Scenario options. So I wonder if there is a big with how that line is parsed?

Since that may be a buggy option, I dug around some more.

I did a string search through the whole LOR directory and found this function in the CvPlayer.cpp file (LoR Source\CvGameCoreDLL):

Code:
bool CvPlayer::canRaze(CvCity* pCity) const
{
	if (!pCity->isAutoRaze())
	{
		if (GC.getGameINLINE().isOption(GAMEOPTION_NO_CITY_RAZING))
		{
			return false;
		}

		if (pCity->getOwnerINLINE() != getID())
		{
			return false;
		}
/************************************************************************************************/
/* REVOLUTIONDCM_MOD                         02/17/10                           jdog5000        */
/*                                                                                              */
/*                                                                                              */
/************************************************************************************************/
		// Change for IDW, so AI may raze cities it captures
		if( pCity->isEverOwned(getID()) || pCity->plot()->isCultureRangeCity(getID(), std::max(0,GC.getNumCultureLevelInfos() - 1)) )
		{
			if (pCity->calculateTeamCulturePercent(getTeam()) >= GC.getDefineINT("RAZING_CULTURAL_PERCENT_THRESHOLD"))
			{
				return false;
			}
		}
/************************************************************************************************/
/* REVOLUTIONDCM_MOD                         END                                 Glider1        */
/************************************************************************************************/
	}

/************************************************************************************************/
/* Afforess	                  Start		 12/21/09                                                */
/*                                                                                              */
/*                                                                                              */
/************************************************************************************************/
	if(GC.getUSE_CAN_RAZE_CITY_CALLBACK())
	{
		CyCity* pyCity = new CyCity(pCity);
		CyArgsList argsList;
		argsList.add(getID());	// Player ID
		argsList.add(gDLL->getPythonIFace()->makePythonObject(pyCity));	// pass in city class
		long lResult=0;
		gDLL->getPythonIFace()->callFunction(PYGameModule, "canRazeCity", argsList.makeFunctionArgs(), &lResult);
		delete pyCity;	// python fxn must not hold on to this pointer 
		if (lResult == 0)
		{
			return (false);
		}
	}
/************************************************************************************************/
/* Afforess	                     END                                                            */
/************************************************************************************************/
	return true;
}


I was thinking that if I change "false" to "true" here, the game would allow razing even if the city is my own. Do I need to compile cpp files before changes made to that file take effect?

Code:
		if (pCity->getOwnerINLINE() != getID())
		{
			[B][COLOR="Red"]return false;[/COLOR][/B]
		}
 
Hmm...I don't know about that. What I was referring to was in My documents/My games/Beyond the Sword/Saves/Worldbuilder. Go there(assuming you have a windows), search for the title of the 300BC scenario, and open it up. The top should look like

Version=11
BeginGame
Era=ERA_ANCIENT
Speed=GAMESPEED_EPIC
Calendar=CALENDAR_BI_YEARLY
Option=GAMEOPTION_NO_CITY_RAZING
Option=GAMEOPTION_RAGING_BARBARIANS
Option=GAMEOPTION_AGGRESSIVE_AI
Victory=VICTORY_TIME
Victory=VICTORY_CONQUEST
Victory=VICTORY_DOMINATION
Victory=VICTORY_CULTURAL
Victory=VICTORY_SPACE_RACE
Victory=VICTORY_DIPLOMATIC
GameTurn=0
MaxTurns=750
MaxCityElimination=0
NumAdvancedStartPoints=0
TargetScore=0
StartYear=-300
Description=
ModPath=
EndGame

Delete the entire line "Option=GAMEOPTION_NO_CITY_RAZING". That should eliminate it.
 
Top Bottom