The reason I asked about what mod you were playing with, is because the version I posted earlier used Martin's GoodMod1.slc, so it would only work in mods that already have that included. Here's a version that I've ripped out of it; this should work with any setup. Anyone who wants to use this needs to go to the file ...\ctp2_data\default\gamedata\script.slc and at the very bottom of it, add the line
and then just put the attached file in the folder ...\ctp2_data\default\gamedata
I don't know how familiar you are with SLIC, but it's all done with the terraform function:
VOID Terraform(location, terrain)
Change location into a different terrain type.
0 TERRAIN_TYPE_FOREST
1 TERRAIN_TYPE_PLAINS
2 TERRAIN_TYPE_TUNDRA
3 TERRAIN_TYPE_GLACIER
4 TERRAIN_TYPE_GRASSLAND
5 TERRAIN_TYPE_DESERT
6 TERRAIN_TYPE_SWAMP
7 TERRAIN_TYPE_JUNGLE
8 TERRAIN_TYPE_MOUNTAIN
9 TERRAIN_TYPE_HILL
10 TERRAIN_TYPE_WATER_SHALLOW
11 TERRAIN_TYPE_WATER_DEEP
12 TERRAIN_TYPE_WATER_VOLCANO
13 TERRAIN_TYPE_SPACE
14 TERRAIN_TYPE_WATER_BEACH
15 TERRAIN_TYPE_WATER_SHELF
16 TERRAIN_TYPE_WATER_TRENCH
17 TERRAIN_TYPE_WATER_RIFT
18 TERRAIN_TYPE_DEAD
19 TERRAIN_TYPE_BROWN_HILL
20 TERRAIN_TYPE_BROWN_MOUNTAIN
21 TERRAIN_TYPE_WHITE_HILL
22 TERRAIN_TYPE_WHITE_MOUNTAIN
23 TERRAIN_TYPE_DEAD_HILL
The numbers in the left hand column are used in the code as follows. MGGoodLoc is the tile location being looked at.
I put the random number bit in so that it would break up the big clumps of terrain (tundra/glacier above) that you often find.
I hope that's enough info to let you get on with changing it if you want to. If not, feel free to ask for advice.
It works fine for me but this may be because of the way I've modified some of the data in const.txt. Tell me how it works with the data you're using.
PS, The new updater code will take a few more days. I'm, er uhm, having too much fun beta testing Call to Bloodlust.
#include "MAQ_Terra.slc"
I don't know how familiar you are with SLIC, but it's all done with the terraform function:
VOID Terraform(location, terrain)
Change location into a different terrain type.
0 TERRAIN_TYPE_FOREST
1 TERRAIN_TYPE_PLAINS
2 TERRAIN_TYPE_TUNDRA
3 TERRAIN_TYPE_GLACIER
4 TERRAIN_TYPE_GRASSLAND
5 TERRAIN_TYPE_DESERT
6 TERRAIN_TYPE_SWAMP
7 TERRAIN_TYPE_JUNGLE
8 TERRAIN_TYPE_MOUNTAIN
9 TERRAIN_TYPE_HILL
10 TERRAIN_TYPE_WATER_SHALLOW
11 TERRAIN_TYPE_WATER_DEEP
12 TERRAIN_TYPE_WATER_VOLCANO
13 TERRAIN_TYPE_SPACE
14 TERRAIN_TYPE_WATER_BEACH
15 TERRAIN_TYPE_WATER_SHELF
16 TERRAIN_TYPE_WATER_TRENCH
17 TERRAIN_TYPE_WATER_RIFT
18 TERRAIN_TYPE_DEAD
19 TERRAIN_TYPE_BROWN_HILL
20 TERRAIN_TYPE_BROWN_MOUNTAIN
21 TERRAIN_TYPE_WHITE_HILL
22 TERRAIN_TYPE_WHITE_MOUNTAIN
23 TERRAIN_TYPE_DEAD_HILL
Code:
ran=random(3); //generate a random number 0 <= ran < 3 if (TerrainType(MGGoodLoc)==2 || TerrainType(MGGoodLoc)==3){ //if the location is tundra or glacier if (ran==0){//33% chance of changing it to grassland terraform(MGGoodLoc,4);//change to grassland } elseif (ran==1){//33% chance of changing it to plains terraform(MGGoodLoc,1);//change to plains } else{//33% chance of changing it to forest terraform(MGGoodLoc,0);//change to forest } }
I hope that's enough info to let you get on with changing it if you want to. If not, feel free to ask for advice.
It works fine for me but this may be because of the way I've modified some of the data in const.txt. Tell me how it works with the data you're using.
PS, The new updater code will take a few more days. I'm, er uhm, having too much fun beta testing Call to Bloodlust.
Comment