Eusebius
Warlord
doronron said:Hello,
I'd like to extract the diseases you've incorporated into your Real World Religions modpack. My understanding is that they're python code -- is there a comment tag I should be looking for?
Thanks.
Hello,
Actually you need some XML from the religions file and the buildings file. There are some fake buildings that represent the presence of AIDS and Smallpox in a city.
The python should all be in the EWR directory, mostly in ewr.py. It is kind of a package. For example, you need my version of 'doReligion' because CIV4 will not spread a religion to a city that already has one unless you use a missionary. Since the diseases are implemented as religions, they wouldn't spread either.
There are also two relevant SDK changes. The first avoids giving a happiness bonus for having a disease/religion in a city (if you have Free Religion). The second one prohibits civs from converting to the disease as their state religion.
In both cases, I hard-coded the idea that 'RELIGION_SECULARISM' was the last real religion in my CIV4ReligionInfo.xml file and that all the ones that came after it were diseases. You would have to put your diseases last and change to your last religion for this scheme to work.
You will also have to change the GameFonts files if you want the disease icon to show up (with the religion ones) under each city name.
Cheers,
Eusebius
Spoiler :
int CvCity::getReligionHappiness(ReligionTypes eReligion) const
{
int iHappiness;
#ifdef EUB_EWRMOD
/* EWRMOD - don't give happiness for diseases */
if (eReligion > (ReligionTypes)GC.getInfoTypeForString("RELIGION_SECULARISM"))
return 0;
#endif
iHappiness = 0;
if (isHasReligion(eReligion))
{
if (eReligion == GET_PLAYER(getOwnerINLINE()).getStateReligion())
{
iHappiness += GET_PLAYER(getOwnerINLINE()).getStateReligionHappiness();
}
else
{
iHappiness += GET_PLAYER(getOwnerINLINE()).getNonStateReligionHappiness();
}
}
return iHappiness;
}
Spoiler :
bool CvPlayer::canDoReligion(ReligionTypes eReligion)
{
#ifdef EUB_EWRMOD
/* EWRMOD - don't give happiness for diseases */
if (eReligion > (ReligionTypes)GC.getInfoTypeForString("RELIGION_SECULARISM"))
return false;
#endif
if (GET_TEAM(getTeam()).getHasReligionCount(eReligion) == 0)
{
return false;
}
return true;
}