Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/maps/random/danubius.js
Show First 20 Lines • Show All 517 Lines • ▼ Show 20 Lines | |||||
log("Creating island bumps..."); | log("Creating island bumps..."); | ||||
createBumps(stayClasses(clIsland, 2), scaleByMapSize(50, 400), 1, 8, 4, 0, 3); | createBumps(stayClasses(clIsland, 2), scaleByMapSize(50, 400), 1, 8, 4, 0, 3); | ||||
log("Paint seabed..."); | log("Paint seabed..."); | ||||
paintTerrainBasedOnHeight(-20, -3, 3, tSeaDepths); | paintTerrainBasedOnHeight(-20, -3, 3, tSeaDepths); | ||||
log("Creating island metal mines..."); | log("Creating island metal mines..."); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup([new SimpleObject(oMetalLarge, 1, 1, 0, 4)], true, clMetal), | new SimpleGroup([new SimpleObject(oMetalLarge, 1, 1, 0, 4)], true, clMetal), | ||||
0, | 0, | ||||
[avoidClasses(clMetal, 50, clRock, 10), stayClasses(clIsland, 5)], | [avoidClasses(clMetal, 50, clRock, 10), stayClasses(clIsland, 5)], | ||||
500, 1 | 500, 1 | ||||
); | ); | ||||
log("Creating island stone mines..."); | log("Creating island stone mines..."); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup([new SimpleObject(oStoneLarge, 1, 1, 0, 4)], true, clRock), | new SimpleGroup([new SimpleObject(oStoneLarge, 1, 1, 0, 4)], true, clRock), | ||||
0, | 0, | ||||
[avoidClasses(clMetal, 10, clRock, 50), stayClasses(clIsland, 5)], | [avoidClasses(clMetal, 10, clRock, 50), stayClasses(clIsland, 5)], | ||||
500, 1 | 500, 1 | ||||
); | ); | ||||
RMS.SetProgress(65); | RMS.SetProgress(65); | ||||
log("Creating island towers..."); | log("Creating island towers..."); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup([new SimpleObject(oTower, 1, 1, 0, 4)], true, clTower), | new SimpleGroup([new SimpleObject(oTower, 1, 1, 0, 4)], true, clTower), | ||||
0, | 0, | ||||
[avoidClasses(clMetal, 4, clRock, 4, clTower, 20), stayClasses(clIsland, 7)], | [avoidClasses(clMetal, 4, clRock, 4, clTower, 20), stayClasses(clIsland, 7)], | ||||
500, 1 | 500, 1 | ||||
); | ); | ||||
log("Creating island outposts..."); | log("Creating island outposts..."); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup([new SimpleObject(oOutpost, 1, 1, 0, 4)], true, clOutpost), | new SimpleGroup([new SimpleObject(oOutpost, 1, 1, 0, 4)], true, clOutpost), | ||||
0, | 0, | ||||
[avoidClasses(clMetal, 4, clRock, 4, clTower, 5, clOutpost, 20), stayClasses(clIsland, 7)], | [avoidClasses(clMetal, 4, clRock, 4, clTower, 5, clOutpost, 20), stayClasses(clIsland, 7)], | ||||
500, 1 | 500, 1 | ||||
); | ); | ||||
log("Creating metal mines..."); | log("Creating metal mines..."); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup([new SimpleObject(oMetalLarge, 1, 1, 0, 4)], true, clMetal), | new SimpleGroup([new SimpleObject(oMetalLarge, 1, 1, 0, 4)], true, clMetal), | ||||
0, | 0, | ||||
[avoidClasses(clForest, 4, clBaseResource, 20, clMetal, 50, clRock, 20, clWater, 4, clHill, 4, clGauls, 5, clPath, 5)], | [avoidClasses(clForest, 4, clBaseResource, 20, clMetal, 50, clRock, 20, clWater, 4, clHill, 4, clGauls, 5, clPath, 5)], | ||||
500, 1 | 500, 1 | ||||
); | ); | ||||
log("Creating stone mines..."); | log("Creating stone mines..."); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup([new SimpleObject(oStoneLarge, 1, 1, 0, 4)], true, clRock), | new SimpleGroup([new SimpleObject(oStoneLarge, 1, 1, 0, 4)], true, clRock), | ||||
0, | 0, | ||||
[avoidClasses(clForest, 4, clBaseResource, 20, clMetal, 20, clRock, 50, clWater, 4, clHill, 4, clGauls, 5, clPath, 5)], | [avoidClasses(clForest, 4, clBaseResource, 20, clMetal, 20, clRock, 50, clWater, 4, clHill, 4, clGauls, 5, clPath, 5)], | ||||
500, 1 | 500, 1 | ||||
); | ); | ||||
log("Creating stone ruins..."); | log("Creating stone ruins..."); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup([new SimpleObject(oStoneRuins, 1, 1, 0, 4)], true, clRock), | new SimpleGroup([new SimpleObject(oStoneRuins, 1, 1, 0, 4)], true, clRock), | ||||
0, | 0, | ||||
[avoidClasses(clForest, 2, clPlayer, 12, clMetal, 6, clRock, 25, clWater, 4, clHill, 4, clGauls, 5, clPath, 1)], | [avoidClasses(clForest, 2, clPlayer, 12, clMetal, 6, clRock, 25, clWater, 4, clHill, 4, clGauls, 5, clPath, 1)], | ||||
500, 1 | 500, 1 | ||||
); | ); | ||||
RMS.SetProgress(70); | RMS.SetProgress(70); | ||||
log("Creating decoratives..."); | log("Creating decoratives..."); | ||||
▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | createFood( | ||||
], | ], | ||||
[avoidClasses(clRock, 4, clMetal, 4, clFood, 3, clForest, 1, clOutpost, 2, clTower, 2), stayClasses(clIsland, 4)], | [avoidClasses(clRock, 4, clMetal, 4, clFood, 3, clForest, 1, clOutpost, 2, clTower, 2), stayClasses(clIsland, 4)], | ||||
clFood | clFood | ||||
); | ); | ||||
RMS.SetProgress(98); | RMS.SetProgress(98); | ||||
log("Creating treasures..."); | log("Creating treasures..."); | ||||
for (let i = 0; i < randomTreasureCount; ++i) | for (let i = 0; i < randomTreasureCount; ++i) | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup( | new SimpleGroup( | ||||
[new SimpleObject(pickRandom(oTreasures), 1, 1, 0, 2)], | [new SimpleObject(pickRandom(oTreasures), 1, 1, 0, 2)], | ||||
true, clTreasure | true, clTreasure | ||||
), | ), | ||||
0, | 0, | ||||
avoidClasses(clForest, 1, clPlayer, 15, clHill, 1, clWater, 5, clFood, 1, clRock, 4, clMetal, 4, clTreasure, 10, clGauls, 5), | avoidClasses(clForest, 1, clPlayer, 15, clHill, 1, clWater, 5, clFood, 1, clRock, 4, clMetal, 4, clTreasure, 10, clGauls, 5), | ||||
1, | 1, | ||||
50 | 50 | ||||
Show All 16 Lines | [ | ||||
scaleByMapSize(2, 10), | scaleByMapSize(2, 10), | ||||
scaleByMapSize(3, 4), | scaleByMapSize(3, 4), | ||||
scaleByMapSize(2, 10) | scaleByMapSize(2, 10) | ||||
], | ], | ||||
avoidClasses(clForest, 1, clPlayer, 10, clBaseResource, 5, clHill, 1, clFood, 1, clWater, 5, clRock, 4, clMetal, 4, clGauls, 5, clPath, 1) | avoidClasses(clForest, 1, clPlayer, 10, clBaseResource, 5, clHill, 1, clFood, 1, clWater, 5, clRock, 4, clMetal, 4, clGauls, 5, clPath, 1) | ||||
); | ); | ||||
log("Creating spawn points for ships..."); | log("Creating spawn points for ships..."); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup([new SimpleObject(triggerPointShipSpawn, 1, 1, 0, 0)], true, clShip), | new SimpleGroup([new SimpleObject(triggerPointShipSpawn, 1, 1, 0, 0)], true, clShip), | ||||
0, | 0, | ||||
[avoidClasses(clShip, 5, clIsland, 4), stayClasses(clWater, 10)], | [avoidClasses(clShip, 5, clIsland, 4), stayClasses(clWater, 10)], | ||||
10000, | 10000, | ||||
1000 | 1000 | ||||
); | ); | ||||
log("Creating patrol points for ships..."); | log("Creating patrol points for ships..."); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup([new SimpleObject(triggerPointShipPatrol, 1, 1, 0, 0)], true, clShipPatrol), | new SimpleGroup([new SimpleObject(triggerPointShipPatrol, 1, 1, 0, 0)], true, clShipPatrol), | ||||
0, | 0, | ||||
[avoidClasses(clShipPatrol, 5, clIsland, 3), stayClasses(clWater, 4)], | [avoidClasses(clShipPatrol, 5, clIsland, 3), stayClasses(clWater, 4)], | ||||
10000, | 10000, | ||||
1000 | 1000 | ||||
); | ); | ||||
log("Creating ungarrison points for ships..."); | log("Creating ungarrison points for ships..."); | ||||
for (let i = 0; i < 2; ++i) | for (let i = 0; i < 2; ++i) | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup( | new SimpleGroup( | ||||
[new SimpleObject( | [new SimpleObject( | ||||
i == 0 ? triggerPointShipUnloadLeft : triggerPointShipUnloadRight, | i == 0 ? triggerPointShipUnloadLeft : triggerPointShipUnloadRight, | ||||
1, 1, | 1, 1, | ||||
0, 0)], | 0, 0)], | ||||
true, | true, | ||||
clShoreUngarrisonPoint[i]), | clShoreUngarrisonPoint[i]), | ||||
0, | 0, | ||||
[avoidClasses(clShoreUngarrisonPoint[i], 4), stayClasses(clShore[i], 0)], | [avoidClasses(clShoreUngarrisonPoint[i], 4), stayClasses(clShore[i], 0)], | ||||
20000, | 20000, | ||||
1 | 1 | ||||
); | ); | ||||
log("Creating patrol points for land attackers..."); | log("Creating patrol points for land attackers..."); | ||||
for (let i = 0; i < 2; ++i) | for (let i = 0; i < 2; ++i) | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup( | new SimpleGroup( | ||||
[new SimpleObject( | [new SimpleObject( | ||||
i == 0 ? triggerPointLandPatrolLeft : triggerPointLandPatrolRight, | i == 0 ? triggerPointLandPatrolLeft : triggerPointLandPatrolRight, | ||||
1, 1, | 1, 1, | ||||
0, 0)], | 0, 0)], | ||||
true, | true, | ||||
clLandPatrolPoint[i]), | clLandPatrolPoint[i]), | ||||
0, | 0, | ||||
[ | [ | ||||
avoidClasses(clWater, 5, clForest, 3, clHill, 3, clFood, 1, clRock, 5, clMetal, 5, clPlayer, 10, clGauls, 5, clLandPatrolPoint[i], 5), | avoidClasses(clWater, 5, clForest, 3, clHill, 3, clFood, 1, clRock, 5, clMetal, 5, clPlayer, 10, clGauls, 5, clLandPatrolPoint[i], 5), | ||||
stayClasses(clLand[i], 0) | stayClasses(clLand[i], 0) | ||||
], | ], | ||||
10000, | 10000, | ||||
100 | 100 | ||||
); | ); | ||||
log("Creating water logs..."); | log("Creating water logs..."); | ||||
createObjectGroups( | createObjectGroupsDeprecated( | ||||
new SimpleGroup([new SimpleObject(aWaterLog, 1, 1, 0, 0)], true, clWaterLog), | new SimpleGroup([new SimpleObject(aWaterLog, 1, 1, 0, 0)], true, clWaterLog), | ||||
0, | 0, | ||||
[avoidClasses(clShip, 3, clIsland, 4), stayClasses(clWater, 4)], | [avoidClasses(clShip, 3, clIsland, 4), stayClasses(clWater, 4)], | ||||
scaleByMapSize(15, 60), | scaleByMapSize(15, 60), | ||||
100 | 100 | ||||
); | ); | ||||
if (randBool(2/3)) | if (randBool(2/3)) | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator