Aussie_Lurker
Deity
Hi guys,
Well I am continuing to struggle on with my changes to the CvInfos.xml file, but have run into a major problem. The thing is that I want a tag which will modify the yields and commerces in State Religion cities. I have successfully done this in CvInfos and CvPlayer, but CvCity is proving to be a massive headache
.
What I thought I would try was a modification of the existing StateReligionHappiness portion of the file (seemed to make sense, as they work along similar lines.) This is what I have done:
Now this isn't causing massive errors, but it IS telling me that
is an undeclared identifier, and that the identifier is not found, even with argument-dependant loop.
Now I can't see how this can be the case, as I refer to it several time prior to this section of code. Can anyone tell me where I am going wrong? Do I have to go back and change something in CvPlayer or CvInfos? I hate constantly asking for help, but I have been working on this all day, without making any progress! Thankyou in advance
.
Aussie_Lurker.
Well I am continuing to struggle on with my changes to the CvInfos.xml file, but have run into a major problem. The thing is that I want a tag which will modify the yields and commerces in State Religion cities. I have successfully done this in CvInfos and CvPlayer, but CvCity is proving to be a massive headache

What I thought I would try was a modification of the existing StateReligionHappiness portion of the file (seemed to make sense, as they work along similar lines.) This is what I have done:
Code:
int CvCity::getStateReligionCommerceRateModifier(CommerceTypes eIndex1, ReligionTypes eIndex2)
{
FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
FAssertMsg(eIndex1 < NUM_COMMERCE_TYPES, "eIndex expected to be < NUM_COMMERCE_TYPES");
FAssertMsg(eIndex2 < GC.getNumReligionInfos(), "eIndex expected to be < GC.getNumReligionInfos()");
return m_aiStateReligionCommerceRateModifier[eIndex];
}
void CvCity::changeStateReligionCommerceRateModifier(CommerceTypes eIndex1, ReligionTypes eIndex2, int iChange)
{
FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
FAssertMsg(eIndex1 < NUM_COMMERCE_TYPES, "eIndex expected to be < NUM_COMMERCE_TYPES");
FAssertMsg(eIndex2 < GC.getNumReligionInfos(), "eIndex expected to be < GC.getNumReligionInfos()");
if (iChange != 0)
{
m_aiStateReligionCommerceRateModifier[eIndex] = (m_aiStateReligionCommerceRateModifier[eIndex] + iChange);
AI_setAssignWorkDirty(true);
}
}
Now this isn't causing massive errors, but it IS telling me that
Code:
m_aiStateReligionCommerceRateModifier[eIndex]
Now I can't see how this can be the case, as I refer to it several time prior to this section of code. Can anyone tell me where I am going wrong? Do I have to go back and change something in CvPlayer or CvInfos? I hate constantly asking for help, but I have been working on this all day, without making any progress! Thankyou in advance

Aussie_Lurker.