ajotatxe
Jan 01, 2006, 04:52 PM
In which file are they programmed?
I want to modify the prizes, thier probabilities, how many of them there are...
I want to modify the prizes, thier probabilities, how many of them there are...
|
View Full Version : Tribal villages ajotatxe Jan 01, 2006, 04:52 PM In which file are they programmed? I want to modify the prizes, thier probabilities, how many of them there are... Kael Jan 01, 2006, 08:23 PM In which file are they programmed? I want to modify the prizes, thier probabilities, how many of them there are... ..\xml\gameinfo\CIV4HandicapInfo.xml Cappella Jan 03, 2006, 09:13 AM In which file are they programmed? I want to modify the prizes, thier probabilities, how many of them there are... For the probabilities, it's like Kael said above, in the file /Assets/xml/gameinfo/CIV4HandicapInfo.xml, there are 20 <GoodyType> fields for each difficulty level to set the probability and result of the tribal village. I don't know if you must have 20 of them, or can put more or less, I didn't try it. For the prizes, it's in the file: /Assets/xml/gameinfo/CIV4GoodyInfo.xml , it defines the prizes to be used in CIV4HandicapInfo.xml file For the position and number of tribal village, it is done in map generation, here is below a very basic example (to be added in the file /publicMaps/continent.py, for example), on how it is done: def addGoodies(): gc = CyGlobalContext() map = CyMap() dice = gc.getGame().getMapRand() iW = map.getGridWidth() iH = map.getGridHeight() idGoodie=gc.getInfoTypeForString("IMPROVEMENT_GOODY_HUT") idOcean=gc.getInfoTypeForString("TERRAIN_OCEAN") idCoast=gc.getInfoTypeForString("TERRAIN_COAST") iNumPlots=iW*iH iNumGoodies=iNumPlots/150 for x in range(iNumGoodies): validPos=0 while validPos==0: posX=dice.get(iW, "Continents.py - addGoodies") posY=dice.get(iH, "Continents.py - addGoodies") plotTerrainType=map.plot(posX,posY).getTerrainType () if not map.plot(posX,posY).isPeak() and plotTerrainType!=idOcean and plotTerrainType!=idCoast: map.plot(posX,posY).setImprovementType(idGoodie) validPos=1 return None The code above can lead to "groups" of tribal villages next to each other, that's because of a lattice effect in the PRN generator used. There are many ways to avoid this, but as I said, it's just a basic example. I hope it helps ;-) Seven05 Jan 03, 2006, 12:43 PM For the technologies that you may get you have to look in CIV4TechInfos.xml, each technology in the file will have one line: <bGoodyTech>0</bGoodyTech> Changing the 0 to a 1 (or a 1 to a 0) will control whether or not that tech can be found in a goody hut. 1 means it can, 0 means it can't. ajotatxe Jan 10, 2006, 06:25 AM Thank all of you, specially Cappella. Alpedar Jan 12, 2006, 08:36 AM What does iGoldRand1 and iGoldRand2 mean? (in goody info) Impaler[WrG] Jan 12, 2006, 03:20 PM Duu... its the range of the randoly selected gold goody, I belive its rolling 2 random number and adding the result to produce a roughly bell curve distribution. |
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.