Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/maps/random/alpine_valley.js
Show First 20 Lines • Show All 501 Lines • ▼ Show 20 Lines | createAreas( | ||||
avoidClasses(clForest, 0, clHill, 0, clDirt, 5, clPlayer, 12), | avoidClasses(clForest, 0, clHill, 0, clDirt, 5, clPlayer, 12), | ||||
scaleByMapSize(15, 45) | scaleByMapSize(15, 45) | ||||
); | ); | ||||
} | } | ||||
RMS.SetProgress(65); | RMS.SetProgress(65); | ||||
log("Creating stone mines..."); | log("Creating stone mines..."); | ||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock); | group = new SimpleGroup([new SimpleObject(oStoneSmall, 0,2, 0,4), new SimpleObject(oStoneLarge, 1,1, 0,4)], true, clRock); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1), | avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1), | ||||
scaleByMapSize(4,16), 100 | scaleByMapSize(4,16), 100 | ||||
); | ); | ||||
log("Creating small stone mines..."); | log("Creating small stone mines..."); | ||||
group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock); | group = new SimpleGroup([new SimpleObject(oStoneSmall, 2,5, 1,3)], true, clRock); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1), | avoidClasses(clForest, 1, clPlayer, 20, clRock, 10, clHill, 1), | ||||
scaleByMapSize(4,16), 100 | scaleByMapSize(4,16), 100 | ||||
); | ); | ||||
log("Creating metal mines..."); | log("Creating metal mines..."); | ||||
group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal); | group = new SimpleGroup([new SimpleObject(oMetalLarge, 1,1, 0,4)], true, clMetal); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clHill, 1), | avoidClasses(clForest, 1, clPlayer, 20, clMetal, 10, clRock, 5, clHill, 1), | ||||
scaleByMapSize(4,16), 100 | scaleByMapSize(4,16), 100 | ||||
); | ); | ||||
RMS.SetProgress(70); | RMS.SetProgress(70); | ||||
log("Creating small decorative rocks..."); | log("Creating small decorative rocks..."); | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[new SimpleObject(aRockMedium, 1,3, 0,1)], | [new SimpleObject(aRockMedium, 1,3, 0,1)], | ||||
true | true | ||||
); | ); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
group, 0, | group, 0, | ||||
avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), | avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), | ||||
scaleByMapSize(16, 262), 50 | scaleByMapSize(16, 262), 50 | ||||
); | ); | ||||
log("Creating large decorative rocks..."); | log("Creating large decorative rocks..."); | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[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)], | ||||
true | true | ||||
); | ); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
group, 0, | group, 0, | ||||
avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), | avoidClasses(clForest, 0, clPlayer, 0, clHill, 0), | ||||
scaleByMapSize(8, 131), 50 | scaleByMapSize(8, 131), 50 | ||||
); | ); | ||||
RMS.SetProgress(75); | RMS.SetProgress(75); | ||||
log("Creating deer..."); | log("Creating deer..."); | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[new SimpleObject(oDeer, 5,7, 0,4)], | [new SimpleObject(oDeer, 5,7, 0,4)], | ||||
true, clFood | true, clFood | ||||
); | ); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20), | avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20), | ||||
3 * numPlayers, 50 | 3 * numPlayers, 50 | ||||
); | ); | ||||
log("Creating berry bush..."); | log("Creating berry bush..."); | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[new SimpleObject(oBerryBush, 5,7, 0,4)], | [new SimpleObject(oBerryBush, 5,7, 0,4)], | ||||
true, clFood | true, clFood | ||||
); | ); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clForest, 0, clPlayer, 20, clHill, 1, clFood, 10), | avoidClasses(clForest, 0, clPlayer, 20, clHill, 1, clFood, 10), | ||||
randIntInclusive(1, 4) * numPlayers + 2, 50 | randIntInclusive(1, 4) * numPlayers + 2, 50 | ||||
); | ); | ||||
log("Creating rabbit..."); | log("Creating rabbit..."); | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[new SimpleObject(oRabbit, 2,3, 0,2)], | [new SimpleObject(oRabbit, 2,3, 0,2)], | ||||
true, clFood | true, clFood | ||||
); | ); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20), | avoidClasses(clForest, 0, clPlayer, 10, clHill, 1, clFood, 20), | ||||
3 * numPlayers, 50 | 3 * numPlayers, 50 | ||||
); | ); | ||||
RMS.SetProgress(85); | RMS.SetProgress(85); | ||||
log("Creating straggler trees..."); | log("Creating straggler trees..."); | ||||
var types = [oPine, oPine]; // some variation | var types = [oPine, oPine]; // some variation | ||||
var num = floor(numStragglers / types.length); | var num = floor(numStragglers / types.length); | ||||
for (var i = 0; i < types.length; ++i) | for (var i = 0; i < types.length; ++i) | ||||
{ | { | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[new SimpleObject(types[i], 1,1, 0,3)], | [new SimpleObject(types[i], 1,1, 0,3)], | ||||
true, clForest | true, clForest | ||||
); | ); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clForest, 1, clHill, 1, clPlayer, 12, clMetal, 6, clRock, 6), | avoidClasses(clForest, 1, clHill, 1, clPlayer, 12, clMetal, 6, clRock, 6), | ||||
num | num | ||||
); | ); | ||||
} | } | ||||
log("Creating small grass tufts..."); | log("Creating small grass tufts..."); | ||||
var planetm = 1; | var planetm = 1; | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)] | [new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)] | ||||
); | ); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clHill, 2, clPlayer, 2, clDirt, 0), | avoidClasses(clHill, 2, clPlayer, 2, clDirt, 0), | ||||
planetm * scaleByMapSize(13, 200) | planetm * scaleByMapSize(13, 200) | ||||
); | ); | ||||
RMS.SetProgress(90); | RMS.SetProgress(90); | ||||
log("Creating large grass tufts..."); | log("Creating large grass tufts..."); | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[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)] | ||||
); | ); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0), | avoidClasses(clHill, 2, clPlayer, 2, clDirt, 1, clForest, 0), | ||||
planetm * scaleByMapSize(13, 200) | planetm * scaleByMapSize(13, 200) | ||||
); | ); | ||||
RMS.SetProgress(95); | RMS.SetProgress(95); | ||||
log("Creating bushes..."); | log("Creating bushes..."); | ||||
group = new SimpleGroup( | group = new SimpleGroup( | ||||
[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)] | ||||
); | ); | ||||
createObjectGroups(group, 0, | createObjectGroupsDeprecated(group, 0, | ||||
avoidClasses(clHill, 1, clPlayer, 1, clDirt, 1), | avoidClasses(clHill, 1, clPlayer, 1, clDirt, 1), | ||||
planetm * scaleByMapSize(13, 200), 50 | planetm * scaleByMapSize(13, 200), 50 | ||||
); | ); | ||||
setSkySet(pickRandom(["cirrus", "cumulus", "sunny"])); | setSkySet(pickRandom(["cirrus", "cumulus", "sunny"])); | ||||
setSunRotation(randFloat(0, TWO_PI)); | setSunRotation(randFloat(0, TWO_PI)); | ||||
setSunElevation(randFloat(PI/ 5, PI / 3)); | setSunElevation(randFloat(PI/ 5, PI / 3)); | ||||
setWaterColor(0.0, 0.047, 0.286); // dark majestic blue | setWaterColor(0.0, 0.047, 0.286); // dark majestic blue | ||||
setWaterTint(0.471, 0.776, 0.863); // light blue | setWaterTint(0.471, 0.776, 0.863); // light blue | ||||
setWaterMurkiness(0.72); | setWaterMurkiness(0.72); | ||||
setWaterWaviness(2.0); | setWaterWaviness(2.0); | ||||
setWaterType("lake"); | setWaterType("lake"); | ||||
ExportMap(); | ExportMap(); |
Wildfire Games · Phabricator