The Great Apple
Big Cheese
If anybody wants to help test, then check out the first post in this thread about joining the group.
The Great Apple said:If anybody wants to help test, then check out the first post in this thread about joining the group.
<ReligionInfo>
<Type>RELIGION_X</Type>
...
<GlobalReligionCommerces>
<iGlobalReligionCommerce>[B]-1[/B]</iGlobalReligionCommerce>
<iGlobalReligionCommerce>0</iGlobalReligionCommerce>
<iGlobalReligionCommerce>0</iGlobalReligionCommerce>
</GlobalReligionCommerces>
...
<StateReligionCommerces>
<iStateReligionCommerce>0</iStateReligionCommerce>
<iStateReligionCommerce>0</iStateReligionCommerce>
<iStateReligionCommerce>1</iStateReligionCommerce>
</StateReligionCommerces>
...
</ReligionInfo>
Kael said:Code:int CvCity::getReligionCommerceByReligion(CommerceTypes eIndex, ReligionTypes eReligion) { int iCommerce; FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0"); FAssertMsg(eIndex < NUM_COMMERCE_TYPES, "eIndex expected to be < NUM_COMMERCE_TYPES"); FAssertMsg(eReligion >= 0, "eReligion expected to be >= 0"); FAssertMsg(eReligion < GC.getNumReligionInfos(), "GC.getNumReligionInfos expected to be >= 0"); iCommerce = 0; 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); } } } return iCommerce; }
If I am reading this right it looks like the commerce result is only applied if the player has no state religion (then whatever commerce if given by the religions in the city are applied) or if the religion is the state religion.
I also see a lot of the following in the SDK:
Code:if (getReligionCommerce(eIndex) != iNewReligionCommerce) { m_aiReligionCommerce[eIndex] = iNewReligionCommerce; FAssert(getReligionCommerce(eIndex) >= 0); updateCommerce(eIndex); }
Which makes me think that the only values it may accept are 0 or higher (I had the same problems with buildings in FfH that weren't giving negative iCommerce values but I reported it to Firaxis with a code fix and they were good enough to check it into 1.61).IMO, two way are possible :
modifying so that negative number are accepted in <iGlobalReligionCommerce>
AND allowing <iGlobalReligionCommerce> to be used for any non-state religion X (if <iGlobalReligionCommerce> is used somewhere else I hadn't found, it might not be a good idea)
or creating a <iCityReligionCommerce> ?? function allowing the same trick
as vanilla civ has no <iCityReligionCommerce> values, it shall not change the vanilla civ game, but may improve modability
As I do not know how to modify SDK, I leave you with the idea, and if you find smarter ways, it will even be better
---
so the real question is : "could you allow negative iCommerce values for religions?"
if (GC.getBuildingInfo(eBuilding).getGlobalReligionCommerce() != NO_RELIGION)
{
iCommerce += (GC.getReligionInfo((ReligionTypes)(GC.getBuildingInfo(eBuilding).getGlobalReligionCommerce())).getGlobalReligionCommerce(eIndex) * GC.getGameINLINE().countReligionLevels((ReligionTypes)(GC.getBuildingInfo(eBuilding).getGlobalReligionCommerce())));
}
void CvCity::updateReligionCommerce(CommerceTypes eIndex)
{
int iNewReligionCommerce;
int iI;
iNewReligionCommerce = 0;
for (iI = 0; iI < GC.getNumReligionInfos(); iI++)
{
iNewReligionCommerce += getReligionCommerceByReligion(eIndex, ((ReligionTypes)iI));
}
if (getReligionCommerce(eIndex) != iNewReligionCommerce)
{
m_aiReligionCommerce[eIndex] = iNewReligionCommerce;
FAssert(getReligionCommerce(eIndex) >= 0);
updateCommerce(eIndex);
}
}
Calavente said:I have some ideas I wanted to use on a mod (maybe) and I wanted to know if you already had any thought about it :
allow bollean tags for requirement; especially the AND /OR/NOT :
those applyable to
ex :
this - civics / technology / buildings / units- A
needs this - civics / technology / building / ressource /religion in city / state religion- X
AND this - civics / technology / building / ressource /religion in city / state religion- Y
OR this - civics / technology / building / ressource /religion in city / state religion- Z
but CANNOT be made if you already have this - civics / technology / building / ressource /religion in city / state religion-
it would be interesting to make a technology available to resaerch only if you have a given ressource (why researche horseback riding when you don't have any horses available, you won't even think about using it..) or make that an unit can be build if you have this techno or that building that come earlier/in another tech path.
other exemples
if you have elephant training groung you cannot have horses training grounds..
to have this oecumenic building you need this religion X and that religion Y
...Etc
some of those boolean already exists for some cases : units needing multiple OR ressources, tech needing multiple AND and OR techs..
but most of those tags do not exist I think..
If you already have them or if you can devellop them, I think it would be interesting for modding, especially for modding exclusive tech paths or speciallising cities.
thanks a lot