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.
) 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
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.
,
,
, and
are the four CommerceTypes, so having it call it iCommerce is not unusual given that the function is calculating the value of the eIndex'th type of commerce earned by the religion.


Nice Emperor Fool, and thanks Snarko. It works, still one minor problem though, while it displays in the culture bar, it's not picking up in the religion icons at the top of the city screen. Any chance this is related to BUG, and does anyone know where the Culture/happiness display for religions in the top part of the city screen is handled?

