Skip to content
TechpriestEnginseer edited this page Aug 1, 2023 · 32 revisions

A

Return Method (arguments) Description
void AddMessage(string sMessage)
void AddNotificationName(string sNotificationName, string sMessage, string sSummary, int iPlotX, int iPlotY, int iGameDataIndex, int iExtraGameData) Adds a notification to the list.

C

Return Method (arguments) Description
bool CanAdoptIdeology(PolicyBranchType iIdeologyBranch) Always true unless disabled via Lua using the GameEvent PlayerCanAdoptTenet.
bool CanAdoptTenet(PolicyType iTenetPolicy, opt bool bIgnoreCost) Functionally the same as CanAdoptPolicy.
bool CanCreateFranchiseInCity(City pOrigin, City pDestination) Can this player create a franchise at the destination city due to a trade route?
bool CanMajorMarry(PlayerID iMajor) Can the specified player perform a diplomatic marriage with this player?
bool CanRequestCoopWar(PlayerID iAlly, PlayerID iTarget) Can the player request an ally to join a coop war against a target player?
void ChangeContractTurns(ContractType iContract) Method for JFDLC.
void ChangeCityAutomatonWorkersChange(int iChange) Change the change to the number of automaton workers at the player level.
void ChangeCityWorkingChange(int iChange) Change how much change to the city working range the player has.
void ChangeGovernmentCooldown(int iChange) Method for JFDLC.
void ChangeGovernmentCooldownRate(int iChange) Method for JFDLC.
void ChangeInfluenceOnAllPlayers(int iInfluence, opt bool bApplyModifier = true, opt bool bModifyForGameSpeed = false) Changes the cultural influence of the player on every other civilization.
void ChangeInfluenceOnPlayer(int iInfluence, opt bool bApplyModifier = true, opt bool bModifyForGameSpeed = false) Changes the cultural influence of the player on the specified player.
void ChangeOverflowResearch(int iOverflow) Changes the overflow research, which is the leftover science after completing a technology.
void ChangePiety(int iValue) Method for JFDLC.
void ChangePietyRate(int iValue) Method for JFDLC.
void ChangeReformCooldown(int iValue) Method for JFDLC.
void ChangeReformCooldownRate(int iValue) Method for JFDLC.
void ChangeSovereignty(int iValue) Method for JFDLC.
int ChangeUnitSupplyFromExpendedGreatPeople() Changes how much unit supply has been obtained by expending Great People
int CountAllFeature(FeatureType iFeature) Counts the number of plots with the specified feature within the player's territory.
int CountAllImprovement(ImprovementType iImprovement, bool bOnlyCreated) Counts the number of plots with the specified improvement within the player's territory. Can be toggled to count only the improvements created by this player.
int CountAllPlotType(PlotType iPlot) Counts the number of plots with the specified type within the player's territory.
int CountAllResource(ResourceType iResource) Counts the number of plots with the specified resource within the player's territory.
int CountAllTerrain(TerrainType iTerrain) Counts the number of plots with the specified terrain within the player's territory.
int CountAllWorkedFeature(FeatureType iFeature) Counts the number of worked plots with the specified feature within the player's territory.
int CountAllWorkedImprovement(ImprovementType iImprovement) Counts the number of plots with the specified improvement within the player's territory.
int CountAllWorkedPlotType(PlotType iPlot) Counts the number of worked plots with the specified type within the player's territory.
int CountAllWorkedResource(ResourceType iResource) Counts the number of worked plots with the specified resource within the player's territory.
int CountAllWorkedTerrain(TerrainType iTerrain) Counts the number of worked plots with the specified terrain within the player's territory.

D

Return Method (arguments) Description
void DisbandContractUnits(ContractType iContract) Method for JFDLC.
void DismissNotification(int iIndex, bool bUserInvoked)
void DoAdvancedAction(City pCity, int iSpyIndex, AdvancedActionType iAdvancedAction, int iRank, BuildingType iBuilding, UnitType iUnit, SpecialistType iSpecialist) The specified spy performs an advanced action of the specified type, with the effectiveness of the specified rank. The advanced action will target the specified building type, unit type, or great person, if valid.
void DoCancelEventChoice(EventChoiceType iEventChoice) Deactivates the specified event choice.
void DoEventChoice(EventChoiceType iEventChoice) Activates the specified event choice, whether or not the parent event is currently active.
void DoForceDefPact(PlayerID iOtherPlayer)
void DoInstantYield(YieldType iYieldType, int iYield, opt bool bSuppress = false, opt CityID iCity = -1) Grants an instant yield to all of the player's cities. Yield amount scales with game speed, but not with era. Can be toggled to suppress the notification. A city can be specified so that only that city gets the yield.
void DoMarriage(PlayerID iMajor) Performs a diplomatic marriage between the specified civilization and this city state. Game will attempt to subtract the marriage cost from the civilization's treasury.
void DoStartEvent(EventType iEvent) Activates the specified player event without checking for its prerequisites.
void DoSwapGreatWorks(YieldType iFocusYield) Triggers the AI routine to decide what Great Work swapping should take place (including placing Great Works up for swap from another player).
void DoSwapGreatWorksHuman(bool bSwap) Triggers the automatic routine for human players to decide Great Work locations. The argument is for whether to place Great Works up for swap from another player.
void DoUpdatePeaceTreatyWillingness() Recalculates what peace treaties this player is willing to offer and accept. The player must be controlled by the AI.
void DoUpdateWarDamageLevel() Recalculates how much damage this player has taken in wars against every other player.

E

Return Method (arguments) Description
void EndContract(ContractType iContract) Method for JFDLC.
void EspionageCreateSpy()
void EspionagePromoteSpy(int iSpyIndex)
void EspionageSetOutcome(int iSpyIndex, SpyResultType iSpyResult, bool bAffectsDiplomacy) Forces an outcome of an external espionage activity.
void EspionageSetPassive(int iSpyIndex, bool bPassive) Passive spies will not attempt to rig elections or steal technology.

G

Return Method (arguments) Description
table GetActiveCityEventChoices() Returns a Lua table with information about the player's active city event choices. Columns are 'EventChoice', 'Duration', ParentEvent', 'CityX', 'CityY'. Does not include events with only one choice.
table GetActivePlayerEventChoices() Returns a Lua table with information about the player's active player event choices. Columns are 'EventChoice', 'Duration, 'ParentEvent'. Does not include events with only one choice.
int GetArtsyGreatPersonRateModifier() What is the bonus to Great Writer, Artist, and Musician rates (due to active league proposal)?
int GetBaseBuildingMaintenance() Returns the total gold maintenace cost for buildings, before modifiers.
int GetBaseUnitMaintenance() Returns the total cost of maintenance for units, after subtracting units which are maintenance free, but before discounts and the increase in cost due to elapsed turns.
table GetBeliefsInPantheon() Returns all the beliefs in the player's pantheon (can return more than one if the player has an enhanced pantheon). If the player has founded a religion, will return all beliefs from the religion instead.
int GetBuyPlotDistance()
int GetCityAutomatonWorkersChange() What is the change to the number of automaton workers? Includes the player level only.
int GetCityWorkingChange() What is the player level change to the city working range?
int GetCombatBonusVsHigherPop() Returns the combat bonus against civilizations with more population than the player, due to the player's civilization traits.
int GetContractGoldMaintenance() Method for JFDDLC.
int GetContractTurnsRemaining(ContractType iContract) Method for JFDLC.
int GetCurrency() Method for JFDLC.
string GetCurrencyName() Method for JFDLC.
int GetBonusHappinessFromLuxuries() What is the total happiness due to luxuries after applying the population modifier? Includes happiness from global monopolies.
int GetBonusHappinessFromLuxuriesFlat() What is the total happiness due to luxuries before applying the population modifier? Includes happiness from global monopolies.
int GetBonusHappinessFromLuxuriesFlatForUI() What is the total happiness due to luxuries before applying the population modifier divided by the number of owned luxuries? Includes happiness from global monopolies.
UnitClassType GetBullyUnit() What unit class will this city state give to civilizations which bully it for units?
int GetCachedValueOfPeaceWithHuman() What is this AI controlled player willing to give or receive for peace with the active human player?
int GetCapitalUnhappinessModCBP() Returns the unhappiness modifier for capitals.
string GetCityPotentialInfo(City pCity, bool bNoBasic) Returns a string describing the specified city's potential for espionage. The boolean argument toggles whether to provide only a basic description.
CorporationType GetCorporation() Returns the corporation founded by this player.
int GetCorporationFoundedTurn() Returns the turn when the player's current corporation was founded.
int GetCoupCooldown() What is the number of turns before a coup can be staged at this city state again?
string GetCurrentOfficeBenefit() Returns a string describing the current benefits to cities with the player's corporation's office.
string GetDisabledTooltip(EventChoiceType iEventChoice) Returns a string describing the reasons this player event choice is disabled.
int GetDominationResistance(PlayerID iOtherPlayer) What is this player's combat bonus towards the other player due that player's warmongering?
int GetEventChoiceCooldown(EventChoiceType iEventChoice) What is the minimum number of turns before this player have activate the specified event choice again?
int GetEventCooldown(EventType iEvent) What is the minimum number of turns before this player can have the specified event activate again?
int GetExpensePerTurnFromVassalTaxes() What is the amount this player is paying per turn to its master?
int GetExplorePercent(PlayerID iMajor, MinorCivQuestType iMinorCivQuestType) Returns the percent of plots required to be explored by the specified civilization for a city state quest.
int GetExtraYieldWorldWonder(BuildingType iBuilding, YieldType iYield) Checks if the specified building is a world wonder, then checks if the player has a bonus to world wonder yields for the specified yield type, then returns the bonus amount. Returns -1 if the instance is invalid.
int GetFractionOriginalCapitalsUnderControl(opt int iCapitalCount = 0) Divides the argument for the number of original capitals with the total number of civilizations, times 100.
int GetGAPFromCities() Returns the golden age points per turn from cities.
int GetGAPFromReligion() Returns the golden age points per turn due to religion.
int GetGAPFromTraits() Returns the golden age points per turn due to civilizaiton traits.
int GetGreatDiplomatRateModifier() Player level change to the Great Diplomat rate due to Policies.
int GetGoldenAgeGreatDiplomatRateModifier() What is the player's modifier to great diplomat rates during golden ages?
int GetGoldenAgeGreatEngineerRateModifier() What is the player's modifier to great engineer rates during golden ages?
int GetGoldenAgeGreatMerchantRateModifier() What is the player's modifier to great merchant rates during golden ages?
int GetGoldenAgeGreatScientistRateModifier() What is the player's modifier to great scientist rates during golden ages?
int GetGoldenAgeModifier() Returns the player's modifier to the golden age duration. This method was in the unmodded game, however in Commuunity Patch it now includes modifiers due to sources other than buildings and policies as well.
int GetGoldPerTurnFromMinorCivs() Returns the total amount of gold per turn obtained from city states.
int GetGovernment() Method for JFDLC.
int GetGovernmentCooldown() Method for JFDLC.
int GetGovernmentCooldownRate() Method for JFDLC.
int GetHandicapHappiness() What is the starting happiness for the player, adjusted for difficulty settings?
int GetHappinessFromCitizenNeeds() Returns the sum of local happiness from each of the player's cities.
int GetHappinessFromResourceMonopolies() Returns the total happiness from all global monoplies of the player.
int GetHappinessFromVassals()
int GetImprovementBuilderCost(BuildType iBuild) How many builder charges does the specified build cost?
int GetInfluenceTradeRouteGoldBonus(PlayerID iPlayer) Returns the bonus to trade routes to the specified player due to the cultural influence the player has over the other player.
string GetInstantYieldHistoryTooltip(int iNumTurns) Generates a tooltip summarising the total amount of instant yields obtained by this player for the last specified number of turns.
int GetInternalTradeRouteGoldBonus() Returns the total bonus gold due to domestic trade routes. Bonus from policy.
int GetInternationalTradeRouteCorporationModifier(City pOrigin, City pDestination, bool bOrigin) Returns the modifier to the gold yields in the origin city due to a trade route between the two specified cities from a corporations owned by the origin player. If bOrigin is true, returns the modifier for the owner of the origin city, and if false, returns it for the owner of the destination city.
int GetInternationalTradeRouteCorporationModifierScience(City pOrigin, City pDestination, bool bOrigin) Returns the modifier to the science yields in the origin city due to a trade route between the two specified cities from a corporations owned by the origin player. If bOrigin is true, returns the modifier for the owner of the origin city, and if false, returns it for the owner of the destination city.
int GetInternationalTradeRouteCulture(City pOrigin, City pDestination, DomainType iDomain, bool bOrigin) Returns the culture yields from a this player's trade route between the two specified cities. If bOrigin is true, returns the modifier for the owner of the origin city, and if false, returns it for the owner of the destination city.
int GetInternationalTradeRouteFood(City pOrigin, City pDestination, DomainType iDomain, bool bOrigin) Returns the food yields from this player's trade route between the two specified cities. If bOrigin is true, returns the modifier for the owner of the origin city, and if false, returns it for the owner of the destination city.
int GetInternationalTradeRouteProduction(City pOrigin, City pDestination, DomainType iDomain, bool bOrigin) Returns the production yields from this player's trade route between the two specified cities. If bOrigin is true, returns the modifier for the owner of the origin city, and if false, returns it for the owner of the destination city.
int GetJerk() Returns the City State 'forced peace' duration if you attack a City State without provocation
int GetJONSCulturePerTurnFromVassals()
int GetLeagueCultureCityModifier()
string GetLegislatureName() Method for JFDLC.
MajorCivOpinionType GetMajorCivOpinion(PlayerID iOtherPlayer) What is this player's (controlled by AI) opinion towards the other player?
ReligionType GetMajorityReligion() Which religion is the majority in the most number of this player's cities?
int GetMarriageCost(PlayerID iMajor) Returns the gold cost for the specified civilization to perform a diplomatic marriage with this city state.
int GetMaxFranchises() Returns the maximum number of franchises which the corporation founded by the player can have.
int GetMaxStockpile()
int GetMilitaryAirMight() Returns the might of the player's air force.
AggressivePostureType GetMilitaryAggressivePosture(PlayerID iOtherPlayer) How aggressive is the specified AI player posturing its military units in relation to the player?
int GetMilitaryLandMight() Returns the might of the player's army.
int GetMilitarySeaMight() Returns the might of the player's navy.
int GetMinorCivCurrentGoldBonus(PlayerID iMajor) What is the gold per turn the city state is granting to the specified civilization?
int GetMinorCivCurrentScienceBonus(PlayerID iMajor) What is the science per turn the city state is granting to the specified civilization?
int GetMinorCivGoldBonus(City pOrigin, City pDestination, DomainType iDomain, bool bOrigin) Returns the additional gold yields due to city state influence from this player's trade route between the two specified cities. If bOrigin is true, returns the modifier for the owner of the origin city, and if false, returns it for the owner of the destination city.
int GetMonopolyGreatPersonRateModifier(SpecialistType iSpecialist) Does the player get a rate modifier for a specific great person due to having monopolies? Related to the database table Resource_MonopolyGreatPersonModifiers.
int GetMonopolyPercent(ResourceType iResource) Returns the number of copies of the resource type owned by the player, divided by the total number of copies on the map.
int GetMyShareOfVassalTaxes() Returns the gold per turn from vassal taxes, divided by the number of players in the player's team.
bool GetNoUnhappinessExpansion() Checks if the player has no happiness penalties due to having more cities.
int GetNumActivePlayerContracts() Method for JFDLC.
int GetNumberofGlobalFranchises() How many franchises does the corporation founded by this player have?
int GetNumberofOffices() How many offices does the corporation founded by this player have?
int GetNumCitiesWithStateReligion(ReligionType iReligion) Method for JFDLC. How many of the player's cities currently follow the state religion? If a religion is specified in the argument, instead returns the number of cities currently following the specified religion.
int GetNumCitiesWithoutStateReligion(ReligionType iReligion) Method for JFDLC. Returns the number of the player's cities not following the state religion. If a religion is specified in the argument, instead returns the number of the player's cities not following the specified religion.
int GetNumDenouncements() How many players has the current player denounced?
int GetNumDenouncementsofPlayer() How many of the other players have denounced the current player?
string GetNumFranchisesTooltip() Returns a tooltip describing the number of franchises the player's corporation has.
int GetNumInternalTradeRoutes() How many domestic trade routes does this player currently have?
int GetNumInternationalTradeRoutes() How many international trade routes does this player currently have?
int GetNumMilitaryAirUnits()
int GetNumMilitaryLandUnits()
int GetNumMilitarySeaUnits()
int GetNumNationalWonders() How many national wonders does this player currently have?
int GetNumPoliciesPurchasedInBranch(PolicyBranchType iPolicyBranch) How many policies of a policy branch type does this player have?
int GetNumPuppetCities() How many puppeted cities does this player own?
int GetNumTurnsBorderPromise(PlayerID iOtherPlayer) Returns the number of turns left before the other player's promise to stop buying tiles near this player's borders expires.
int GetNumTurnsExpansionPromise(PlayerID iOtherPlayer) Returns the number of turns left before the other player's promise to stop expanding near this player expires.
int GetNumTurnsMilitaryPromise(PlayerID iOtherPlayer) Returns the number of turns left before the other player's promise to move troops from this player's borders expires.
int GetNumUnitsOfType(UnitType iUnitType, opt bool bIncludeBeingTrained = false) Calculates the number of units of a certain type for the player. Set bIncludeBeingTrained to include units being trained in cities.
int GetNumUnitPromotions(PromotionType iPromotion) How many of the player's units have the specified promotion?
int GetNumWonders() How many world wonders does this player currently have?
Plot GetOriginalCapitalPlot() Gets the plot of the player's original capital.
PlayerID GetPermanentAlly() Who is the permanent ally of this city state (due to a sphere of influence), if any?
int GetPiety() Method for JFDLC.
int GetPietyRate() Method for JFDLC.
StrengthType GetPlayerEconomicStrengthComparedToUs(PlayerID iPlayer) What is this player's assessment of the other player's economic strength?
StrengthType GetPlayerMilitaryStrengthComparedToUs(PlayerID iPlayer) What is this player's assessment of the other player's military strength?
int GetPlayerMoveTroopsRequestCounter(PlayerType iOtherPlayer) The number of turns remaining before the other player's request to move troops from its borders expires.
string GetPledgeProtectionInvalidReason(PlayerID iMajor) Returns a tooltip describing the reasons the specified civilization cannot pledge to protect this city state.
int GetPolicyConversionModifier(PolicyType iPolicyType) The religious conversion modifier due to the specified Policy.
int GetPolicyGreatDiplomatRateModifier() What is the bonus to Great Diplomat rates due to policies?
int GetPoliticLeader() Method for JFDLC.
string GetPoliticLeaderKey() Method for JFDLC.
int GetPoliticPercent(int iFaction) Method for JFDLC.
table GetPotentialInternationalTradeRouteDestinationsFrom(Unit pUnit, City pCity) Returns a table with all potential international trade route destinations the player can make from the specified city, with the specified unit being the trade unit.
table GetPotentialInternationalTradeRouteDestinationsHelper(Player pPlayer, Unit pUnit, Plot pPlot) Returns a table with all potential trade route destinations the specified player can make from the specified plot, with the specified unit being the trade unit.
int GetProsperityScore() Method for JFDLC.
int GetPuppetUnhappinessMod() Returns the player's modifier to puppet unhappiness.
void GetRandomIntrigue(City pCity, int iSpy) Triggers the game to check if a spy should uncover any intrigue, then passes it to the player.
table GetRecentCityEventChoices() Returns a Lua table with information about the player's active city event choices. Columns are 'EventChoice', 'Duration, 'ParentEvent'. Includes events with only one choice.
table GetRecentPlayerEventChoices() Returns a Lua table with information about the player's active player event choices. Columns are 'EventChoice', 'Duration, 'ParentEvent'. Includes events with only one choice.
int GetReformCooldown() Method for JFDLC.
int GetReformCooldownRate() Method for JFDLC.
int GetResourcesMisc(ResourceType iResource) Returns the number of copies of the specified resource the player is getting from other sources. Other sources include everything except for resources from improved tiles, buildings (except due to number of corporation franchises), and imports.
bool GetResourceMonopolyPlayer(ResourceType iResource) Checks if the player has a global monopoly of the specified resource type. Deprecated, use HasGlobalMonopoly.
string GetRewardString(PlayerID iMajor, MinorCivQuestType iMinorCivQuestType) iMinorCivQuestType) Returns a string for the reward to the specified player when completing the specified quest type for the city state.
string GetScaledEventChoiceValue(EventChoiceType iEventChoice, bool bYieldsOnly) Generates a tooltip describing the yields from this event choice, after scaling with era. Can be toggled to display only the yields without any additional text.
int GetScalingNationalPopulationRequrired(BuildingType iBuilding) Returns the total national population required to contruct the building, after scaling with the number of cities the player owns. There is typo in the method name.
int GetScienceFromVassalTimes100()
int GetSciencePerTurnFromMinorCivs() Returns the total amount of science per turn obtained from city states.
int GetScienceRateFromLeagueAid()
int GetScienceRateFromMinorAllies()
int GetScienceyGreatPersonRateModifier() What is the bonus to Great Scientist, Engineer, and Merchant rates (due to active league proposal)?
int GetScoreFromMilitarySize() Returns this player's score from its military size. The more cities the player has, the larger the required military size to achieve the same score.
int GetScoreFromMinorAllies() Returns this player's score from city state alliances (not friendships).
int GetScoreFromVassals()
int GetSovereignty() Method for JFDLC.
int GetSpecificBuildingType(string sBuildingClass) Given a building class, get the player's specific building of that class.
int GetSpecificUnitType(string sUnitClass) Given a unit class, get the player's specific unit of that class.
string GetSpyChanceAtCity(City pCity, int iSpyIndex, bool bNoBasic) Returns a string describing the specified spy at the specified city chance of succeeding. The boolean argument toggles whether to give only a basic description.
int GetStateReligion() Method for JFDLC. What is this player's current state religion?
string GetTargetCityString(PlayerID iMajor, MinorCivQuestType iMinorCivQuestType) iMinorCivQuestType) Returns the string for the city name of the specified quest's target.
int GetTechDeviation() Returns the modifier to happiness needs due to the number of technologies researched.
int GetTechsToFreePolicy() How many more technologies does the player need to research before getting a free policy due to a civilization trait which grants free policies per number of technology.
int GetTechSupplyReduction() Returns the loss in supply due to the number of technologies researched by the player.
int GetTotalValueToMe(Deal pDeal) What is the value of the specified deal to this AI controlled player?
int GetTotalValueToMeNormal(Deal pDeal) What is the value of the specified deal to this AI controlled player? If trade between this player and the current active player is sanctioned, returns -99999.
int GetTourismPenalty() Returns the penalty to tourism due to the number of non-puppet cities owned.
int GetTradeConnectionDistance(City pOrigin, City pDestination, DomainType iDomain) Returns the distance of the trade route owned by this player between the two specified cities.
int GetTradeConnectionDistanceValueModifierTimes100(City pOrigin, City pDestination, DomainType iDomain) Returns the modifier to the trade yields of the trade route owned by this player between the two specified cities, due to the distance.
int GetTradeConnectionOpenBordersModifierTimes100(City pOrigin, City pDestination, bool bOrigin) Returns the modifier to the trade yields of a trade route between the two specified cities due to open borders. If bOrigin is true, returns the modifier for the owner of the origin city, and if false, returns it for the owner of the destination city.
string GetTradeRouteBenefitHelper() Returns a string describing the benefits to the player's trade routes due to having the player's corporation.
int GetTradeRouteTurns(City pOrigin, City pDestination, DomainType iDomain) Returns the number of turns left of the trade route owned by this player between the two specified cities.
int GetTraitConquestOfTheWorldCityAttackMod(Plot pPlot) Returns the attack mod due to the 'Conquest of the World' trait. Deprecated.
int GetTreatyWillingToOffer(PlayerID iOtherPlayer) How much is the current player (controlled by AI) willing to give up in a peace treaty?
int GetTurnsSinceConversion() Method for JFDLC.
int GetUnhappinessFromCitizenNeeds() Returns the sum of unhappiness due to needs from all of the player's cities.
int GetUnhappinessFromCityCulture() Returns the sum of unhappiness due to culture needs from all of the player's cities.
int GetUnhappinessFromCityConnection() Returns the sum of unhappiness due to lack of connection to the capital from all of the player's cities.
int GetUnhappinessFromCityDefense() Returns the sum of unhappiness due to defense needs from all of the player's cities.
int GetUnhappinessFromCityGold() Returns the sum of unhappiness due to gold needs from all of the player's cities.
int GetUnhappinessFromJFDSpecial() Method for JFDLC. Returns the sum of unhappiness due to various reasons in JFDLC from all of the player's cities.
int GetUnhappinessFromCityMinority() Returns the sum of unhappiness due religious conflict from all of the player's cities.
int GetUnhappinessFromCityPillaged() Returns the sum of unhappiness due to pillaged tiles from all of the player's cities.
int GetUnhappinessFromCityScience() Returns the sum of unhappiness due to science needs from all of the player's cities.
int GetUnhappinessFromCityStarving() Returns the sum of unhappiness due starvation from all of the player's cities.
int GetUnhappinessFromWarWeariness() What is the total unhappiness due to war weariness?
int GetUnitSupplyFromExpendedGreatPeople() How much unit supply has been obtained by expending Great People?
int GetVassalDemandScore(PlayerID iMaster) Returns the opinion weight of this player towards the specified player due to demands made by the master.
int GetVassalFailedProtectScore(PlayerID iMaster) Returns the opinion weight of this player towards the specified player due to failure of protection by the master.
int GetVassalGoldMaintenance()
string GetVassalIndependenceTooltipAsMaster(PlayerID iVassal) Returns a tooltip describing whether the specified player can declare independence from this player.
string GetVassalIndependenceTooltipAsVassal() Returns a tooltip describing whether the player can declare independence from its master.
int GetVassalProtectScore(PlayerID iMaster) Returns the opinion weight of this player towards the specified player due to protection by the master.
int GetVassalScore(PlayerID iMaster) Returns the opinion weight of this player towards the specified player due to being a vassal (before other modifiers). Depends on whether it is voluntary or not.
int GetVassalTaxContribution(PlayerID iVassal) How much gold per turn is the specified player paying as vassal tax, divided by the number of players in the player's team?
int GetVassalTaxScore(PlayerID iMaster) Returns the opinion weight of this player towards the specified player due to taxes set by the master.
int GetVassalTreatedScore(PlayerID iMaster) Returns the opinion weight of this player towards the specified player due to its treatment as a vassal. Combination of demands made, taxes, protection by master, trade routes, and religion.
VassalTreatmentType GetVassalTreatmentLevel(PlayerID iMaster) Returns how this player thinks the specified player has treated it as its master.
string GetVassalTreatmentToolTip(PlayerID iMaster) Returns a tooltip describing how the player thinks the specified player has treated it as its master.
WarDamageLevelType GetWarDamageLevel(PlayerID iPlayer) How much damage has this player taken in a war against a specific player?
int GetWarScore(PlayerID iPlayer) What is the player's war score on the specified player?
int GetWarWeariness() Returns the player's current war weariness, which is a value between 0 to 75.
int GetWarWearinessSupplyReduction() Returns the amount of supply lost due to war weariness.
string GetWLTKDResourceTT() Builds and returns a tooltip describing all resources currently demanded by cities, in which granting them causes the city to start a 'We Love The King Day' celebration.
int GetWorkPlotDistance() Returns the plot working range player's cities.
int GetWoundedUnitDamageMod() Returns the player's modifier to the combat penalty due to being wounded.
int GetXQuestBuildingRemaining(PlayerID iMajor, MinorCivQuestType iMinorCivQuestType) iMinorCivQuestType, BuildingType iBuilding) Returns number of buildings remaining that the civilization needs to build for the city state quest.
int GetYieldPerTurnFromMinors(YieldType iYield) Returns the amount of the specified yields per turn the player gets due to city state friendships and alliances.
int GetYieldPerTurnFromReligion(YieldType iYield) What is the amount of the specified yield per turn due to religion?
int GetYieldPerTurnFromVassals(YieldType iYield) Returns the amount of the specified yields per turn the player gets due to vassals.
bool GrantPolicy(PolicyType iPolicy, opt bool bFree = false) Grants the specified policy to the player. Can be toggled to be free, so that the policy cost of the player does not increase. Returns true if successful.
int GetYieldTheftAmount(PlayerID iMajor, YieldType iYield) Returns the amount of the specified yield obtained when the specified player bullies this city state.

H

Return Method (arguments) Description
bool HasAnyDomesticTradeRoute()
bool HasAnyHolyCity()
bool HasAnyInternationalTradeRoute()
bool HasAnyNaturalWonder()
bool HasAnyReligion()
bool HasAnyTradeRoute()
bool HasAnyTradeRouteWith(PlayerID iPlayer)
bool HasAnyWonder()
bool HasBuilding(BuildingType iBuildingType)
bool HasBuildingClass(BuildingClassType iBuildingClassType)
bool HasBelief(BeliefType iBeliefType)
bool HasCapturedHolyCity(ReligionType iReligionType)
bool HasCurrency() Method for JFDLC.
bool HasEmbassyWith(PlayerID iOtherPlayer) Does this player has an embassy at the other player's capital?
bool HasEnhancedReligion() Is the player's majority religion enhanced?
bool HasGlobalMonopoly(ResourceType iResource) Checks if the player has a global monopoly of the specified resource type.
bool HasGovernment() Method for JFDLC.
bool HasHolyCity(ReligionType iReligionType)
bool HasIdeology(PolicyBranchType iPolicyBranchType) Functionally the same as HasPolicyBranch.
bool HasNaturalWonder(FeatureType iFeatureType)
bool HasPantheon()
bool HasPolicyBranch(PolicyBranchType iPolicyBranchType)
bool HasProject(ProjectType iProjectType)
bool HasReachedEra(EraType iEraType)
bool HasReligion(ReligionType iReligionType) Is the specified religion the player's majority religion?
bool HasSecularized() Method for JFDLC.
bool HasSpecialist(SpecialistType iSpecialistType)
bool HasSpecialistSlot(SpecialistType iSpecialistType)
bool HasStateReligion() Method for JFDLC.
bool HasStrategicMonopoly(ResourceType iResource) Checks if the player has a strategic monopoly of the specified resource type. Note that only strategic resources are valid for strategic monopolies.
bool HasTech(TechType iTechType)
bool HasTenet(PolicyType iPolicyType) Functionally the same as HasPolicy.
bool HasTrait(TraitType iTraitType)
bool HasUnit(UnitType iUnitType)
bool HasUnitClass(UnitClassType iUnitClassType)
bool HasWonder(BuildingType iBuildingType) Functionally the same as HasBuilding.

I

Return Method (arguments) Description
void InitContractUnits(ContractType iContract) Method for JFDLC.
void InitNamedUnit(UnitType iUnitType, string sName, int iPlotX, int iPlotY, opt UnitAIType iUnitAI = NO_UNITAI, DirectionType iDirection = NO_DIRECTION) Similar to InitUnit, except a name can be specified. If the name and unit type exactly matches an entry in Unit_UniqueNames, and a unit with the name hasn't been created yet, the game will consider that as a great person name which has already been used. The game will also set the appropriate great work, if applicable.
bool IsActHostileTowardsHuman(PlayerID iPlayer)
bool IsAnnexedCityStatesGiveYields()
bool IsAtPeace() Excludes Barbarians.
bool IsAtPeaceAllMajors()
bool IsAtPeaceAllMinors() Excludes Barbarians.
bool IsAtPeaceWith(PlayerID iPlayer)
bool IsAtWar() Excludes Barbarians.
bool IsAtWarAnyMajor()
bool IsAtWarAnyMinor() Excludes Barbarians.
bool IsAtWarWith(PlayerID iPlayer)
bool IsBullyAnnex() Does this player have the trait to annex city states when demanding heavy tribute from them?
bool IsCarnaval() Does this player a trait which triggers 'We Love The King Day' at all cities at the start of a golden age? Note the spelling 'Carnaval' instead of 'Carnival'.
bool IsCityNameValid(string sName, opt bool bTestDestroyed) Name is valid if no other city on the map has the exact same name. Set bTestDestroyed to true to include destroyed cities as well.
bool IsCivilization(CivilizationType iCivilizationType)
bool IsConnectedTo(PlayerID iPlayer) Is the player's capital connected to the specified player's capital via road, rail, or sea?
bool IsConnectedToPlayer(PlayerID iPlayer) Is the player connected to the specified player via trade routes?
bool IsConnectionBonus() Does this player have a bonus to yields in the capital per trade route partner?
bool IsDenounceMessageTooSoon(PlayerID iPlayer) Is it too soon for this player to be denounced by the other player?
bool IsDiplomaticMarriage() Is this player able to perform diplomatic marriages with city states?
bool IsEventChoiceActive(EventChoiceType iEventChoice, opt bool bInstantEvents = false) Is the specified player event choice active? Instant events are events with only one choice.
bool IsEventChoiceValid(EventChoiceType iEventChoice, EventType iEvent) Checks if both the specified event choice, and the specified parent event are valid. The specified event must be a parent of the event choice, otherwise will always return false.
bool IsGPWLTKD() When great persons are born or when great works are created, does this player have a trait which then triggers a 'We Love The King Day'?
bool IsHasDefensivePact(PlayerID iOtherPlayer) Checks if the player has a defensive pact with any player except the player specified in the argument.
bool IsHasDefensivePactWithPlayer(PlayerID iOtherPlayer) Does this player have a defensive pact with the specified player?
bool IsInEra(EraType iEraType)
bool IsMajorCiv() Is this player a major civilization?
bool IsMarried(PlayerID iMajor) Is this city state diplomatically married to the specified civilization?
bool IsNoAlly() Is this city state currently under an open doors resolution?
bool IsPagan() Method for JFDLC.
bool IsPlotConnectedToPlot(Plot pFromPlot, Plot pToPlot, opt bool bAllowHarbors = false, opt bool bAssumeOpenBorders = false) Checks if the two plots are connected by road, rail, or sea (if harbors are allowed), by default does not allow harbors and must have open borders to connect.
bool IsProphetValid() Checks if the Great Prophet a valid choice for the Maya's free great person.
bool IsShowImports() Does the game include some form of imports when considering monopolies for the player?
bool IsTraitAnyBelief() Does the player's civilization have a trait that allows it to pick beliefs, even if they are already in another religion?
bool IsVassalageAcceptable(PlayerID iOtherPlayer) Does the current player want to become the other player's voluntary vassal? If the current player is human, this will always return false.
bool IsWillingToMakePeaceWithHuman(PlayerID iOtherPlayer) Is the current player (controlled by AI) willing to make peace with the other player? Contrary with method name, the player in the argument does not have to be human.

M

Return Method (arguments) Description
bool MoveRequestTooSoon(PlayerID iOtherPlayer) Is it too soon for the current player to ask the other player to move its troops from the current player's borders?

P

Return Method (arguments) Description
bool PlayerHasAnyContract() Method for JFDLC.
bool PlayerHasContract(ContractType iContract) Method for JFDLC.

Q

Return Method (arguments) Description
int QuestSpyActionsRemaining(PlayerID iMajor, MinorCivQuestType iMinorCivQuestType) iMinorCivQuestType, PlayerID iTarget) Returns the number of spy actions on the target remaining for the civilization for the city state quest.

R

Return Method (arguments) Description
bool RevokePolicy(PolicyType iPolicy) The player will no longer have the specified policy. Returns true if successful.

S

Return Method (arguments) Description
void SetBullyUnit(UnitClassType iUnitClass) Sets the unit class granted to civilizations when the civilization bullies the city state for units.
void SetCapitalCity(City pCity) Sets the specified city to be the player's capital.
void SetCurrency(int iValue) Method for JFDLC.
void SetCurrencyName(string sValue) Method for JFDLC.
void SetEventChoiceCooldown(EventType iEvent, int iValue) Sets the minimum number of turns before the player can activate the specified event choice.
void SetEventCooldown(EventType iEvent, int iValue) Sets the minimum number of turns before the specified event can activate for the player.
void SetGovernment(int iValue) Method for JFDLC.
void SetGovernmentCooldown(int iValue) Method for JFDLC.
void SetGovernmentCooldownRate(int iValue) Method for JFDLC.
void SetHasSecularized(bool bValue) Method for JFDLC.
void SetLeaderType(LeaderType iLeader) Changes the leader of this civilization. Note that traits are tied to the leader.
void SetLegislatureName(string sValue) Method for JFDLC.
void SetOriginalCapitalXY(City pCity) Sets the location of the specified city to be the location of the player's original capital.
void SetOverflowResearch(int iOverflow) Sets the overflow research, which is the leftover science after completing a technology.
void SetPersonality(MinorCivPersonalityType iPersonality) Set the city state player's personality.
void SetPiety(int iValue) Method for JFDLC.
void SetPietyRate(int iValue) Method for JFDLC.
void SetPoliticLeader(int iValue) Method for JFDLC.
void SetPoliticLeaderKey(string sValue) Method for JFDLC.
void SetPoliticPercent(int iFaction, int iValue) Method for JFDLC.
void SetProsperityScore(int iValue) Method for JFDLC.
void SetReformCooldown(int iValue) Method for JFDLC.
void SetReformCooldownRate(int iValue) Method for JFDLC.
void SetSovereignty(int iValue) Method for JFDLC.
void SetTurnsSinceConversion(int iValue) Method for JFDLC.
void SetWarWeariness(int iValue) Sets the war weariness for the player. Should be a number between 0 and 75.
void SetYieldPerTurnFromMinors(YieldType iYield, int iValue) Sets the amount of the specified yields per turn the player gets due to city state friendships and alliances.
void StartContract(ContractType iContract) Method for JFDLC.
bool SwapPolicy(PolicyType iOldPolicy, PolicyType iNewPolicy) Swaps a player's specified policy for another. Carries over the free policy status. Returns true if successful.

U

Return Method (arguments) Description
bool UnitIsActiveContractUnit(UnitType iUnitType) Method for JFDLC.

V

Return Method (arguments) Description
bool ValidHeistLocation(int iSpyIndex, City pCity) Is the specified city a valid location for the specified spy to move into as a thief?