Aug 14, 2009, 05:56 PM
In the 1936 Europe scenario with accurate events, the Munich event gives Czechoslovakia to Germany, and a bunch of units. What file determines what units Germany gets? I see in the RTWEvents python file the mention of the annexation events for Austria and Czechoslovakia, but nothing about the units or where they go or how many, etc.
Where is that?
Aug 15, 2009, 01:59 PM
I woulds say CvPlayer.cpp (sorry, it appears to be hardcoded):
void CvPlayer::doAnnexation(int value1)
PlayerTypes eNewPlayer = ((PlayerTypes)value1);
if (eNewPlayer == NO_PLAYER)
for (CvUnit* pLoopUnit = firstUnit(&iLoop); pLoopUnit != NULL; pLoopUnit = nextUnit(&iLoop))
CvPlot* pPlot = pLoopUnit->plot();
pGiftUnit = GET_PLAYER(eNewPlayer).initUnit(pLoopUnit->getUnitType(), pLoopUnit->getX_INLINE(), pLoopUnit->getY_INLINE(), pLoopUnit->AI_getUnitAIType());
for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
int iCulture = pLoopCity->getCultureTimes100(getID());
CvPlot* pPlot = pLoopCity->plot();
GET_PLAYER(eNewPlayer).acquireCity(pLoopCity, false, true, false);
if (NULL != pPlot)
CvCity* pCity = pPlot->getPlotCity();
if (NULL != pCity)
pCity->setCultureTimes100(getID(), 0, false, false);
pCity->setCultureTimes100(eNewPlayer, iCulture, true, false);
Not a C++ modder, so I can't tell for sure, but I do know that the event in RTWEventManager triggers this.
Aug 15, 2009, 07:41 PM
That bit of code doesn't mean much to me, but I am guessing it takes the city and units from one civ and gives it to another. So whatever units Czechoslovakia has, Germany gets via the annexation.