Bug Reports

Thanks for the report both of you, seems easy enough to fix ... issue seems to be with the barbarian civ having their unit type defined as NONE for some unit classes (like Tanks ...).

Attached is a patched file to fix this, unzip it and replace the one in Revolution/Assets/Python/Revolution/.
 

Attachments

  • RevUtils.zip
    10.4 KB · Views: 73
just got this on military advisor (revolution mod merged with BUG mod)



any idea?


just got another error screen: (appears now always when my mouse is over an air unit)

 
update: the aircombat bug is not your or thomas' pi fault. the clean bug mod got this error too, you can't select an air unit with it either.
 
I'm merging the CIV Gold mod with this one; there are some flaws. No new civs pop out as a result of a revolution, even though I modified the python files. I did some more editing, and have yet to test the new changes. The civs in CIV Gold are modular. So are the leaders, and Revolutions has created rebel nations (from the original) with the new leaders.

Tell me if these files are correct.

Code:
# RebelTypes.py
#
# by jdog5000
# Version 1.1

# This file sets up the most likely rebel civ types to appear when a revolution occurs in a particular civ.

from CvPythonExtensions import *
import CvUtil

gc = CyGlobalContext()

# Initialize list to empty
RebelTypeList = list()

# This function actually sets up the lists of most preferable rebel types for each motherland civ type
# All rebel types in this list are equally likely
# If none of these are available, defaults to a similar art style civ
def setup( ) :

    #print "Setting up rebel type list"

    global RebelTypeList
    
    RebelTypeList = list()

    for idx in range(0,gc.getNumCivilizationInfos()) :
        RebelTypeList.append( list() )

    try :
	    iAborigines     = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ABORIGINES')
        iAinu           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_AINU')
        iAlbania        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ALBANIA')
        iAmerica        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_AMERICA')
        iAnishnaabek    = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ANISHNAABEK')
        iAniyonega      = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ANIYONEGA')
        iArabia         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ARABIA')
        iArgentina      = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ARGENTINA')
        iArmenia        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ARMENIA')
        iAssyria        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ASSYRIA')
        iAustralia      = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_AUSTRALIA')
        iAustria        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_AUSTRIA')
        iAztec          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_AZTEC')
        iBabylon        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_BABYLON')
        iBaktria        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_BAKTRIA')
        iBatavii        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_BATAVII')
        iBolivarian     = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_BOLIVARIAN')
        iBrazil         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_BRAZIL')
        iBulgaria       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_BULGARIA')
        iBuryat         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_BURYAT')
        iByzantium      = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_BYZANTIUM')
        iCanada         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_CANADA')
        iCarthage       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_CARTHAGE')
        iCelt           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_CELT')
        iChile          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_CHILE')
        iChina          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_CHINA')
        iCongo          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_CONGO')
        iCroatia        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_CROATIA')
        iCuba           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_CUBA')
        iCzech          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_CZECH')
        iDenmark        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_DENMARK')
        iDinnehih       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_DINNEHIH')
        iEgypt          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_EGYPT')
        iEngland        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ENGLAND')
        iEthiopia       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ETHIOPIA')
        iEtruscans      = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ETRUSCANS')
        iFinland        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_FINLAND')
        iFrance         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_FRANCE')
        iGalatia        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_GALATIA')
        iGermany        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_GERMANY')
        iGetai          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_GETAI')
        iGoths          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_GOTHS')
        iGreece         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_GREECE')
        iHarappan       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_HARAPPAN')
        iHittites       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_HITTITES')
        iHolyRoman      = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_HOLY_ROMAN')
        iInca           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_INCA')
        iIndia          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_INDIA')
        iIndonesia      = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_INDONESIA')
        iIreland        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_IRELAND')
        iIroquois       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_IROQUOIS')
        iIsrael         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ISRAEL')
        iItaly          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ITALY')
        iJapan          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_JAPAN')
        iJomon          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_JOMON')
        iKanembornu     = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_KANEMBORNU')
        iKhmer          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_KHMER')
        iKhoisan        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_KHOISAN')
        iKorea          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_KOREA')
        iKushan         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_KUSHAN')
        iLithuania      = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_LITHUANIA')
        iMaasai         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MAASAI')
        iMaghreb        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MAGHREB')
        iMagyar         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MAGYAR')
        iMajapahit      = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MAJAPAHIT')
        iMalagasy       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MALAGASY')
        iMali           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MALI')
        iMande          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MANDE')
        iMaori          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MAORI')
        iMaya           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MAYA')
        iMexico         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MEXICO')
        iMinoa          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MINOA')
        iMongol         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MONGOL')
        iMutapa         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_MUTAPA')
        iNativeAmerica  = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_NATIVE_AMERICA')
        iNetherlands    = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_NETHERLANDS')
        iNewZealand     = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_NEWZEALAND')
        iNigeria        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_NIGERIA')
        iNimiipu        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_NIMIIPU')
        iNubian         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_NUBIAN')
        iOlmec          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_OLMEC')
        iOttoman        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_OTTOMAN')
        iOxus           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_OXUS')
        iPakistan       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_PAKISTAN')
        iPersia         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_PERSIA')
        iPhoenicia      = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_PHOENICIA')
        iPicts          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_PICTS')
        iPiliwni        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_PILIWNI')
        iPoland         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_POLAND')
        iPolynesia      = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_POLYNESIA')
        iPortugal       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_PORTUGAL')
        iRomania        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ROMANIA')
        iRome           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ROME')
        iRussia         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_RUSSIA')
        iSami           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_SAMI')
        iScotland       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_SCOTLAND')
        iScythia        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_SCYTHIA')
        iSeleukia       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_SELEUKIA')
        iSiam           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_SIAM')
        iSioux          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_SIOUX')
        iSomalia        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_SOMALIA')
        iSouthAfrica    = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_SOUTHAFRICA')
        iSpain          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_SPAIN')
        iSumeria        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_SUMERIA')
        iSweden         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_SWEDEN')
        iThailand       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_THAILAND')
        iTibet          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_TIBET')
        iTillikum       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_TILLIKUM')
        iTogo           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_TOGO')
        iToltec         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_TOLTEC')
        iTroy           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_TROY')
        iTupi           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_TUPI')
        iUkraine        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_UKRAINE')
        iUpaajut        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_UPAAJUT')
        iUyghur         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_UYGHUR')
        iVedic          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_VEDIC')
        iVietnam        = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_VIETNAM')
        iViking         = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_VIKING')
        iVoestaneoo     = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_VOESTANEOO')
        iWales          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_WALES')
        iWestIndies     = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_WESTINDIES')
        iYangshao       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_YANGSHAO')
        iYanomami       = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_YANOMAMI')
        iYemen          = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_YEMEN')
        iZulu           = CvUtil.findInfoTypeNum(gc.getCivilizationInfo,gc.getNumCivilizationInfos(),'CIVILIZATION_ZULU')
		
        # Format is:
        # RebelTypeList[iHomeland] = [iRebel1, iRebel2, iRebel3]
        # No limit on length of rebel list, can be zero

        RebelTypeList[iAborigines]  = []
        RebelTypeList[iAinu]        = []
        RebelTypeList[iAlbania]     = []
        RebelTypeList[iAmerica]     = [iEngland,iNativeAmerica,iAnishnaabek,iCanada,iVoestaneoo,iDinnehih,iSioux,iIroquois,iNimiipu]
        RebelTypeList[iAnishnaabek] = []
        RebelTypeList[iArabia]      = [iPersia,iOttoman,iBabylon,iSumeria,iYemen,iHittite,iMaghreb,iIsrael,iPhoenicia]
        RebelTypeList[iArgentina]   = []
        RebelTypeList[iArmenia]     = []
        RebelTypeList[iAssyria]     = []
        RebelTypeList[iAustralia]   = []
        RebelTypeList[iAustria]     = [iMagyar,iItaly,iGermany,iFrance,Russia,iBulgaria,iPoland,iCzech,iRomania]
        RebelTypeList[iAztec]       = [iInca,iSpain,iNativeAmerica,iMaya,iOlmec,iToltec,iMexico]
        RebelTypeList[iBabylon]     = [iSumeria,iPersia,iGreece,iEgypt,iArabia,iIsrael,iPhoenicia,iHittites]
        RebelTypeList[iBatavii]     = []
        RebelTypeList[iBolivarian]  = []
        RebelTypeList[iBrazil]      = []
        RebelTypeList[iBulgaria]    = []
        RebelTypeList[iBuryat]      = []
        RebelTypeList[iByzantium]   = [iGreece,iRome,iOttoman,iHolyRoman,iMaghreb,iMinoa,iHittites]
        RebelTypeList[iCanada]      = [iAmerica,iEngland,iTillikum,iAnishnaabek,iNativeAmerica,iIroquois]
        RebelTypeList[iCarthage]    = [iRome,iEgypt,iPhoenicia,iMali,iSpain]
        RebelTypeList[iCelt]        = [iFrance,iEngland,iGermany,iIreland,iScotland,iWales]
        RebelTypeList[iChile]       = []
        RebelTypeList[iChina]       = [iKorea,iMongol,iIndia,iAinu,iJomon,iJapan,iKhmer,iSiam,iVietnam,iYangshao,iTibet]
        RebelTypeList[iCongo]       = []
        RebelTypeList[iCroatia]     = []
        RebelTypeList[iCuba]        = []
        RebelTypeList[iCzech]       = [iGermany,iPoland,iAustria]
        RebelTypeList[iDenmark]     = []
        RebelTypeList[iDinnehih]    = []
        RebelTypeList[iEgypt]       = [iNubia,iAssyria,iIsrael]
        RebelTypeList[iEngland]     = [iAmerica,iIndia,iZulu,iCelt,iEthiopia,iWales,iScotland,iCanada,iIreland,iAustralia,iSouthAfrica,iWestIndies,iNewZealand]
        RebelTypeList[iEthiopia]    = [iMali,iZulu,iArabia,iMande,iNubia,iSomalia]
        RebelTypeList[iEtruscans]   = []
        RebelTypeList[iFinland]     = []
        RebelTypeList[iFrance]      = [iGermany,iCelt,iEngland,iMali,iHolyRoman,iTogo,iMande,iCanada,iWestIndies]
        RebelTypeList[iGalatia]     = []
        RebelTypeList[iGermany]     = [iFrance,iRussia,iHolyRoman,iNetherlands,iAustria,iPoland,iCzech]
        RebelTypeList[iGetai]       = []
        RebelTypeList[iGoths]       = []
        RebelTypeList[iGreece]      = [iRome,iPersia,iCarthage,iOttoman,iTroy,iMinoa]
        RebelTypeList[iHarappan]    = []
        RebelTypeList[iHittites]    = []
        RebelTypeList[iHolyRoman]   = [iGermany,iFrance,iSpain,iByzantium,iAustria,iItaly]
        RebelTypeList[iInca]        = [iAztec,iSpain,iMaya,iNativeAmerica,iOlmec,iToltec,iArgentina,iChile]
        RebelTypeList[iIndia]       = [iPersia,iChina,iEngland,iKhmer,iPakistan,iTibet,iSiam,iThailand]
        RebelTypeList[iIndonesia]   = []
        RebelTypeList[iIreland]     = []
        RebelTypeList[iIroquois]    = []
        RebelTypeList[iIsrael]      = []
        RebelTypeList[iItaly]       = []
        RebelTypeList[iJapan]       = [iKorea,iChina,iMongol,iKhmer,iIndonesia,iSiam,iVietnam,iThailand,iAinu,iJomon]
        RebelTypeList[iJomon]       = []
        RebelTypeList[iKanembornu]  = []
        RebelTypeList[iKhmer]       = [iIndia,iVietnam,iSiam,iThailand]
        RebelTypeList[iKhoisan]     = []
        RebelTypeList[iKorea]       = [iJapan,iChina,iMongol,iBuryat]
        RebelTypeList[iKushan]      = []
        RebelTypeList[iLithuania]   = []
        RebelTypeList[iMaasai]      = []
        RebelTypeList[iMaghreb]     = []
        RebelTypeList[iMagyar]      = []
        RebelTypeList[iMajapahit]   = []
        RebelTypeList[iMalagasy]    = []
        RebelTypeList[iMali]        = [iMande,iMaasai,iArabia,iFrance,iEthiopia]
        RebelTypeList[iMande]       = []
        RebelTypeList[iMaori]       = []
        RebelTypeList[iMaya]        = [iAztec,iInca,iSpain,iOlmec,iToltec,iMexico,iCuba]
        RebelTypeList[iMexico]      = []
        RebelTypeList[iMinoa]       = []
        RebelTypeList[iMongol]      = [iChina,iRussia,iPersia,iKorea,iBuryat,iArabia,iMaghreb]
        RebelTypeList[iMutapa]      = []
        RebelTypeList[iNativeAmerica]   = [iAmerica,iVoestaneoo,iCanada,iAnishnaabek,iDinnehih,iSioux,iIroquois,iNimiipu]
        RebelTypeList[iNetherlands] = [iGermany,iEngland,iAmerica,iDenmark,iSouthAfrica]
        RebelTypeList[iNewZealand]  = []
        RebelTypeList[iNigeria]     = []
        RebelTypeList[iNimiipu]     = []
        RebelTypeList[iNubian]       = []
        RebelTypeList[iOlmec]       = []
        RebelTypeList[iOttoman]     = [iPersia,iGreece,iArabia,iByzantium,iMaghreb]
        RebelTypeList[iOxus]        = []
        RebelTypeList[iPakistan]    = [iIndia,iPersia,iGreece,iArabs]
        RebelTypeList[iPersia]      = [iOttoman,iIndia,iMongol,iGreece,iSumeria,iBabylon,iIsrael,iPhoenicia,iMaghreb]
        RebelTypeList[iPhoenicia]   = []
        RebelTypeList[iPicts]       = []
        RebelTypeList[iPiliwni]     = []
        RebelTypeList[iPoland]      = [iGermany,iHolyRoman,iUkraine]
        RebelTypeList[iPolynesia]   = []
        RebelTypeList[iPortugal]    = [iSpain,iBrazil,iSouthAfrica,iJapan]
        RebelTypeList[iRomania]     = []
        RebelTypeList[iRome]        = [iGreece,iCarthage,iCelt,iEgypt,iByzantium,iEtruscan,iItaly,iByzantium,iGermany,iGoths,iFrance,iIsrael]
        RebelTypeList[iRussia]      = [iGermany,iMongol,iArmenia,iUkraine,iBuryat,iPoland,iKorea]
        RebelTypeList[iSami]        = []
        RebelTypeList[iScotland]    = []
        RebelTypeList[iScythia]     = []
        RebelTypeList[iSeleukia]      = []
        RebelTypeList[iSiam]        = []
        RebelTypeList[iSioux]       = []
        RebelTypeList[iSomalia]     = []
        RebelTypeList[iSouthAfrica] = []
        RebelTypeList[iSpain]       = [iPortugal,iArabia,iAztec,iInca,iMexico,iArgentina,iCuba,iChile,iOlmec,iToltec,iCarthage]
        RebelTypeList[iSumeria]     = [iBabylon,iOttoman,iGreece,iPersia,iHittites,iTroy,iMinoa,iMaghreb]
        RebelTypeList[iSweden]      = []
        RebelTypeList[iThailand]    = []
        RebelTypeList[iTibet]       = []
        RebelTypeList[iTillikum]    = []
        RebelTypeList[iTogo]        = []
        RebelTypeList[iToltec]      = []
        RebelTypeList[iTroy]        = []
        RebelTypeList[iTupi]        = []
        RebelTypeList[iUkraine]     = []
        RebelTypeList[iUpaajut]     = []
        RebelTypeList[iUyghur]      = []
        RebelTypeList[iVedic]       = []
        RebelTypeList[iVietnam]     = []
        RebelTypeList[iViking]      = [iCanada,iSweden,iFinland,iDenmark]
        RebelTypeList[iVoestaneoo]  = []
        RebelTypeList[iWales]       = []
        RebelTypeList[iWestIndies]  = []
        RebelTypeList[iYangshao]    = []
        RebelTypeList[iYanomami]    = []
        RebelTypeList[iYemen]       = []
        RebelTypeList[iZulu]        = [iMali,iArabia,iSouthAfrica,iMaasai]
        
        #print "Completed rebel type list"

    except:
        print "Error!  Rebel types not found, no short lists available"

Code:
# CvModName
#
# To register the name of this mod with the config parser

modName = 'CIV Gold'

:confused:
 
Part 2. (Character limit per post)

Code:
## Copyright (c) 2005-2006, Gillmer J. Derge.

## This file is part of Civilization IV Alerts mod.
##
## Civilization IV Alerts mod is free software; you can redistribute
## it and/or modify it under the terms of the GNU General Public
## License as published by the Free Software Foundation; either
## version 2 of the License, or (at your option) any later version.
##
## Civilization IV Alerts mod is distributed in the hope that it will
## be useful, but WITHOUT ANY WARRANTY; without even the implied
## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## See the GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Civilization IV Alerts mod; if not, write to the Free
## Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
## 02110-1301 USA
    
__version__ = "$Revision: 1.4 $"
# $Source: /usr/local/cvsroot/Civ4lerts/src/main/python/CvCustomEventManager.py,v $

import CvEventManager
import CvConfigParser
# --------- Revolution mod (1/2) -------------
import RevolutionInit
import Civ4lerts

class CvCustomEventManager(CvEventManager.CvEventManager, object):

    """Extends the standard event manager by adding support for multiple
    handlers for each event.
    
    Methods exist for both adding and removing event handlers.  A set method 
    also exists to override the default handlers.  Clients should not depend 
    on event handlers being called in a particular order.
    
    This approach works best with mods that have implemented the design
    pattern suggested on Apolyton by dsplaisted.
    
    http://apolyton.net/forums/showthread.php?threadid=142916
    
    The example given in the 8th post in the thread would be handled by adding
    the following lines to the CvCustomEventManager constructor.  The RealFort,
    TechConquest, and CulturalDecay classes can remain unmodified.
    
        self.addEventHandler("unitMove", rf.onUnitMove)
        self.addEventHandler("improvementBuilt", rf.onImprovementBuilt)
        self.addEventHandler("techAcquired", rf.onTechAcquired)
        self.addEventHandler("cityAcquired", tc.onCityAcquired)
        self.addEventHandler("EndGameTurn", cd.onEndGameTurn)
        
    Note that the naming conventions for the event type strings vary from event
    to event.  Some use initial capitalization, some do not; some eliminate the
    "on..." prefix used in the event handler function name, some do not.  Look
    at the unmodified CvEventManager.py source code to determine the correct
    name for a particular event.
    
    Take care with event handlers that also extend CvEventManager.  Since
    this event manager handles invocation of the base class handler function,
    additional handlers should not also call the base class function themselves.

    """

    def __init__(self, *args, **kwargs):
        super(CvCustomEventManager, self).__init__(*args, **kwargs)
        # map the initial EventHandlerMap values into the new data structure
        for eventType, eventHandler in self.EventHandlerMap.iteritems():
            self.setEventHandler(eventType, eventHandler)
        # --> INSERT EVENT HANDLER INITIALIZATION HERE <--

        # --------- Revolution mod (2/2) -------------
        revConfigFile = "Revolution.ini"
        RevolutionInit.RevolutionInit( self, revConfigFile )
        
        Civ4lerts.Civ4lerts( self )

    def addEventHandler(self, eventType, eventHandler):
        """Adds a handler for the given event type.
        
        A list of supported event types can be found in the initialization 
        of EventHandlerMap in the CvEventManager class.
        
        Throws LookupError if the eventType is not valid.

        """
        
        if eventType not in self.EventHandlerMap:
            raise LookupError(eventType)
        if( not eventHandler in self.EventHandlerMap[eventType] ) :
            self.EventHandlerMap[eventType].append(eventHandler)

    def removeEventHandler(self, eventType, eventHandler):
        """Removes a handler for the given event type.
        
        A list of supported event types can be found in the initialization 
        of EventHandlerMap in the CvEventManager class.  It is an error if 
        the given handler is not found in the list of installed handlers.
        
        Throws LookupError if the eventType is not valid.

        """
        if eventType not in self.EventHandlerMap:
            raise LookupError(eventType)
        self.EventHandlerMap[eventType].remove(eventHandler)
    
    def setEventHandler(self, eventType, eventHandler):
        """Removes all previously installed event handlers for the given 
        event type and installs a new handler.
        
        A list of supported event types can be found in the initialization 
        of EventHandlerMap in the CvEventManager class.  This method is 
        primarily useful for overriding, rather than extending, the default 
        event handler functionality.
        
        Throws LookupError if the eventType is not valid.

        """
        if eventType not in self.EventHandlerMap:
            raise LookupError(eventType)
        self.EventHandlerMap[eventType] = [eventHandler]
    
    def setPopupHandler(self, eventType, popupHandler):
        """Removes all previously installed popup handlers for the given 
        event type and installs a new handler.
        
        The eventType should be an integer.  It must be unique with respect
        to the integers assigned to built in events.  The popupHandler should
        be a list made up of (name, beginFunction, applyFunction).  The name
        is used in debugging output.  The begin and apply functions are invoked
        by beginEvent and applyEvent, respectively, to manage a popup dialog
        in response to the event.

        """
        self.Events[eventType] = popupHandler

    def handleEvent(self, argsList):
        """Handles events by calling all installed handlers."""
        self.origArgsList = argsList
        flagsIndex = len(argsList) - 6
        self.bDbg, self.bMultiPlayer, self.bAlt, self.bCtrl, self.bShift, self.bAllowCheats = argsList[flagsIndex:]
        eventType = argsList[0]
        return {
            "kbdEvent": self._handleConsumableEvent,
            "mouseEvent": self._handleConsumableEvent,
            "OnSave": self._handleOnSaveEvent,
            "OnLoad": self._handleOnLoadEvent
        }.get(eventType, self._handleDefaultEvent)(eventType, argsList[1:])

    def _handleDefaultEvent(self, eventType, argsList):
        if self.EventHandlerMap.has_key(eventType):
            for eventHandler in self.EventHandlerMap[eventType]:
                # the last 6 arguments are for internal use by handleEvent
                eventHandler(argsList[:len(argsList) - 6])

    def _handleConsumableEvent(self, eventType, argsList):
        """Handles events that can be consumed by the handlers, such as
        keyboard or mouse events.
        
        If a handler returns non-zero, processing is terminated, and no 
        subsequent handlers are invoked.

        """
        if self.EventHandlerMap.has_key(eventType):
            for eventHandler in self.EventHandlerMap[eventType]:
                # the last 6 arguments are for internal use by handleEvent
                result = eventHandler(argsList[:len(argsList) - 6])
                if (result > 0):
                    return result
        return 0

    # TODO: this probably needs to be more complex
    def _handleOnSaveEvent(self, eventType, argsList):
        """Handles OnSave events by concatenating the results obtained
        from each handler to form an overall consolidated save string.

        """
        result = ""
        if self.EventHandlerMap.has_key(eventType):
            for eventHandler in self.EventHandlerMap[eventType]:
                # the last 6 arguments are for internal use by handleEvent
                result = result + eventHandler(argsList[:len(argsList) - 6])
        return result

    # TODO: this probably needs to be more complex
    def _handleOnLoadEvent(self, eventType, argsList):
        """Handles OnLoad events."""
        return self._handleDefaultEvent(eventType, argsList)

fortunately, it still works, and civs function normally. Simply, the new ones don't arise as a result of revolution.
 
Circuit -

There appears to be an indentation error in the RebelTypes.py file you posted on the iAborigines line. Python is extremely picking about indentation and it is necessary to always use either spaces or tabs, not mix the two in one file ... set your editor to display what type whitespace is there (if you're just using notepad, I highly recommend notepad++).

Do you get a popup informing you that the Revolution mod is running with certain components enabled/disabled? If not, then you may be missing the file from Revolution\Assets\Python\EntryPoints which tells civ to load the CustomEventManager.

Do the Revolution keyboard shortcuts like Ctrl+Shift+W or Ctrl+Shift+X work?
 
Just a quick one to thank you for this sincerely great mod and to pose a very small question. Version 1.62 is a heap of fun on minor-civs pangaea and most excellent indeed. One day when the AI knows how to invade transcontinental other maps will be great too.

The question is just regarding the city interface (see attachment). The Revolution bar indicates a slight "greening" which I always thought meant "improving" but the text says orange worsening. It's probably just something wrong with my left handed brain again....

Cheers and thanks!
 
Circuit -

There appears to be an indentation error in the RebelTypes.py file you posted on the iAborigines line. Python is extremely picking about indentation and it is necessary to always use either spaces or tabs, not mix the two in one file ... set your editor to display what type whitespace is there (if you're just using notepad, I highly recommend notepad++).

Do you get a popup informing you that the Revolution mod is running with certain components enabled/disabled? If not, then you may be missing the file from Revolution\Assets\Python\EntryPoints which tells civ to load the CustomEventManager.

Do the Revolution keyboard shortcuts like Ctrl+Shift+W or Ctrl+Shift+X work?

I don't know why but that indentation is not in my file. Don't ask how that sneaked into the post.:dunno:

I didn't know that the shortcuts even existed. The Popup does appear as normal. All the components do indeed work: just the new civs don't arise as a result of revolution. However, that file is modified from what it was before. It previously only listed the new civs in the area prior to the [iHomeland] = [iRebel1,iRebel2, iBlaBlaBla] section. I don't know whether that would make a difference or not, being listed in first part but not second, but might as well find out.
 
Got some new meesages:
Traceback (most recent call last):

File "CvEventInterface", line 25, in onEvent

File "CvCustomEventManager", line 182, in handleEvent

File "CvCustomEventManager", line 193, in _handleDefaultEvent

File "StartAsMinors", line 158, in onTechAcquired

AttributeError: 'NoneType' object has no attribute 'setNewNameByCivics'
ERR: Python function onEvent failed, module CvEventInterface
Traceback (most recent call last):

File "CvEventInterface", line 25, in onEvent

File "CvCustomEventManager", line 182, in handleEvent

File "CvCustomEventManager", line 193, in _handleDefaultEvent

File "BarbarianCiv", line 172, in onEndPlayerTurn

File "BarbarianCiv", line 1017, in checkMinorCivs

File "BarbarianCiv", line 1170, in settleMinorCiv

AttributeError: 'NoneType' object has no attribute 'setNewNameByCivics'
ERR: Python function onEvent failed, module CvEventInterface
 
Okay, the hot keys work. It also appears that the new civs are popping up as rebels. But I don't know that for sure; I went into worldbuilder and just got a glimpse of the other continent (no rebellions on mine).
 
Just a quick one to thank you for this sincerely great mod and to pose a very small question. Version 1.62 is a heap of fun on minor-civs pangaea and most excellent indeed. One day when the AI knows how to invade transcontinental other maps will be great too.

The question is just regarding the city interface (see attachment). The Revolution bar indicates a slight "greening" which I always thought meant "improving" but the text says orange worsening. It's probably just something wrong with my left handed brain again....

Cheers and thanks!

That's my bad ... the text uses the new trend method while the bar uses just the instantaneous value of the local rev index. The trend works like this:

"average" rev index = (1/3)*new rev index + (2/3)*last "average"

and improving/worsening compares against this exponentially decaying average. It's a better measure that what's currently used for the bar graphic, I'll be sure to update that.

Got some new meesages:

Argh ... yeah, I added code so that StartAsMinors and BarbCiv would be able to force changes in the name of the civ at certain times. Works well if DynamicCivNames is running ... I'll fix these two things and post a new version soon, you can simply comment out those lines in your version for now if you like.
 
When a country assimilates, gives up its independence, could you make it so the game distinguishes between civilizations being destroyed, and civilizations assimilating? In my game Russia gave up its independence and joined the English/German Alliance, but the news thing said it was destroyed. It wasn't, that message would be a lot more accurate if it read "Russia has been assimilated."
 
Argh ... yeah, I added code so that StartAsMinors and BarbCiv would be able to force changes in the name of the civ at certain times. Works well if DynamicCivNames is running ... I'll fix these two things and post a new version soon, you can simply comment out those lines in your version for now if you like.
When will the new version be released?
 
More an annoyance than a bug:

If you allow the AI to take over instead of revolting, the espionage sliders are assigned to various values up to 99. It is extremely annoying to have to click "-" 99 times to get the espionage slider to zero for a particular player. At the end of the AI round, could they perhaps all be divided by 10 or something so 99 becomes 10, 71 becomes 7 and it makes resetting the values much easier?
 
When will the new version be released?
This evening or tomorrow ... depends what I else I package in.

...with better bts AI 0.31 please :) (0.3 with a bomber fix ;))
A new BBAI will be out soon also to address the bomber issue, I'll include that as well.

When a country assimilates, gives up its independence, could you make it so the game distinguishes between civilizations being destroyed, and civilizations assimilating? In my game Russia gave up its independence and joined the English/German Alliance, but the news thing said it was destroyed. It wasn't, that message would be a lot more accurate if it read "Russia has been assimilated."
You should get a message saying they "decided to give it their independence" before the destroyed message ... I'll see what I can do to silence the destroyed message in these circumstances.

More an annoyance than a bug:

If you allow the AI to take over instead of revolting, the espionage sliders are assigned to various values up to 99. It is extremely annoying to have to click "-" 99 times to get the espionage slider to zero for a particular player. At the end of the AI round, could they perhaps all be divided by 10 or something so 99 becomes 10, 71 becomes 7 and it makes resetting the values much easier?

Yeah, I meant to do that before ... should be quick and easy to add to the next version.
 
Top Bottom