SDK Question

Androrc the Orc

Emperor
Joined
Apr 19, 2004
Messages
1,621
Location
Vienna, Austria
I activated the Pirates, and did the following change in CvCity.cpp (to make it so when a pirate civilization has population growth, that the result is a Petty Criminal instead of a Free Colonist):

Code:
//	Pirates Start
//	makes Petty Criminals be the result of population growth for pirate civilizations
			UnitTypes eUnit = (UnitTypes)GC.getCivilizationInfo(getCivilizationType()).getCivilizationUnits(GC.getDefineINT("DEFAULT_POPULATION_UNIT"));
			if (GET_PLAYER(getOwnerINLINE()).isPirates())
			{
			UnitTypes eUnit = (UnitTypes)GC.getCivilizationInfo(getCivilizationType()).getCivilizationUnits(GC.getDefineINT("DEFAULT_POPULATION_UNIT_PIRATE"));
			}
//			UnitTypes eUnit = (UnitTypes)GC.getCivilizationInfo(getCivilizationType()).getCivilizationUnits(GC.getDefineINT("DEFAULT_POPULATION_UNIT"));	//how it was before I changed it
//	Pirates End

I defined DEFAULT_POPULATION_UNIT_PIRATE in GlobalDefinesAlt.xml.

I started up a game with the Pirates, and when the population of the city grew, the game crashed. What did I do wrong?
 
Top Bottom