<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://modiki.civfanatics.com/index.php?action=history&amp;feed=atom&amp;title=Player.GetNumCities_%28Civ5_API%29</id>
	<title>Player.GetNumCities (Civ5 API) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://modiki.civfanatics.com/index.php?action=history&amp;feed=atom&amp;title=Player.GetNumCities_%28Civ5_API%29"/>
	<link rel="alternate" type="text/html" href="https://modiki.civfanatics.com/index.php?title=Player.GetNumCities_(Civ5_API)&amp;action=history"/>
	<updated>2026-04-10T08:35:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://modiki.civfanatics.com/index.php?title=Player.GetNumCities_(Civ5_API)&amp;diff=11948&amp;oldid=prev</id>
		<title>DonQuich: Bot update</title>
		<link rel="alternate" type="text/html" href="https://modiki.civfanatics.com/index.php?title=Player.GetNumCities_(Civ5_API)&amp;diff=11948&amp;oldid=prev"/>
		<updated>2012-09-20T08:22:37Z</updated>

		<summary type="html">&lt;p&gt;Bot update&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Civ5 API Beta Banner}}&lt;br /&gt;
&amp;#039;&amp;#039;This page is a part of the [[Lua and UI Reference (Civ5)]].&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TypeInfos5|Function.png|This function is a member of {{Type5|Player}}.&amp;lt;br/&amp;gt;&lt;br /&gt;
This is an instance method, invoke it with a colon.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;#039;int&amp;#039;&amp;#039;&amp;#039; Player:GetNumCities&amp;lt;b&amp;gt;(&amp;lt;/b&amp;gt;&amp;lt;b&amp;gt;)&amp;lt;/b&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Returned Value&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:No description available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Source code samples=&lt;br /&gt;
&amp;#039;&amp;#039;Redundant occurences have been removed.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|CityBannerManager.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/CityBannerManager.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|1247}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;for cityIndex = 0, player:GetNumCities() - 1, 1&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|CityView.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/CityView/CityView.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0709}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (pPlayer:GetNumCities() &amp;lt;= 1) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|CivsAlive.lua - DLC_01 DLC}}&lt;br /&gt;
:&amp;lt;code&amp;gt;DLC/DLC_01/Scenarios/Mongol Scenario/CivsAlive.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0073}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (Players[playerID]:GetNumCities() == 0) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|HappinessInfo.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/Popups/HappinessInfo.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0190}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local iExtraHappinessPerCity = pPlayer:GetExtraHappinessPerCity() * pPlayer:GetNumCities();&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|0405}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local iNumNormalCities = pPlayer:GetNumCities() - iNumOccupiedCities;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|0587}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if( pPlayer:GetNumCities() &amp;gt; 0 ) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|InGame.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/InGame.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0811}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (UI.CanSelectionListFound() and player:GetNumCities() &amp;gt; 0) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|SocialPolicyPopup.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/Popups/SocialPolicyPopup.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0223}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local playerHas1City = player:GetNumCities() &amp;gt; 0;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|TopPanel.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/TopPanel.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0013}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (pPlayer:GetNumCities() &amp;gt; 0) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|TurnsRemaining.lua (G&amp;amp;K)}}&lt;br /&gt;
:&amp;lt;code&amp;gt;DLC/Expansion/Scenarios/MedievalScenario/TurnsRemaining.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0315}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;for cityIndex = 0, pPlayer:GetNumCities() - 1, 1 do&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|1123}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (pPlayer:IsAlive() and pPlayer:GetNumCities() == 0) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|TurnsRemaining.lua (G&amp;amp;K)}}&lt;br /&gt;
:&amp;lt;code&amp;gt;DLC/Expansion/Scenarios/SteampunkScenario/TurnsRemaining.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0516}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (not pPlayer:IsMinorCiv() and pPlayer:GetNumCities() == 1) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|TutorialChecks.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;Tutorial/TutorialChecks.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0305}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (player:GetNumCities() &amp;gt; 1) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|0512}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (player:GetNumMilitaryUnits() &amp;lt;= player:GetNumCities()) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|0625}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (player:GetNumCities() == 0) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|1304}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (player:GetNumCities() &amp;gt; 3) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|1322}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (iNumWorkers &amp;gt; player:GetNumCities()) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|1596}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (player:GetNumCities() &amp;lt;= 0) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|3316}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (player:GetNumCities() &amp;gt; 0) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Civ5 API Footer}}&lt;br /&gt;
[[Category:Civ5 Methods and Functions|GetNumCities]]&lt;br /&gt;
[[Category:Civ5 Cities API|GetNumCities]]&lt;/div&gt;</summary>
		<author><name>DonQuich</name></author>
	</entry>
</feed>