Hi there,
I read in one of the threads here a while ago that you can change missionary success rates by amending cvUnit.cpp and changing iSpread to 100.
However, I#vev done that and more and I still fail regularly at spreading a religion in my own cities.
My modified script:
Please help?
I read in one of the threads here a while ago that you can change missionary success rates by amending cvUnit.cpp and changing iSpread to 100.
However, I#vev done that and more and I still fail regularly at spreading a religion in my own cities.
My modified script:
Code:
bool CvUnit::spread(ReligionTypes eReligion)
{
CvCity* pCity;
CvWString szBuffer;
int iSpreadProb;
if (!canSpread(plot(), eReligion))
{
return false;
}
pCity = plot()->getPlotCity();
if (pCity != NULL)
{
iSpreadProb = m_pUnitInfo->getReligionSpreads(eReligion);
if (pCity->getTeam() != getTeam())
{
iSpreadProb /= 2;
}
bool bSuccess;
iSpreadProb = 101;
if (GC.getGameINLINE().getSorenRandNum(100, "Unit Spread Religion") < iSpreadProb)
{
pCity->setHasReligion(eReligion, true, true, false);
bSuccess = true;
}
else
{
szBuffer = gDLL->getText("TXT_KEY_MISC_RELIGION_FAILED_TO_SPREAD", getNameKey(), GC.getReligionInfo(eReligion).getChar(), pCity->getNameKey());
gDLL->getInterfaceIFace()->addMessage(getOwnerINLINE(), true, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_NOSPREAD", MESSAGE_TYPE_INFO, getButton(), (ColorTypes)GC.getInfoTypeForString("COLOR_RED"), pCity->getX_INLINE(), pCity->getY_INLINE());
bSuccess = false;
}
// Python Event
CvEventReporter::getInstance().unitSpreadReligionAttempt(this, eReligion, bSuccess);
}
if (plot()->isActiveVisible(false))
{
NotifyEntity(MISSION_SPREAD);
}
kill(true);
return true;
}
Please help?