CvEventManager

From Civilization Modding Wiki
Revision as of 16:18, 8 August 2009 by TC01 (talk | contribs) (Started file, added a few functions- from my BTS event manager)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The CvEventManager file controls what happens during events that occur in the game. These aren't events like Beyond the Sword random events but rather events like a unit moving, a turn beginning, or a nuclear explosion occuring.

The Python files are written in the python programming language. They can be edited in a text editor such as notepad or in a programming editor like Python's IDLE.

This page is missing information. Do not remove this notice until it is complete.

Functions

Below is a list of all the functions in the file. Each function has a quick description attached to it. Note that there are comments strewn throughout some of these files, direct from the developers in order to aid the potential modders.

Function Parameters Description
def onUpdate() self, argsList (fDeltaTime) Called every frame (disabled in BTS with PythonCallbackDefines.xml)
def onWindowActivation() self, argsList (bActive) Called when the game window activates or deactivates
def onUnInit() self, argsList Called before Civ shuts down
def onPreSave() self, argsList Called before the game is saved
def onSaveGame() self, argsList Returns the name of the save game
def onLoadGame() self, argsList Called on the loading of the game
def onGameStart() self, argsList Called on the start of the game
def onGameEnd() self, argsList Called at the end of the game
def onBeginGameTurn() self, argsList (iGameTurn) Called at the beginning of the end of each turn
def onEndGameTurn() self, argsList (iGameTurn) Called at the end of the end of each turn
def onBeginPlayerTurn() self, argsList (iGameTurn, iPlayer) Called at the beginning of a player's turn
def onEndPlayerTurn() self, argsList (iGameTurn, iPlayer) Called at the end of a player's turn
def onEndTurnReady() self, argsList (iGameTurn) Called when the turn is ready to end
def onFirstContact() self, argsList (iTeamX, iHasMetTeamY) Called when one team meets another team
def onCombatResult() self, argsList (iWinner, iLoser) Called after combat

Example

This example is a quick idea of what you can do with functions in this file.

 <insert code example from actual Python file>


CvAdvisorUtilsCvCameraControlsCvDebugToolsCvDefineEditorCvDiplomacyCvEventManagerCvGameUtilsCvMagGeneratorUtilCvPerfTestCvQuestManagerCvScreenUtilsCvUtilDomPyHelpersPyHelpersScreenImputvector

_DebugTools; PitBoss:

AudioLogParserPbAdminPbWizard

EntryPoints:

CvAppInterfaceCvDebugInterfaceCvDiplomacyInterfaceCvEventInterfaceCvGameInterfaceCvGameInterfaceFileCvMapScriptInterfaceCvOptionScreenCallbackInterfaceCvPopupInterfaceCvRandomEventInterfaceCvScreensInterfaceCvScreenUtilsInterfaceCvTranslatorCvUnitControlInterfaceCvWBInterfacePbMain

pyHelper; pyUnit; pyWB:

PopupUnitUnitEntityCvUnitControllerCvWBDescCvWBPopups

Screens:

CvAdvisorScreenCvCivicsScreenCvCorporationAdvisorCvDanQuayleCvDawnOfManCvDebugInfoScreenCvDomesticAdvisorCvEraMovieScreenCvEspionageAdvisorCvExoticForeignAdvisorCvFinanceAdvisorCvForeignAdvisorCvGFCScreenCvHallOfFameScreenCvInfoScreenCvIntroMovieScreenCvMainInterfaceCvMilitaryAdvisorCvOptionsScreenCvPediaBonusCvPediaBuildingCvPediaCivicCvPediaCivilizationCvPediaCorporationCvPediaFeatureCvPediaHistoryCvPediaImprovementCvPediaLeaderCvPediaMainCvPediaProjectCvPediaPromotionCvPediaReligionCvPediaScreenCvPediaSpecialistCvPediaTechCvPediaTerrainCvPediaUnitCvPediaUnitChartCvReligionScreenCvReplayScreenCvScreenCvScreenEnumsCvSpaceShipScreenCvTechChooserCvTechSplashScreenCvTopCivsCvTutorialQuestScreenCvUNVictoryScreenCvVictoryMovieScreenCvVictoryScreenCvWonderMovieScreenCvWorldBuilderDiplomacyScreenCvWorldBuilderScreenIconGridTechTree

Note: this list is for Beyond the Sword 3.19; other versions may not have all these files.