phungus420
Deity
- Joined
- Mar 1, 2003
- Messages
- 6,296
So I'm trying to add an ability to receive culture from non state religions as an effect of a trait. I have working code (supplied by Tsentom1 ) that does this, however it is flawed: It doesn't display the information in the city screen. While I'm glad to have the effect functioning, I need it to display properly.
I'm kind of wondering where I should start here. But here is something that looks promising to me:
From CvCity.cpp
Am I correct in assuming this is where the code is screening out Non State religion "commerce"? Further down it looks like this is then converted to culture, I think this is the right spot.
Any ideas on how to add in an: if getPlayer - gettagIwillcreateinTraitinfos ; Don't screen out non state
function?
I'm going to reread Xieno's tutorial on adding a boolean tag, but I'm pretty sure I understand that, I'm interested in once I get a tag in there, how to get it to function.
I'm kind of wondering where I should start here. But here is something that looks promising to me:
From CvCity.cpp
Code:
if ((GET_PLAYER(getOwnerINLINE()).getStateReligion() == eReligion) || (GET_PLAYER(getOwnerINLINE()).getStateReligion() == NO_RELIGION))
{
if (isHasReligion(eReligion))
{
iCommerce += GC.getReligionInfo(eReligion).getStateReligionCommerce(eIndex);
if (isHolyCity(eReligion))
{
iCommerce += GC.getReligionInfo(eReligion).getHolyCityCommerce(eIndex);
}
}
}
Am I correct in assuming this is where the code is screening out Non State religion "commerce"? Further down it looks like this is then converted to culture, I think this is the right spot.
Any ideas on how to add in an: if getPlayer - gettagIwillcreateinTraitinfos ; Don't screen out non state
function?
I'm going to reread Xieno's tutorial on adding a boolean tag, but I'm pretty sure I understand that, I'm interested in once I get a tag in there, how to get it to function.