braveheart1
Chieftain
- Joined
- Jul 19, 2015
- Messages
- 16
I HAVE A DOUBT. but if I put the small map size does not change anything right?
<?xml version="1.0" encoding="utf-8"?>
<GameData>
<!-- ++++++++++++++++++++++++++++++ -->
<!-- Earth Giant map start position -->
<!-- ++++++++++++++++++++++++++++++ -->
<GiantEarth_StartPosition>
<Row>
<Civilization>CIVILIZATION_AMERICA</Civilization>
<X>155</X>
<Y>64</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_ARABIA</Civilization>
<X>42</X>
<Y>41</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_AZTEC</Civilization>
<X>139</X>
<Y>50</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_BRAZIL</Civilization>
<X>164</X>
<Y>20</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_CHINA</Civilization>
<X>82</X>
<Y>60</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_EGYPT</Civilization>
<X>30</X>
<Y>46</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_ENGLAND</Civilization>
<X>11</X>
<Y>72</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_FRANCE</Civilization>
<X>13</X>
<Y>65</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_GERMANY</Civilization>
<X>22</X>
<Y>69</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_GREECE</Civilization>
<X>28</X>
<Y>57</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_INDIA</Civilization>
<X>61</X>
<Y>52</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_JAPAN</Civilization>
<X>97</X>
<Y>59</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_KONGO</Civilization>
<X>23</X>
<Y>27</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_NORWAY</Civilization>
<X>20</X>
<Y>80</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_ROME</Civilization>
<X>21</X>
<Y>58</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_RUSSIA</Civilization>
<X>34</X>
<Y>73</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_SCYTHIA</Civilization>
<X>50</X>
<Y>62</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_SPAIN</Civilization>
<X>8</X>
<Y>57</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_SUMERIA</Civilization>
<X>46</X>
<Y>47</Y>
</Row
<Replace>
<Civilization>CIVILIZATION_PORTUGAL</Civilization>
<X>5</X>
<Y>55</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_VENICE</Civilization>
<X>21</X>
<Y>62</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_POLAND</Civilization>
<X>28</X>
<Y>69</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_BRAZIL</Civilization>
<X>168</X>
<Y>24</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_ASSYRIA</Civilization>
<X>42</X>
<Y>54</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_INDONESIA</Civilization>
<X>80</X>
<Y>26</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_MOROCCO</Civilization>
<X>6</X>
<Y>50</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_ZULU</Civilization>
<X>32</X>
<Y>9</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_SHOSHONE</Civilization>
<X>136</X>
<Y>71</Y>
</Replace>
<!-- City States -->
<Row>
<Civilization>CIVILIZATION_AMSTERDAM</Civilization>
<X>17</X>
<Y>72</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_BRUSSELS</Civilization>
<X>14</X>
<Y>69</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_BUENOS_AIRES</Civilization>
<X>161</X>
<Y>16</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_CARTHAGE</Civilization>
<X>18</X>
<Y>52</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_GENEVA</Civilization>
<X>18</X>
<Y>64</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_HATTUSA</Civilization>
<X>38</X>
<Y>58</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_HONG_KONG</Civilization>
<X>82</X>
<Y>48</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_JAKARTA</Civilization>
<X>80</X>
<Y>26</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_JERUSALEM</Civilization>
<X>36</X>
<Y>51</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_KABUL</Civilization>
<X>54</X>
<Y>56</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_KANDY</Civilization>
<X>62</X>
<Y>33</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_KUMASI</Civilization>
<X>14</X>
<Y>34</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_LA_VENTA</Civilization>
<X>143</X>
<Y>47</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_LISBON</Civilization>
<X>4</X>
<Y>55</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_MOHENJO_DARO</Civilization>
<X>53</X>
<Y>50</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_NAN_MADOL</Civilization>
<X>105</X>
<Y>31</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_PRESLAV</Civilization>
<X>31</X>
<Y>62</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_SEOUL</Civilization>
<X>89</X>
<Y>62</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_STOCKHOLM</Civilization>
<X>24</X>
<Y>79</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_TORONTO</Civilization>
<X>153</X>
<Y>69</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_VALLETTA</Civilization>
<X>22</X>
<Y>51</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_VILNIUS</Civilization>
<X>26</X>
<Y>74</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_YEREVAN</Civilization>
<X>43</X>
<Y>59</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_ZANZIBAR</Civilization>
<X>33</X>
<Y>27</Y>
</Row>
</GiantEarth_StartPosition>
<!-- +++++++++++++++++++++++++++++++++++ -->
<!-- "Greatest Earth Map" start position -->
<!-- +++++++++++++++++++++++++++++++++++ -->
<GreatestEarthMap_StartPosition>
<Row>
<Civilization>CIVILIZATION_AMERICA</Civilization>
<X>19</X>
<Y>47</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_ARABIA</Civilization>
<X>64</X>
<Y>33</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_AZTEC</Civilization>
<X>11</X>
<Y>34</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_CHINA</Civilization>
<X>87</X>
<Y>54</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_EGYPT</Civilization>
<X>58</X>
<Y>33</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_ENGLAND</Civilization>
<X>40</X>
<Y>52</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_FRANCE</Civilization>
<X>42</X>
<Y>48</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_GERMANY</Civilization>
<X>51</X>
<Y>53</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_GREECE</Civilization>
<X>57</X>
<Y>41</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_INDIA</Civilization>
<X>75</X>
<Y>39</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_IROQUOIS</Civilization>
<X>19</X>
<Y>51</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_JAPAN</Civilization>
<X>98</X>
<Y>46</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_OTTOMAN</Civilization>
<X>62</X>
<Y>44</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_PERSIA</Civilization>
<X>69</X>
<Y>40</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_ROME</Civilization>
<X>50</X>
<Y>42</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_RUSSIA</Civilization>
<X>63</X>
<Y>56</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_SIAM</Civilization>
<X>83</X>
<Y>38</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_SONGHAI</Civilization>
<X>47</X>
<Y>26</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_BABYLON</Civilization>
<X>66</X>
<Y>38</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_MONGOL</Civilization>
<X>81</X>
<Y>57</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_INCA</Civilization>
<X>23</X>
<Y>17</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_SPAIN</Civilization>
<X>37</X>
<Y>38</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_POLYNESIA</Civilization>
<X>102</X>
<Y>36</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_DENMARK</Civilization>
<X>49</X>
<Y>57</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_KOREA</Civilization>
<X>92</X>
<Y>52</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_AUSTRIA</Civilization>
<X>54</X>
<Y>49</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_BYZANTIUM</Civilization>
<X>58</X>
<Y>45</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_CARTHAGE</Civilization>
<X>48</X>
<Y>36</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_CELTS</Civilization>
<X>38</X>
<Y>56</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_ETHIOPIA</Civilization>
<X>64</X>
<Y>26</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_HUNS</Civilization>
<X>67</X>
<Y>49</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_MAYA</Civilization>
<X>15</X>
<Y>31</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_NETHERLANDS</Civilization>
<X>43</X>
<Y>53</Y>
</Row>
<Row>
<Civilization>CIVILIZATION_SWEDEN</Civilization>
<X>52</X>
<Y>61</Y>
</Row>
<Replace>
<Civilization>CIVILIZATION_PORTUGAL</Civilization>
<X>33</X>
<Y>37</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_VENICE</Civilization>
<X>51</X>
<Y>47</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_POLAND</Civilization>
<X>56</X>
<Y>55</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_BRAZIL</Civilization>
<X>30</X>
<Y>13</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_ASSYRIA</Civilization>
<X>65</X>
<Y>41</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_INDONESIA</Civilization>
<X>85</X>
<Y>24</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_MOROCCO</Civilization>
<X>39</X>
<Y>31</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_ZULU</Civilization>
<X>59</X>
<Y>5</Y>
</Replace>
<Replace>
<Civilization>CIVILIZATION_SHOSHONE</Civilization>
<X>5</X>
<Y>51</Y>
</Replace>
</GreatestEarthMap_StartPosition>
</GameData>
Hi! Any tips on how to start making maps, or converting them, or something? It would be great for the community to start working already on some maps with your help. Thanks!
<?xml version="1.0" encoding="utf-8"?>
<Mod id="any_GUID" version="23">
<Properties>
<Name>Your Mod Name</Name>
<Stability>Alpha</Stability>
<Teaser>ttt</Teaser>
<Description>ddd</Description>
<Authors>xxx</Authors>
</Properties>
<Dependencies />
<References />
<Blocks />
<Settings>
<Custom>
<Items>
<File>Config.xml</File>
</Items>
</Custom>
</Settings>
<Components>
<ImportFiles>
<Items>
<File>YourMap.lua</File>
</Items>
</ImportFiles>
</Components>
<Files>
<File>YourMap.lua</File>
<File>Config.xml</File>
</Files>
</Mod>
<GameInfo>
<Maps>
<Row File="YourMap.lua" Name="Your Map" Description="The map description" SortIndex="1"/>
</Maps>
</GameInfo>
------------------------------------------------------------------------------
-- FILE: YourMap.Lua
--
------------------------------------------------------------------------------
include "MapEnums"
include "MapUtilities"
include "MountainsCliffs"
include "RiversLakes"
include "FeatureGenerator"
include "TerrainGenerator"
include "NaturalWonderGenerator"
include "ResourceGenerator"
include "AssignStartingPlots"
print("LoadingYour map")
local g_iW, g_iH;
local g_iFlags = {};
local g_continentsFrac = nil;
------------------------------------------------------------------------------
-- The application side will call GetMapScriptInfo directly to request
-- information about the map script.
-------------------------------------------------------------------------------
function GetMapInitData(worldSize)
return {
Width = 180,
Height = 94,
WrapX = true,
WrapY = false,
};
end
-------------------------------------------------------------------------------
function GenerateMap()
print("Generating Your Map");
local pPlot;
-- Set globals
g_iW, g_iH = 180, 94;
g_iFlags = TerrainBuilder.GetFractalFlags();
ImportMap()
-- Temp
AreaBuilder.Recalculate();
local biggest_area = Areas.FindBiggestArea(false);
print("After Adding Hills: ", biggest_area:GetPlotCount());
-- River generation is affected by plot types, originating from highlands and preferring to traverse lowlands.
--AddRivers();
--AddFeatures();
local args = {
numberToPlace = GameInfo.Maps[Map.GetMapSize()].NumNaturalWonders,
};
--local nwGen = NaturalWonderGenerator.Create(args);
AreaBuilder.Recalculate();
TerrainBuilder.AnalyzeChokepoints();
TerrainBuilder.StampContinents();
resourcesConfig = MapConfiguration.GetValue("resources");
local args = {
resources = resourcesConfig,
};
--ResourceGenerator.Create(args);
print("Creating start plot database.");
local startConfig = MapConfiguration.GetValue("start");-- Get the start config
-- START_MIN_Y and START_MAX_Y is the percent of the map ignored for major civs' starting positions.
local args = {
MIN_MAJOR_CIV_FERTILITY = 150,
MIN_MINOR_CIV_FERTILITY = 50,
MIN_BARBARIAN_FERTILITY = 1,
START_MIN_Y = 15,
START_MAX_Y = 15,
START_CONFIG = startConfig,
};
local start_plot_database = AssignStartingPlots.Create(args)
local GoodyGen = AddGoodies(g_iW, g_iH);
end
function AddFeatures()
print("Adding Features");
-- Get Rainfall setting input by user.
local rainfall = MapConfiguration.GetValue("rainfall");
if rainfall == 4 then
rainfall = 1 + TerrainBuilder.GetRandomNumber(3, "Random Rainfall - Lua");
end
local args = {rainfall = rainfall}
local featuregen = FeatureGenerator.Create(args);
featuregen:AddFeatures();
end
--[[
ENUM from Civ5
ResourceType
[0] = RESOURCE_IRON
[1] = RESOURCE_HORSE
[2] = RESOURCE_COAL
[3] = RESOURCE_OIL
[4] = RESOURCE_ALUMINUM
[5] = RESOURCE_URANIUM
[6] = RESOURCE_WHEAT
[7] = RESOURCE_COW
[8] = RESOURCE_SHEEP
[9] = RESOURCE_DEER
[10] = RESOURCE_BANANA
[11] = RESOURCE_FISH
[12] = RESOURCE_STONE
[13] = RESOURCE_WHALE
[14] = RESOURCE_PEARLS
[15] = RESOURCE_GOLD
[16] = RESOURCE_SILVER
[17] = RESOURCE_GEMS
[18] = RESOURCE_MARBLE
[19] = RESOURCE_IVORY
[20] = RESOURCE_FUR
[21] = RESOURCE_DYE
[22] = RESOURCE_SPICES
[23] = RESOURCE_SILK
[24] = RESOURCE_SUGAR
[25] = RESOURCE_COTTON
[26] = RESOURCE_WINE
[27] = RESOURCE_INCENSE
[28] = RESOURCE_JEWELRY
[29] = RESOURCE_PORCELAIN
[30] = RESOURCE_COPPER
[31] = RESOURCE_SALT
[32] = RESOURCE_CRAB
[33] = RESOURCE_TRUFFLES
[34] = RESOURCE_CITRUS
[40] = RESOURCE_BISON
[41] = RESOURCE_COCOA
civ6
[0] = RESOURCE_BANANAS
[1] = RESOURCE_CATTLE
[2] = RESOURCE_COPPER
[3] = RESOURCE_CRABS
[4] = RESOURCE_DEER
[5] = RESOURCE_FISH
[6] = RESOURCE_RICE
[7] = RESOURCE_SHEEP
[8] = RESOURCE_STONE
[9] = RESOURCE_WHEAT
[10] = RESOURCE_CITRUS
[11] = RESOURCE_COCOA
[12] = RESOURCE_COFFEE
[13] = RESOURCE_COTTON
[14] = RESOURCE_DIAMONDS
[15] = RESOURCE_DYES
[16] = RESOURCE_FURS
[17] = RESOURCE_GYPSUM
[18] = RESOURCE_INCENSE
[19] = RESOURCE_IVORY
[20] = RESOURCE_JADE
[21] = RESOURCE_MARBLE
[22] = RESOURCE_MERCURY
[23] = RESOURCE_PEARLS
[24] = RESOURCE_SALT
[25] = RESOURCE_SILK
[26] = RESOURCE_SILVER
[27] = RESOURCE_SPICES
[28] = RESOURCE_SUGAR
[29] = RESOURCE_TEA
[30] = RESOURCE_TOBACCO
[31] = RESOURCE_TRUFFLES
[32] = RESOURCE_WHALES
[33] = RESOURCE_WINE
[40] = RESOURCE_ALUMINUM
[41] = RESOURCE_COAL
[42] = RESOURCE_HORSES
[43] = RESOURCE_IRON
[44] = RESOURCE_NITER
[45] = RESOURCE_OIL
[46] = RESOURCE_URANIUM
FeaturesType
[0] = FEATURE_ICE ----> 1
[1] = FEATURE_JUNGLE ----> 2
[2] = FEATURE_MARSH ----> 5
[3] = FEATURE_OASIS ----> 4
[4] = FEATURE_FLOOD_PLAINS ----> 0
[5] = FEATURE_FOREST ----> 3
[6] = FEATURE_FALLOUT
[7] = FEATURE_CRATER
[8] = FEATURE_FUJI
[9] = FEATURE_MESA
[10] = FEATURE_REEF ----> 6
[11] = FEATURE_VOLCANO
[12] = FEATURE_GIBRALTAR
[13] = FEATURE_GEYSER
[14] = FEATURE_FOUNTAIN_YOUTH
[15] = FEATURE_POTOSI
[16] = FEATURE_EL_DORADO
[17] = FEATURE_ATOLL
[18] = FEATURE_SRI_PADA
[19] = FEATURE_MT_SINAI
[20] = FEATURE_MT_KAILASH
[21] = FEATURE_ULURU
[22] = FEATURE_LAKE_VICTORIA
[23] = FEATURE_KILIMANJARO ----> 12
[24] = FEATURE_SOLOMONS_MINES
PlotType
[0] = PLOT_MOUNTAIN
[1] = PLOT_HILLS
[2] = PLOT_LAND
[3] = PLOT_OCEAN
TerrainTypes
[0] = TERRAIN_GRASS,
[1] = TERRAIN_PLAINS,
[2] = TERRAIN_DESERT,
[3] = TERRAIN_TUNDRA,
[4] = TERRAIN_SNOW,
[5] = TERRAIN_COAST,
[6] = TERRAIN_OCEAN,
FeatureTypes
[0] = FEATURE_ICE,
[1] = FEATURE_JUNGLE,
[2] = FEATURE_MARSH,
[3] = FEATURE_OASIS,
[4] = FEATURE_FLOOD_PLAINS,
[5] = FEATURE_FOREST,
[6] = FEATURE_FALLOUT,
[7] = FEATURE_ATOLL,
Continental Art Set
[0] = Ocean
[1] = America
[2] = Asia
[3] = Africa
[4] = Europe
Rivers (same for civ6)
[0] = FLOWDIRECTION_NORTH
[1] = FLOWDIRECTION_NORTHEAST
[2] = FLOWDIRECTION_SOUTHEAST
[3] = FLOWDIRECTION_SOUTH
[4] = FLOWDIRECTION_SOUTHWEST
[5] = FLOWDIRECTION_NORTHWEST
Directions (same for civ6)
[0] = DIRECTION_NORTHEAST
[1] = DIRECTION_EAST
[2] = DIRECTION_SOUTHEAST
[3] = DIRECTION_SOUTHWEST
[4] = DIRECTION_WEST
[5] = DIRECTION_NORTHWEST
-- Code to export the civ5 map
for iPlotLoop = 0, Map.GetNumPlots()-1, 1 do
local plot = Map.GetPlotByIndex(iPlotLoop)
local NEOfRiver = 0
local WOfRiver = 0
local NWOfRiver = 0
if plot:IsNEOfRiver() then NEOfRiver = 1 end -- GetRiverSWFlowDirection()
if plot:IsWOfRiver() then WOfRiver = 1 end -- GetRiverEFlowDirection()
if plot:IsNWOfRiver() then NWOfRiver = 1 end -- GetRiverSEFlowDirection()
print("MapToConvert["..plot:GetX().."]["..plot:GetY().."]={"..plot:GetTerrainType()..","..plot:GetPlotType()..","..plot:GetFeatureType()..","..plot:GetContinentArtType()..",{{"..NEOfRiver..","..plot:GetRiverSWFlowDirection().. "},{"..WOfRiver..","..plot:GetRiverEFlowDirection().."},{"..NWOfRiver..","..plot:GetRiverSEFlowDirection().."}},{"..plot:GetResourceType(-1)..","..plot:GetNumResource().."}}")
end
--]]
function ImportMap()
local MapToConvert = GetMap()
local count = 0
-- Civ5 ENUM
PLOT_MOUNTAIN = 0
PLOT_HILLS = 1
-- Civ5 to Civ6
local FeaturesCiv5toCiv6 = {}
for i = 0, 24 do FeaturesCiv5toCiv6[i] = g_FEATURE_NONE end
FeaturesCiv5toCiv6[0] = g_FEATURE_ICE
FeaturesCiv5toCiv6[1] = g_FEATURE_JUNGLE
FeaturesCiv5toCiv6[2] = g_FEATURE_MARSH
FeaturesCiv5toCiv6[3] = g_FEATURE_OASIS
FeaturesCiv5toCiv6[4] = g_FEATURE_FLOODPLAINS
FeaturesCiv5toCiv6[5] = g_FEATURE_FOREST
-- Natural wonders may require a special coding
FeaturesCiv5toCiv6[10] = g_FEATURE_BARRIER_REEF
--FeaturesCiv5toCiv6[23] = g_FEATURE_KILIMANJARO
local ResourceCiv5toCiv6 = {}
for i = 0, 41 do ResourceCiv5toCiv6[i] = -1 end
ResourceCiv5toCiv6[4]= 40 -- ALUMINUM
ResourceCiv5toCiv6[10]= 0 -- BANANAS
ResourceCiv5toCiv6[40]= 16 -- BISON to FURS
ResourceCiv5toCiv6[7]= 1 -- CATTLE
ResourceCiv5toCiv6[34]= 10 -- CITRUS
ResourceCiv5toCiv6[2]= 41 -- COAL
ResourceCiv5toCiv6[41]= 11 -- COCOA
ResourceCiv5toCiv6[30]= 2 -- COPPER
ResourceCiv5toCiv6[25]= 13 -- COTTON
ResourceCiv5toCiv6[32]= 3 -- CRABS
ResourceCiv5toCiv6[9]= 4 -- DEER
ResourceCiv5toCiv6[17]= 14 -- DIAMONDS
ResourceCiv5toCiv6[21]= 15 -- DYES
ResourceCiv5toCiv6[11]= 5 -- FISH
ResourceCiv5toCiv6[20]= 16 -- FURS
ResourceCiv5toCiv6[15]= 44 -- GOLD to NITER
ResourceCiv5toCiv6[1]= 42 -- HORSES
ResourceCiv5toCiv6[27]= 18 -- INCENSE
ResourceCiv5toCiv6[0]= 43 -- IRON
ResourceCiv5toCiv6[19]= 19 -- IVORY
ResourceCiv5toCiv6[28]= 20 -- JADE
ResourceCiv5toCiv6[18]= 21 -- MARBLE
ResourceCiv5toCiv6[3]= 45 -- OIL
ResourceCiv5toCiv6[14]= 23 -- PEARLS
ResourceCiv5toCiv6[31]= 24 -- SALT
ResourceCiv5toCiv6[8]= 7 -- SHEEP
ResourceCiv5toCiv6[23]= 25 -- SILK
ResourceCiv5toCiv6[16]= 26 -- SILVER
ResourceCiv5toCiv6[22]= 27 -- SPICES
ResourceCiv5toCiv6[12]= 8 -- STONE
ResourceCiv5toCiv6[24]= 28 -- SUGAR
ResourceCiv5toCiv6[33]= 31 -- TRUFFLES
ResourceCiv5toCiv6[5]= 46 -- URANIUM
ResourceCiv5toCiv6[13]= 32 -- WHALES
ResourceCiv5toCiv6[6]= 9 -- WHEAT
ResourceCiv5toCiv6[26]= 33 -- WINE
for i = 0, (g_iW * g_iH) - 1, 1 do
plot = Map.GetPlotByIndex(i)
print("----------")
print("Convert plot at "..plot:GetX()..","..plot:GetY())
-- Map Data
-- MapToConvert[x][y] = {civ5TerrainType, civ5PlotTypes, civ5FeatureTypes, civ5ContinentType, {{IsNEOfRiver, flow}, {IsWOfRiver, flow}, {IsNWOfRiver, flow}}, {Civ5ResourceType, num} }
local civ5TerrainType = MapToConvert[plot:GetX()][plot:GetY()][1]
local civ5PlotTypes = MapToConvert[plot:GetX()][plot:GetY()][2]
local civ5FeatureTypes = MapToConvert[plot:GetX()][plot:GetY()][3]
local civ5ContinentType = MapToConvert[plot:GetX()][plot:GetY()][4]
local rivers = MapToConvert[plot:GetX()][plot:GetY()][5] -- = {{IsNEOfRiver, flow}, {IsWOfRiver, flow}, {IsNWOfRiver, flow}}
local resource = MapToConvert[plot:GetX()][plot:GetY()][6] -- = {Civ5ResourceType, num}
-- Set terrain type
local civ6TerrainType = g_TERRAIN_TYPE_OCEAN
if civ5TerrainType == 5 then civ6TerrainType = g_TERRAIN_TYPE_COAST
elseif civ5TerrainType ~= 6 then
-- the code below won't work if the order is changed in the terrains table
-- entrie for civ5 are: 0 = GRASS, 1= PLAINS, ...
-- entries for civ6 are: 0 = GRASS, 1= GRASS_HILL, 2 = GRASS_MOUNTAIN, 3= PLAINS, 4 = PLAINS_HILL, ...
civ6TerrainType = civ5TerrainType * 3 -- civ5TerrainType * 3 0-0 1-3 2-6 3-9 4-12
if civ5PlotTypes == PLOT_HILLS then
civ6TerrainType = civ6TerrainType + g_TERRAIN_BASE_TO_HILLS_DELTA
elseif civ5PlotTypes == PLOT_MOUNTAIN then
civ6TerrainType = civ6TerrainType + g_TERRAIN_BASE_TO_MOUNTAIN_DELTA
end
end
print(" - Set Terrain Type = "..tostring(GameInfo.Terrains[civ6TerrainType].TerrainType))
count = count + 1
TerrainBuilder.SetTerrainType(plot, civ6TerrainType)
-- Set rivers
if rivers[1][1] == 1 then -- IsNEOfRiver
TerrainBuilder.SetNEOfRiver(plot, true, rivers[1][2])
print(" - Set is NE of river, flow = "..tostring(rivers[1][2]))
end
if rivers[2][1] == 1 then -- IsWOfRiver
TerrainBuilder.SetWOfRiver(plot, true, rivers[2][2])
print(" - Set is W of river, flow = "..tostring(rivers[2][2]))
end
if rivers[3][1] == 1 then -- IsNWOfRiver
TerrainBuilder.SetNWOfRiver(plot, true, rivers[3][2])
print(" - Set is NW of river, flow = "..tostring(rivers[3][2]))
end
-- Set Features
if civ5FeatureTypes ~= -1 and FeaturesCiv5toCiv6[civ5FeatureTypes] ~= g_FEATURE_NONE then
print(" - Set Feature Type = "..tostring(GameInfo.Features[FeaturesCiv5toCiv6[civ5FeatureTypes]].FeatureType))
TerrainBuilder.SetFeatureType(plot, FeaturesCiv5toCiv6[civ5FeatureTypes])
end
-- Set Resources
if resource[1] ~= -1 and ResourceCiv5toCiv6[resource[1]] ~= -1 then
print(" - Set Resource Type = "..tostring(GameInfo.Resources[ResourceCiv5toCiv6[resource[1]]].ResourceType))
ResourceBuilder.SetResourceType(plot, ResourceCiv5toCiv6[resource[1]], resource[2])
end
end
print(" Placed terrain on "..tostring(count) .. " tiles")
end
function GetMap()
local MapToConvert = {}
for i = 0, g_iW - 1, 1 do
MapToConvert[i] = {}
end
-- Map Data
-- MapToConvert[x][y] = {civ5TerrainType, civ5PlotTypes, civ5FeatureTypes, civ5ContinentType, {{IsNEOfRiver, flow}, {IsWOfRiver, flow}, {IsNWOfRiver, flow}}, {Civ5ResourceType, num} }
MapToConvert[0][0]={5,3,0,4,{{0,-1},{0,-1},{0,-1}},{-1,0}}
MapToConvert[1][0]={5,3,0,4,{{0,-1},{0,-1},{0,-1}},{-1,0}}
MapToConvert[2][0]={5,3,0,4,{{0,-1},{0,-1},{0,-1}},{-1,0}}
MapToConvert[3][0]={4,1,-1,3,{{0,-1},{0,-1},{0,-1}},{-1,0}}
MapToConvert[4][0]={5,3,0,0,{{0,-1},{0,-1},{0,-1}},{-1,0}}
-- of course there will be a lot more lines here...
MapToConvert[176][93]={5,3,0,4,{{0,-1},{0,-1},{0,-1}},{-1,0}}
MapToConvert[177][93]={5,3,0,4,{{0,-1},{0,-1},{0,-1}},{-1,0}}
MapToConvert[178][93]={5,3,0,4,{{0,-1},{0,-1},{0,-1}},{-1,0}}
MapToConvert[179][93]={4,0,-1,1,{{0,-1},{0,-1},{0,-1}},{-1,0}}
return MapToConvert
end
function GetMapInitData(worldSize)
return {
Width = 180,
Height = 94,
WrapX = true,
WrapY = false,
};
end
-- Set globals
g_iW, g_iH = 180, 94;
g_iFlags = TerrainBuilder.GetFractalFlags();
MapToConvert[179][93]={4,0,-1,1,{{0,-1},{0,-1},{0,-1}},{-1,0}}
for iPlotLoop = 0, Map.GetNumPlots()-1, 1 do
local plot = Map.GetPlotByIndex(iPlotLoop)
local NEOfRiver = 0
local WOfRiver = 0
local NWOfRiver = 0
if plot:IsNEOfRiver() then NEOfRiver = 1 end -- GetRiverSWFlowDirection()
if plot:IsWOfRiver() then WOfRiver = 1 end -- GetRiverEFlowDirection()
if plot:IsNWOfRiver() then NWOfRiver = 1 end -- GetRiverSEFlowDirection()
print("MapToConvert["..plot:GetX().."]["..plot:GetY().."]={"..plot:GetTerrainType()..","..plot:GetPlotType()..","..plot:GetFeatureType()..","..plot:GetContinentArtType()..",{{"..NEOfRiver..","..plot:GetRiverSWFlowDirection().. "},{"..WOfRiver..","..plot:GetRiverEFlowDirection().."},{"..NWOfRiver..","..plot:GetRiverSEFlowDirection().."}},{"..plot:GetResourceType(-1)..","..plot:GetNumResource().."}}")
end
I can provide a table to fill, I can use the help !That's what I would also like to know.
@Gedemon: I'd love to help you with placing cliffs on the maps. I have already plans where they could be appropriate without getting in the way of important coastal cities. Civ-players, who like realism do place cities roughly where their real locations are. That's what I assume at least.
Edith says: I'm not far enough in the game to know if they even are an issue for building docks etc. but there are places where they are a must have (e.g. Bretagne, Norway, some parts of Portugal and Northern Spain etc.).
I can provide a table to fill, I can use the help !
Thanks, but I've just packed a new version for test
For close CS, I think I'll just add an option like for civ5 : kill them if they are to close of another civilization
I post the updated version in this post first, because I'd like it to be tested a bit before going "live", in particular the Greatest Earth (see if it still works even if the placements may not be accurate and CS are missing TSL) and the options that were broken for the other maps, because I'm actually testing the giant earth and you know how long it takes to load / quit / test something, reload...
- fix TSL not working on Giant Earth
- fix some options that were removed for the normal map script
I need to understand how they are placed first.Ok, awesome! Just give the table and instructions.
table.insert(Cliffs, {X = 23, Y = 25})
table.insert(Cliffs, {X = 23, Y = 24})
NW are on the to do list, they are not placed at the moment.Testing out the new version on the giant map. everything seems okay so far but I have a question, once your done testing and adding the things you want are you planning on increasing the amount of natural wonders that can spawn on the map ? I ask because in the 2 games I've played before this I started in america and that had no natural wonders at all.
thanks, that was what I wanted to knowStill getting issues with not being able to select however many civs i want for the 3 added maps. It only allows 10 for all of them and i have to select a vanilla map, then select xx civs, then select greatest earth, then load.
all tests were good and loaded without error.
Greatest earth map with 10 civs loaded fine and all civs TSL's were good (CS's are still messed up but we know that already).
Greatest earth map with 15 civs loaded Scythia (me) on the french tsl, and also loaded the french in that spot as well. where Scythia's tsl is (black seasish area) there was a no one.
Greatest earth map with 12 civs loaded Scythia on English TSL with the English as well, kongo in south ameria and no one is the kongo TSL.
Greatest earth map with 12 civs loaded scythia and norway were in wrong TSL's
I tested a few more times and it seems only Norway, Kongo,and Scythia are misplaced every time. I messed around with their starting locations in the XML but i couldn't get them to properly place. I also disabled CS's because I though that would help and I still got miss-placement of those 3 civs.
Not sure if any of this helps.
I need to understand how they are placed first.
Can you provide a few positions ?
edit :
I need the land plot near the cliff
PHP:table.insert(Cliffs, {X = 23, Y = 25}) table.insert(Cliffs, {X = 23, Y = 24})
Any volunteer fors the TSL for the Greatest Earth and the Europe map ?
Ok, let's start with Britain:
http://www.directupload.net/file/d/4520/z7g3naqq_png.htm
White is the position of the Dover Cliffs.
table.insert(Cliffs, {X = 23, Y = 25, Direction = DirectionTypes.DIRECTION_NORTHEAST})
i don't know for Egypt, the inland position give some space to the Mediterranean civilizations.Ok I tried the Giant TSL map, it seem good so far, except for greece, leader position is inverted.
Couple note too, in the previous thread we agreed to change Arabian capital position on the Civ V one, but it will need a rename, Egyptian capital is actually in Civ V postion too (32,43), now that Arabian one is far away, maybe change it to it's real position (30,49)?
We also changed Sparta position to Byzantium position for gameplay purpose, so it doesn't overlap with Athena, if someone have a better proposition let us know
My next step would be to do the Ludicrous position, or someone is already on it? (or map is subject to change? )
Yes, that's bugging me, I havent' found yet how to force a refresh...Initial Greatest Earth Test, Tuner Enabled and all Debugging options on:
At the Advanced Setup, after selecting Greatest Earth it would not let me choose more than 10 Civs, the Add AI Player button disapeared.. Reverted back to Continents, selected Ludicrus Map Size, it populated the civs, went back to Greatest Earth, it kept the selected number of Civs, 20, Add AI Button is still there too. Starting Game..
Thanks, I know what I need, a table like that:
where X,Y is the position of a land plot and DirectionTypes.DIRECTION_NORTHEAST is the direction to an adjacent water plot with the cliff.Code:table.insert(Cliffs, {X = 23, Y = 25, Direction = DirectionTypes.DIRECTION_NORTHEAST})
there can be multiple direction with a cliff for a same plot