How the event vichy looks

Darkator

Prince
Joined
Sep 18, 2020
Messages
311
Location
Poland,EU
II wanted to create an event where, after the occupation of Paris by Germany, a few French cities are taken by France vichy. And so it wonders how to do it.
 
II wanted to create an event where, after the occupation of Paris by Germany, a few French cities are taken by France vichy. And so it wonders how to do it.

There's an event exactly like this in the Road to War scenario in Beyond the Sword. I guess you could look in the files there and try to reverse engineer the event script.
 
I made an event. Which starts when the Germans conquer Paris and then Vichy France appears. The problem consists in this event did not conquer two cities. Nothing happens.

Code:
def turnChecker(self, iTurn):
if (game.getVichyHappened() == 0):
if (self.getFrenchAxisCities() > self.numFrenchCitiesFall):
self.EVichy()


def EVichy(self):
# Send off to do Vichy France and notify player
gc.getPlayer(self.pFranceID).doVichyFrance(6, 26, 26, 6)
popup = PyPopup.PyPopup(-1)
szTitle = localText.getText("TXT_KEY_WW2_VICHY_TITLE", ())
szText = localText.getText("TXT_KEY_WW2_VICHY_TEXT", ())
popup.setHeaderString(szTitle)
popup.addSeparator()
popup.setBodyString(szText)
popup.launch()
self.pGermanyTeam.addTeam(gc.getPlayer(self.pVichyID).getTeam())
game.setVichyHappened(2)
def getFrenchAxisCities(self):
iCount = 0

if (self.cParis.getOwner() == self.pGermanyID or self.cParis.getOwner() == self.pItalyID):
iCount = iCount + 1
if (self.cNantes.getOwner() == self.pGermanyID or self.cNantes.getOwner() == self.pItalyID):
iCount = iCount + 1
if (self.cParis.getOwner() == self.pFranceID):
iCount = 0;
return iCount

def initValues(self):
# Variables
self.Map = 99






self.cLyon = gc.getMap().plot( 50, 18 ).getPlotCity()
self.cMarsyli = gc.getMap().plot( 49, 16 ).getPlotCity()
self.cAlgier = gc.getMap().plot( 49, 6 ).getPlotCity()
self.cTunis = gc.getMap().plot( 52, 5 ).getPlotCity()
self.cOran = gc.getMap().plot( 47, 6 ).getPlotCity()
self.cRabat = gc.getMap().plot( 43, 6 ).getPlotCity()
self.cBaszczar = gc.getMap().plot( 46, 3 ).getPlotCity()
self.cMarrakesz = gc.getMap().plot( 40, 4 ).getPlotCity()
self.cParis = gc.getMap().plot( 50, 20 ).getPlotCity()
self.cNantes = gc.getMap().plot( 47, 19 ).getPlotCity()




self.numFrenchCitiesFall = 1

self.pVichyID = 26

self.pVichyTeam = gc.getTeam(gc.getPlayer(self.pVichyID).getTeam())

self.pGermanyID = 0

self.cBerlin = gc.getMap().plot( 69, 36 ).getPlotCity()

self.pItalyID = 6

self.cRome = gc.getMap().plot( 68, 20 ).getPlotCity()

self.pFranceID = 2

self.pEnglandID = 1

self.pGermanyTeam = gc.getTeam(gc.getPlayer(self.pGermanyID).getTeam())

self.pItalyTeam = gc.getTeam(gc.getPlayer(self.pItalyID).getTeam())



def getMap(self):
return self.Map
 
I was a bit wrong with this paris, in general, Paris and the city near it were supposed to be occupied.
 
Back
Top Bottom