Index: binaries/data/mods/public/maps/scenarios/Battle for the Tiber.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Battle for the Tiber.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Battle for the Tiber.xml (working copy) @@ -40,11 +40,11 @@ "b": 39, "g": 39, "r": 131 }, "Name": "Rome", - "Resources": { + "StartingResources": { "food": 250, "metal": 250, "stone": 250, "wood": 250 }, @@ -56,11 +56,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Veii", - "Resources": { + "StartingResources": { "food": 250, "metal": 250, "stone": 250, "wood": 250 }, Index: binaries/data/mods/public/maps/scenarios/Campaign Test Map.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Campaign Test Map.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Campaign Test Map.xml (working copy) @@ -54,11 +54,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Delian League", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, @@ -83,11 +83,11 @@ "b": 0, "g": 128, "r": 255 }, "Name": "Thebes", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, @@ -112,11 +112,11 @@ "b": 5, "g": 165, "r": 50 }, "Name": "Thessaly", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, @@ -129,11 +129,11 @@ "b": 0, "g": 255, "r": 255 }, "Name": "Megara", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, @@ -146,11 +146,11 @@ "b": 255, "g": 255, "r": 0 }, "Name": "Eretria", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, @@ -163,11 +163,11 @@ "b": 200, "g": 80, "r": 160 }, "Name": "Chalcis", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, Index: binaries/data/mods/public/maps/scenarios/Death Canyon - Invasion Force.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Death Canyon - Invasion Force.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Death Canyon - Invasion Force.xml (working copy) @@ -52,11 +52,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, @@ -68,12 +68,11 @@ "b": 220, "g": 99, "r": 166 }, "Name": "Invasion Force", - "PopulationLimit": 1, - "Resources": { + "StartingResources": { "stone": 2500 }, "DisabledTemplates": [ "structures/rome_civil_centre" ], @@ -85,11 +84,11 @@ "b": 5, "g": 165, "r": 50 }, "Name": "Player 3", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, @@ -101,11 +100,10 @@ "b": 75, "g": 230, "r": 230 }, "Name": "Invasion Force", - "PopulationLimit": 1, "DisabledTemplates": [ "structures/iber_civil_centre" ], "Team": 1 } Index: binaries/data/mods/public/maps/scenarios/Eire and Albion.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Eire and Albion.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Eire and Albion.xml (working copy) @@ -41,11 +41,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 100000, "metal": 100000, "stone": 100000, "wood": 100000 }, @@ -57,11 +57,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 100000, "metal": 100000, "stone": 100000, "wood": 100000 }, Index: binaries/data/mods/public/maps/scenarios/Fast Oasis.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Fast Oasis.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Fast Oasis.xml (working copy) @@ -38,11 +38,11 @@ "b": 200, "g": 80, "r": 80 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 1000, "metal": 1000, "stone": 1000, "wood": 1000 }, @@ -54,11 +54,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 1000, "metal": 1000, "stone": 1000, "wood": 1000 }, @@ -70,11 +70,11 @@ "b": 5, "g": 165, "r": 50 }, "Name": "Player 3", - "Resources": { + "StartingResources": { "food": 1000, "metal": 1000, "stone": 1000, "wood": 1000 }, @@ -86,11 +86,11 @@ "b": 75, "g": 230, "r": 230 }, "Name": "Player 4", - "Resources": { + "StartingResources": { "food": 1000, "metal": 1000, "stone": 1000, "wood": 1000 }, Index: binaries/data/mods/public/maps/scenarios/Introductory Tutorial.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Introductory Tutorial.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Introductory Tutorial.xml (working copy) @@ -54,11 +54,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 2000, "metal": 2000, "stone": 2000, "wood": 2000 }, @@ -71,11 +71,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 2000, "metal": 1000, "stone": 1000, "wood": 2000 }, Index: binaries/data/mods/public/maps/scenarios/Laconia 01.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Laconia 01.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Laconia 01.xml (working copy) @@ -40,11 +40,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 600, "metal": 400, "stone": 600, "wood": 600 }, @@ -68,11 +68,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 400, "metal": 2000, "stone": 400, "wood": 400 }, Index: binaries/data/mods/public/maps/scenarios/Migration.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Migration.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Migration.xml (working copy) @@ -42,11 +42,11 @@ "b": 0, "g": 255, "r": 255 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, @@ -58,11 +58,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, @@ -74,11 +74,11 @@ "b": 5, "g": 165, "r": 50 }, "Name": "Player 3", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, Index: binaries/data/mods/public/maps/scenarios/Miletus.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Miletus.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Miletus.xml (working copy) @@ -40,12 +40,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Miletus", - "PopulationLimit": 1000, - "Resources": { + "StartingResources": { "food": 1000, "metal": 1000, "stone": 1000, "wood": 1000 }, Index: binaries/data/mods/public/maps/scenarios/Necropolis.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Necropolis.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Necropolis.xml (working copy) @@ -52,11 +52,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 100, "metal": 100, "stone": 100, "wood": 100 }, @@ -68,11 +68,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 100, "metal": 100, "stone": 100, "wood": 100 }, @@ -84,11 +84,11 @@ "b": 5, "g": 165, "r": 50 }, "Name": "Player 3", - "Resources": { + "StartingResources": { "food": 100, "metal": 100, "stone": 100, "wood": 100 }, @@ -100,11 +100,11 @@ "b": 75, "g": 230, "r": 230 }, "Name": "Player 4", - "Resources": { + "StartingResources": { "food": 100, "metal": 100, "stone": 100, "wood": 100 }, Index: binaries/data/mods/public/maps/scenarios/Peloponnese.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Peloponnese.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Peloponnese.xml (working copy) @@ -51,11 +51,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Athens", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, @@ -79,11 +79,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Sparta", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, @@ -107,11 +107,11 @@ "b": 5, "g": 165, "r": 50 }, "Name": "Elis", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, @@ -123,11 +123,11 @@ "b": 0, "g": 128, "r": 255 }, "Name": "Thebes", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, @@ -139,11 +139,11 @@ "b": 255, "g": 255, "r": 0 }, "Name": "Corinth", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, @@ -155,11 +155,11 @@ "b": 200, "g": 80, "r": 160 }, "Name": "Thessaly", - "Resources": { + "StartingResources": { "food": 700, "metal": 500, "stone": 500, "wood": 700 }, Index: binaries/data/mods/public/maps/scenarios/Polynesia.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Polynesia.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Polynesia.xml (working copy) @@ -54,11 +54,11 @@ "b": 51, "g": 133, "r": 45 }, "Name": "Samoa", - "Resources": { + "StartingResources": { "food": 300, "wood": 300 }, "StartingCamera": { "Position": { @@ -81,11 +81,11 @@ "b": 175, "g": 64, "r": 42 }, "Name": "Vanuatu", - "Resources": { + "StartingResources": { "food": 300, "wood": 300 }, "StartingCamera": { "Position": { Index: binaries/data/mods/public/maps/scenarios/Saharan Oases.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Saharan Oases.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Saharan Oases.xml (working copy) @@ -38,11 +38,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 250, "metal": 300, "stone": 250, "wood": 250 }, @@ -54,11 +54,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 250, "metal": 300, "stone": 250, "wood": 250 }, @@ -70,11 +70,11 @@ "b": 5, "g": 165, "r": 50 }, "Name": "Player 3", - "Resources": { + "StartingResources": { "food": 300, "metal": 250, "stone": 250, "wood": 250 }, @@ -86,11 +86,11 @@ "b": 75, "g": 230, "r": 230 }, "Name": "Player 4", - "Resources": { + "StartingResources": { "food": 300, "metal": 250, "stone": 250, "wood": 250 }, Index: binaries/data/mods/public/maps/scenarios/Sahel.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sahel.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sahel.xml (working copy) @@ -52,11 +52,11 @@ "b": 14, "g": 14, "r": 177 }, "Name": "Aulus Manlius Capitolinus", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, @@ -68,11 +68,11 @@ "b": 199, "g": 67, "r": 56 }, "Name": "Hasdrubal the Fair", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, @@ -84,11 +84,11 @@ "b": 5, "g": 165, "r": 50 }, "Name": "Artaxshacha II", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, @@ -100,11 +100,11 @@ "b": 147, "g": 40, "r": 99 }, "Name": "Tautalus", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 100, "wood": 300 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Athenians.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Athenians.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Athenians.xml (working copy) @@ -54,11 +54,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "The Athenians", - "Resources": { + "StartingResources": { "food": 100000, "metal": 100000, "stone": 100000, "wood": 100000 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Britons.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Britons.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Britons.xml (working copy) @@ -54,11 +54,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 20000, "metal": 20000, "stone": 20000, "wood": 20000 }, @@ -83,11 +83,11 @@ "b": 64, "g": 128, "r": 255 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 400, "metal": 400, "stone": 400, "wood": 400 }, @@ -112,11 +112,11 @@ "b": 5, "g": 165, "r": 50 }, "Name": "Player 3", - "Resources": { + "StartingResources": { "food": 400, "metal": 400, "stone": 400, "wood": 400 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Carthaginians.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Carthaginians.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Carthaginians.xml (working copy) @@ -54,12 +54,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Carthage", - "PopulationLimit": 10000, - "Resources": { + "StartingResources": { "food": 10000, "metal": 10000, "stone": 10000, "wood": 10000 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Gauls.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Gauls.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Gauls.xml (working copy) @@ -54,11 +54,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 20000, "metal": 20000, "stone": 20000, "wood": 20000 }, @@ -83,11 +83,11 @@ "b": 64, "g": 128, "r": 255 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 400, "metal": 400, "stone": 400, "wood": 400 }, @@ -112,11 +112,11 @@ "b": 5, "g": 165, "r": 50 }, "Name": "Player 3", - "Resources": { + "StartingResources": { "food": 400, "metal": 400, "stone": 400, "wood": 400 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Iberians.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Iberians.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Iberians.xml (working copy) @@ -57,11 +57,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 9990, "metal": 9990, "stone": 9990, "wood": 9990 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Macedonians.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Macedonians.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Macedonians.xml (working copy) @@ -54,11 +54,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "The Macedonians", - "Resources": { + "StartingResources": { "food": 100000, "metal": 100000, "stone": 100000, "wood": 100000 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Mauryans.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Mauryans.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Mauryans.xml (working copy) @@ -55,11 +55,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Mauryan Indians", - "Resources": { + "StartingResources": { "food": 99990, "metal": 99990, "stone": 99990, "wood": 99990 }, @@ -72,11 +72,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Enemy", - "Resources": { + "StartingResources": { "food": 9990, "metal": 9990, "stone": 9990, "wood": 9990 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Persians.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Persians.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Persians.xml (working copy) @@ -55,11 +55,11 @@ "b": 242, "g": 83, "r": 139 }, "Name": "Achaemenids", - "Resources": { + "StartingResources": { "food": 33000, "metal": 33000, "stone": 33000, "wood": 33000 }, @@ -84,11 +84,11 @@ "b": 0, "g": 64, "r": 128 }, "Name": "Creeps", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Ptolemies 2.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Ptolemies 2.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Ptolemies 2.xml (working copy) @@ -49,11 +49,11 @@ "PlayerData": [ { "AI": "", "Civ": "ptol", "Name": "Ptolemy \"Savior\"", - "Resources": { + "StartingResources": { "food": 50000, "metal": 50000, "stone": 50000, "wood": 50000 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Ptolemies.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Ptolemies.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Ptolemies.xml (working copy) @@ -55,11 +55,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Ptolemaios A' Soter", - "Resources": { + "StartingResources": { "food": 10000, "metal": 10000, "stone": 10000, "wood": 10000 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Romans.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Romans.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Romans.xml (working copy) @@ -60,11 +60,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 13000, "metal": 13000, "stone": 13000, "wood": 13000 }, @@ -77,11 +77,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Seleucids.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Seleucids.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Seleucids.xml (working copy) @@ -60,11 +60,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "The Seleucids", - "Resources": { + "StartingResources": { "food": 13000, "metal": 13000, "stone": 13000, "wood": 13000 }, @@ -77,11 +77,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "The Ptolemies", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, Index: binaries/data/mods/public/maps/scenarios/Sandbox - Spartans.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Sandbox - Spartans.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Sandbox - Spartans.xml (working copy) @@ -54,11 +54,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "The Spartans", - "Resources": { + "StartingResources": { "food": 100000, "metal": 100000, "stone": 100000, "wood": 100000 }, Index: binaries/data/mods/public/maps/scenarios/Siwa Oasis.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Siwa Oasis.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Siwa Oasis.xml (working copy) @@ -40,11 +40,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 400, "metal": 200, "stone": 200, "wood": 400 }, @@ -56,11 +56,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 400, "metal": 200, "stone": 200, "wood": 400 }, @@ -72,11 +72,11 @@ "b": 128, "g": 128, "r": 0 }, "Name": "Player 3", - "Resources": { + "StartingResources": { "food": 400, "metal": 200, "stone": 200, "wood": 400 }, @@ -88,11 +88,11 @@ "b": 6, "g": 150, "r": 255 }, "Name": "Player 4", - "Resources": { + "StartingResources": { "food": 400, "metal": 200, "stone": 200, "wood": 400 }, Index: binaries/data/mods/public/maps/scenarios/Triggers_demo.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Triggers_demo.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Triggers_demo.xml (working copy) @@ -52,11 +52,11 @@ "LockTeams": false, "Name": "Triggers Demo", "PlayerData": [ { "Civ": "athen", - "Resources": { + "StartingResources": { "food": 50000, "metal": 50000, "stone": 50000, "wood": 50000 } Index: binaries/data/mods/public/maps/scenarios/WallTest.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/WallTest.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/WallTest.xml (working copy) @@ -41,12 +41,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "PopulationLimit": 100000, - "Resources": { + "StartingResources": { "food": 100000, "metal": 100000, "stone": 100000, "wood": 100000 }, @@ -70,12 +69,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 2", - "PopulationLimit": 2, - "Resources": { + "StartingResources": { "food": 5000, "metal": 5000, "stone": 5000, "wood": 5000 }, Index: binaries/data/mods/public/maps/scenarios/Walls.xml =================================================================== --- binaries/data/mods/public/maps/scenarios/Walls.xml (revision 19255) +++ binaries/data/mods/public/maps/scenarios/Walls.xml (working copy) @@ -42,11 +42,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, @@ -71,11 +71,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, Index: binaries/data/mods/public/maps/skirmishes/Forest Battle (4).xml =================================================================== --- binaries/data/mods/public/maps/skirmishes/Forest Battle (4).xml (revision 19255) +++ binaries/data/mods/public/maps/skirmishes/Forest Battle (4).xml (working copy) @@ -44,22 +44,15 @@ "GameType": "conquest", "Keywords": [], "LockTeams": false, "Name": "Forest Battle (4)", "PlayerData": [ - { - "PopulationLimit": 100 - }, - { - "PopulationLimit": 100 - }, - { - "PopulationLimit": 100 - }, - { - "PopulationLimit": 100 - } + null, + {}, + {}, + {}, + {} ], "Preview": "forest_battle.png", "RevealMap": false } ]]> Index: binaries/data/mods/public/maps/skirmishes/Libyan Oases (4).xml =================================================================== --- binaries/data/mods/public/maps/skirmishes/Libyan Oases (4).xml (revision 19255) +++ binaries/data/mods/public/maps/skirmishes/Libyan Oases (4).xml (working copy) @@ -50,11 +50,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 } @@ -64,11 +64,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 } @@ -78,11 +78,11 @@ "b": 5, "g": 165, "r": 50 }, "Name": "Player 3", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 } @@ -92,11 +92,11 @@ "b": 199, "g": 54, "r": 134 }, "Name": "Player 4", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 } Index: binaries/data/mods/public/maps/skirmishes/Libyan Oasis (2).xml =================================================================== --- binaries/data/mods/public/maps/skirmishes/Libyan Oasis (2).xml (revision 19255) +++ binaries/data/mods/public/maps/skirmishes/Libyan Oasis (2).xml (working copy) @@ -50,11 +50,11 @@ "b": 200, "g": 46, "r": 46 }, "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, @@ -77,11 +77,11 @@ "b": 20, "g": 20, "r": 150 }, "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 300, "metal": 300, "stone": 300, "wood": 300 }, Index: binaries/data/mods/public/maps/skirmishes/Sicilia_Nomad.xml =================================================================== --- binaries/data/mods/public/maps/skirmishes/Sicilia_Nomad.xml (revision 19255) +++ binaries/data/mods/public/maps/skirmishes/Sicilia_Nomad.xml (working copy) @@ -42,11 +42,11 @@ "Name": "Sicilia Nomad (2)", "Preview": "sicilia.png", "PlayerData": [ { "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 300, "metal": 460, "stone": 560, "wood": 800 }, @@ -63,11 +63,11 @@ } } }, { "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 300, "metal": 460, "stone": 560, "wood": 800 }, Index: binaries/data/mods/public/maps/skirmishes/Syria (2).xml =================================================================== --- binaries/data/mods/public/maps/skirmishes/Syria (2).xml (revision 19255) +++ binaries/data/mods/public/maps/skirmishes/Syria (2).xml (working copy) @@ -45,20 +45,20 @@ "LockTeams": false, "Name": "Syria (2)", "PlayerData": [ { "Name": "Player 1", - "Resources": { + "StartingResources": { "food": 50000, "metal": 50000, "stone": 50000, "wood": 50000 } }, { "Name": "Player 2", - "Resources": { + "StartingResources": { "food": 50000, "metal": 50000, "stone": 50000, "wood": 50000 } Index: binaries/data/mods/public/simulation/helpers/InitGame.js =================================================================== --- binaries/data/mods/public/simulation/helpers/InitGame.js (revision 19255) +++ binaries/data/mods/public/simulation/helpers/InitGame.js (working copy) @@ -55,21 +55,10 @@ function InitGame(settings) cmpPlayer.SetAI(true); AIDiff = Math.min(AIDiff, rate.length - 1); cmpPlayer.SetGatherRateMultiplier(rate[AIDiff]); cmpPlayer.SetTradeRateMultiplier(rate[AIDiff]); } - if (settings.PopulationCap) - cmpPlayer.SetMaxPopulation(settings.PopulationCap); - - if (settings.mapType !== "scenario" && settings.StartingResources) - { - let resourceCounts = cmpPlayer.GetResourceCounts(); - let newResourceCounts = {}; - for (let resouces in resourceCounts) - newResourceCounts[resouces] = settings.StartingResources; - cmpPlayer.SetResourceCounts(newResourceCounts); - } } // Map or player data (handicap...) dependent initialisations of components (i.e. garrisoned units) Engine.BroadcastMessage(MT_InitGame, {}); let seed = settings.AISeed ? settings.AISeed : 0; Index: binaries/data/mods/public/simulation/helpers/Player.js =================================================================== --- binaries/data/mods/public/simulation/helpers/Player.js (revision 19255) +++ binaries/data/mods/public/simulation/helpers/Player.js (working copy) @@ -94,34 +94,56 @@ function LoadPlayerSettings(settings, ne cmpPlayer.SetEnemy(j); continue; } - // Note: this is not yet implemented but I leave it commented to highlight it's easy - // If anyone ever adds handicap. - //if (getSetting(playerData, playerDefaults, i, "GatherRateMultiplier") !== undefined) - // cmpPlayer.SetGatherRateMultiplier(getSetting(playerData, playerDefaults, i, "GatherRateMultiplier")); - - if (getSetting(playerData, playerDefaults, i, "PopulationLimit") !== undefined) - cmpPlayer.SetMaxPopulation(getSetting(playerData, playerDefaults, i, "PopulationLimit")); - - if (getSetting(playerData, playerDefaults, i, "Resources") !== undefined) - cmpPlayer.SetResourceCounts(getSetting(playerData, playerDefaults, i, "Resources")); - - if (getSetting(playerData, playerDefaults, i, "StartingTechnologies") !== undefined) - cmpPlayer.SetStartingTechnologies(getSetting(playerData, playerDefaults, i, "StartingTechnologies")); - - if (getSetting(playerData, playerDefaults, i, "DisabledTechnologies") !== undefined) - cmpPlayer.SetDisabledTechnologies(getSetting(playerData, playerDefaults, i, "DisabledTechnologies")); - - let disabledTemplates = []; - if (settings.DisabledTemplates !== undefined) - disabledTemplates = settings.DisabledTemplates; - if (getSetting(playerData, playerDefaults, i, "DisabledTemplates") !== undefined) - disabledTemplates = disabledTemplates.concat(getSetting(playerData, playerDefaults, i, "DisabledTemplates")); - if (disabledTemplates.length) - cmpPlayer.SetDisabledTemplates(disabledTemplates); + // Get the player setting if the gamesettings defines one, otherwise use the globally defined setting + let getPlayerOrGlobalSetting = function(settingName) + { + let setting = getSetting(playerData, playerDefaults, i, settingName); + if (setting !== undefined) + return setting; + + if (settings[settingName] !== undefined) + return settings[settingName]; + + return undefined; + }; + + let populationCap = getPlayerOrGlobalSetting("PopulationCap"); + if (populationCap) + cmpPlayer.SetMaxPopulation(populationCap); + + let startingResources = getPlayerOrGlobalSetting("StartingResources"); + if (startingResources) + cmpPlayer.SetResourceCounts(startingResources); + + let gatherRateMultiplier = getPlayerOrGlobalSetting("GatherRateMultiplier"); + if (gatherRateMultiplier) + cmpPlayer.SetGatherRateMultiplier(gatherRateMultiplier); + + // Concatenate player and global settings, if the setting is an array + let getPlayerOrGlobalSettingArray = function(settingName) + { + let setting = []; + + if (settings[settingName] !== undefined) + setting = settings[settingName]; + + let set = getSetting(playerData, playerDefaults, i, settingName); + if (set !== undefined) + setting = setting.concat(set); + + return setting; + }; + + for (let settingName of ["StartingTechnologies", "DisabledTechnologies", "DisabledTemplates"]) + { + let setting = getPlayerOrGlobalSettingArray(settingName); + if (setting.length) + cmpPlayer["Set" + settingName](setting); + } if (settings.DisableSpies) { cmpPlayer.AddDisabledTechnology("unlock_spies"); cmpPlayer.AddDisabledTemplate("special/spy");