Index: binaries/data/mods/public/maps/random/belgian_uplands.js
===================================================================
--- binaries/data/mods/public/maps/random/belgian_uplands.js (revision 16918)
+++ binaries/data/mods/public/maps/random/belgian_uplands.js (working copy)
@@ -21,10 +21,6 @@
// Heightmap functionality
//////////
-// Some general heightmap settings
-const MIN_HEIGHT = - SEA_LEVEL; // 20, should be set in the libs!
-const MAX_HEIGHT = 0xFFFF/HEIGHT_UNITS_PER_METRE - SEA_LEVEL; // A bit smaler than 90, should be set in the libs!
-
// Add random heightmap generation functionality
function getRandomReliefmap(minHeight, maxHeight)
{
Index: binaries/data/mods/public/maps/random/rmgen/library.js
===================================================================
--- binaries/data/mods/public/maps/random/rmgen/library.js (revision 16918)
+++ binaries/data/mods/public/maps/random/rmgen/library.js (working copy)
@@ -6,12 +6,22 @@
const PI = Math.PI;
const TWO_PI = 2 * Math.PI;
const TERRAIN_SEPARATOR = "|";
-const SEA_LEVEL = 20.0;
+const SEA_LEVEL = 160.0;
const CELL_SIZE = 4;
const HEIGHT_UNITS_PER_METRE = 92;
const MIN_MAP_SIZE = 128;
const MAX_MAP_SIZE = 512;
const FALLBACK_CIV = "athen";
+// Constants needed for heightmap_manipulation.js
+const MAX_HEIGHT_RANGE = 0xFFFF / HEIGHT_UNITS_PER_METRE // Engine limit, Roughly 700 meters
+const MIN_HEIGHT = - SEA_LEVEL;
+const MAX_HEIGHT = MAX_HEIGHT_RANGE - SEA_LEVEL;
+// Entity template structure keys that might change, for easier mod support
+const STARTING_ENTITY_KEY = "StartEntities";
+const START_ENTITY_TEMPLATE_PATH_KEY = "Template"
+const BUILDER_TEMPLATEPATH_KEYS = ["Builder", "Entities", "_string"];
+const PRODUCTION_TEMPLATEPATH_KEYS = ["ProductionQueue", "Entities", "_string"];
+const CIV_PLACEHOLDER_STRING = "{civ}";
/////////////////////////////////////////////////////////////////////////////////////////////
// Utility functions
@@ -394,15 +404,132 @@
return g_MapSettings.PlayerData.length - 1;
}
+// Takes nothing, returns an array of strings representing all available civilizations
+function getCivList()
+{
+ var raw_civData = RMS.GetCivData();
+ var civList = [];
+ for (var i = 0; i < raw_civData.length; ++i)
+ civList.push(JSON.parse(raw_civData[i]).Code);
+
+ return civList;
+}
+
+// Takes nothing, returns an associative array with civ strings as keys containing all unpacked civ data (Templates need to be unpacked with RMS.GetTemplate() if needed)
+function getFullCivData()
+{
+ var rawCivData = RMS.GetCivData();
+ var unpackedCivData = {};
+ for (var i = 0; i < rawCivData.length; i++)
+ {
+ var singleCivData = JSON.parse(rawCivData[i]);
+ unpackedCivData[singleCivData.Code] = singleCivData;
+ }
+
+ return unpackedCivData;
+}
+
+// Takes a player number (0-7, so Gaia excluded). Returns this players civ string
+// ToDo: If the player number is to high an error will occur (and the fallback won't be reached)!
function getCivCode(player)
{
if (g_MapSettings.PlayerData[player+1].Civ)
return g_MapSettings.PlayerData[player+1].Civ;
- warn("undefined civ specified for player " + (player + 1) + ", falling back to '" + FALLBACK_CIV + "'");
+ warn("Undefined civ specified for player " + (player + 1) + ", falling back to '" + FALLBACK_CIV + "'");
return FALLBACK_CIV;
}
+// Takes an entity path and a key list to get the templates value
+function getTemplateValue(entPath, key_list)
+{
+ var subdata = RMS.GetTemplate(entPath);
+ for (var i = 0; i < key_list.length; i++)
+ {
+ if (key_list[i] in subdata)
+ {
+ subdata = subdata[key_list[i]];
+ }
+ else
+ {
+ return false;
+ }
+ }
+ return subdata;
+}
+
+// Returns a list of all templates paths available to the given civ
+function getTempatePathList(civ)
+{
+ var templatePaths = getFullCivData();
+ if (civ in templatePaths)
+ {
+ templatePaths = templatePaths[civ];
+ }
+ else
+ {
+ var keys = [];
+ for (var key in templatePaths)
+ keys.push(key);
+ warn("getTempatePathList: Unknown civ: " + civ + " not in " + uneval(keys));
+ return false;
+ }
+ if (STARTING_ENTITY_KEY in templatePaths)
+ {
+ templatePaths = templatePaths[STARTING_ENTITY_KEY];
+ }
+ else
+ {
+ var keys = [];
+ for (var key in templatePaths)
+ keys.push(key);
+ warn("getTempatePathList: Civ has no starting entities as defined in STARTING_ENTITY_KEY (" + STARTING_ENTITY_KEY + "): " + uneval(keys));
+ return false;
+ }
+ for (var i = 0; i < templatePaths.length; i++)
+ {
+ if (START_ENTITY_TEMPLATE_PATH_KEY in templatePaths[i])
+ {
+ templatePaths[i] = templatePaths[i][START_ENTITY_TEMPLATE_PATH_KEY];
+ }
+ else
+ {
+ var keys = [];
+ for (var key in templatePaths[i])
+ keys.push(key);
+ warn("getTempatePathList: Starting entity list item has no template as defined in START_ENTITY_TEMPLATE_PATH_KEY (" + START_ENTITY_TEMPLATE_PATH_KEY + "): " + uneval(keys));
+ return false;
+ }
+ }
+ var foundNew = 1;
+ while (foundNew > 0)
+ {
+ foundNew = 0;
+ var methods = [BUILDER_TEMPLATEPATH_KEYS, PRODUCTION_TEMPLATEPATH_KEYS];
+ for (var m = 0; m < methods.length; m++)
+ {
+ for (var t = 0; t < templatePaths.length; t++)
+ {
+ var pathsToCheck = getTemplateValue(templatePaths[t], methods[m]);
+ if (typeof(pathsToCheck) === typeof(""))
+ {
+ pathsToCheck = pathsToCheck.split(/\s+/);
+ for (var c = 0; c < pathsToCheck.length; c++)
+ {
+ var actualPath = pathsToCheck[c].replace(CIV_PLACEHOLDER_STRING, civ);
+ if (templatePaths.indexOf(actualPath) == -1 && RMS.TemplateExists(actualPath))
+ {
+ templatePaths.push(actualPath);
+ foundNew++;
+ }
+ }
+ }
+ }
+ }
+ }
+ return templatePaths;
+}
+
function areAllies(player1, player2)
{
if ((g_MapSettings.PlayerData[player1+1].Team === undefined) || (g_MapSettings.PlayerData[player2+1].Team === undefined) || (g_MapSettings.PlayerData[player2+1].Team == -1) || (g_MapSettings.PlayerData[player1+1].Team == -1))
Index: binaries/data/mods/public/maps/random/rmgen/misc.js
===================================================================
--- binaries/data/mods/public/maps/random/rmgen/misc.js (revision 16918)
+++ binaries/data/mods/public/maps/random/rmgen/misc.js (working copy)
@@ -157,17 +157,17 @@
}
}
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// placeCivDefaultEntities
//
// Creates the default starting player entities depending on the players civ
// fx&fy: position of player base
// playerid: id of player
// angle: angle of main base building, optional, default is BUILDING_ANGlE
-// kwargs: Takes some optional keyword arguments to tweek things
-// 'iberWall': may be false, 'walls' (default) or 'towers'. Determines the defensive structures Iberians get as civ bonus
+// kwargs: Optional. Takes an associative array with keyword arguments to tweak things:
+// Known keys: 'iberWall': may be false, 'walls' (default) or 'towers'. Determines the defensive structures Iberians get as civ bonus
//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function placeCivDefaultEntities(fx, fz, playerid, angle, kwargs)
{
// Unpack kwargs
Index: binaries/data/mods/public/maps/random/rmgen/wall_builder.js
===================================================================
--- binaries/data/mods/public/maps/random/rmgen/wall_builder.js (revision 16918)
+++ binaries/data/mods/public/maps/random/rmgen/wall_builder.js (working copy)
@@ -37,46 +37,25 @@
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// WallElement class definition
//
-// Concept: If placed unrotated the wall's course is towards positive Y (top) with "outside" right (+X) and "inside" left (-X) like unrotated entities has their drop-points right (in rmgen)
-// The course of the wall will be changed by corners (bending != 0) and so the "inside"/"outside" direction
+// Concept: If placed unrotated the wall's build direction is towards positive Y (top) with "outside" right (+X) and "inside" left (-X) like unrotated entities has their drop-points right (in rmgen)
+// The build direction of the wall will be changed by corners (bending != 0) and so the "inside"/"outside" direction
//
-// type Descriptive string, example: "wallLong". NOTE: Not really needed. Mainly for custom wall elements and to get the wall element type in code
-// entity Optional. Template name string of the entity to be placed, example: "structures/cart_wall_long". Default is undefined (No entity placed)
-// angle Optional. The angle (float) added to place the entity so "outside" is right when the wall element is placed unrotated. Default is 0
-// width Optional. How far this wall element lengthens the wall (float), if unrotated the Y space needed. Default is 0
-// indent Optional. The lateral indentation of the entity, drawn "inside" (positive values) or pushed "outside" (negative values). Default is 0
-// bending Optional. How the course of the wall is changed after this element, positive is bending "in"/left/counter clockwise (like entity placement)
+// type Identification string.
+// entPath Optional. Template entity path string of the entity to be placed, example: "structures/cart_wall_long". Default is undefined (No entity placed)
+// angle Optional. Relative angle to the build direction. Default is 0
+// width Optional. How far this wall element lengthens the wall (float), if unrotated the Y space needed. Default is 0
+// indent Optional. The lateral indentation of the entity, drawn "inside" (positive values) or pushed "outside" (negative values). Default is 0
+// bending Optional. How the build direction of the wall is changed after this element, positive is bending "in"/left/counter clockwise (like entity placement)
// NOTE: Bending is not supported by all placement functions (see there)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function WallElement(type, entity, angle, width, indent, bending)
+function WallElement(type, entPath, angle, width, indent, bending)
{
this.type = type;
- // Default wall element type documentation:
- // Lengthening straight blocking (mainly left/right symmetric) wall elements (Walls and wall fortifications)
- // "wall" A blocking straight wall element that mainly lengthens the wall, self-explanatory
- // "wallShort" self-explanatory
- // "wallLong" self-explanatory
- // "tower" A blocking straight wall element with damage potential (but for palisades) that slightly lengthens the wall, example: wall tower, palisade tower(No attack)
- // "wallFort" A blocking straight wall element with massive damage potential that lengthens the wall, example: fortress, palisade fort
- // Lengthening straight non/custom blocking (mainly left/right symmetric) wall elements (Gates and entries)
- // "gate" A blocking straight wall element with passability determined by owner, example: gate (Functionality not yet implemented)
- // "entry" A non-blocking straight wall element (same width as gate) but without an actual template or just a flag/column/obelisk
- // "entryTower" A non-blocking straight wall element (same width as gate) represented by a single (maybe indented) template, example: defence tower, wall tower, outpost, watchtower
- // "entryFort" A non-blocking straight wall element represented by a single (maybe indented) template, example: fortress, palisade fort
- // Bending wall elements (Wall corners)
- // "cornerIn" A wall element bending the wall by PI/2 "inside" (left, +, see above), example: wall tower, palisade curve
- // "cornerOut" A wall element bending the wall by PI/2 "outside" (right, -, see above), example: wall tower, palisade curve
- // "cornerHalfIn" A wall element bending the wall by PI/4 "inside" (left, +, see above), example: wall tower, palisade curve. NOTE: Not yet implemented
- // "cornerHalfOut" A wall element bending the wall by PI/4 "outside" (right, -, see above), example: wall tower, palisade curve. NOTE: Not yet implemented
- // Zero length straight indented (mainly left/right symmetric) wall elements (Outposts/watchtowers and non-defensive base structures)
- // "outpost" A zero-length wall element without bending far indented so it stands outside the wall, example: outpost, defence tower, watchtower
- // "house" A zero-length wall element without bending far indented so it stands inside the wall that grants population bonus, example: house, hut, longhouse
- // "barracks" A zero-length wall element without bending far indented so it stands inside the wall that grants unit production, example: barracks, tavern, ...
- this.entity = entity;
- this.angle = (angle !== undefined) ? angle : 0*PI;
+ this.entPath = entPath;
+ this.angle = (angle !== undefined) ? angle : 0;
this.width = (width !== undefined) ? width : 0;
this.indent = (indent !== undefined) ? indent : 0;
- this.bending = (bending !== undefined) ? bending : 0*PI;
+ this.bending = (bending !== undefined) ? bending : 0;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -86,13 +65,13 @@
// It's mainly the abstract shape defined in a Fortress instances wall because different styles can be used for it (see wallStyles)
//
// type Descriptive string, example: "tiny". Not really needed (WallTool.wallTypes["type string"] is used). Mainly for custom wall elements
-// wall Optional. Array of wall element strings. Can be set afterwards. Default is an epty array.
+// wall Optional. Array of wall element strings. Can be set afterwards. Default is an empty array.
// Example: ["entrance", "wall", "cornerIn", "wall", "gate", "wall", "entrance", "wall", "cornerIn", "wall", "gate", "wall", "cornerIn", "wall"]
// centerToFirstElement Optional. Object with properties "x" and "y" representing a vector from the visual center to the first wall element. Default is undefined
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function Fortress(type, wall, centerToFirstElement)
{
- this.type = type; // Only usefull to get the type of the actual fortress
+ this.type = type;
this.wall = (wall !== undefined) ? wall : [];
this.centerToFirstElement = undefined;
}
@@ -107,8 +86,44 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var wallStyles = {};
-// Generic civ dependent wall style definition. "rome_siege" needs some tweek...
-var wallScaleByType = {"athen" : 1.5, "brit" : 1.5, "cart" : 1.8, "gaul" : 1.5, "iber" : 1.5, "mace" : 1.5, "maur": 1.5, "pers" : 1.5, "ptol" : 1.5, "rome" : 1.5, "sele" : 1.5, "spart" : 1.5, "rome_siege" : 1.5};
+// Get wall element width by template file path and angle
+function getTemplateWidthByAngle(entPath, angle)
+{
+ var template = RMS.GetTemplate(entPath);
+ var width = getTemplateValue(entPath, ["WallPiece", "Length"]) / CELL_SIZE;
+
+ return width;
+}
+
+// Add new WallElement by it's properties
+function addNewWallElement(style, type, angle)
+{
+ var templatePath = "structures/" + style + "_" + type
+ wallStyles[style][type] = new WallElement(type, templatePath, angle, getTemplateWidthByAngle(templatePath, angle));
+}
+
+// Find all wall sets by civ to be then put into wallStyles
+var entitiesByCiv = {};
+var civList = getCivList();
+for (var i = 0; i < civList.length; i++)
+{
+ var civ = civList[i];
+ var templatePathList = getTempatePathList(civ);
+ entitiesByCiv[civ] = templatePathList;
+}
+
+// Generic civ dependent wall style definition. Some, e.g. "rome_siege" needs tweaking...
+var wallScaleByType = {}; // To be removed TODO
+var civData = getFullCivData();
+for (var i = 0; i < civList.length; i++)
+{
+ var civ = civList[i];
+ var wallSets = civData[civ].WallSets;
+ if (wallSets.hasOwnProperty("Stone"))
+ wallScaleByType[civ] = wallSets.Stone.Scale;
+}
+// Non-civ but civ specific wall styles
+wallScaleByType.rome_siege = 1.5;
for (var style in wallScaleByType)
{
var civ = style;
@@ -116,18 +131,48 @@
civ = "rome";
wallStyles[style] = {};
// Default wall elements
- wallStyles[style]["tower"] = new WallElement("tower", "structures/" + style + "_wall_tower", PI, wallScaleByType[style]);
+ var templatePath = "structures/" + style + "_wall_tower";
+ var angle = PI;
+ var width = getTemplateWidthByAngle(templatePath, angle); // DEBUG
+ log("getTemplateWidthByAngle(" + templatePath + ") = " + width + ", used to be width = " + wallScaleByType[style]); // DEBUG
+ // wallStyles[style]["tower"] = new WallElement("tower", templatePath, angle, width);//wallScaleByType[style]);
+ addNewWallElement(style, "wall_tower", PI);
+ wallStyles[style]["tower"] = wallStyles[style]["wall_tower"]; // Shortcut
+
wallStyles[style]["endLeft"] = new WallElement("endLeft", "structures/" + style + "_wall_tower", PI, wallScaleByType[style]); // Same as tower. To be compatible with palisades...
wallStyles[style]["endRight"] = new WallElement("endRight", "structures/" + style + "_wall_tower", PI, wallScaleByType[style]); // Same as tower. To be compatible with palisades...
wallStyles[style]["cornerIn"] = new WallElement("cornerIn", "structures/" + style + "_wall_tower", 5*PI/4, 0, 0.35*wallScaleByType[style], PI/2); // 2^0.5 / 4 ~= 0.35 ~= 1/3
wallStyles[style]["cornerOut"] = new WallElement("cornerOut", "structures/" + style + "_wall_tower", 3*PI/4, 0.71*wallScaleByType[style], 0, -PI/2); // // 2^0.5 / 2 ~= 0.71 ~= 2/3
+
+ var templatePath = "structures/" + style + "_wall_short"; // DEBUG
+ var angle = 0*PI; // DEBUG
+ var width = getTemplateWidthByAngle(templatePath, angle); // DEBUG
+ log("getTemplateWidthByAngle(" + templatePath + ") = " + width + ", used to be width = " + 2*wallScaleByType[style]); // DEBUG
wallStyles[style]["wallShort"] = new WallElement("wallShort", "structures/" + style + "_wall_short", 0*PI, 2*wallScaleByType[style]);
+
+ var templatePath = "structures/" + style + "_wall_medium"; // DEBUG
+ var angle = 0*PI; // DEBUG
+ var width = getTemplateWidthByAngle(templatePath, angle); // DEBUG
+ log("getTemplateWidthByAngle(" + templatePath + ") = " + width + ", used to be width = " + 4*wallScaleByType[style]); // DEBUG
wallStyles[style]["wall"] = new WallElement("wall", "structures/" + style + "_wall_medium", 0*PI, 4*wallScaleByType[style]);
+
wallStyles[style]["wallMedium"] = new WallElement("wall", "structures/" + style + "_wall_medium", 0*PI, 4*wallScaleByType[style]);
+
+ var templatePath = "structures/" + style + "_wall_long"; // DEBUG
+ var angle = 0*PI; // DEBUG
+ var width = getTemplateWidthByAngle(templatePath, angle); // DEBUG
+ log("getTemplateWidthByAngle(" + templatePath + ") = " + width + ", used to be width = " + 6*wallScaleByType[style]); // DEBUG
wallStyles[style]["wallLong"] = new WallElement("wallLong", "structures/" + style + "_wall_long", 0*PI, 6*wallScaleByType[style]);
+
// Gate and entrance wall elements
var gateWidth = 6*wallScaleByType[style];
+
+ var templatePath = "structures/" + style + "_wall_gate"; // DEBUG
+ var angle = PI; // DEBUG
+ var width = getTemplateWidthByAngle(templatePath, angle); // DEBUG
+ log("getTemplateWidthByAngle(" + templatePath + ") = " + width + ", used to be width = " + 6*wallScaleByType[style]); // DEBUG
wallStyles[style]["gate"] = new WallElement("gate", "structures/" + style + "_wall_gate", PI, gateWidth);
+
wallStyles[style]["entry"] = new WallElement("entry", undefined, 0*PI, gateWidth);
wallStyles[style]["entryTower"] = new WallElement("entryTower", "structures/" + civ + "_defense_tower", PI, gateWidth, -4*wallScaleByType[style]);
wallStyles[style]["entryFort"] = new WallElement("entryFort", "structures/" + civ + "_fortress", 0*PI, 8*wallScaleByType[style], 6*wallScaleByType[style]);
@@ -150,22 +195,7 @@
wallStyles[style]["space3"] = new WallElement("space3", undefined, 0*PI, 3*wallScaleByType[style]);
wallStyles[style]["space4"] = new WallElement("space4", undefined, 0*PI, 4*wallScaleByType[style]);
}
-// Add wall fortresses for all generic styles
-wallStyles["athen"]["wallFort"] = new WallElement("wallFort", "structures/athen_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */);
-wallStyles["brit"]["wallFort"] = new WallElement("wallFort", "structures/brit_fortress", PI, 2.8);
-wallStyles["cart"]["wallFort"] = new WallElement("wallFort", "structures/cart_fortress", PI, 5.1, 1.6);
-wallStyles["gaul"]["wallFort"] = new WallElement("wallFort", "structures/gaul_fortress", PI, 4.2, 1.5);
-wallStyles["iber"]["wallFort"] = new WallElement("wallFort", "structures/iber_fortress", PI, 5, 0.2);
-wallStyles["mace"]["wallFort"] = new WallElement("wallFort", "structures/mace_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */);
-wallStyles["maur"]["wallFort"] = new WallElement("wallFort", "structures/maur_fortress", PI, 5.5);
-wallStyles["pers"]["wallFort"] = new WallElement("wallFort", "structures/pers_fortress", PI, 5.6/*5.5*/, 1.9/*1.7*/);
-wallStyles["ptol"]["wallFort"] = new WallElement("wallFort", "structures/ptol_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */);
-wallStyles["rome"]["wallFort"] = new WallElement("wallFort", "structures/rome_fortress", PI, 6.3, 2.1);
-wallStyles["sele"]["wallFort"] = new WallElement("wallFort", "structures/sele_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */);
-wallStyles["spart"]["wallFort"] = new WallElement("wallFort", "structures/spart_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */);
// Adjust "rome_siege" style
-wallStyles["rome_siege"]["wallFort"] = new WallElement("wallFort", "structures/rome_army_camp", PI, 7.2, 2);
-wallStyles["rome_siege"]["entryFort"] = new WallElement("entryFort", "structures/rome_army_camp", PI, 12, 7);
wallStyles["rome_siege"]["house"] = new WallElement("house", "structures/rome_tent", PI, 0, 4);
// Add special wall styles not well to implement generic (and to show how custom styles can be added)
@@ -178,7 +208,7 @@
wallStyles["palisades"]["wallLong"] = new WallElement("wall", "other/palisades_rocks_long", 0*PI, 3.5);
wallStyles["palisades"]["wallShort"] = new WallElement("wall", "other/palisades_rocks_short", 0*PI, 1.2);
wallStyles["palisades"]["tower"] = new WallElement("tower", "other/palisades_rocks_tower", -PI/2, 0.7);
-wallStyles["palisades"]["wallFort"] = new WallElement("wallFort", "other/palisades_rocks_fort", PI, 1.7);
+// wallStyles["palisades"]["wallFort"] = new WallElement("wallFort", "other/palisades_rocks_fort", PI, 1.7);
wallStyles["palisades"]["gate"] = new WallElement("gate", "other/palisades_rocks_gate", PI, 3.6);
wallStyles["palisades"]["entry"] = new WallElement("entry", undefined, wallStyles["palisades"]["gate"].angle, wallStyles["palisades"]["gate"].width);
wallStyles["palisades"]["entryTower"] = new WallElement("entryTower", "other/palisades_rocks_watchtower", 0*PI, wallStyles["palisades"]["gate"].width, -3);
@@ -208,31 +238,7 @@
wallStyles["road"]["tLeft"] = new WallElement("road", "actor|props/special/eyecandy/road_temperate_intersect_T.xml", PI, 4.5, 1.25);
wallStyles["road"]["tRight"] = new WallElement("road", "actor|props/special/eyecandy/road_temperate_intersect_T.xml", 0*PI, 4.5, -1.25);
-// Add special wall element collection "other"
-// NOTE: This is not a wall style in the common sense. Use with care!
-wallStyles["other"] = {};
-wallStyles["other"]["fence"] = new WallElement("fence", "other/fence_long", -PI/2, 3.1);
-wallStyles["other"]["fence_medium"] = new WallElement("fence", "other/fence_long", -PI/2, 3.1);
-wallStyles["other"]["fence_short"] = new WallElement("fence_short", "other/fence_short", -PI/2, 1.5);
-wallStyles["other"]["fence_stone"] = new WallElement("fence_stone", "other/fence_stone", -PI/2, 2.5);
-wallStyles["other"]["palisade"] = new WallElement("palisade", "other/palisades_rocks_short", 0, 1.2);
-wallStyles["other"]["column"] = new WallElement("column", "other/column_doric", 0, 1);
-wallStyles["other"]["obelisk"] = new WallElement("obelisk", "other/obelisk", 0, 2);
-wallStyles["other"]["spike"] = new WallElement("spike", "other/palisades_angle_spike", -PI/2, 1);
-wallStyles["other"]["bench"] = new WallElement("bench", "other/bench", PI/2, 1.5);
-wallStyles["other"]["benchForTable"] = new WallElement("benchForTable", "other/bench", 0, 0.5);
-wallStyles["other"]["table"] = new WallElement("table", "other/table_rectangle", 0, 1);
-wallStyles["other"]["table_square"] = new WallElement("table_square", "other/table_square", PI/2, 1);
-wallStyles["other"]["flag"] = new WallElement("flag", "special/rallypoint", PI, 1);
-wallStyles["other"]["standing_stone"] = new WallElement("standing_stone", "gaia/special_ruins_standing_stone", PI, 1);
-wallStyles["other"]["settlement"] = new WallElement("settlement", "gaia/special_settlement", PI, 6);
-wallStyles["other"]["gap"] = new WallElement("gap", undefined, 0, 2);
-wallStyles["other"]["gapSmall"] = new WallElement("gapSmall", undefined, 0, 1);
-wallStyles["other"]["gapLarge"] = new WallElement("gapLarge", undefined, 0, 4);
-wallStyles["other"]["cornerIn"] = new WallElement("cornerIn", undefined, 0, 0, 0, PI/2);
-wallStyles["other"]["cornerOut"] = new WallElement("cornerOut", undefined, 0, 0, 0, -PI/2);
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// fortressTypes data structure for some default fortress types
//
@@ -339,19 +345,19 @@
{
var element = wallStyles[style][wall[i]];
if (element === undefined && i == 0)
- warn("No valid wall element: " + wall[i]);
+ warn("No valid wall element: style = " + style + ", wall[" + i + "] = " + wall[i] + ", wallStyles[" + style + "][wall[" + i + "]] = " + wallStyles[style][wall[i]] + ", element = " + element + ", wall = " + wall);
// Indentation
var placeX = wallX - element.indent * cos(orientation);
var placeY = wallY - element.indent * sin(orientation);
// Add wall elements entity placement arguments to the alignment
- alignment.push({"x": placeX, "y": placeY, "entity": element.entity, "angle":orientation + element.angle});
+ alignment.push({"x": placeX, "y": placeY, "entPath": element.entPath, "angle":orientation + element.angle});
// Preset vars for the next wall element
if (i+1 < wall.length)
{
orientation += element.bending;
var nextElement = wallStyles[style][wall[i+1]];
if (nextElement === undefined)
- warn("No valid wall element: " + wall[i+1]);
+ warn("No valid wall element: style = " + style + ", wall[" + (i+1) + "] = " + wall[i+1] + ", wallStyles[" + style + "][wall[" + (i+1) + "]] = " + wallStyles[style][wall[i+1]] + ", nextElement = " + uneval(nextElement) + ", wall = " + wall);
var distance = (element.width + nextElement.width)/2;
// Corrections for elements with indent AND bending
var indent = element.indent;
@@ -427,7 +433,7 @@
// Places a wall with wall elements attached to another like determined by WallElement properties.
//
// startX, startY Where the first wall element should be placed
-// wall Array of wall element type strings. Example: ["endLeft", "wallLong", "tower", "wallLong", "endRight"]
+// wall Array of wall element types. Example: ["endLeft", "wallLong", "tower", "wallLong", "endRight"]
// style Optional. Wall style string. Default is the civ of the given player, "palisades" for gaia
// playerId Optional. Number of the player the wall will be placed for. Default is 0 (gaia)
// orientation Optional. Angle the first wall element is placed. Default is 0
@@ -455,9 +461,9 @@
// Place the wall
for (var iWall = 0; iWall < wall.length; iWall++)
{
- var entity = AM[iWall].entity;
- if (entity !== undefined)
- placeObject(AM[iWall].x, AM[iWall].y, entity, playerId, AM[iWall].angle);
+ var entPath = AM[iWall].entPath;
+ if (entPath !== undefined)
+ placeObject(AM[iWall].x, AM[iWall].y, entPath, playerId, AM[iWall].angle);
}
}
@@ -526,7 +532,7 @@
//
// startX/startY Coordinate of the approximate beginning of the wall (Not the place of the first wall element)
// targetX/targetY Coordinate of the approximate ending of the wall (Not the place of the last wall element)
-// wallPart Optional. An array of NON-BENDING wall element type strings. Default is ["tower", "wallLong"]
+// wallPart Optional. An array of NON-BENDING wall element types. Default is ["tower", "wallLong"]
// style Optional. Wall style string. Default is the civ of the given player, "palisades" for gaia
// playerId Optional. Integer number of the player. Default is 0 (gaia)
// endWithFirst Optional. A boolean value. If true the 1st wall element in the wallPart array will finalize the wall. Default is true
@@ -552,7 +558,7 @@
{
var bending = wallStyles[style][wallPart[elementIndex]].bending;
if (bending != 0)
- warn("Bending is not supported by placeLinearWall but a bending wall element is used: " + wallPart[elementIndex] + " -> wallStyles[style][wallPart[elementIndex]].entity");
+ warn("Bending is not supported by placeLinearWall but a bending wall element is used: " + wallPart[elementIndex] + " -> wallStyles[style][wallPart[elementIndex]].entPath");
}
// Setup number of wall parts
var totalLength = getDistance(startX, startY, targetX, targetY);
@@ -588,9 +594,9 @@
var placeX = x - wallEle.indent * sin(wallAngle);
var placeY = y + wallEle.indent * cos(wallAngle);
// Placement
- var entity = wallEle.entity;
- if (entity !== undefined)
- placeObject(placeX, placeY, entity, playerId, placeAngle + wallEle.angle);
+ var entPath = wallEle.entPath;
+ if (entPath !== undefined)
+ placeObject(placeX, placeY, entPath, playerId, placeAngle + wallEle.angle);
x += scaleFactor * wallEle.width/2 * cos(wallAngle);
y += scaleFactor * wallEle.width/2 * sin(wallAngle);
}
@@ -600,9 +606,9 @@
var wallEle = wallStyles[style][wallPart[0]];
x += scaleFactor * wallEle.width/2 * cos(wallAngle);
y += scaleFactor * wallEle.width/2 * sin(wallAngle);
- var entity = wallEle.entity;
- if (entity !== undefined)
- placeObject(x, y, entity, playerId, placeAngle + wallEle.angle);
+ var entPath = wallEle.entPath;
+ if (entPath !== undefined)
+ placeObject(x, y, entPath, playerId, placeAngle + wallEle.angle);
}
}
@@ -615,7 +621,7 @@
//
// centerX/Y Coordinates of the circle's center
// radius How wide the circle should be (approximate, especially if maxBendOff != 0)
-// wallPart Optional. An array of NON-BENDING wall element type strings. Default is ["tower", "wallLong"]
+// wallPart Optional. An array of NON-BENDING wall element types. Default is ["tower", "wallLong"]
// style Optional. Wall style string. Default is the civ of the given player, "palisades" for gaia
// playerId Optional. Integer number of the player. Default is 0 (gaia)
// orientation Optional. Where the open part of the (circular) arc should face (if maxAngle is < 2*PI). Default is 0
@@ -624,7 +630,8 @@
// maxBendOff Optional. How irregular the circle should be. 0 means regular circle, PI/2 means very irregular. Default is 0 (regular circle)
//
// NOTE: Don't use wall elements with bending like corners!
-// TODO: Perhaps add eccentricity and maxBendOff functionality (untill now an unused argument)
+// TODO: Perhaps add eccentricity
+// TODO: Check if maxBendOff parameter works in all cases
// TODO: Perhaps add functionality for spirals
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function placeCircularWall(centerX, centerY, radius, wallPart, style, playerId, orientation, maxAngle, endWithFirst, maxBendOff)
@@ -652,7 +659,7 @@
// Check arguments
if (maxBendOff > PI/2 || maxBendOff < 0)
- warn("placeCircularWall maxBendOff sould satisfy 0 < maxBendOff < PI/2 (~1.5) but it is: " + maxBendOff);
+ warn("placeCircularWall maxBendOff should satisfy 0 < maxBendOff < PI/2 (~1.5) but it is: " + maxBendOff);
for (var elementIndex = 0; elementIndex < wallPart.length; elementIndex++)
{
var bending = wallStyles[style][wallPart[elementIndex]].bending;
@@ -699,9 +706,9 @@
placeX -= wallEle.indent * cos(placeAngle);
placeY -= wallEle.indent * sin(placeAngle);
// Placement
- var entity = wallEle.entity;
- if (entity !== undefined)
- placeObject(placeX, placeY, entity, playerId, placeAngle + wallEle.angle);
+ var entPath = wallEle.entPath;
+ if (entPath !== undefined)
+ placeObject(placeX, placeY, entPath, playerId, placeAngle + wallEle.angle);
// Prepare for the next wall element
actualAngle += addAngle;
x = centerX + radius*cos(actualAngle);
@@ -717,7 +724,7 @@
var placeX = x + (targetX - x)/2;
var placeY = y + (targetY - y)/2;
var placeAngle = actualAngle + addAngle/2;
- placeObject(placeX, placeY, wallEle.entity, playerId, placeAngle + wallEle.angle);
+ placeObject(placeX, placeY, wallEle.entPath, playerId, placeAngle + wallEle.angle);
}
}
@@ -728,7 +735,7 @@
//
// centerX/Y Coordinates of the polygon's center
// radius How wide the circle should be in which the polygon fits
-// wallPart Optional. An array of NON-BENDING wall element type strings. Default is ["wallLong", "tower"]
+// wallPart Optional. An array of NON-BENDING wall element types. Default is ["wallLong", "tower"]
// cornerWallElement Optional. Wall element to be placed at the polygon's corners. Default is "tower"
// style Optional. Wall style string. Default is the civ of the given player, "palisades" for gaia
// playerId Optional. Integer number of the player. Default is 0 (gaia)
@@ -769,7 +776,7 @@
for (var i = 0; i < numCorners; i++)
{
var angleToCorner = getAngle(corners[i][0], corners[i][1], centerX, centerY);
- placeObject(corners[i][0], corners[i][1], wallStyles[style][cornerWallElement].entity, playerId, angleToCorner);
+ placeObject(corners[i][0], corners[i][1], wallStyles[style][cornerWallElement].entPath, playerId, angleToCorner);
if (!(skipFirstWall && i == 0))
{
placeLinearWall(
@@ -899,7 +906,7 @@
for (var i = 0; i < numCorners; i++)
{
var angleToCorner = getAngle(corners[i][0], corners[i][1], centerX, centerY);
- placeObject(corners[i][0], corners[i][1], wallStyles[style][cornerWallElement].entity, playerId, angleToCorner);
+ placeObject(corners[i][0], corners[i][1], wallStyles[style][cornerWallElement].entPath, playerId, angleToCorner);
if (!(skipFirstWall && i == 0))
{
placeLinearWall(
@@ -996,17 +1003,17 @@
var wallElement = "wallLong";
if ((pointIndex + 1) % gateOccurence == 0)
wallElement = "gate";
- var entity = wallStyles[style][wallElement].entity;
- if (entity)
+ var entPath = wallStyles[style][wallElement].entPath;
+ if (entPath)
{
placeObject(startX + (getDistance(startX, startY, targetX, targetY)/2)*cos(angle), // placeX
startY + (getDistance(startX, startY, targetX, targetY)/2)*sin(angle), // placeY
- entity, playerId, angle - PI/2 + wallStyles[style][wallElement].angle);
+ entPath, playerId, angle - PI/2 + wallStyles[style][wallElement].angle);
}
// Place tower
var startX = centerX + bestPointDerivation[(pointIndex + bestPointDerivation.length - 1) % bestPointDerivation.length][0];
var startY = centerY + bestPointDerivation[(pointIndex + bestPointDerivation.length - 1) % bestPointDerivation.length][1];
var angle = getAngle(startX, startY, targetX, targetY);
- placeObject(centerX + bestPointDerivation[pointIndex][0], centerY + bestPointDerivation[pointIndex][1], wallStyles[style]["tower"].entity, playerId, angle - PI/2 + wallStyles[style]["tower"].angle);
+ placeObject(centerX + bestPointDerivation[pointIndex][0], centerY + bestPointDerivation[pointIndex][1], wallStyles[style]["tower"].entPath, playerId, angle - PI/2 + wallStyles[style]["tower"].angle);
}
}
Index: binaries/data/mods/public/maps/random/schwarzwald.js
===================================================================
--- binaries/data/mods/public/maps/random/schwarzwald.js (revision 16918)
+++ binaries/data/mods/public/maps/random/schwarzwald.js (working copy)
@@ -131,7 +131,7 @@
// Setup paths
var pathSucsessRadius = baseRadius/2;
var pathAngleOff = PI/2;
-var pathWidth = 10; // This is not really the path's thickness in tiles but the number of tiles in the clumbs of the path
+var pathWidth = 10; // This is not really the path's thickness in tiles but the number of tiles in the clumps of the path
// Setup additional resources
var resourceRadius = 2*mapRadius/3; // 3*mapRadius/8;
@@ -232,10 +232,6 @@
//
////////////////
-// Some heightmap constants
-const MIN_HEIGHT = - SEA_LEVEL; // -20
-const MAX_HEIGHT = 0xFFFF/HEIGHT_UNITS_PER_METRE - SEA_LEVEL; // A bit smaller than 90
-
// Get the diferrence between minimum and maxumum height
function getMinAndMaxHeight(reliefmap)
{
Index: binaries/data/mods/public/maps/random/wall_demo.js
===================================================================
--- binaries/data/mods/public/maps/random/wall_demo.js (revision 16918)
+++ binaries/data/mods/public/maps/random/wall_demo.js (working copy)
@@ -62,20 +62,26 @@
var actualX = distToMapBorder;
var actualY = distToMapBorder;
// Wall styles are chosen by strings so the civ strings got by getCivCode() can be used
-// Other styles may be present as well but besides the civ styles only 'palisades' includes all wall element types (yet)
-const wallStyleList = ["athen", "brit", "cart", "gaul", "iber", "mace", "maur", "pers", "ptol", "rome", "sele", "spart", "rome_siege", "palisades"];
+var wallStyleList = getCivList();
+// Other styles may be available as well...
+wallStyleList.push("rome_siege");
+wallStyleList.push("palisades");
+// Check if all wall styles are present and remove unknown ones
+for (var i = 0; i < wallStyleList.length; i++)
+ if (!wallStyles.hasOwnProperty(wallStyleList[i]))
+ wallStyleList.splice(i, 1);
////////////////////////////////////////
// Custom wall placement (element based)
////////////////////////////////////////
-var wall = ['endLeft', 'wallLong', 'tower', 'wall', 'outpost', 'wall', 'cornerOut', 'wall', 'cornerIn', 'wall', 'house', 'endRight', 'entryTower', 'endLeft', 'wallShort', 'barracks', 'gate', 'tower', 'wall', 'wallFort', 'wall', 'endRight'];
+var wall = ['endLeft', 'wallLong', 'tower', 'tower', 'tower', 'wall', 'outpost', 'wall', 'cornerOut', 'wall', 'cornerIn', 'wall', 'house', 'endRight', 'entryTower', 'endLeft', 'wallShort', 'barracks', 'gate', 'tower', 'wall', 'endRight'];
for (var styleIndex = 0; styleIndex < wallStyleList.length; styleIndex++)
{
var startX = actualX + styleIndex * buildableMapSize/wallStyleList.length; // X coordinate of the first wall element
var startY = actualY; // Y coordinate of the first wall element
- var style = wallStyleList[styleIndex]; // // The wall's style like 'cart', 'iber', 'pers', 'rome', 'romeSiege' or 'palisades'
- var orientation = styleIndex * PI/64; // Orientation of the first wall element. 0 means 'outside' or 'front' is right (positive X, like object placement)
+ var style = wallStyleList[styleIndex]; // The wall's style like 'cart', 'iber', 'pers', 'rome', 'romeSiege' or 'palisades'
+ var orientation = PI/16 * sin(styleIndex * PI/4); // Orientation of the first wall element. 0 means 'outside' or 'front' is right (positive X, like object placement in Atlas)
// That means the wall will be build towards top (positive Y) if no corners are used
var playerId = 0; // Owner of the wall (like in placeObject). 0 is Gaia, 1 is Player 1 (default color blue), ...
placeWall(startX, startY, wall, style, playerId, orientation); // Actually placing the wall
@@ -155,7 +161,7 @@
{
for (var wallIndex = 0; wallIndex < numWallsPerStyle; wallIndex++)
{
- var startX = actualX + (styleIndex * numWallsPerStyle + wallIndex) * distToOtherWalls; // X coordinate the wall will start from
+ var startX = actualX + (styleIndex * numWallsPerStyle + wallIndex) * buildableMapSize/wallStyleList.length/numWallsPerStyle; // X coordinate the wall will start from
var startY = actualY; // Y coordinate the wall will start from
var endX = startX; // X coordinate the wall will end
var endY = actualY + (wallIndex + 1) * maxWallLength/numWallsPerStyle; // Y coordinate the wall will end
@@ -167,8 +173,6 @@
// placeObject(endX, endY, 'other/obelisk', 0, 0*PI); // Place visual marker to see where exsactly the wall ends
}
}
-actualX = distToMapBorder; // Reset actualX
-actualY += maxWallLength + distToOtherWalls; // Increase actualY for next wall placement method
// Export map data
Index: binaries/data/mods/public/maps/random/wall_demo.json
===================================================================
--- binaries/data/mods/public/maps/random/wall_demo.json (revision 16918)
+++ binaries/data/mods/public/maps/random/wall_demo.json (working copy)
@@ -2,7 +2,7 @@
"settings" : {
"Name" : "Wall Demo",
"Script" : "wall_demo.js",
- "Description" : "A demonstration of wall placement methods/code in random maps. Very large map size is recommended.",
+ "Description" : "A demonstration of wall placement methods/code in random maps. Giant map size is recommended!",
"BaseTerrain" : ["grass1"],
"BaseHeight" : 0,
"Keywords": ["demo"],
Index: binaries/data/mods/public/simulation/data/civs/athen.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/athen.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/athen.json (working copy)
@@ -109,6 +109,19 @@
"Special":"Train heroes and research technology pertaining to heroes."
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.5
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/data/civs/brit.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/brit.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/brit.json (working copy)
@@ -87,6 +87,19 @@
"Special": ""
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.5
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/data/civs/cart.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/cart.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/cart.json (working copy)
@@ -112,6 +112,19 @@
"Special":"Hire Iberian mercenaries."
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.8
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/data/civs/gaul.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/gaul.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/gaul.json (working copy)
@@ -87,6 +87,19 @@
"Special": ""
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.5
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/data/civs/iber.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/iber.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/iber.json (working copy)
@@ -85,6 +85,19 @@
"Special": "Defensive Aura - Gives all Iberian units and buildings within vision range of the monument a 10-15% attack boost. Build Limit: Only 5 may be built per map."
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.5
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/data/civs/mace.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/mace.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/mace.json (working copy)
@@ -114,6 +114,19 @@
"Special":"Constructs and upgrades all Macedonian siege engines."
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.5
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/data/civs/maur.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/maur.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/maur.json (working copy)
@@ -94,6 +94,19 @@
"Special":"Contentment: +10% Health and +10% resource gathering rates for all citizens and allied citizens within its range. Can be built anywhere except in enemy territory. Max Built: 10."
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.5
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/data/civs/pers.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/pers.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/pers.json (working copy)
@@ -104,6 +104,19 @@
"Special": "Train heroes and Persian Immortals. Gives a slow trickle of all resources as 'Satrapy Tribute.'"
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.5
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/data/civs/ptol.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/ptol.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/ptol.json (working copy)
@@ -113,6 +113,19 @@
"Special":"When built along the shoreline, removes shroud of darkness over all the water, revealing all the coast lines on the map. Limit: 1."
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.5
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/data/civs/rome.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/rome.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/rome.json (working copy)
@@ -89,6 +89,24 @@
"Special": "Can be built in neutral and enemy territory to strangle enemy towns."
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.5
+ },
+ "Siege":
+ {
+ "Template": "structures/rome_wallset_siege",
+ "Scale": 1.5
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/data/civs/sele.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/sele.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/sele.json (working copy)
@@ -114,6 +114,19 @@
"Special":"This is the Seleucid expansion building, similar to Civic Centers for other factions. It is weaker and carries a smaller territory influence, but is cheaper and built faster."
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.5
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/data/civs/spart.json
===================================================================
--- binaries/data/mods/public/simulation/data/civs/spart.json (revision 16918)
+++ binaries/data/mods/public/simulation/data/civs/spart.json (working copy)
@@ -105,6 +105,19 @@
"Special":"Train heroes and Spartiates and research technologies related to them."
}
],
+ "WallSets":
+ {
+ "Palisades":
+ {
+ "Template": "other/wallset_palisade",
+ "Scale": 0.55
+ },
+ "Stone":
+ {
+ "Template": "structures/athen_wallset_stone",
+ "Scale": 1.5
+ }
+ },
"StartEntities":
[
{
Index: binaries/data/mods/public/simulation/templates/structures/athen_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/athen_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/athen_wall_tower.xml (working copy)
@@ -16,6 +16,6 @@
structures/hellenes/wall_tower.xml
- 7.5
+ 7.0
\ No newline at end of file
Index: binaries/data/mods/public/simulation/templates/structures/brit_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/brit_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/brit_wall_tower.xml (working copy)
@@ -20,6 +20,6 @@
structures/celts/wall_tower.xml
- 9.0
+ 7.0
Index: binaries/data/mods/public/simulation/templates/structures/cart_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/cart_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/cart_wall_tower.xml (working copy)
@@ -20,6 +20,6 @@
structures/fndn_3x3.xml
- 11.0
+ 10.5
Index: binaries/data/mods/public/simulation/templates/structures/gaul_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/gaul_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/gaul_wall_tower.xml (working copy)
@@ -20,6 +20,6 @@
structures/celts/wall_tower.xml
- 9.0
+ 7.0
Index: binaries/data/mods/public/simulation/templates/structures/iber_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/iber_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/iber_wall_tower.xml (working copy)
@@ -21,6 +21,6 @@
structures/iberians/wall_tower.xml
- 10
+ 8.5
Index: binaries/data/mods/public/simulation/templates/structures/mace_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/mace_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/mace_wall_tower.xml (working copy)
@@ -16,6 +16,6 @@
structures/hellenes/wall_tower.xml
- 7.5
+ 7.0
\ No newline at end of file
Index: binaries/data/mods/public/simulation/templates/structures/maur_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/maur_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/maur_wall_tower.xml (working copy)
@@ -25,6 +25,6 @@
structures/mauryans/wall_tower.xml
- 9.5
+ 7.0
Index: binaries/data/mods/public/simulation/templates/structures/pers_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/pers_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/pers_wall_tower.xml (working copy)
@@ -16,6 +16,6 @@
structures/persians/wall_tower.xml
- 8.5
+ 7.5
Index: binaries/data/mods/public/simulation/templates/structures/ptol_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/ptol_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/ptol_wall_tower.xml (working copy)
@@ -16,6 +16,6 @@
structures/ptolemies/wall_tower.xml
- 10
+ 6.5
\ No newline at end of file
Index: binaries/data/mods/public/simulation/templates/structures/rome_siege_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/rome_siege_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/rome_siege_wall_tower.xml (working copy)
@@ -43,6 +43,6 @@
structures/romans/siege_wall_tower.xml
- 6.0
+ 5.5
Index: binaries/data/mods/public/simulation/templates/structures/rome_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/rome_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/rome_wall_tower.xml (working copy)
@@ -16,6 +16,6 @@
structures/romans/wall_tower.xml
- 9.5
+ 8.0
Index: binaries/data/mods/public/simulation/templates/structures/sele_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/sele_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/sele_wall_tower.xml (working copy)
@@ -16,6 +16,6 @@
structures/hellenes/wall_tower.xml
- 7.5
+ 7.0
\ No newline at end of file
Index: binaries/data/mods/public/simulation/templates/structures/spart_wall_tower.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/spart_wall_tower.xml (revision 16918)
+++ binaries/data/mods/public/simulation/templates/structures/spart_wall_tower.xml (working copy)
@@ -16,6 +16,6 @@
structures/hellenes/wall_tower.xml
- 7.5
+ 7.0
\ No newline at end of file