//*************************************************************** // Terrain Discombobulator // Version 0.9.0 (December 6, 2002) // // Coded by: Devil Of Truth //*************************************************************** // Don't you just hate CTP2 maps? They're so ordered, clustered and ugly! // Have you ever wondered whether it is even geologically possible to have so // many mountains in one hemisphere? // This SLIC tries to address these imbalances by adding some randomness to // these maps, and it flattens some of those gargantuan mountain ranges. // // In short, it makes CTP2 maps a little less Monet, and a little more Picasso. // // What it will do: // * It will add some random terrain types to most terrains. For example: Those // plains that fill entire continents, will now have some grasslands, hills etc. // * It will add some plains, forests, grasslands etc. in between mountains to // make enormous mountain ranges a little less soul-destroying. // * It will add coral reefs to the map. // // What it won't do: // * It will not fill the entire map with random gibberish. Environmental regions will // still be discernable, albeit a little less homogeneous. // * It will not affect land area in any way. You won't gain more land or sea. // * It will not predict next week's lottery numbers. // // What you need: // * You need to have the patched (v1.11) version of CTP2 installed. // * It has been tested with most mods and it seems to work fine. However, // mods that alter terrain are not supported. // // What else: // * The script evaluates every tile on the map. Obviously, this takes time and // patience. Luckily, it only does this once - right in the beginning // while the game is loading - never again after that. (Also, the larger the // map, the longer it will take - but you already knew that.) // * You may need to fiddle with Const.txt and Map.txt to get the best // results. The standard Cradle 1.3+ configuration seems to work well. // //*************************************************************** HandleEvent(BeginTurn)'ChangeMyMap' pre { int_t tmpCounter1; int_t tmpCounter2; int_t tmpRND; location_t TileLoc; if (GetCurrentRound() == 0) { // Only run this code right in the beginning when the game loads. for (tmpCounter1 = 0; tmpCounter1 <= GetMapWidth()-1; tmpCounter1 = tmpCounter1+1) { // Loop through every tile horizontally. for (tmpCounter2 = 0; tmpCounter2 <= GetMapHeight()-1; tmpCounter2 = tmpCounter2+1) { // Loop through every tile vertically. MakeLocation(TileLoc, tmpCounter1, tmpCounter2); // Get the coordinates of the tile. // Plains. if (TerrainType(TileLoc) == 1) { // The tile is a plain. Not as in boring... as in not quite grassland. tmpRND = random(25); // Get a random number. This has a large range, because I don't want to change every tile - just a few. if (tmpRND == 1) { Terraform(TileLoc,9); // Terraform tile to green hills. } if (tmpRND == 2) { Terraform(TileLoc,8); // Terraform tile to green mountains. } if (tmpRND == 3) { Terraform(TileLoc,5); // Terraform tile to desert. } if (tmpRND == 4) { Terraform(TileLoc,4); // Terraform tile to grasslands. } if (tmpRND == 5) { Terraform(TileLoc,0); // Terraform tile to forests. } } // Grasslands. if (TerrainType(TileLoc) == 4) { // The tile is a grassland. tmpRND = random(25); // Get a random number. This has a large range, because I don't want to change every tile - just a few. if (tmpRND == 1) { Terraform(TileLoc,9); // Terraform tile to green hills. } if (tmpRND == 2) { Terraform(TileLoc,8); // Terraform tile to green mountains. } if (tmpRND == 3) { Terraform(TileLoc,1); // Terraform tile to plains. } if (tmpRND == 4) { Terraform(TileLoc,7); // Terraform tile to jungles. } } // Tundra and Glaciers. if (TerrainType(TileLoc) == 2 || TerrainType(TileLoc) == 3) { // These tiles are useless. A lot like boy-bands. tmpRND = random(6); // Get a... you know... random thingie. if (tmpRND == 1) { Terraform(TileLoc,1); // Terraform tile to plains. } if (tmpRND == 2) { Terraform(TileLoc,4); // Terraform tile to grasslands. } if (tmpRND == 3) { Terraform(TileLoc,0); // Terraform tile to forests. } } // Deserts. if (TerrainType(TileLoc) == 5) { // The tile is a (drum roll) desert. tmpRND = random(25); // Get a random number. This has a large range, because I don't want to change every tile - just a few. if (tmpRND == 1) { Terraform(TileLoc,1); // Terraform tile to ugly amber plains. } if (tmpRND == 2) { Terraform(TileLoc,4); // Terraform tile to pretty green grasslands. } if (tmpRND == 3) { Terraform(TileLoc,18); // Terraform tile to bumpy desert tiles. } if (tmpRND == 4) { Terraform(TileLoc,19); // Terraform tile to unsightly brown mountains. } } // Jungle. if (TerrainType(TileLoc) == 7) { // It's a jungle out there. tmpRND = random(25); // Get a random number. This has a large range, because I don't want to change every tile - just a few. if (tmpRND == 1) { Terraform(TileLoc,4); // Terraform tile to grasslands. } if (tmpRND == 2) { Terraform(TileLoc,9); // Terraform tile to green hills. } } // Forest. if (TerrainType(TileLoc) == 0) { // Run forest, run. tmpRND = random(25); // Get a random number. This has a large range, because I don't want to change every tile - just a few. if (tmpRND == 1) { Terraform(TileLoc,1); // Terraform tile to plains. } if (tmpRND == 2) { Terraform(TileLoc,4); // Terraform tile to grasslands. } if (tmpRND == 3) { Terraform(TileLoc,9); // Terraform tile to green hills. } } // Mountains and hills. if (TerrainType(TileLoc) == 8 || TerrainType(TileLoc) == 9 || TerrainType(TileLoc) == 18 || TerrainType(TileLoc) == 19 || TerrainType(TileLoc) == 20 || TerrainType(TileLoc) == 21) { // This tile is a mountain or a hill. tmpRND = random(6); // Get a random... whatever. if (tmpRND == 1) { Terraform(TileLoc,1); // Bulldoze, plant shrubs, and call it a plain. } if (tmpRND == 2) { Terraform(TileLoc,4); // Bulldoze, plant good quality grass, go to jail (unless you live in an enlightened society). } if (tmpRND == 3) { Terraform(TileLoc,0); // Bulldoze, see the forest for the trees. } if (tmpRND == 4) { Terraform(TileLoc,9); // Terraform tile to hills. } } // Shallow water. if (TerrainType(TileLoc) == 10) { // This tile is as deep as Britney's lyrics. tmpRND = random(5); // Get a random number. if (tmpRND == 1) { Terraform(TileLoc,23); // OK Coral! } } } } DisableTrigger('ChangeMyMap'); } elseif (GetCurrentRound () > 0) { // Only do this once at the beginning of the game - even if somebody does 'reloadslic'. Of course, if you change the turn to 0 and 'reloadslic' it will re-terraform the map. But then you deserve it anyway. DisableTrigger('ChangeMyMap'); } } // Fin.