Index: binaries/data/mods/public/gui/gamesetup/gamesetup.js
===================================================================
--- binaries/data/mods/public/gui/gamesetup/gamesetup.js	(revision 13796)
+++ binaries/data/mods/public/gui/gamesetup/gamesetup.js	(working copy)
@@ -107,8 +107,8 @@
 
 	// Init map types
 	var mapTypes = getGUIObjectByName("mapTypeSelection");
-	mapTypes.list = ["Scenario","Random"];
-	mapTypes.list_data = ["scenario","random"];
+	mapTypes.list = ["Scenario","Skirmish","Random"];
+	mapTypes.list_data = ["scenario","skirmish","random"];
 
 	// Setup map filters - will appear in order they are added
 	addFilter("Default", function(settings) { return settings && !keywordTestOR(settings.Keywords, ["naval", "demo", "hidden"]); });
@@ -471,6 +471,7 @@
 	switch (g_GameAttributes.mapType)
 	{
 	case "scenario":
+	case "skirmish":
 		mapFiles = getXMLFileList(g_GameAttributes.mapPath);
 		break;
 
@@ -532,6 +533,7 @@
 		switch (g_GameAttributes.mapType)
 		{
 		case "scenario":
+		case "skirmish":
 			g_MapData[name] = Engine.LoadMapSettings(g_GameAttributes.mapPath+name);
 			break;
 
@@ -656,6 +658,15 @@
 		g_GameAttributes.mapPath = "maps/scenarios/";
 		break;
 
+	case "skirmish":
+		g_GameAttributes.mapPath = "maps/skirmish/";
+		g_GameAttributes.settings = {
+			PlayerData: g_DefaultPlayerData.slice(0, 4),
+			Seed: Math.floor(Math.random() * 65536),
+			CheatsEnabled: g_GameAttributes.settings.CheatsEnabled
+		};
+		break;
+
 	case "random":
 		g_GameAttributes.mapPath = "maps/random/";
 		g_GameAttributes.settings = {
@@ -959,6 +970,61 @@
 
 		break;
 
+	case "skirmish":
+		mapSizeText.caption = "Default";
+		numPlayersText.caption = numPlayers;
+		numPlayersSelection.hidden = true;
+		mapSize.hidden = true;
+		if (g_IsController)
+		{	//Host
+			revealMap.hidden = false;
+			victoryCondition.hidden = false;
+			lockTeams.hidden = false;
+			populationCap.hidden = false;
+			startingResources.hidden = false;
+			
+			numPlayersText.hidden = false;
+			mapSizeText.hidden = false;
+			revealMapText.hidden = true;
+			victoryConditionText.hidden = true;
+			lockTeamsText.hidden = true;
+			populationCapText.hidden = true;
+			startingResourcesText.hidden = true;
+			
+			// Update map preview
+			getGUIObjectByName("mapPreview").sprite = "cropped:(0.78125,0.5859375)session/icons/mappreview/" + getMapPreview(mapName);
+			
+			revealMapText.caption = "Reveal map:";
+			revealMap.checked = (mapSettings.RevealMap ? true : false);
+
+			victoryConditionText.caption = "Victory condition:";
+			victoryCondition.selected = victoryIdx;
+			lockTeamsText.caption = "Teams locked:";
+			lockTeams.checked = (mapSettings.LockTeams ? true : false);
+		}
+		else
+		{
+			// Client
+			numPlayersText.hidden = false;
+			mapSizeText.hidden = false;
+			revealMapText.hidden = false;
+			victoryConditionText.hidden = false;
+			lockTeamsText.hidden = false;
+			populationCap.hidden = true;
+			populationCapText.hidden = false;
+			startingResources.hidden = true;
+			startingResourcesText.hidden = false;
+			// Update map preview
+			getGUIObjectByName("mapPreview").sprite = "cropped:(0.78125,0.5859375)session/icons/mappreview/" + getMapPreview(mapName);
+
+			revealMapText.caption = (mapSettings.RevealMap ? "Yes" : "No");
+			victoryConditionText.caption = VICTORY_TEXT[victoryIdx];
+			lockTeamsText.caption = (mapSettings.LockTeams ? "Yes" : "No");
+		}
+
+		break;
+
+
 	case "scenario":
 		// For scenario just reflect settings for the current map
 		numPlayersSelection.hidden = true;
@@ -1046,7 +1112,7 @@
 				pCivText.caption = g_CivData[civ].Name;
 			pTeamText.caption = (team !== undefined && team >= 0) ? team+1 : "-";
 		}
-		else if (g_GameAttributes.mapType == "random")
+		else if (g_GameAttributes.mapType != "scenario")
 		{
 			pCivText.hidden = true;
 			pCiv.hidden = false;
Index: binaries/data/mods/public/gui/loading/loading.js
===================================================================
--- binaries/data/mods/public/gui/loading/loading.js	(revision 13796)
+++ binaries/data/mods/public/gui/loading/loading.js	(working copy)
@@ -46,6 +46,7 @@
 		var mapName = data.attribs.settings.Name;
 		switch (data.attribs.mapType)
 		{
+		case "skirmish":
 		case "scenario":
 			loadingMapName.caption = "Loading \"" + mapName + "\"";
 			break;
Index: binaries/data/mods/public/maps/scenarios/Acropolis 01.xml
===================================================================
--- binaries/data/mods/public/maps/scenarios/Acropolis 01.xml	(revision 13796)
+++ binaries/data/mods/public/maps/scenarios/Acropolis 01.xml	(working copy)
@@ -23078,4 +23078,4 @@
 		</Entity>
 	</Entities>
 	<Paths/>
-</Scenario>
\ No newline at end of file
+</Scenario>
Index: binaries/data/mods/public/simulation/components/SkirmishReplacer.js
===================================================================
--- binaries/data/mods/public/simulation/components/SkirmishReplacer.js	(revision 0)
+++ binaries/data/mods/public/simulation/components/SkirmishReplacer.js	(working copy)
@@ -0,0 +1,63 @@
+const civList = ["general", "athen", "brit", "cart", "celt", "gaul", "hele", "iber", "mace", "maur", "pers", "rome", "spart"];
+
+function SkirmishReplacer() {}
+
+
+SkirmishReplacer.prototype.Schema = "";
+for each (var civ in civList)
+	SkirmishReplacer.prototype.Schema += 
+		"<optional>" +
+			"<element name='"+civ+"' a:help='Replacement template for this civ. If this element is not present, the \"general\" element (with {civ} replaced by the civ code) is taken. If this element is empty, or not defined, and also no general element, this entity is just deleted.'>" +
+				"<text/>" +
+			"</element>" +
+		"</optional>";
+
+
+
+SkirmishReplacer.prototype.Init = function()
+{
+};
+
+SkirmishReplacer.prototype.OnOwnershipChanged = function(msg)
+{
+	if (msg.to == 0)
+		warn("Skirmish map elements can only be owned by regular players. Please delete entity "+this.entity+" or change the ownership to a non-gaia player.");
+};
+
+/**
+ * Replace this entity with a civ-specific entity on the first turn
+ */
+SkirmishReplacer.prototype.OnUpdate = function(msg)
+{
+	var cmpPlayer = QueryOwnerInterface(this.entity, IID_Player);
+	var civ = cmpPlayer.GetCiv();
+
+	var templateName = "";
+	if (civ in this.template)
+		templateName = this.template[civ];
+	else if ("general" in this.template)
+		templateName = this.template.general;
+
+	if (!templateName || civ == "gaia")
+	{
+		Engine.DestroyEntity(this.entity);
+		return;
+	}
+	
+	templateName = templateName.replace(/\{civ\}/g, civ);
+
+	var cmpCurPosition = Engine.QueryInterface(this.entity, IID_Position);
+	var replacement = Engine.AddEntity(templateName);
+	var cmpReplacementPosition = Engine.QueryInterface(replacement, IID_Position)
+	var pos = cmpCurPosition.GetPosition2D();
+	cmpReplacementPosition.JumpTo(pos.x, pos.y);
+	var rot = cmpCurPosition.GetRotation();
+	cmpReplacementPosition.SetYRotation(rot.y);
+	var cmpCurOwnership = Engine.QueryInterface(this.entity, IID_Ownership);
+	var cmpReplacementOwnership = Engine.QueryInterface(replacement, IID_Ownership);
+	cmpReplacementOwnership.SetOwner(cmpCurOwnership.GetOwner());
+
+	Engine.DestroyEntity(this.entity);
+};
+
+Engine.RegisterComponentType(IID_SkirmishReplacer, "SkirmishReplacer", SkirmishReplacer);
Index: binaries/data/mods/public/simulation/components/interfaces/SkirmishReplacer.js
===================================================================
--- binaries/data/mods/public/simulation/components/interfaces/SkirmishReplacer.js	(revision 0)
+++ binaries/data/mods/public/simulation/components/interfaces/SkirmishReplacer.js	(working copy)
@@ -0,0 +1 @@
+Engine.RegisterInterface("SkirmishReplacer");
Index: binaries/data/mods/public/simulation/templates/skirmish/structures/default_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/structures/default_civil_centre.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/structures/default_civil_centre.xml	(working copy)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_structure_civic_civil_centre">
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <SkirmishReplacer>
+    <general>structures/{civ}_civil_centre</general>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>structures/athenians/civic_centre_new.xml</Actor>
+  </VisualActor>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/structures/default_civil_centre.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_gate.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_gate.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_gate.xml	(working copy)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_structure_defense_wall_gate">
+  <Footprint>
+    <Square width="39.0" depth="8.0"/>
+    <Height>9.0</Height>
+  </Footprint>
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Obstruction>
+    <Obstructions>
+      <Right width="12" depth="6.5" x="12.5" z="0"/>
+      <Left width="12" depth="6.5" x="-12.5" z="0"/>
+      <Door width="13" depth="6.5" x="0" z="0"/>
+    </Obstructions>
+  </Obstruction>
+  <SkirmishReplacer>
+    <general>structures/{civ}_wall_gate</general>
+    <spart/>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>structures/hellenes/wall_gate.xml</Actor>
+  </VisualActor>
+  <WallPiece>
+    <Length>38.0</Length>
+  </WallPiece>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_gate.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_long.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_long.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_long.xml	(working copy)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_structure_defense_wall_long">
+  <Footprint>
+    <Square width="37" depth="9"/>
+    <Height>9.0</Height>
+  </Footprint>
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Obstruction>
+    <Static width="36.0" depth="8"/>
+  </Obstruction>
+  <SkirmishReplacer>
+    <general>structures/{civ}_wall_long</general>
+    <spart/>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>structures/hellenes/wall_long.xml</Actor>
+  </VisualActor>
+  <WallPiece>
+  	<Length>36.0</Length>
+  </WallPiece>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_long.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_medium.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_medium.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_medium.xml	(working copy)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_structure_defense_wall_medium">
+  <Footprint>
+    <Square width="25" depth="9"/>
+    <Height>9.0</Height>
+  </Footprint>
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Obstruction>
+    <Static width="24.0" depth="8"/>
+  </Obstruction>
+  <SkirmishReplacer>
+    <general>structures/{civ}_wall_medium</general>
+    <spart/>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>structures/hellenes/wall_medium.xml</Actor>
+  </VisualActor>
+  <WallPiece>
+  	<Length>24.0</Length>
+  </WallPiece>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_medium.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_short.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_short.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_short.xml	(working copy)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_structure_defense_wall_short">
+  <Footprint>
+    <Square width="13" depth="9"/>
+    <Height>9.0</Height>
+  </Footprint>
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Obstruction>
+    <Static width="12.0" depth="8"/>
+  </Obstruction>
+  <SkirmishReplacer>
+    <general>structures/{civ}_wall_short</general>
+    <spart/>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>structures/hellenes/wall_short.xml</Actor>
+  </VisualActor>
+  <WallPiece>
+  	<Length>12.0</Length>
+  </WallPiece>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_short.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_tower.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_tower.xml	(working copy)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_structure_defense_wall_tower">
+  <Footprint replace="">
+    <Circle radius="6.2"/>
+    <Height>15.0</Height>
+  </Footprint>
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Obstruction>
+    <Static width="10" depth="10"/>
+  </Obstruction>
+  <SkirmishReplacer>
+    <general>structures/{civ}_wall_tower</general>
+    <spart/>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>structures/hellenes/wall_tower.xml</Actor>
+  </VisualActor>
+  <WallPiece>
+    <Length>10</Length>
+  </WallPiece>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/structures/default_wall_tower.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_gate.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_gate.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_gate.xml	(working copy)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_structure_defense_wall_gate">
+  <Footprint>
+    <Square width="37.0" depth="9.5"/>
+    <Height>9.0</Height>
+  </Footprint>
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Obstruction>
+    <Obstructions>
+      <Right width="10" depth="8.5" x="13" z="0"/>
+      <Left width="10" depth="8.5" x="-13" z="0"/>
+      <Door width="16.0" depth="8.5" x="0" z="0"/>
+    </Obstructions>
+  </Obstruction>
+  <SkirmishReplacer>
+    <iber>structures/iber_wall_gate</iber>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>structures/iberians/wall_gate.xml</Actor>
+  </VisualActor>
+  <WallPiece>
+  	<Length>36.0</Length>
+  </WallPiece>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_gate.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_long.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_long.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_long.xml	(working copy)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_structure_defense_wall_long">
+  <Footprint>
+    <Square width="37" depth="9"/>
+    <Height>9.0</Height>
+  </Footprint>
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Obstruction>
+    <Static width="36.0" depth="8"/>
+  </Obstruction>
+  <SkirmishReplacer>
+    <iber>structures/iber_wall_long</iber>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>structures/iberians/wall_long.xml</Actor>
+  </VisualActor>
+  <WallPiece>
+  	<Length>36.0</Length>
+  </WallPiece>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_long.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_medium.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_medium.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_medium.xml	(working copy)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_structure_defense_wall_medium">
+  <Footprint>
+    <Square width="25" depth="9"/>
+    <Height>9.0</Height>
+  </Footprint>
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Obstruction>
+    <Static width="24.0" depth="8"/>
+  </Obstruction>
+  <SkirmishReplacer>
+    <iber>structures/iber_wall_medium</iber>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>structures/iberians/wall_medium.xml</Actor>
+  </VisualActor>
+  <WallPiece>
+  	<Length>24.0</Length>
+  </WallPiece>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_medium.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_short.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_short.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_short.xml	(working copy)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_structure_defense_wall_short">
+  <Footprint>
+    <Square width="13" depth="9"/>
+    <Height>9.0</Height>
+  </Footprint>
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Obstruction>
+    <Static width="12.0" depth="8"/>
+  </Obstruction>
+  <SkirmishReplacer>
+    <iber>structures/iber_wall_short</iber>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>structures/iberians/wall_short.xml</Actor>
+  </VisualActor>
+  <WallPiece>
+  	<Length>12.0</Length>
+  </WallPiece>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_short.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_tower.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_tower.xml	(working copy)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_structure_defense_wall_tower">
+  <Footprint replace="">
+    <Circle radius="6.2"/>
+    <Height>15.0</Height>
+  </Footprint>
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Obstruction>
+    <Static width="10" depth="10"/>
+  </Obstruction>
+  <SkirmishReplacer>
+    <iber>structures/iber_wall_tower</iber>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>structures/iberians/wall_tower.xml</Actor>
+  </VisualActor>
+  <WallPiece>
+    <Length>10</Length>
+  </WallPiece>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/structures/iber_wall_tower.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/units/default_cavalry.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/units/default_cavalry.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/units/default_cavalry.xml	(working copy)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_unit_cavalry">
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Promotion disable=""/>
+  <SkirmishReplacer>
+    <general>units/{civ}_cavalry_javelinist_b</general>
+    <celt>units/celt_cavalry_swordsman_b</celt>
+    <gaul>units/gaul_cavalry_swordsman_b</gaul>
+    <hele>units/hele_cavalry_swordsman_b</hele>
+    <iber>units/iber_cavalry_spearman_b</iber>
+    <maur>units/maur_support_elephant</maur>
+    <rome>units/rome_cavalry_spearman_b</rome>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>units/athenians/cavalry_javelinist_b.xml</Actor>
+  </VisualActor>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/units/default_cavalry.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/units/default_infantry_melee_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/units/default_infantry_melee_b.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/units/default_infantry_melee_b.xml	(working copy)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_unit_infantry_melee">
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Promotion disable=""/>
+  <SkirmishReplacer>
+    <general>units/{civ}_infantry_spearman_b</general>
+    <rome>units/rome_infantry_swordsman_b</rome>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>units/athenians/infantry_spearman_b.xml</Actor>
+  </VisualActor>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/units/default_infantry_melee_b.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/units/default_infantry_ranged_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/units/default_infantry_ranged_b.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/units/default_infantry_ranged_b.xml	(working copy)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_unit_infantry_ranged">
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <Promotion disable=""/>
+  <SkirmishReplacer>
+    <general>units/{civ}_infantry_javelinist_b</general>
+    <athen>units/athen_infantry_slinger_b</athen>
+    <brit>units/brit_infantry_slinger_b</brit>
+    <cart>units/cart_infantry_archer_b</cart>
+    <maur>units/maur_infantry_archer_b</maur>
+    <pers>units/pers_infantry_archer_b</pers>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>units/athenians/infantry_slinger_b.xml</Actor>
+  </VisualActor>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/units/default_infantry_ranged_b.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: binaries/data/mods/public/simulation/templates/skirmish/units/default_support_female_citizen.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/skirmish/units/default_support_female_citizen.xml	(revision 0)
+++ binaries/data/mods/public/simulation/templates/skirmish/units/default_support_female_citizen.xml	(working copy)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Entity parent="template_unit_support_female_citizen">
+  <Identity>
+    <Civ>skirm</Civ>
+  </Identity>
+  <SkirmishReplacer>
+   <general>units/{civ}_support_female_citizen</general>
+  </SkirmishReplacer>
+  <VisualActor>
+    <Actor>units/athenians/female_citizen.xml</Actor>
+  </VisualActor>
+</Entity>

Property changes on: binaries/data/mods/public/simulation/templates/skirmish/units/default_support_female_citizen.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: source/graphics/MapReader.cpp
===================================================================
--- source/graphics/MapReader.cpp	(revision 13796)
+++ source/graphics/MapReader.cpp	(working copy)
@@ -64,7 +64,7 @@
 }
 
 // LoadMap: try to load the map from given file; reinitialise the scene to new data if successful
-void CMapReader::LoadMap(const VfsPath& pathname, CTerrain *pTerrain_,
+void CMapReader::LoadMap(const VfsPath& pathname,  const CScriptValRooted& settings, CTerrain *pTerrain_,
 						 WaterManager* pWaterMan_, SkyManager* pSkyMan_,
 						 CLightEnv *pLightEnv_, CGameView *pGameView_, CCinemaManager* pCinema_, CTriggerManager* pTrigMan_, CPostprocManager* pPostproc_,
 						 CSimulation2 *pSimulation2_, const CSimContext* pSimContext_, int playerID_, bool skipEntities)
@@ -83,6 +83,7 @@
 	m_PlayerID = playerID_;
 	m_SkipEntities = skipEntities;
 	m_StartingCameraTarget = INVALID_ENTITY;
+	m_ScriptSettings = settings;
 
 	filename_xml = pathname.ChangeExtension(L".xml");
 
@@ -116,8 +117,11 @@
 	if (pPostproc)
 		pPostproc->SetPostEffect(L"default");
 
-	// load map settings script
-	RegMemFun(this, &CMapReader::LoadScriptSettings, L"CMapReader::LoadScriptSettings", 50);
+	// load map or script settings script
+	if (settings.undefined())
+		RegMemFun(this, &CMapReader::LoadScriptSettings, L"CMapReader::LoadScriptSettings", 50);
+	else
+		RegMemFun(this, &CMapReader::LoadRMSettings, L"CMapReader::LoadRMSettings", 50);
 
 	// load player settings script (must be done before reading map)
 	RegMemFun(this, &CMapReader::LoadPlayerSettings, L"CMapReader::LoadPlayerSettings", 50);
@@ -138,7 +142,6 @@
 	RegMemFun(this, &CMapReader::DelayLoadFinished, L"CMapReader::DelayLoadFinished", 5);
 }
 
-
 // LoadRandomMap: try to load the map data; reinitialise the scene to new data if successful
 void CMapReader::LoadRandomMap(const CStrW& scriptFile, const CScriptValRooted& settings, CTerrain *pTerrain_,
 						 WaterManager* pWaterMan_, SkyManager* pSkyMan_,
Index: source/graphics/MapReader.h
===================================================================
--- source/graphics/MapReader.h	(revision 13796)
+++ source/graphics/MapReader.h	(working copy)
@@ -53,7 +53,7 @@
 	~CMapReader();
 
 	// LoadMap: try to load the map from given file; reinitialise the scene to new data if successful
-	void LoadMap(const VfsPath& pathname, CTerrain*, WaterManager*, SkyManager*, CLightEnv*, CGameView*,
+	void LoadMap(const VfsPath& pathname, const CScriptValRooted& settings, CTerrain*, WaterManager*, SkyManager*, CLightEnv*, CGameView*,
 		CCinemaManager*, CTriggerManager*, CPostprocManager* pPostproc, CSimulation2*, const CSimContext*, 
 	        int playerID, bool skipEntities);
 
Index: source/ps/Game.cpp
===================================================================
--- source/ps/Game.cpp	(revision 13796)
+++ source/ps/Game.cpp	(working copy)
@@ -146,9 +146,11 @@
 	{
 		// Load scenario attributes
 		std::wstring mapFile;
+		// let settings undefined to take map file settings instead
+		CScriptValRooted settings;
 		m_Simulation2->GetScriptInterface().GetProperty(attribs.get(), "map", mapFile);
 
-		m_World->RegisterInit(mapFile, m_PlayerID);
+		m_World->RegisterInit(L"scenarios/"+mapFile, settings, m_PlayerID);
 	}
 	else if (mapType == "random")
 	{
@@ -160,6 +162,17 @@
 		m_Simulation2->GetScriptInterface().GetProperty(attribs.get(), "settings", settings);
 
 		m_World->RegisterInitRMS(scriptFile, settings, m_PlayerID);
+	} 
+	else if (mapType == "skirmish")
+	{
+		// Load skirmish attributes
+		std::wstring mapFile;
+		CScriptValRooted settings;
+
+		m_Simulation2->GetScriptInterface().GetProperty(attribs.get(), "map", mapFile);
+		m_Simulation2->GetScriptInterface().GetProperty(attribs.get(), "settings", settings);
+
+		m_World->RegisterInit(L"skirmish/"+mapFile, settings, m_PlayerID);
 	}
 
 	if (m_IsSavedGame)
Index: source/ps/World.cpp
===================================================================
--- source/ps/World.cpp	(revision 13796)
+++ source/ps/World.cpp	(working copy)
@@ -65,12 +65,12 @@
 /**
  * Initializes the game world with the attributes provided.
  **/
-void CWorld::RegisterInit(const CStrW& mapFile, int playerID)
+void CWorld::RegisterInit(const CStrW& mapFile, const CScriptValRooted& settings, int playerID)
 {
 	// Load the map, if one was specified
 	if (mapFile.length())
 	{
-		VfsPath mapfilename(VfsPath("maps/scenarios") / (mapFile + L".pmp"));
+		VfsPath mapfilename(VfsPath("maps/") / (mapFile + L".pmp"));
 		CMapReader* reader = 0;
 
 		try
@@ -77,7 +77,7 @@
 		{
 			reader = new CMapReader;
 			CTriggerManager* pTriggerManager = NULL;
-			reader->LoadMap(mapfilename, m_Terrain,
+			reader->LoadMap(mapfilename, settings, m_Terrain,
 				CRenderer::IsInitialised() ? g_Renderer.GetWaterManager() : NULL,
 				CRenderer::IsInitialised() ? g_Renderer.GetSkyManager() : NULL,
 				&g_LightEnv, m_pGame->GetView(),
Index: source/ps/World.h
===================================================================
--- source/ps/World.h	(revision 13796)
+++ source/ps/World.h	(working copy)
@@ -73,7 +73,7 @@
 	/*
 	Initialize the World - load the map and all objects
 	*/
-	void RegisterInit(const CStrW& mapFile, int playerID);
+	void RegisterInit(const CStrW& mapFile, const CScriptValRooted& settings, int playerID);
 
 	/*
 	Initialize the World - generate and load the random map
Index: source/simulation2/Simulation2.cpp
===================================================================
--- source/simulation2/Simulation2.cpp	(revision 13796)
+++ source/simulation2/Simulation2.cpp	(working copy)
@@ -388,10 +388,11 @@
 		{
 			// Load scenario attributes
 			std::wstring mapFile;
+			CScriptValRooted settings;
 			m_ComponentManager.GetScriptInterface().GetProperty(m_InitAttributes.get(), "map", mapFile);
 
 			VfsPath mapfilename(VfsPath("maps/scenarios") / (mapFile + L".pmp"));
-			mapReader->LoadMap(mapfilename, &secondaryTerrain, NULL, NULL, NULL, NULL, NULL, NULL,
+			mapReader->LoadMap(mapfilename, settings, &secondaryTerrain, NULL, NULL, NULL, NULL, NULL, NULL,
 				NULL, NULL, &secondaryContext, INVALID_PLAYER, true); // throws exception on failure
 		}
 		else
Index: source/simulation2/components/tests/test_Pathfinder.h
===================================================================
--- source/simulation2/components/tests/test_Pathfinder.h	(revision 13796)
+++ source/simulation2/components/tests/test_Pathfinder.h	(working copy)
@@ -66,9 +66,10 @@
 		sim2.ResetState();
 
 		CMapReader* mapReader = new CMapReader(); // it'll call "delete this" itself
+		CScriptValRooted settings;
 
 		LDR_BeginRegistering();
-		mapReader->LoadMap(L"maps/scenarios/Median Oasis 01.pmp", &terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+		mapReader->LoadMap(L"maps/scenarios/Median Oasis 01.pmp", settings, &terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 			&sim2, &sim2.GetSimContext(), -1, false);
 		LDR_EndRegistering();
 		TS_ASSERT_OK(LDR_NonprogressiveLoad());
Index: source/simulation2/tests/test_Serializer.h
===================================================================
--- source/simulation2/tests/test_Serializer.h	(revision 13796)
+++ source/simulation2/tests/test_Serializer.h	(working copy)
@@ -642,9 +642,10 @@
 		sim2.ResetState();
 
 		CMapReader* mapReader = new CMapReader(); // it'll call "delete this" itself
+		CScriptValRooted settings;
 
 		LDR_BeginRegistering();
-		mapReader->LoadMap(L"maps/scenarios/Latium.pmp", &terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+		mapReader->LoadMap(L"maps/scenarios/Latium.pmp", settings, &terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 			&sim2, &sim2.GetSimContext(), -1, false);
 		LDR_EndRegistering();
 		TS_ASSERT_OK(LDR_NonprogressiveLoad());
