AssignStartingPlots.DivideIntoRegions (Civ5 API)

From Civilization Modding Wiki
Jump to navigationJump to search

This page is a part of the Lua and UI Reference (Civ5).


Function.png This function is a member of AssignStartingPlots.

This is an instance method, invoke it with a colon.


Usage

void AssignStartingPlots:DivideIntoRegions(int numDivisions, unknown fertility_table, table rectangle_data_table)


Parameters

numDivisions: No description available.
fertility_table: No description available.
rectangle_data_table: No description available.


Source code samples

Too many occurences. Only 50 out of 47 are listed.

AssignStartingPlots.lua (G&K)

DLC/Expansion/Gameplay/Lua/AssignStartingPlots.lua
1181
self:DivideIntoRegions(firstSubdivisions, first_section_fertility_table, first_section_data_table)
1182
self:DivideIntoRegions(laterSubdivisions, second_section_fertility_table, second_section_data_table)
1184
else
1193
self:DivideIntoRegions(iSubdivisions, first_section_fertility_table, first_section_data_table)
1194
self:DivideIntoRegions(iSubdivisions, second_section_fertility_table, second_section_data_table)
1196
elseif (iNumDivides == 3) then
1207
self:DivideIntoRegions(iSubdivisions, second_section_fertility_table, second_section_data_table)
1208
self:DivideIntoRegions(iSubdivisions, third_section_fertility_table, third_section_data_table)
1210
else
1504
self:DivideIntoRegions(self.iNumCivs, fert_table, rect_table)
1505
-- The regions have been defined.
1507
elseif self.method == 3 or self.method == 4 then -- Rectangular
1525
self:DivideIntoRegions(self.iNumCivs, fert_table, rect_table)
1526
-- The regions have been defined.
1528
else -- Continental.
1735
self:DivideIntoRegions(iNumCivsOnThisLandmass, fert_table, rect_table)
1736
else


Europe.lua (G&K)

DLC/Expansion/Maps/Europe.lua
0865
self:DivideIntoRegions(1, fert_table, rect_table)
0866
iNumCivsRemaining = iNumCivsRemaining - 1;
0887
self:DivideIntoRegions(iNumCivsRemaining, fert_table, rect_table)
0888
end


Europe_Scenario.lua (G&K)

DLC/Expansion/Scenarios/MedievalScenario/Europe_Scenario.lua
0956
self:DivideIntoRegions(iSubdivisions, second_section_fertility_table, second_section_data_table)
0957
end
0997
self:DivideIntoRegions(1, fert_table, rect_table)
0998
--print("- Morocco and Tunisia defined as Region 3.");
1000
-- Egypt and Judea.
1001
self.inhabited_WestX = 56;
1009
self:DivideIntoRegions(1, fert_table, rect_table)
1010
--print("- Egypt and Judea defined as Region 4.");
1012
-- Turkey.
1013
self.inhabited_WestX = 60;
1021
self:DivideIntoRegions(1, fert_table, rect_table)
1022
--print("- Turkey defined as Region 5.");
1024
-- Balkans.
1025
self.inhabited_WestX = 42;
1033
self:DivideIntoRegions(1, fert_table, rect_table)
1034
--print("- Balkans defined as Region 6.");
1036
-- Spain.
1037
self.inhabited_WestX = 6;
1045
self:DivideIntoRegions(1, fert_table, rect_table)
1046
--print("- Spain defined as Region 7.");
1049
self.inhabited_WestX = 6;
1057
self:DivideIntoRegions(1, fert_table, rect_table)
1058
--print("- France defined as Region 8.");
1060
-- Netherlands.
1061
self.inhabited_WestX = 19;
1069
self:DivideIntoRegions(1, fert_table, rect_table)
1070
--print("- Netherlands defined as Region 9.");
1072
-- Central Europe.
1073
self.inhabited_WestX = 35;
1081
self:DivideIntoRegions(1, fert_table, rect_table)
1082
--print("- Central Europe defined as Region 10.");
1084
-- Scandinavia.
1085
self.inhabited_WestX = 23;
1093
self:DivideIntoRegions(1, fert_table, rect_table)
1094
--print("- Scandinavia defined as Region 11.");
1096
-- Russia.
1097
self.inhabited_WestX = 51;
1105
self:DivideIntoRegions(1, fert_table, rect_table)
1106
--print("- Russia defined as Region 12.");
1108
end


Hemispheres.lua (G&K)

DLC/Expansion/Maps/Hemispheres.lua
0967
self:DivideIntoRegions(iNumCivsInWest, fert_table, rect_table)
0969
-- Process the team in the east.
0970
self.inhabited_WestX = math.floor(iW / 2) + 1;
0982
self:DivideIntoRegions(iNumCivsInEast, fert_table, rect_table)
0983
-- The regions have been defined.
0985
-- If number of teams is any number other than two, use standard division.
0986
else


North_vs_South.lua

Maps/North_vs_South.lua
0518
self:DivideIntoRegions(iNumCivsInSouth, fert_table, rect_table)
0520
-- Process the team in the north.
0521
self.inhabited_WestX = 0;
0533
self:DivideIntoRegions(iNumCivsInNorth, fert_table, rect_table)
0534
-- The regions have been defined.
0536
-- If number of teams is any number other than two, use standard One Landmass division.
0537
else
0560
self:DivideIntoRegions(self.iNumCivs, fert_table, rect_table)
0561
-- The regions have been defined.
0562
end


West_vs_East.lua

Maps/West_vs_East.lua
0355
self:DivideIntoRegions(iNumCivsInEast, fert_table, rect_table)
0356
-- The regions have been defined.
0358
-- If number of teams is any number other than two, use standard One Landmass division.
0359
else



The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.