Originally posted by Maquiladora
Martin is there any way i can add a second good on Tundra terrain? Youve got one good on tundra (Caribou) but i want another good with different bonuses to the Caribou, is there a way without writing more code to generate a second good on tundra?
and if there isnt another way, can you tell me how to modify goods.slc to put it in
Martin is there any way i can add a second good on Tundra terrain? Youve got one good on tundra (Caribou) but i want another good with different bonuses to the Caribou, is there a way without writing more code to generate a second good on tundra?
and if there isnt another way, can you tell me how to modify goods.slc to put it in
You need to modify the following files:
To add a good at all:
goods.txt for the good itsself
terrain.txt to add the good to a certain kind of terrain
gl_str.txt to give the new good a name
uniticon.txt to to give the good some images and some text for the Great Libary, note that the GlHidden flag for CTP2 v1.1 does not work
Great_Libary.txt for some description
goodsID.txt I am not sure if this is really needed because the sprite indeces in this file are redundant and dublicated with the ones on Goods.txt, however I modified it for GoodMod
To add a terrain bonus you need to modify:
tileimp.txt to modify the tileimprovement that gives the terrain boni for the good
Goods.slc to write some code that places the according tileimps on the tiles with the goods.
Well GM1_goods.txt should be self explaining just search for "Caribou" and you find an outcommented entry, right below it. You just have to uncomment it and modify it to your needs. Basicly the entry should look like the one for the Caribou. With the exception of the field Probability. The probability of all goods that can appear on a terrain type should be at maximum 1. So the entry there is ok, but can be changed if you don't like the ratio of 1/3 to 2/3. Actual you see 0.5 and 0.25, but as the total probability is not 1 but 0.75 you get to these values.
GM1_terrain.txt is just an uncommenting job in the according terrain.
Well you have to do something in GM1_gl_str.txt but just copy 'n' paste 'n' modify the text of the according good you find there.
For GM1_uniticon.txt: You might have nothing to do except of modification, of an existing entry, everything should be there, and if not it is just again copy 'n' paste 'n' modify.
GM1_Great_Libary.txt: Here I am sure the entry is there but just needs to be filled with some life.
GM1_goodsID.txt: Well if it is necessary then you just need to modify one number.
GM1_tileimp.txt: You need to find this entry:
TILEIMP_LAND_GOOD_TWO
There you need to add an terrain effect for tundra.
GM1_Goods.slc: Here is the most complicate part, but I think I make it easy:
First rename MG_CreateGoodImprovement2 to MG_CreateGoodImprovement and remove or rename the orignal MG_CreateGoodImprovement. However I thought the first function would be faster, but I doubt that there is a difference.
Now find this piece of code in the file:
Code:
elseif (HasGood(MGGoodLoc)==36) {//TERRAIN_TUNDRA_GOOD_ONE // Caribou Event:CreateImprovement(MGPlayer, MGGoodLoc, MGTileImpLandGood1, 0); }
Replace in the duplicate the 36 by 37 and replace MGTileImpLandGood1 by MGTileImpLandGood2 note the 2 at the end. Then you have to increment by one all the numbers in that line in the following entries:
Code:
elseif (HasGood(MGGoodLoc)==36)
-Martin
Comment