Changeset View
Standalone View
binaries/data/mods/public/maps/random/survivalofthefittest.js
RMS.LoadLibrary("rmgen"); | RMS.LoadLibrary("rmgen"); | ||||
//random terrain textures | |||||
var random_terrain = randomizeBiome(); | var random_terrain = randomizeBiome(); | ||||
const tMainTerrain = rBiomeT1(); | const tMainTerrain = rBiomeT1(); | ||||
const tForestFloor1 = rBiomeT2(); | const tForestFloor1 = rBiomeT2(); | ||||
const tForestFloor2 = rBiomeT3(); | const tForestFloor2 = rBiomeT3(); | ||||
const tCliff = rBiomeT4(); | const tCliff = rBiomeT4(); | ||||
const tHill = rBiomeT8(); | |||||
const tTier1Terrain = rBiomeT5(); | const tTier1Terrain = rBiomeT5(); | ||||
const tTier2Terrain = rBiomeT6(); | const tTier2Terrain = rBiomeT6(); | ||||
const tTier3Terrain = rBiomeT7(); | const tTier3Terrain = rBiomeT7(); | ||||
const tHill = rBiomeT8(); | |||||
const tDirt = rBiomeT9(); | |||||
const tRoad = rBiomeT10(); | |||||
const tRoadWild = rBiomeT11(); | |||||
const tTier4Terrain = rBiomeT12(); | const tTier4Terrain = rBiomeT12(); | ||||
const tShoreBlend = rBiomeT13(); | |||||
const tShore = rBiomeT14(); | |||||
const tWater = rBiomeT15(); | |||||
bb: All these tTier's may be moved together. | |||||
// gaia entities | // gaia entities | ||||
const oTree1 = rBiomeE1(); | const oTree1 = rBiomeE1(); | ||||
const oTree2 = rBiomeE2(); | const oTree2 = rBiomeE2(); | ||||
const oTree3 = rBiomeE3(); | const oTree3 = rBiomeE3(); | ||||
const oTree4 = rBiomeE4(); | const oTree4 = rBiomeE4(); | ||||
const oTree5 = rBiomeE5(); | const oTree5 = rBiomeE5(); | ||||
const oFruitBush = rBiomeE6(); | |||||
const oMainHuntableAnimal = rBiomeE8(); | |||||
const oFish = rBiomeE9(); | |||||
const oSecondaryHuntableAnimal = rBiomeE10(); | |||||
const oStoneLarge = rBiomeE11(); | |||||
const oStoneSmall = rBiomeE12(); | |||||
const oMetalLarge = rBiomeE13(); | |||||
const oWood = "gaia/special_treasure_wood"; | |||||
const oFood = "gaia/special_treasure_food_bin"; | |||||
// decorative props | // decorative props | ||||
const aGrass = rBiomeA1(); | const aGrass = rBiomeA1(); | ||||
const aGrassShort = rBiomeA2(); | const aGrassShort = rBiomeA2(); | ||||
const aReeds = rBiomeA3(); | |||||
const aLillies = rBiomeA4(); | |||||
const aRockLarge = rBiomeA5(); | const aRockLarge = rBiomeA5(); | ||||
const aRockMedium = rBiomeA6(); | const aRockMedium = rBiomeA6(); | ||||
const aBushMedium = rBiomeA7(); | const aBushMedium = rBiomeA7(); | ||||
const aBushSmall = rBiomeA8(); | const aBushSmall = rBiomeA8(); | ||||
const aTree = rBiomeA9(); | const aWaypointFlag = "actor|props/special/common/waypoint_flag.xml"; | ||||
const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2]; | const pForest1 = [tForestFloor2 + TERRAIN_SEPARATOR + oTree1, tForestFloor2 + TERRAIN_SEPARATOR + oTree2, tForestFloor2]; | ||||
const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1]; | const pForest2 = [tForestFloor1 + TERRAIN_SEPARATOR + oTree4, tForestFloor1 + TERRAIN_SEPARATOR + oTree5, tForestFloor1]; | ||||
log("Initializing map..."); | const oTreasureSeeker = "skirmish/units/default_support_female_citizen"; | ||||
const oCivicCenter = "skirmish/structures/default_civil_centre"; | |||||
const oCitizenInfantry = "skirmish/units/default_infantry_melee_b"; | |||||
const triggerPointAttacker = "special/trigger_point_A"; | |||||
const triggerPointTreasures = [ | |||||
"special/trigger_point_B", | |||||
"special/trigger_point_C", | |||||
"special/trigger_point_D" | |||||
]; | |||||
log("Initializing map..."); | |||||
InitMap(); | InitMap(); | ||||
var numPlayers = getNumPlayers(); | var numPlayers = getNumPlayers(); | ||||
var mapSize = getMapSize(); | var mapSize = getMapSize(); | ||||
var mapArea = mapSize*mapSize; | |||||
// create tile classes | |||||
var clPlayer = createTileClass(); | var clPlayer = createTileClass(); | ||||
var clHill = createTileClass(); | var clHill = createTileClass(); | ||||
var clHill2 = createTileClass(); | |||||
var clForest = createTileClass(); | var clForest = createTileClass(); | ||||
Not Done Inline ActionsIs here ever written too? bb: Is here ever written too? | |||||
Not Done Inline Actions
elexis: 1. yes, that createForests call
2. expected by rmgen! (see polar sea) | |||||
var clWater = createTileClass(); | |||||
var clDirt = createTileClass(); | var clDirt = createTileClass(); | ||||
Not Done Inline ActionsSame? bb: Same? | |||||
Not Done Inline ActionsThat is being written to by createLayeredPatches and used to keep minimum distance between them elexis: That is being written to by createLayeredPatches and used to keep minimum distance between them | |||||
var clRock = createTileClass(); | |||||
var clMetal = createTileClass(); | |||||
var clFood = createTileClass(); | |||||
var clBaseResource = createTileClass(); | var clBaseResource = createTileClass(); | ||||
Done Inline ActionsAnother? bb: Another? | |||||
Done Inline ActionsYep, removing elexis: Yep, removing | |||||
Done Inline Actions? bb: ? | |||||
Done Inline Actionsnucular elexis: nucular | |||||
var clSettlement = createTileClass(); | |||||
var clLand = createTileClass(); | var clLand = createTileClass(); | ||||
Done Inline ActionsOne might argue that the references to clBaseResource are pointless elexis: One might argue that the references to clBaseResource are pointless | |||||
var clWomen = createTileClass(); | var clWomen = createTileClass(); | ||||
for (var ix = 0; ix < mapSize; ix++) | for (var ix = 0; ix < mapSize; ix++) | ||||
{ | |||||
for (var iz = 0; iz < mapSize; iz++) | for (var iz = 0; iz < mapSize; iz++) | ||||
Not Done Inline Actions(Got some commit on my randomPatch branch for this loop thing, so not going further into that now) elexis: (Got some commit on my randomPatch branch for this loop thing, so not going further into that… | |||||
{ | |||||
var x = ix / (mapSize + 1.0); | |||||
var z = iz / (mapSize + 1.0); | |||||
placeTerrain(ix, iz, tMainTerrain); | placeTerrain(ix, iz, tMainTerrain); | ||||
Done Inline ActionsOnce busy: let ix ;; ++ix bb: Once busy: `let ix ;; ++ix` | |||||
Not Done Inline ActionsGot a big commit for that incoming nuking all of these and I feel all occurances in the file should be changed if I change these. elexis: Got a big commit for that incoming nuking all of these and I feel all occurances in the file… | |||||
} | |||||
} | |||||
var fx = fractionToTiles(0.5); | var ix = Math.round(fractionToTiles(0.5)); | ||||
Done Inline ActionsInline these. bb: Inline these. | |||||
Not Done Inline ActionsAck, fixes var defs below too elexis: Ack, fixes var defs below too | |||||
var fz = fractionToTiles(0.5); | var iz = Math.round(fractionToTiles(0.5)); | ||||
ix = round(fx); | |||||
iz = round(fz); | // Create the main treasure area in the middle of the map | ||||
createArea( | |||||
var lSize = sqrt(sqrt(sqrt(scaleByMapSize(1, 6)))); | new ClumpPlacer(mapSize * mapSize * scaleByMapSize(0.065, 0.09), 0.7, 0.1, 10, ix, iz), | ||||
[ | |||||
var placer = new ClumpPlacer(mapArea * 0.065 * lSize, 0.7, 0.1, 10, ix, iz); | new LayeredPainter([tMainTerrain, tMainTerrain], [3]), | ||||
var terrainPainter = new LayeredPainter( | new SmoothElevationPainter(ELEVATION_SET, 3, 3), | ||||
[tMainTerrain, tMainTerrain], // terrains | paintClass(clLand) | ||||
[3] // widths | ], | ||||
); | null); | ||||
var elevationPainter = new SmoothElevationPainter( | |||||
ELEVATION_SET, // type | |||||
3, // elevation | |||||
3 // blend radius | |||||
); | |||||
createArea(placer, [terrainPainter, elevationPainter, paintClass(clLand)], null); | |||||
// randomize player order | // randomize player order | ||||
var playerIDs = []; | var playerIDs = []; | ||||
for (var i = 0; i < numPlayers; i++) | for (var i = 0; i < numPlayers; i++) | ||||
{ | |||||
playerIDs.push(i+1); | playerIDs.push(i+1); | ||||
Done Inline Actionslet ++i bb: `let ++i` | |||||
Not Done Inline Actionsslightly pedantic XP Also this one needs to be merged with all dupes in all rms files elexis: slightly pedantic XP Also this one needs to be merged with all dupes in all rms files | |||||
} | |||||
playerIDs = sortPlayers(playerIDs); | playerIDs = sortPlayers(playerIDs); | ||||
// place players | // place players | ||||
var playerX = new Array(numPlayers); | var playerX = new Array(numPlayers); | ||||
var playerZ = new Array(numPlayers); | var playerZ = new Array(numPlayers); | ||||
var attackerX = new Array(numPlayers); | var attackerX = new Array(numPlayers); | ||||
var attackerZ = new Array(numPlayers); | var attackerZ = new Array(numPlayers); | ||||
var playerAngle = new Array(numPlayers); | var playerAngle = new Array(numPlayers); | ||||
var startAngle = randFloat(0, TWO_PI); | var startAngle = randFloat(0, 2 * PI); | ||||
Done Inline Actions2*PI bb: 2*PI | |||||
for (var i = 0; i < numPlayers; i++) | for (let i = 0; i < numPlayers; ++i) | ||||
{ | { | ||||
playerAngle[i] = startAngle + i*TWO_PI/numPlayers; | playerAngle[i] = startAngle + i * 2 * PI / numPlayers; | ||||
Done Inline ActionsPI*2 bb: PI*2 | |||||
Not Done Inline ActionsNope, 2 * PI :P elexis: Nope, 2 * PI :P | |||||
playerX[i] = 0.5 + 0.3*cos(playerAngle[i]); | playerX[i] = 0.5 + 0.3*cos(playerAngle[i]); | ||||
playerZ[i] = 0.5 + 0.3*sin(playerAngle[i]); | playerZ[i] = 0.5 + 0.3*sin(playerAngle[i]); | ||||
attackerX[i] = 0.5 + 0.45*cos(playerAngle[i]); | attackerX[i] = 0.5 + 0.45*cos(playerAngle[i]); | ||||
attackerZ[i] = 0.5 + 0.45*sin(playerAngle[i]); | attackerZ[i] = 0.5 + 0.45*sin(playerAngle[i]); | ||||
} | } | ||||
for (var i = 0; i < numPlayers; i++) | for (let i = 0; i < numPlayers; ++i) | ||||
{ | { | ||||
var id = playerIDs[i]; | var id = playerIDs[i]; | ||||
log("Creating base for player " + id + "..."); | log("Creating base for player " + id + "..."); | ||||
// some constants | |||||
var radius = scaleByMapSize(15,25); | var radius = scaleByMapSize(15, 25); | ||||
var cliffRadius = 2; | |||||
var elevation = 20; | |||||
// place the attacker spawning trigger point | // place the attacker spawning trigger point | ||||
var ax = round(fractionToTiles(attackerX[i])); | var ax = round(fractionToTiles(attackerX[i])); | ||||
var az = round(fractionToTiles(attackerZ[i])); | var az = round(fractionToTiles(attackerZ[i])); | ||||
placeObject(ax, az, "special/trigger_point_A", id, PI); | placeObject(ax, az, triggerPointAttacker, id, PI); | ||||
placeObject(ax, az, aWaypointFlag, 0, PI/2); | |||||
addToClass(ax, az, clPlayer); | addToClass(ax, az, clPlayer); | ||||
addToClass(round(fractionToTiles((attackerX[i] + playerX[i]) / 2)), round(fractionToTiles((attackerZ[i] + playerZ[i]) / 2)), clPlayer); | addToClass(round(fractionToTiles((attackerX[i] + playerX[i]) / 2)), round(fractionToTiles((attackerZ[i] + playerZ[i]) / 2)), clPlayer); | ||||
// get the x and z in tiles | // get the x and z in tiles | ||||
fx = fractionToTiles(playerX[i]); | let fx = fractionToTiles(playerX[i]); | ||||
fz = fractionToTiles(playerZ[i]); | let fz = fractionToTiles(playerZ[i]); | ||||
ix = round(fx); | let ix = round(fx); | ||||
iz = round(fz); | let iz = round(fz); | ||||
addToClass(ix, iz, clPlayer); | addToClass(ix, iz, clPlayer); | ||||
addToClass(ix+5, iz, clPlayer); | addToClass(ix+5, iz, clPlayer); | ||||
addToClass(ix, iz+5, clPlayer); | addToClass(ix, iz+5, clPlayer); | ||||
addToClass(ix-5, iz, clPlayer); | addToClass(ix-5, iz, clPlayer); | ||||
addToClass(ix, iz-5, clPlayer); | addToClass(ix, iz-5, clPlayer); | ||||
// Place default civ starting entities | // Place default civ starting entities | ||||
var uDist = 6; | var uDist = 6; | ||||
var uSpace = 2; | var uSpace = 2; | ||||
placeObject(fx, fz, "skirmish/structures/default_civil_centre", id, BUILDING_ORIENTATION); | placeObject(fx, fz, oCivicCenter, id, BUILDING_ORIENTATION); | ||||
var uAngle = BUILDING_ORIENTATION - PI / 2; | var uAngle = BUILDING_ORIENTATION - PI / 2; | ||||
var count = 4; | var count = 4; | ||||
for (var numberofentities = 0; numberofentities < count; numberofentities++) | for (let numberofentities = 0; numberofentities < count; ++numberofentities) | ||||
{ | { | ||||
var ux = fx + uDist * cos(uAngle) + numberofentities * uSpace * cos(uAngle + PI/2) - (0.75 * uSpace * floor(count / 2) * cos(uAngle + PI/2)); | var ux = fx + uDist * cos(uAngle) + numberofentities * uSpace * cos(uAngle + PI/2) - (0.75 * uSpace * floor(count / 2) * cos(uAngle + PI/2)); | ||||
var uz = fz + uDist * sin(uAngle) + numberofentities * uSpace * sin(uAngle + PI/2) - (0.75 * uSpace * floor(count / 2) * sin(uAngle + PI/2)); | var uz = fz + uDist * sin(uAngle) + numberofentities * uSpace * sin(uAngle + PI/2) - (0.75 * uSpace * floor(count / 2) * sin(uAngle + PI/2)); | ||||
placeObject(ux, uz, "skirmish/units/default_infantry_melee_b", id, uAngle); | placeObject(ux, uz, oCitizenInfantry, id, uAngle); | ||||
} | } | ||||
placeDefaultDecoratives(fx, fz, aGrassShort, clBaseResource, radius); | placeDefaultDecoratives(fx, fz, aGrassShort, clBaseResource, radius); | ||||
var tang = startAngle + (i+0.5)*TWO_PI/numPlayers; | var tang = startAngle + (i + 0.5) * 2 * PI / numPlayers; | ||||
var placer = new PathPlacer(fractionToTiles(0.5), fractionToTiles(0.5), fractionToTiles(0.5 + 0.5*cos(tang)), fractionToTiles(0.5 + 0.5*sin(tang)), scaleByMapSize(14,24), 0.4, 3*(scaleByMapSize(1,3)), 0.2, 0.05); | |||||
var terrainPainter = new LayeredPainter( | var placer = new PathPlacer( | ||||
[tMainTerrain, tMainTerrain], // terrains | fractionToTiles(0.5), | ||||
[1] // widths | fractionToTiles(0.5), | ||||
); | fractionToTiles(0.5 + 0.5 * Math.cos(tang)), | ||||
var elevationPainter = new SmoothElevationPainter( | fractionToTiles(0.5 + 0.5 * Math.sin(tang)), | ||||
ELEVATION_SET, // type | scaleByMapSize(14, 24), | ||||
3, // elevation | 0.4, | ||||
4 // blend radius | 3 * scaleByMapSize(1, 3), | ||||
); | 0.2, | ||||
createArea(placer, [terrainPainter, elevationPainter, paintClass(clWater)], null); | 0.05); | ||||
createArea( | |||||
placer, | |||||
[ | |||||
new LayeredPainter([tMainTerrain, tMainTerrain], [1]), | |||||
new SmoothElevationPainter(ELEVATION_SET, 3, 4) | |||||
], | |||||
null); | |||||
//creating female citizens | |||||
var femaleLocation = getTIPIADBON([ix, iz], [mapSize / 2, mapSize / 2], [-3 , 3.5], 1, 3); | var femaleLocation = getTIPIADBON([ix, iz], [mapSize / 2, mapSize / 2], [-3 , 3.5], 1, 3); | ||||
if (femaleLocation !== undefined) | if (femaleLocation !== undefined) | ||||
{ | { | ||||
placeObject(femaleLocation[0], femaleLocation[1], "skirmish/units/default_support_female_citizen", id, playerAngle[i] + PI); | placeObject(femaleLocation[0], femaleLocation[1], oTreasureSeeker, id, playerAngle[i] + PI); | ||||
addToClass(floor(femaleLocation[0]), floor(femaleLocation[1]), clWomen); | addToClass(floor(femaleLocation[0]), floor(femaleLocation[1]), clWomen); | ||||
} | } | ||||
} | } | ||||
paintTerrainBasedOnHeight(3.12, 29, 1, tCliff); | paintTerrainBasedOnHeight(3.12, 29, 1, tCliff); | ||||
paintTileClassBasedOnHeight(3.12, 29, 1, clHill); | paintTileClassBasedOnHeight(3.12, 29, 1, clHill); | ||||
// create trigger points for treasures | for (let triggerPointTreasure of triggerPointTreasures) | ||||
var group = new SimpleGroup( [new SimpleObject("special/trigger_point_B", 1,1, 0,0)], true, clWomen); | createObjectGroups( | ||||
createObjectGroups(group, 0, | new SimpleGroup([new SimpleObject(triggerPointTreasure, 1, 1, 0, 0)], true, clWomen), | ||||
Done Inline ActionsWhitespaces bb: Whitespaces | |||||
Not Done Inline ActionsDidn't make up my mind entirely on those, because those are min max pairs, but yeah, might be actually more consistent elexis: Didn't make up my mind entirely on those, because those are min max pairs, but yeah, might be… | |||||
0, | |||||
[avoidClasses(clForest, 5, clPlayer, 5, clHill, 5), stayClasses(clLand, 5)], | [avoidClasses(clForest, 5, clPlayer, 5, clHill, 5), stayClasses(clLand, 5)], | ||||
scaleByMapSize(40, 140), 100 | scaleByMapSize(40, 140), 100 | ||||
); | ); | ||||
group = new SimpleGroup( [new SimpleObject("special/trigger_point_C", 1,1, 0,0)], true, clWomen); | createBumps(stayClasses(clLand, 5)); | ||||
Done Inline ActionsNot sure if this is correct clPlayer isn't removed, and shouldn't this be an array? bb: Not sure if this is correct `clPlayer` isn't removed, and shouldn't this be an array? | |||||
Not Done Inline Actionsconstraints can be a single constraint or an array elexis: constraints can be a single constraint or an array
clLand already excludes clPlayer, clLand is… | |||||
createObjectGroups(group, 0, | |||||
[avoidClasses(clForest, 5, clPlayer, 5, clHill, 5), stayClasses(clLand, 5)], | |||||
scaleByMapSize(40, 140), 100 | |||||
); | |||||
group = new SimpleGroup( [new SimpleObject("special/trigger_point_D", 1,1, 0,0)], true, clWomen); | |||||
createObjectGroups(group, 0, | |||||
[avoidClasses(clForest, 5, clPlayer, 5, clHill, 5), stayClasses(clLand, 5)], | |||||
scaleByMapSize(40, 140), 100 | |||||
); | |||||
// create bumps | |||||
createBumps([avoidClasses(clWater, 2, clPlayer, 10), stayClasses(clLand, 5)]); | |||||
// create hills | |||||
if (randBool()) | |||||
createHills([tMainTerrain, tCliff, tHill], [avoidClasses(clPlayer, 20, clHill, 5, clBaseResource, 3, clWomen, 5), stayClasses(clLand, 5)], clHill, scaleByMapSize(10, 60) * numPlayers); | |||||
else | |||||
createMountains(tCliff, [avoidClasses(clPlayer, 20, clHill, 5, clBaseResource, 3, clWomen, 5), stayClasses(clLand, 5)], clHill, scaleByMapSize(10, 60) * numPlayers); | |||||
createHills([tCliff, tCliff, tHill], avoidClasses(clPlayer, 20, clHill, 5, clBaseResource, 3, clWomen, 5, clLand, 5), clHill, scaleByMapSize(15, 90) * numPlayers, undefined, undefined, undefined, undefined, 55); | |||||
// create forests | |||||
createForests( | createForests( | ||||
[tMainTerrain, tForestFloor1, tForestFloor2, pForest1, pForest2], | [tMainTerrain, tForestFloor1, tForestFloor2, pForest1, pForest2], | ||||
[avoidClasses(clPlayer, 20, clForest, 5, clHill, 0, clBaseResource,2, clWomen, 5), stayClasses(clLand, 4)], | [avoidClasses(clPlayer, 20, clForest, 5, clHill, 0, clBaseResource,2, clWomen, 5), stayClasses(clLand, 4)], | ||||
clForest, | clForest, | ||||
1.0, | 1, | ||||
Done Inline Actions1.0? bb: 1.0? | |||||
Not Done Inline Actionsack elexis: ack | |||||
random_terrain | random_terrain | ||||
); | ); | ||||
if (randBool()) | |||||
createHills( | |||||
[tMainTerrain, tCliff, tHill], | |||||
[avoidClasses(clPlayer, 20, clHill, 5, clBaseResource, 3, clWomen, 5), stayClasses(clLand, 5)], | |||||
clHill, | |||||
scaleByMapSize(10, 60) * numPlayers); | |||||
else | |||||
createMountains( | |||||
tCliff, | |||||
[avoidClasses(clPlayer, 20, clHill, 5, clBaseResource, 3, clWomen, 5), stayClasses(clLand, 5)], | |||||
clHill, | |||||
scaleByMapSize(10, 60) * numPlayers); | |||||
createHills( | |||||
[tCliff, tCliff, tHill], | |||||
avoidClasses(clPlayer, 20, clHill, 5, clBaseResource, 3, clWomen, 5, clLand, 5), | |||||
clHill, | |||||
scaleByMapSize(15, 90) * numPlayers, | |||||
undefined, | |||||
undefined, | |||||
undefined, | |||||
undefined, | |||||
55); | |||||
RMS.SetProgress(50); | RMS.SetProgress(50); | ||||
// create dirt patches | |||||
log("Creating dirt patches..."); | log("Creating dirt patches..."); | ||||
createLayeredPatches( | createLayeredPatches( | ||||
[scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)], | [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)], | ||||
[[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]], | [[tMainTerrain, tTier1Terrain], [tTier1Terrain, tTier2Terrain], [tTier2Terrain, tTier3Terrain]], | ||||
Done Inline Actionswhitespaces bb: whitespaces | |||||
[1,1], | [1, 1], | ||||
Done Inline ActionsWhitespace bb: Whitespace | |||||
[avoidClasses(clForest, 0, clHill, 0, clDirt, 5, clPlayer, 12, clWomen, 5), stayClasses(clLand, 5)] | [avoidClasses(clForest, 0, clHill, 0, clDirt, 5, clPlayer, 12, clWomen, 5), stayClasses(clLand, 5)] | ||||
Done Inline ActionsA tab too many? bb: A tab too many? | |||||
Done Inline Actionsdont see it elexis: dont see it | |||||
Done Inline ActionsWhy are there 2 tabs on the lines above, instead of 1? bb: Why are there 2 tabs on the lines above, instead of 1? | |||||
Not Done Inline Actionsok, saw it x) (the entire block is off, not only that one line) elexis: ok, saw it x) (the entire block is off, not only that one line) | |||||
); | ); | ||||
// create grass patches | |||||
log("Creating grass patches..."); | log("Creating grass patches..."); | ||||
createPatches( | createPatches( | ||||
[scaleByMapSize(2, 4), scaleByMapSize(3, 7), scaleByMapSize(5, 15)], | [scaleByMapSize(2, 4), scaleByMapSize(3, 7), scaleByMapSize(5, 15)], | ||||
tTier4Terrain, | tTier4Terrain, | ||||
[avoidClasses(clForest, 0, clHill, 0, clDirt, 5, clPlayer, 12, clWomen, 5), stayClasses(clLand, 5)] | [avoidClasses(clForest, 0, clHill, 0, clDirt, 5, clPlayer, 12, clWomen, 5), stayClasses(clLand, 5)] | ||||
); | ); | ||||
// create decoration | |||||
var planetm = 1; | var planetm = 1; | ||||
Done Inline ActionsLook some lines down... nuke? bb: Look some lines down... nuke? | |||||
Not Done Inline ActionsTernary maybe, but nuking would mean that we lose the difference on the tropic biome no? elexis: Ternary maybe, but nuking would mean that we lose the difference on the tropic biome no?
Also… | |||||
if (random_terrain == g_BiomeTropic) | if (random_terrain == g_BiomeTropic) | ||||
planetm = 8; | planetm = 8; | ||||
createDecoration | createDecoration( | ||||
( | [ | ||||
[[new SimpleObject(aRockMedium, 1,3, 0,1)], | [new SimpleObject(aRockMedium, 1, 3, 0, 1)], | ||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)], | [new SimpleObject(aRockLarge, 1, 2, 0, 1), new SimpleObject(aRockMedium, 1, 3, 0, 2)], | ||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)], | [new SimpleObject(aGrassShort, 1, 2, 0, 1, -PI/8, PI/8)], | ||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)], | [new SimpleObject(aGrass, 2,4, 0, 1.8, -PI/8, PI/8), new SimpleObject(aGrassShort, 3,6, 1.2, 2.5, -PI/8, PI/8)], | ||||
bbUnsubmitted Not Done Inline Actions2 whitespaces missing bb: 2 whitespaces missing | |||||
[new SimpleObject(aBushMedium, 1,2, 0,2), new SimpleObject(aBushSmall, 2,4, 0,2)] | [new SimpleObject(aBushMedium, 1, 2, 0, 2), new SimpleObject(aBushSmall, 2, 4, 0, 2)] | ||||
Done Inline ActionsWhitespaces bb: Whitespaces | |||||
Not Done Inline ActionsI guess I have to when I'm already fixing the other whitespace in the same line. elexis: I guess I have to when I'm already fixing the other whitespace in the same line. | |||||
], | ], | ||||
[ | [ | ||||
scaleByMapSize(16, 262), | scaleByMapSize(16, 262), | ||||
scaleByMapSize(8, 131), | scaleByMapSize(8, 131), | ||||
planetm * scaleByMapSize(13, 200), | planetm * scaleByMapSize(13, 200), | ||||
planetm * scaleByMapSize(13, 200), | planetm * scaleByMapSize(13, 200), | ||||
planetm * scaleByMapSize(13, 200) | planetm * scaleByMapSize(13, 200) | ||||
], | ], | ||||
[avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 5)] | [avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), stayClasses(clLand, 5)] | ||||
); | ); | ||||
// create straggler trees | |||||
log("Creating straggler trees..."); | log("Creating straggler trees..."); | ||||
var types = [oTree1, oTree2, oTree4, oTree3]; // some variation | createStragglerTrees( | ||||
createStragglerTrees(types, [avoidClasses(clForest, 7, clHill, 1, clPlayer, 9, clMetal, 6, clRock, 6), stayClasses(clLand, 7)]); | [oTree1, oTree2, oTree4, oTree3], | ||||
[avoidClasses(clForest, 7, clHill, 1, clPlayer, 9), stayClasses(clLand, 7)]); | |||||
// Export map data | |||||
ExportMap(); | ExportMap(); |
All these tTier's may be moved together.