GameEvents
Static Events
Events can be subscribed by using GameEvents.SomeEvent.Add(SomeFunction)
.
Name | Parameters |
---|---|
GameEvents.BuildingConstructed | playerID [number] cityID [number] buildingID [number] plotID [number] bOriginalConstruction [boolean] |
GameEvents.BuildingPillageStateChanged | playerID [number] cityID [number] buildingID [number] bPillageState [boolean] |
GameEvents.CityBuilt | playerID [number] cityID [number] iX [number] iY [number] |
GameEvents.CityConquered | newPlayerID [number] oldPlayerID [number] newCityID [number] iCityX [number] iCityY [number] |
GameEvents.DiploSurpriseDeclareWar | mainPlayer [number] opponentPlayer [number] |
GameEvents.EventPopupChoice | playerID [number] tParameters [table] |
GameEvents.FoundNewWorld | playerID [number] Threshold [number] |
GameEvents.HasFourCities | playerID [number] Threshold [number] |
GameEvents.OnCityPopulationChanged | cityOwner [number] cityID [number] ChangeAmount [number] |
GameEvents.OnCivicCulturevated | iPlayer [number] eCivic [number] |
GameEvents.OnDistrictConstructed | playerID [number] districtID [number] iX [number] iY [number] |
GameEvents.OnFaithEarned | ePlayer [number] iFaithAmount [number] |
GameEvents.OnGameTurnStarted | playerID [number] |
GameEvents.OnNewMajorityReligion | |
GameEvents.OnPillage | playerID [number] unitID [number] bImprovement [boolean] buildingType [number] |
GameEvents.OnPlayerCommandSetObjectState | playerID [number] tParameters [table] |
GameEvents.OnPlayerGaveInfluenceToken | majorID [number] minorID [number] iAmount [number] |
GameEvents.OnRandomEventOccurred | iType [number] iSeverity [number] iX [number] iY [number] iMitigationLevel [number] |
GameEvents.OnUnitRetreated | unitOwner [number] unitID [number] |
GameEvents.PlayerTurnStartComplete | playerID [number] |
GameEvents.PlayerTurnStarted | playerID [number] |
GameEvents.PlotOwnershipChanged | |
GameEvents.PlotPropertyChanged | iX [number] iY [number] |
GameEvents.PolicyChanged | playerID [number] policyID [number] bEnacted [boolean] |
GameEvents.UnitAddedToMap | playerID [number] unitID [number] |