Ticket #2944: gen_wall_builder2015-8-3.patch
File gen_wall_builder2015-8-3.patch, 30.3 KB (added by , 9 years ago) |
---|
-
binaries/data/mods/public/maps/random/belgian_uplands.js
21 21 // Heightmap functionality 22 22 ////////// 23 23 24 // Some general heightmap settings25 const MIN_HEIGHT = - SEA_LEVEL; // 20, should be set in the libs!26 const MAX_HEIGHT = 0xFFFF/HEIGHT_UNITS_PER_METRE - SEA_LEVEL; // A bit smaler than 90, should be set in the libs!27 28 24 // Add random heightmap generation functionality 29 25 function getRandomReliefmap(minHeight, maxHeight) 30 26 { -
binaries/data/mods/public/maps/random/rmgen/library.js
6 6 const PI = Math.PI; 7 7 const TWO_PI = 2 * Math.PI; 8 8 const TERRAIN_SEPARATOR = "|"; 9 const SEA_LEVEL = 20.0;9 const SEA_LEVEL = 160.0; 10 10 const CELL_SIZE = 4; 11 11 const HEIGHT_UNITS_PER_METRE = 92; 12 12 const MIN_MAP_SIZE = 128; 13 13 const MAX_MAP_SIZE = 512; 14 14 const FALLBACK_CIV = "athen"; 15 // Constants needed for heightmap_manipulation.js 16 const MAX_HEIGHT_RANGE = 0xFFFF / HEIGHT_UNITS_PER_METRE // Engine limit, Roughly 700 meters 17 const MIN_HEIGHT = - SEA_LEVEL; 18 const MAX_HEIGHT = MAX_HEIGHT_RANGE - SEA_LEVEL; 19 // Entity template structure keys that might change, for easier mod support 20 const STARTING_ENTITY_KEY = "StartEntities"; 21 const START_ENTITY_TEMPLATE_PATH_KEY = "Template" 22 const BUILDER_TEMPLATEPATH_KEYS = ["Builder", "Entities", "_string"]; 23 const PRODUCTION_TEMPLATEPATH_KEYS = ["ProductionQueue", "Entities", "_string"]; 24 const CIV_PLACEHOLDER_STRING = "{civ}"; 15 25 16 26 ///////////////////////////////////////////////////////////////////////////////////////////// 17 27 // Utility functions … … 394 404 return g_MapSettings.PlayerData.length - 1; 395 405 } 396 406 407 // Takes nothing, returns an array of strings representing all available civilizations 408 function getCivList() 409 { 410 var raw_civData = RMS.GetCivData(); 411 var civList = []; 412 for (var i = 0; i < raw_civData.length; ++i) 413 civList.push(JSON.parse(raw_civData[i]).Code); 414 415 return civList; 416 } 417 418 // 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) 419 function getFullCivData() 420 { 421 var rawCivData = RMS.GetCivData(); 422 var unpackedCivData = {}; 423 for (var i = 0; i < rawCivData.length; i++) 424 { 425 var singleCivData = JSON.parse(rawCivData[i]); 426 unpackedCivData[singleCivData.Code] = singleCivData; 427 } 428 429 return unpackedCivData; 430 } 431 432 // Takes a player number (0-7, so Gaia excluded). Returns this players civ string 433 // ToDo: If the player number is to high an error will occur (and the fallback won't be reached)! 397 434 function getCivCode(player) 398 435 { 399 436 if (g_MapSettings.PlayerData[player+1].Civ) 400 437 return g_MapSettings.PlayerData[player+1].Civ; 401 438 402 warn(" undefined civ specified for player " + (player + 1) + ", falling back to '" + FALLBACK_CIV + "'");439 warn("Undefined civ specified for player " + (player + 1) + ", falling back to '" + FALLBACK_CIV + "'"); 403 440 return FALLBACK_CIV; 404 441 } 405 442 443 // Takes an entity path and a key list to get the templates value 444 function getTemplateValue(entPath, key_list) 445 { 446 var subdata = RMS.GetTemplate(entPath); 447 for (var i = 0; i < key_list.length; i++) 448 { 449 if (key_list[i] in subdata) 450 { 451 subdata = subdata[key_list[i]]; 452 } 453 else 454 { 455 return false; 456 } 457 } 458 return subdata; 459 } 460 461 // Returns a list of all templates paths available to the given civ 462 function getTempatePathList(civ) 463 { 464 var templatePaths = getFullCivData(); 465 if (civ in templatePaths) 466 { 467 templatePaths = templatePaths[civ]; 468 } 469 else 470 { 471 var keys = []; 472 for (var key in templatePaths) 473 keys.push(key); 474 warn("getTempatePathList: Unknown civ: " + civ + " not in " + uneval(keys)); 475 return false; 476 } 477 if (STARTING_ENTITY_KEY in templatePaths) 478 { 479 templatePaths = templatePaths[STARTING_ENTITY_KEY]; 480 } 481 else 482 { 483 var keys = []; 484 for (var key in templatePaths) 485 keys.push(key); 486 warn("getTempatePathList: Civ has no starting entities as defined in STARTING_ENTITY_KEY (" + STARTING_ENTITY_KEY + "): " + uneval(keys)); 487 return false; 488 } 489 for (var i = 0; i < templatePaths.length; i++) 490 { 491 if (START_ENTITY_TEMPLATE_PATH_KEY in templatePaths[i]) 492 { 493 templatePaths[i] = templatePaths[i][START_ENTITY_TEMPLATE_PATH_KEY]; 494 } 495 else 496 { 497 var keys = []; 498 for (var key in templatePaths[i]) 499 keys.push(key); 500 warn("getTempatePathList: Starting entity list item has no template as defined in START_ENTITY_TEMPLATE_PATH_KEY (" + START_ENTITY_TEMPLATE_PATH_KEY + "): " + uneval(keys)); 501 return false; 502 } 503 } 504 var foundNew = 1; 505 while (foundNew > 0) 506 { 507 foundNew = 0; 508 var methods = [BUILDER_TEMPLATEPATH_KEYS, PRODUCTION_TEMPLATEPATH_KEYS]; 509 for (var m = 0; m < methods.length; m++) 510 { 511 for (var t = 0; t < templatePaths.length; t++) 512 { 513 var pathsToCheck = getTemplateValue(templatePaths[t], methods[m]); 514 if (typeof(pathsToCheck) === typeof("")) 515 { 516 pathsToCheck = pathsToCheck.split(/\s+/); 517 for (var c = 0; c < pathsToCheck.length; c++) 518 { 519 var actualPath = pathsToCheck[c].replace(CIV_PLACEHOLDER_STRING, civ); 520 if (templatePaths.indexOf(actualPath) == -1 && RMS.TemplateExists(actualPath)) 521 { 522 templatePaths.push(actualPath); 523 foundNew++; 524 } 525 } 526 } 527 } 528 } 529 } 530 return templatePaths; 531 } 532 406 533 function areAllies(player1, player2) 407 534 { 408 535 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)) -
binaries/data/mods/public/maps/random/rmgen/mapgen.js
1 var TILE_CENTERED_HEIGHT_MAP = false; 1 var TILE_CENTERED_HEIGHT_MAP = false; // Only touch this if you REALLY KNOW what you are doing! 2 2 var WATER_LEVEL_CHANGED = false; 3 3 4 4 var g_Map; -
binaries/data/mods/public/maps/random/rmgen/misc.js
157 157 } 158 158 } 159 159 160 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 160 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 161 161 // placeCivDefaultEntities 162 162 // 163 163 // Creates the default starting player entities depending on the players civ 164 164 // fx&fy: position of player base 165 165 // playerid: id of player 166 166 // angle: angle of main base building, optional, default is BUILDING_ANGlE 167 // kwargs: Takes some optional keyword arguments to tweek things168 // 'iberWall': may be false, 'walls' (default) or 'towers'. Determines the defensive structures Iberians get as civ bonus167 // kwargs: Optional. Takes an associative array with keyword arguments to tweak things: 168 // Known keys: 'iberWall': may be false, 'walls' (default) or 'towers'. Determines the defensive structures Iberians get as civ bonus 169 169 // 170 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 170 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 171 171 function placeCivDefaultEntities(fx, fz, playerid, angle, kwargs) 172 172 { 173 173 // Unpack kwargs -
binaries/data/mods/public/maps/random/rmgen/wall_builder.js
107 107 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 108 108 var wallStyles = {}; 109 109 110 // Generic civ dependent wall style definition. "rome_siege" needs some tweek... 111 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}; 110 // Get wall element width by template and angle 111 function getTemplateWidthByAngle(templatePath, angle) 112 { 113 var template = RMS.GetTemplate(templatePath); 114 var width = undefined; 115 if (template.hasOwnProperty("Footprint")) 116 { 117 if (template.Footprint.hasOwnProperty("Square")) 118 { 119 if (template.Footprint.Square.hasOwnProperty("@width")) 120 { 121 if (template.Footprint.Square.hasOwnProperty("@depth")) 122 { 123 width = max(parseFloat(template.Footprint.Square["@width"]) * abs(cos(angle)), parseFloat(template.Footprint.Square["@depth"]) * abs(sin(angle))) / CELL_SIZE; 124 } 125 else 126 { 127 warn("wall_builder.js: getTemplateWidthByAngle(): Template " + templatePath + " has a square Footprint but no property '@depth'"); 128 } 129 } 130 else 131 { 132 warn("wall_builder.js: getTemplateWidthByAngle(): Template " + templatePath + " has a square Footprint but no property '@width'"); 133 } 134 } 135 else if (template.Footprint.hasOwnProperty("Circle")) 136 { 137 if (template.Footprint.Circle.hasOwnProperty("@radius")) 138 { 139 width = parseFloat(template.Footprint.Circle["@radius"]) / CELL_SIZE; 140 } 141 else 142 { 143 warn("wall_builder.js: getTemplateWidthByAngle(): Template " + templatePath + " has a circle Footprint but no property '@radius'"); 144 } 145 } 146 else 147 { 148 warn("wall_builder.js: getTemplateWidthByAngle(): Template " + templatePath + " has a Footprint that is neither 'Square' nor 'Circle'"); 149 } 150 } 151 else 152 { 153 warn("wall_builder.js: getTemplateWidthByAngle(): Template " + templatePath + " has no property'Footprint'"); 154 } 155 156 return width; 157 } 158 159 // Add new WallElement by it's properties 160 function addNewWallElement(style, name, angle) 161 { 162 var templatePath = "structures/" + style + "_" + name 163 wallStyles[style][name] = new WallElement(name, templatePath, angle, getTemplateWidthByAngle(templatePath, angle)); 164 } 165 166 // Find all wall sets by civ to be then put into wallStyles 167 var entitiesByCiv = {}; 168 var civList = getCivList(); 169 for (var i = 0; i < civList.length; i++) 170 { 171 var civ = civList[i]; 172 var templatePathList = getTempatePathList(civ); 173 entitiesByCiv[civ] = templatePathList; 174 } 175 176 // Generic civ dependent wall style definition. Some, e.g. "rome_siege" needs tweaking... 177 var wallScaleByType = {}; // To be removed TODO 178 var civData = getFullCivData(); 179 for (var i = 0; i < civList.length; i++) 180 { 181 var civ = civList[i]; 182 var wallSets = civData[civ].WallSets; 183 if (wallSets.hasOwnProperty("Stone")) 184 wallScaleByType[civ] = wallSets.Stone.Scale; // Wallset Stone still hardcoded 185 } 186 // Non-civ but civ specific wall styles 187 wallScaleByType.rome_siege = 1.5; 112 188 for (var style in wallScaleByType) 113 189 { 114 190 var civ = style; … … 116 192 civ = "rome"; 117 193 wallStyles[style] = {}; 118 194 // Default wall elements 119 wallStyles[style]["tower"] = new WallElement("tower", "structures/" + style + "_wall_tower", PI, wallScaleByType[style]); 195 var templatePath = "structures/" + style + "_wall_tower"; 196 var angle = PI; 197 var width = getTemplateWidthByAngle(templatePath, angle); // DEBUG 198 log("getTemplateWidthByAngle(" + templatePath + ") = " + width + ", used to be width = " + wallScaleByType[style]); // DEBUG 199 // wallStyles[style]["tower"] = new WallElement("tower", templatePath, angle, width);//wallScaleByType[style]); 200 addNewWallElement(style, "wall_tower", PI); 201 wallStyles[style]["tower"] = wallStyles[style]["wall_tower"]; // Shortcut 202 120 203 wallStyles[style]["endLeft"] = new WallElement("endLeft", "structures/" + style + "_wall_tower", PI, wallScaleByType[style]); // Same as tower. To be compatible with palisades... 121 204 wallStyles[style]["endRight"] = new WallElement("endRight", "structures/" + style + "_wall_tower", PI, wallScaleByType[style]); // Same as tower. To be compatible with palisades... 122 205 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 123 206 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 207 208 var templatePath = "structures/" + style + "_wall_short"; // DEBUG 209 var angle = 0*PI; // DEBUG 210 var width = getTemplateWidthByAngle(templatePath, angle); // DEBUG 211 log("getTemplateWidthByAngle(" + templatePath + ") = " + width + ", used to be width = " + 2*wallScaleByType[style]); // DEBUG 124 212 wallStyles[style]["wallShort"] = new WallElement("wallShort", "structures/" + style + "_wall_short", 0*PI, 2*wallScaleByType[style]); 213 214 var templatePath = "structures/" + style + "_wall_medium"; // DEBUG 215 var angle = 0*PI; // DEBUG 216 var width = getTemplateWidthByAngle(templatePath, angle); // DEBUG 217 log("getTemplateWidthByAngle(" + templatePath + ") = " + width + ", used to be width = " + 4*wallScaleByType[style]); // DEBUG 125 218 wallStyles[style]["wall"] = new WallElement("wall", "structures/" + style + "_wall_medium", 0*PI, 4*wallScaleByType[style]); 219 126 220 wallStyles[style]["wallMedium"] = new WallElement("wall", "structures/" + style + "_wall_medium", 0*PI, 4*wallScaleByType[style]); 221 222 var templatePath = "structures/" + style + "_wall_long"; // DEBUG 223 var angle = 0*PI; // DEBUG 224 var width = getTemplateWidthByAngle(templatePath, angle); // DEBUG 225 log("getTemplateWidthByAngle(" + templatePath + ") = " + width + ", used to be width = " + 6*wallScaleByType[style]); // DEBUG 127 226 wallStyles[style]["wallLong"] = new WallElement("wallLong", "structures/" + style + "_wall_long", 0*PI, 6*wallScaleByType[style]); 227 128 228 // Gate and entrance wall elements 129 229 var gateWidth = 6*wallScaleByType[style]; 230 231 var templatePath = "structures/" + style + "_wall_gate"; // DEBUG 232 var angle = PI; // DEBUG 233 var width = getTemplateWidthByAngle(templatePath, angle); // DEBUG 234 log("getTemplateWidthByAngle(" + templatePath + ") = " + width + ", used to be width = " + 6*wallScaleByType[style]); // DEBUG 130 235 wallStyles[style]["gate"] = new WallElement("gate", "structures/" + style + "_wall_gate", PI, gateWidth); 236 131 237 wallStyles[style]["entry"] = new WallElement("entry", undefined, 0*PI, gateWidth); 132 238 wallStyles[style]["entryTower"] = new WallElement("entryTower", "structures/" + civ + "_defense_tower", PI, gateWidth, -4*wallScaleByType[style]); 133 239 wallStyles[style]["entryFort"] = new WallElement("entryFort", "structures/" + civ + "_fortress", 0*PI, 8*wallScaleByType[style], 6*wallScaleByType[style]); … … 161 267 wallStyles["pers"]["wallFort"] = new WallElement("wallFort", "structures/pers_fortress", PI, 5.6/*5.5*/, 1.9/*1.7*/); 162 268 wallStyles["ptol"]["wallFort"] = new WallElement("wallFort", "structures/ptol_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */); 163 269 wallStyles["rome"]["wallFort"] = new WallElement("wallFort", "structures/rome_fortress", PI, 6.3, 2.1); 164 wallStyles["sele"]["wallFort"] = new WallElement("wallFort", "structures/sele_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */);165 270 wallStyles["spart"]["wallFort"] = new WallElement("wallFort", "structures/spart_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */); 166 271 // Adjust "rome_siege" style 167 272 wallStyles["rome_siege"]["wallFort"] = new WallElement("wallFort", "structures/rome_army_camp", PI, 7.2, 2); … … 339 444 { 340 445 var element = wallStyles[style][wall[i]]; 341 446 if (element === undefined && i == 0) 342 warn("No valid wall element: " + wall[i]);447 warn("No valid wall element: style = " + style + ", wall[" + i + "] = " + wall[i] + ", wallStyles[" + style + "][wall[" + i + "]] = " + wallStyles[style][wall[i]] + ", element = " + element + ", wall = " + wall); 343 448 // Indentation 344 449 var placeX = wallX - element.indent * cos(orientation); 345 450 var placeY = wallY - element.indent * sin(orientation); … … 351 456 orientation += element.bending; 352 457 var nextElement = wallStyles[style][wall[i+1]]; 353 458 if (nextElement === undefined) 354 warn("No valid wall element: " + wall[i+1]);459 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); 355 460 var distance = (element.width + nextElement.width)/2; 356 461 // Corrections for elements with indent AND bending 357 462 var indent = element.indent; … … 624 729 // maxBendOff Optional. How irregular the circle should be. 0 means regular circle, PI/2 means very irregular. Default is 0 (regular circle) 625 730 // 626 731 // NOTE: Don't use wall elements with bending like corners! 627 // TODO: Perhaps add eccentricity and maxBendOff functionality (untill now an unused argument) 732 // TODO: Perhaps add eccentricity 733 // TODO: Check if maxBendOff parameter works in all cases 628 734 // TODO: Perhaps add functionality for spirals 629 735 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 630 736 function placeCircularWall(centerX, centerY, radius, wallPart, style, playerId, orientation, maxAngle, endWithFirst, maxBendOff) … … 652 758 653 759 // Check arguments 654 760 if (maxBendOff > PI/2 || maxBendOff < 0) 655 warn("placeCircularWall maxBendOff s ould satisfy 0 < maxBendOff < PI/2 (~1.5) but it is: " + maxBendOff);761 warn("placeCircularWall maxBendOff should satisfy 0 < maxBendOff < PI/2 (~1.5) but it is: " + maxBendOff); 656 762 for (var elementIndex = 0; elementIndex < wallPart.length; elementIndex++) 657 763 { 658 764 var bending = wallStyles[style][wallPart[elementIndex]].bending; -
binaries/data/mods/public/maps/random/schwarzwald.js
131 131 // Setup paths 132 132 var pathSucsessRadius = baseRadius/2; 133 133 var pathAngleOff = PI/2; 134 var pathWidth = 10; // This is not really the path's thickness in tiles but the number of tiles in the clum bs of the path134 var pathWidth = 10; // This is not really the path's thickness in tiles but the number of tiles in the clumps of the path 135 135 136 136 // Setup additional resources 137 137 var resourceRadius = 2*mapRadius/3; // 3*mapRadius/8; … … 232 232 // 233 233 //////////////// 234 234 235 // Some heightmap constants236 const MIN_HEIGHT = - SEA_LEVEL; // -20237 const MAX_HEIGHT = 0xFFFF/HEIGHT_UNITS_PER_METRE - SEA_LEVEL; // A bit smaller than 90238 239 235 // Get the diferrence between minimum and maxumum height 240 236 function getMinAndMaxHeight(reliefmap) 241 237 { -
binaries/data/mods/public/maps/random/wall_demo.js
62 62 var actualX = distToMapBorder; 63 63 var actualY = distToMapBorder; 64 64 // Wall styles are chosen by strings so the civ strings got by getCivCode() can be used 65 // Other styles may be present as well but besides the civ styles only 'palisades' includes all wall element types (yet) 66 const wallStyleList = ["athen", "brit", "cart", "gaul", "iber", "mace", "maur", "pers", "ptol", "rome", "sele", "spart", "rome_siege", "palisades"]; 65 var wallStyleList = getCivList(); 66 // Other styles may be available as well... 67 wallStyleList.push("rome_siege"); 68 wallStyleList.push("palisades"); 69 // Check if all wall styles are present and remove unknown ones 70 for (var i = 0; i < wallStyleList.length; i++) 71 if (!wallStyles.hasOwnProperty(wallStyleList[i])) 72 wallStyleList.splice(i, 1); 67 73 68 74 69 75 //////////////////////////////////////// … … 74 80 { 75 81 var startX = actualX + styleIndex * buildableMapSize/wallStyleList.length; // X coordinate of the first wall element 76 82 var startY = actualY; // Y coordinate of the first wall element 77 var style = wallStyleList[styleIndex]; // //The wall's style like 'cart', 'iber', 'pers', 'rome', 'romeSiege' or 'palisades'78 var orientation = styleIndex * PI/64; // Orientation of the first wall element. 0 means 'outside' or 'front' is right (positive X, like object placement)83 var style = wallStyleList[styleIndex]; // The wall's style like 'cart', 'iber', 'pers', 'rome', 'romeSiege' or 'palisades' 84 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) 79 85 // That means the wall will be build towards top (positive Y) if no corners are used 80 86 var playerId = 0; // Owner of the wall (like in placeObject). 0 is Gaia, 1 is Player 1 (default color blue), ... 81 87 placeWall(startX, startY, wall, style, playerId, orientation); // Actually placing the wall … … 155 161 { 156 162 for (var wallIndex = 0; wallIndex < numWallsPerStyle; wallIndex++) 157 163 { 158 var startX = actualX + (styleIndex * numWallsPerStyle + wallIndex) * distToOtherWalls; // X coordinate the wall will start from164 var startX = actualX + (styleIndex * numWallsPerStyle + wallIndex) * buildableMapSize/wallStyleList.length/numWallsPerStyle; // X coordinate the wall will start from 159 165 var startY = actualY; // Y coordinate the wall will start from 160 166 var endX = startX; // X coordinate the wall will end 161 167 var endY = actualY + (wallIndex + 1) * maxWallLength/numWallsPerStyle; // Y coordinate the wall will end … … 167 173 // placeObject(endX, endY, 'other/obelisk', 0, 0*PI); // Place visual marker to see where exsactly the wall ends 168 174 } 169 175 } 170 actualX = distToMapBorder; // Reset actualX171 actualY += maxWallLength + distToOtherWalls; // Increase actualY for next wall placement method172 176 173 177 174 178 // Export map data -
binaries/data/mods/public/maps/random/wall_demo.json
2 2 "settings" : { 3 3 "Name" : "Wall Demo", 4 4 "Script" : "wall_demo.js", 5 "Description" : "A demonstration of wall placement methods/code in random maps. Very large map size is recommended.",5 "Description" : "A demonstration of wall placement methods/code in random maps. Giant map size is recommended!", 6 6 "BaseTerrain" : ["grass1"], 7 7 "BaseHeight" : 0, 8 8 "Keywords": ["demo"], -
binaries/data/mods/public/simulation/data/civs/athen.json
109 109 "Special":"Train heroes and research technology pertaining to heroes." 110 110 } 111 111 ], 112 "WallSets": 113 { 114 "Palisades": 115 { 116 "Template": "other/wallset_palisade", 117 "Scale": 0.55 118 }, 119 "Stone": 120 { 121 "Template": "structures/athen_wallset_stone", 122 "Scale": 1.5 123 } 124 }, 112 125 "StartEntities": 113 126 [ 114 127 { -
binaries/data/mods/public/simulation/data/civs/brit.json
87 87 "Special": "" 88 88 } 89 89 ], 90 "WallSets": 91 { 92 "Palisades": 93 { 94 "Template": "other/wallset_palisade", 95 "Scale": 0.55 96 }, 97 "Stone": 98 { 99 "Template": "structures/athen_wallset_stone", 100 "Scale": 1.5 101 } 102 }, 90 103 "StartEntities": 91 104 [ 92 105 { -
binaries/data/mods/public/simulation/data/civs/cart.json
112 112 "Special":"Hire Iberian mercenaries." 113 113 } 114 114 ], 115 "WallSets": 116 { 117 "Palisades": 118 { 119 "Template": "other/wallset_palisade", 120 "Scale": 0.55 121 }, 122 "Stone": 123 { 124 "Template": "structures/athen_wallset_stone", 125 "Scale": 1.8 126 } 127 }, 115 128 "StartEntities": 116 129 [ 117 130 { -
binaries/data/mods/public/simulation/data/civs/gaul.json
87 87 "Special": "" 88 88 } 89 89 ], 90 "WallSets": 91 { 92 "Palisades": 93 { 94 "Template": "other/wallset_palisade", 95 "Scale": 0.55 96 }, 97 "Stone": 98 { 99 "Template": "structures/athen_wallset_stone", 100 "Scale": 1.5 101 } 102 }, 90 103 "StartEntities": 91 104 [ 92 105 { -
binaries/data/mods/public/simulation/data/civs/iber.json
85 85 "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." 86 86 } 87 87 ], 88 "WallSets": 89 { 90 "Palisades": 91 { 92 "Template": "other/wallset_palisade", 93 "Scale": 0.55 94 }, 95 "Stone": 96 { 97 "Template": "structures/athen_wallset_stone", 98 "Scale": 1.5 99 } 100 }, 88 101 "StartEntities": 89 102 [ 90 103 { -
binaries/data/mods/public/simulation/data/civs/mace.json
114 114 "Special":"Constructs and upgrades all Macedonian siege engines." 115 115 } 116 116 ], 117 "WallSets": 118 { 119 "Palisades": 120 { 121 "Template": "other/wallset_palisade", 122 "Scale": 0.55 123 }, 124 "Stone": 125 { 126 "Template": "structures/athen_wallset_stone", 127 "Scale": 1.5 128 } 129 }, 117 130 "StartEntities": 118 131 [ 119 132 { -
binaries/data/mods/public/simulation/data/civs/maur.json
94 94 "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." 95 95 } 96 96 ], 97 "WallSets": 98 { 99 "Palisades": 100 { 101 "Template": "other/wallset_palisade", 102 "Scale": 0.55 103 }, 104 "Stone": 105 { 106 "Template": "structures/athen_wallset_stone", 107 "Scale": 1.5 108 } 109 }, 97 110 "StartEntities": 98 111 [ 99 112 { -
binaries/data/mods/public/simulation/data/civs/pers.json
104 104 "Special": "Train heroes and Persian Immortals. Gives a slow trickle of all resources as 'Satrapy Tribute.'" 105 105 } 106 106 ], 107 "WallSets": 108 { 109 "Palisades": 110 { 111 "Template": "other/wallset_palisade", 112 "Scale": 0.55 113 }, 114 "Stone": 115 { 116 "Template": "structures/athen_wallset_stone", 117 "Scale": 1.5 118 } 119 }, 107 120 "StartEntities": 108 121 [ 109 122 { -
binaries/data/mods/public/simulation/data/civs/ptol.json
113 113 "Special":"When built along the shoreline, removes shroud of darkness over all the water, revealing all the coast lines on the map. Limit: 1." 114 114 } 115 115 ], 116 "WallSets": 117 { 118 "Palisades": 119 { 120 "Template": "other/wallset_palisade", 121 "Scale": 0.55 122 }, 123 "Stone": 124 { 125 "Template": "structures/athen_wallset_stone", 126 "Scale": 1.5 127 } 128 }, 116 129 "StartEntities": 117 130 [ 118 131 { -
binaries/data/mods/public/simulation/data/civs/rome.json
89 89 "Special": "Can be built in neutral and enemy territory to strangle enemy towns." 90 90 } 91 91 ], 92 "WallSets": 93 { 94 "Palisades": 95 { 96 "Template": "other/wallset_palisade", 97 "Scale": 0.55 98 }, 99 "Stone": 100 { 101 "Template": "structures/athen_wallset_stone", 102 "Scale": 1.5 103 }, 104 "Siege": 105 { 106 "Template": "structures/rome_wallset_siege", 107 "Scale": 1.5 108 } 109 }, 92 110 "StartEntities": 93 111 [ 94 112 { -
binaries/data/mods/public/simulation/data/civs/sele.json
114 114 "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." 115 115 } 116 116 ], 117 "WallSets": 118 { 119 "Palisades": 120 { 121 "Template": "other/wallset_palisade", 122 "Scale": 0.55 123 } 124 }, 117 125 "StartEntities": 118 126 [ 119 127 { -
binaries/data/mods/public/simulation/data/civs/spart.json
105 105 "Special":"Train heroes and Spartiates and research technologies related to them." 106 106 } 107 107 ], 108 "WallSets": 109 { 110 "Palisades": 111 { 112 "Template": "other/wallset_palisade", 113 "Scale": 0.55 114 }, 115 "Stone": 116 { 117 "Template": "structures/athen_wallset_stone", 118 "Scale": 1.5 119 } 120 }, 108 121 "StartEntities": 109 122 [ 110 123 {