diff --git a/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_a.xml b/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_a.xml index ca9c532f70..bb54521f7c 100644 --- a/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_a.xml +++ b/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_a.xml @@ -23,6 +23,10 @@ + + + + diff --git a/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_b.xml b/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_b.xml index 7c1b008286..07f80b2f36 100644 --- a/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_b.xml +++ b/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_b.xml @@ -5,11 +5,16 @@ - + + + + + + @@ -57,13 +62,6 @@ - - - - - - - diff --git a/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_e.xml b/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_e.xml index acf27d22f7..1d44099d49 100644 --- a/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_e.xml +++ b/binaries/data/mods/public/art/actors/units/carthaginians/infantry_swordsman_2_e.xml @@ -19,8 +19,14 @@ - + + + + + + + diff --git a/binaries/data/mods/public/art/textures/ui/session/portraits/structures/shipyard.png b/binaries/data/mods/public/art/textures/ui/session/portraits/structures/shipyard.png new file mode 100644 index 0000000000..923a17ff21 --- /dev/null +++ b/binaries/data/mods/public/art/textures/ui/session/portraits/structures/shipyard.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ae40e40727480941a56e0f5da2d49caa50b8415ccfaf202e8fb9f807fecaa69 +size 47968 diff --git a/binaries/data/mods/public/maps/random/islands.js b/binaries/data/mods/public/maps/random/islands.js new file mode 100644 index 0000000000..eea6570166 --- /dev/null +++ b/binaries/data/mods/public/maps/random/islands.js @@ -0,0 +1,596 @@ +RMS.LoadLibrary("rmgen"); + +// terrain textures +const tOceanDepths = "medit_sea_depths"; +const tOceanRockDeep = "medit_sea_coral_deep"; +const tOceanRockShallow = "medit_rocks_wet"; +const tOceanCoral = "medit_sea_coral_plants"; +const tBeachWet = "medit_sand_wet"; +const tBeachDry = "medit_sand"; +const tBeachGrass = "medit_rocks_grass"; +const tBeach = ["medit_rocks_grass","medit_sand", "medit_rocks_grass_shrubs"] +//const tBeachBlend = ["medit_rocks_grass","medit_grass_field_dry", "medit_grass_field_brown","medit_rocks_shrubs", "medit_rocks_grass_shrubs"]; +const tBeachBlend = ["medit_rocks_grass", "medit_rocks_grass_shrubs"]; +const tBeachCliff = "medit_dirt"; +const tCity = "medit_city_tile"; +const tGrassDry = ["medit_grass_field_dry", "medit_grass_field_b"]; +//const tGrass = ["medit_grass_field_dry", "medit_grass_field_brown", "medit_grass_field_b"]; +const tGrass = ["medit_rocks_grass", "medit_rocks_grass","medit_dirt","medit_rocks_grass_shrubs"]; +const tGrassLush = ["grass_temperate_dry_tufts", "medit_grass_flowers"]; +const tGrassShrubs = "medit_shrubs"; +const tCliffShrubs = ["medit_cliff_aegean_shrubs", "medit_cliff_italia_grass","medit_cliff_italia"] +const tGrassRock = ["medit_rocks_grass"]; +const tDirt = "medit_dirt"; +const tDirtGrass = "medit_dirt_b"; +const tDirtCliff = "medit_cliff_italia"; +const tGrassCliff = "medit_cliff_italia_grass"; +const tCliff = ["medit_cliff_italia", "medit_cliff_italia", "medit_cliff_italia_grass"]; +const tForestFloor = "medit_forestfloor_a"; + +// gaia entities +const oBeech = "gaia/flora_tree_euro_beech"; +const oBerryBush = "gaia/flora_bush_berry"; +const oCarob = "gaia/flora_tree_carob"; +const oCypress1 = "gaia/flora_tree_cypress"; +const oCypress2 = "gaia/flora_tree_cypress"; +const oLombardyPoplar = "gaia/flora_tree_poplar_lombardy"; +const oOak = "gaia/flora_tree_oak"; +const oPalm = "gaia/flora_tree_medit_fan_palm"; +const oPine = "gaia/flora_tree_aleppo_pine"; +const oPoplar = "gaia/flora_tree_poplar"; +const oDateT = "gaia/flora_tree_cretan_date_palm_tall"; +const oDateS = "gaia/flora_tree_cretan_date_palm_short"; +const oChicken = "gaia/fauna_chicken"; +const oDeer = "gaia/fauna_deer"; +const oFish = "gaia/fauna_fish"; +const oWhale = "gaia/fauna_whale_humpback"; +const oStoneLarge = "gaia/geology_stonemine_medit_quarry"; +const oStoneSmall = "gaia/geology_stone_mediterranean"; +const oMetalLarge = "gaia/geology_metal_mediterranean_slabs"; +const oShipwreck = "other/special_treasure_shipwreck"; +const oShipDebris = "other/special_treasure_shipwreck_debris"; + +// decorative props +const aBushLargeDry = "actor|props/flora/bush_medit_la_dry.xml"; +const aBushLarge = "actor|props/flora/bush_medit_la.xml"; +const aBushMedDry = "actor|props/flora/bush_medit_me_dry.xml"; +const aBushMed = "actor|props/flora/bush_medit_me.xml"; +const aBushSmall = "actor|props/flora/bush_medit_sm.xml"; +const aBushSmallDry = "actor|props/flora/bush_medit_sm_dry.xml"; +const aGrass = "actor|props/flora/grass_soft_large_tall.xml"; +const aGrassDry = "actor|props/flora/grass_soft_dry_large_tall.xml"; +const aRockLarge = "actor|geology/stone_granite_large.xml"; +const aRockMed = "actor|geology/stone_granite_med.xml"; +const aRockSmall = "actor|geology/stone_granite_small.xml"; + + +// terrain + entity (for painting) +var pPalmForest = [tForestFloor+TERRAIN_SEPARATOR+oPalm, tGrass]; +var pPineForest = [tForestFloor+TERRAIN_SEPARATOR+oPine, tGrass]; +var pPoplarForest = [tForestFloor+TERRAIN_SEPARATOR+oLombardyPoplar, tGrass]; +var pMainForest = [tForestFloor+TERRAIN_SEPARATOR+oCarob, tForestFloor+TERRAIN_SEPARATOR+oBeech, tGrass, tGrass]; +// initialize map + +log("Initializing map..."); + +InitMap(); + +var numPlayers = getNumPlayers(); +var mapSize = getMapSize(); + +// create tile classes + +var clCoral = createTileClass(); +var clPlayer = createTileClass(); +var clIsland = createTileClass(); +var clCity = createTileClass(); +var clDirt = createTileClass(); +var clHill = createTileClass(); +var clForest = createTileClass(); +var clWater = createTileClass(); +var clRock = createTileClass(); +var clMetal = createTileClass(); +var clFood = createTileClass(); +var clBaseResource = createTileClass(); + +//array holding starting islands based on number of players +var startingPlaces=[[0],[0,3],[0,2,4],[0,1,3,4],[0,1,2,3,4],[0,1,2,3,4,5]]; + +//figure out how many spoke islands +var numIslands =6; +if(numPlayers<6){ + numIslands=6; +}else{ + numIslands=numPlayers; +} + +//figure out coordinates of spoke islands +var islandX = new Array(numIslands); +var islandZ = new Array(numIslands); +var islandAngle = new Array(numIslands); +//holds all land areas +var areas = []; + +var startAngle = randFloat() * 2 * PI; +for (var i=0; i < numIslands; i++) +{ + islandAngle[i] = startAngle + i*2*PI/numIslands; + islandX[i] = 0.5 + 0.39*cos(islandAngle[i]); + islandZ[i] = 0.5 + 0.39*sin(islandAngle[i]); +} + + +for(var i=0;i=6)||(i==startingPlaces[numPlayers-1][nPlayer])){ + + // get the x and z in tiles + var fx = fractionToTiles(islandX[i]); + var fz = fractionToTiles(islandZ[i]); + var ix = round(fx); + var iz = round(fz); + + //create city patch + var cityRadius = 6; + var placer = new ClumpPlacer(PI*cityRadius*cityRadius, 0.6, 0.3, 10, ix, iz); + var painter = new LayeredPainter([tGrass, tCity], [1]); + createArea(placer, [painter,paintClass(clCity)], null); + + + // get civ specific starting entities + var civEntities = getStartingEntities(nPlayer); + + // create the TC + var angletemple = 1.5*PI-islandAngle[i]; + angletemple = 0.75*PI; + //angletemple = (angletemple<0)?angletemple+2*PI:angletemple; + var group = new SimpleGroup( // elements (type, min/max count, min/max distance) + [new SimpleObject(civEntities[0].Template, 1,1, 0,0, angletemple, angletemple)], + true, null, ix, iz + ); + createObjectGroup(group, nPlayer+1); + + // create starting units + var uDist = 8; + var uAngle = islandAngle[i] + PI + randFloat(-PI/8, PI/8); + + for (var j = 1; j < civEntities.length; ++j) + { + var count = (civEntities[j].Count !== undefined ? civEntities[j].Count : 1); + var ux = round(fx + uDist * cos(uAngle)); + var uz = round(fz + uDist * sin(uAngle)); + group = new SimpleGroup( // elements (type, min/max count, min/max distance) + [new SimpleObject(civEntities[j].Template, count,count, 1,ceil(count/2))], + true, null, ux, uz + ); + createObjectGroup(group, nPlayer+1); + uAngle += PI/4; + } + + nPlayer++; +} +} + + +RMS.SetProgress(15); + + +// get the x and z in tiles + +var nCenter=floor(scaleByMapSize(1,4)) +var startAngle = randFloat() * 2 * PI; +for (var i=0; i < nCenter; i++) +{ + var fx=.5; + var fz=.5; + if(nCenter==1){ + fx=.5; + fz=.5; + }else{ + var isangle = startAngle + i*2*PI/nCenter+randFloat(-PI/8,PI/8); + var dRadius = randFloat(.1,.16); + fx = 0.5 + dRadius*cos(isangle); + fz = 0.5 + dRadius*sin(isangle); + } + var ix = round(fractionToTiles(fx)); + var iz = round(fractionToTiles(fz)); + + var radius = scaleByMapSize(15,30); + var coral= 2; + var wet = 3; + var dry = 1; + var gbeach = 2; + var elevation = 3; + + var islandSize = PI*radius*radius; + var islandBottom=PI*(radius+coral)*(radius+coral); + + //create base + var placer = new ClumpPlacer(islandBottom, .7, .1, 10, ix, iz); + var terrainPainter = new LayeredPainter( + [tOceanRockDeep, tOceanCoral], + [5] + ); + createArea(placer, [terrainPainter, paintClass(clCoral)],avoidClasses(clCoral,0,clPlayer,0)); + + // create island + var placer = new ClumpPlacer(islandSize, .7, .1, 10, ix, iz); + var terrainPainter = new LayeredPainter( + [tOceanCoral,tBeachWet, tBeachDry, tBeach, tBeachBlend, tGrass], + [1,wet,dry,1,gbeach] + ); + var elevationPainter = new SmoothElevationPainter( + ELEVATION_SET, + elevation, + 5 + ); + var temp = createArea(placer, [terrainPainter, paintClass(clIsland), elevationPainter],avoidClasses(clPlayer,0)); + + areas.push(temp); +} +RMS.SetProgress(30); + +// create bumps +log("Creating bumps..."); +placer = new ClumpPlacer(scaleByMapSize(20, 60), 0.3, 0.06, 1); +painter = new SmoothElevationPainter(ELEVATION_MODIFY, 2, 3); +createAreasInAreas( + placer, + painter, + avoidClasses(clCity, 0), + scaleByMapSize(25, 75),15, + areas +); + +// create hills +log("Creating hills..."); +placer = new ClumpPlacer(scaleByMapSize(20, 150), 0.2, 0.1, 1); +terrainPainter = new LayeredPainter( + [tCliff, tCliffShrubs], // terrains + [2] // widths +); +elevationPainter = new SmoothElevationPainter(ELEVATION_SET, 12, 2); +createAreasInAreas( + placer, + [terrainPainter, elevationPainter, paintClass(clHill)], + avoidClasses(clCity, 15, clHill, 15), + scaleByMapSize(5, 30), 15, + areas +); + +RMS.SetProgress(40); +//find all water +for (var ix = 0; ix < mapSize; ix++) +{ + for (var iz = 0; iz < mapSize; iz++) + { + if(getHeight(ix,iz)<0){ + addToClass(ix,iz,clWater); + } + } +} + +// create forests +log("Creating forests..."); +var types = [ + [[tForestFloor, tGrass, pPalmForest], [tForestFloor, pPalmForest]], + [[tForestFloor, tGrass, pPineForest], [tForestFloor, pPineForest]], + [[tForestFloor, tGrass, pPoplarForest], [tForestFloor, pPoplarForest]], + [[tForestFloor, tGrass, pMainForest], [tForestFloor, pMainForest]] +]; // some variation +var size = 5; //size +var num = scaleByMapSize(10, 64); //number +for (var i = 0; i < types.length; ++i) +{ + placer = new ClumpPlacer(6+randInt(12), 0.1, 0.1, 1); + painter = new LayeredPainter( + types[i], // terrains + [2] // widths + ); + createAreasInAreas( + placer, + [painter, paintClass(clForest)], + avoidClasses(clCity, 1, clWater, 3, clForest, 3, clHill, 0), + num, 20, areas + ); +} + +RMS.SetProgress(60); + +log("Creating stone mines..."); +// create large stone quarries +group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock); +createObjectGroupsByAreas(group, 0, + [avoidClasses(clWater, 0, clForest, 0, clHill, 0, clPlayer, 5, clRock, 1)], + scaleByMapSize(4,16), 200, areas +); + +// create small stone quarries +group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock); +createObjectGroupsByAreas(group, 0, + [avoidClasses(clWater, 0, clForest, 0, clHill, 0, clPlayer, 5, clRock, 2)], + scaleByMapSize(4,16), 200, areas +); +RMS.SetProgress(70); + +log("Creating metal mines..."); +// create large metal quarries +group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal); +createObjectGroupsByAreas(group, 0, + [avoidClasses(clWater, 0, clForest, 0, clHill, 0, clPlayer, 5, clMetal, 2, clRock, 1)], + scaleByMapSize(4,16), 200, areas +); + +RMS.SetProgress(80); + + + +//create shrub patches +log("Creating shrub patches..."); +var sizes = [scaleByMapSize(2, 32), scaleByMapSize(3, 48), scaleByMapSize(5, 80)]; +for (var i = 0; i < sizes.length; i++) +{ + placer = new ClumpPlacer(sizes[i], 0.3, 0.06, 0.5); + painter = new LayeredPainter([tBeachBlend,tGrassShrubs],[1]); + createAreasInAreas( + placer, + [painter, paintClass(clDirt)], + avoidClasses(clWater, 3, clHill, 0, clDirt, 6, clCity, 0), + scaleByMapSize(4, 16), 20, areas + ); +} + +//create grass patches +log("Creating grass patches..."); +var sizes = [scaleByMapSize(2, 32), scaleByMapSize(3, 48), scaleByMapSize(5, 80)]; +for (var i = 0; i < sizes.length; i++) +{ + placer = new ClumpPlacer(sizes[i], 0.3, 0.06, 0.5); + painter = new LayeredPainter([tGrassDry],[]); + createAreasInAreas( + placer, + [painter, paintClass(clDirt)], + avoidClasses(clWater, 3, clHill, 0, clDirt, 6, clCity, 0), + scaleByMapSize(4, 16), 20, areas + ); +} + +RMS.SetProgress(90); + +log("Creating straggler trees..."); +// create straggler trees +var trees = [oCarob, oBeech, oLombardyPoplar, oLombardyPoplar, oPine]; +for (var t in trees) +{ + group = new SimpleGroup([new SimpleObject(trees[t], 1,1, 0,1)], true, clForest); + createObjectGroupsByAreas(group, 0, + avoidClasses(clWater, 2, clForest, 2, clCity, 3, clBaseResource, 1, clRock, 1, clMetal, 1), + scaleByMapSize(2, 38), 50, areas + ); +} + + +// create straggler cypresses +group = new SimpleGroup( + [new SimpleObject(oCypress2, 1,3, 0,3), new SimpleObject(oCypress1, 0,2, 0,2)], + true +); +createObjectGroupsByAreas(group, 0, + avoidClasses(clWater, 2, clForest, 2, clCity, 3, clBaseResource, 1, clRock, 1, clMetal, 1), + scaleByMapSize(5, 75), 50, areas +); + + +// create straggler date palms +group = new SimpleGroup( + [new SimpleObject(oDateS, 1,3, 0,3), new SimpleObject(oDateT, 0,2, 0,2)], + true +); +createObjectGroupsByAreas(group, 0, + avoidClasses(clWater, 2, clForest, 1, clCity, 0, clBaseResource, 1, clRock, 1, clMetal, 1), + scaleByMapSize(5, 75), 50, areas +); + +log("Creating rocks..."); +// create rocks +group = new SimpleGroup( + [new SimpleObject(aRockSmall, 0,3, 0,2), new SimpleObject(aRockMed, 0,2, 0,2), + new SimpleObject(aRockLarge, 0,1, 0,2)] +); +createObjectGroups(group, 0, + avoidClasses(clWater, 0, clCity, 0), + scaleByMapSize(30, 180), 50 +); + +// create deer +log("Creating deer..."); +group = new SimpleGroup( + [new SimpleObject(oDeer, 5,7, 0,4)], + true, clFood +); +createObjectGroups(group, 0, + avoidClasses(clWater, 5, clForest, 1, clHill, 1, clCity, 10, clMetal, 2, clRock, 2, clFood, 8), + 3 * numPlayers, 50 +); + +RMS.SetProgress(95); + +log("Creating berry bushes..."); +// create berry bushes +group = new SimpleGroup([new SimpleObject(oBerryBush, 5,7, 0,3)], true, clFood); +createObjectGroups(group, 0, + avoidClasses(clWater, 2, clForest, 1, clHill, 1, clCity, 10, clMetal, 2, clRock, 2, clFood, 8), + 1.5 * numPlayers, 100 +); + +log("Creating Fish..."); +// create Fish +group = new SimpleGroup([new SimpleObject(oFish, 1,1, 0,3)], true, clFood); +createObjectGroups(group, 0, + [stayClasses(clWater,1),avoidClasses(clFood, 8)], + scaleByMapSize(40,200), 100 +); + +log("Creating Whales..."); +// create Whales +group = new SimpleGroup([new SimpleObject(oWhale, 1,1, 0,3)], true, clFood); +createObjectGroups(group, 0, + [stayClasses(clWater,1),avoidClasses(clFood, 8, clPlayer,4,clIsland,4)], + scaleByMapSize(10,40), 100 +); + +log("Creating shipwrecks..."); +// create shipwreck +group = new SimpleGroup([new SimpleObject(oShipwreck, 1,1, 0,3)], true, clFood); +createObjectGroups(group, 0, + [stayClasses(clWater,1),avoidClasses(clFood, 8)], + scaleByMapSize(6,16), 100 +); + +log("Creating shipwreck debris..."); +// create shipwreck debris +group = new SimpleGroup([new SimpleObject(oShipDebris, 1,2, 0,4)], true, clFood); +createObjectGroups(group, 0, + [stayClasses(clWater,1),avoidClasses(clFood, 8)], + scaleByMapSize(10,20), 100 +); + +// Adjust environment +setSkySet("sunny"); +setWaterMurkiness(0.626953); +setWaterShininess(0.732422); +setWaterTint(0, 0.501961, 0.501961); +setWaterReflectionTint(0.313726, 0.376471, 0.521569); +setWaterReflectionTintStrength(0.615234); + +// Export map data +ExportMap(); diff --git a/binaries/data/mods/public/maps/random/islands.json b/binaries/data/mods/public/maps/random/islands.json new file mode 100644 index 0000000000..aa6fa06f9c --- /dev/null +++ b/binaries/data/mods/public/maps/random/islands.json @@ -0,0 +1,11 @@ +{ + "settings" : { + "Name" : "Islands", + "Script" : "islands.js", + "Description" : "Each player starts on an island surrounded by water.", + "BaseTerrain" : ["medit_sea_depths"], + "BaseHeight" : -5, + "CircularMap" : true, + "XXXXXX" : "Optionally define other things here, like we would for a scenario" + } +} diff --git a/binaries/data/mods/public/maps/scenarios/Oasis II.xml b/binaries/data/mods/public/maps/scenarios/Oasis II.xml index 3a5a7e03b7..d8aa955843 100644 --- a/binaries/data/mods/public/maps/scenarios/Oasis II.xml +++ b/binaries/data/mods/public/maps/scenarios/Oasis II.xml @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:080781ea0cb19e18b4565272f4185c2aa11709a8e642bfaef9484bf722edd178 -size 200780 +oid sha256:2d6e67218f8d0a99b992e332f76f267047daba785ce6581097c61248ec9f18aa +size 200603 diff --git a/binaries/data/mods/public/maps/scenarios/Oasis III.xml b/binaries/data/mods/public/maps/scenarios/Oasis III.xml index 38b18daff5..a098f87ef1 100644 --- a/binaries/data/mods/public/maps/scenarios/Oasis III.xml +++ b/binaries/data/mods/public/maps/scenarios/Oasis III.xml @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef185d75096333ae55fc670f74f4dfc3db62d324b025b2efb079aee1ba01a612 -size 200797 +oid sha256:d3321aed1c2e4ebf04209468e90ccbe6aef5d9bf8da99bdf611ba657eeba8642 +size 200446 diff --git a/binaries/data/mods/public/simulation/templates/structures/cart_super_dock.xml b/binaries/data/mods/public/simulation/templates/structures/cart_super_dock.xml index 6984bd4820..c283670d73 100644 --- a/binaries/data/mods/public/simulation/templates/structures/cart_super_dock.xml +++ b/binaries/data/mods/public/simulation/templates/structures/cart_super_dock.xml @@ -11,7 +11,7 @@ /Naval Shipyard/ The structure is based upon the centre island of the inner harbour constructed to house the war fleet of the Carthaginian navy at Carthage. Construct and repair mighty warships. - structures/dock.png + structures/shipyard.png 10