OrionVeteran
Deity
I was looking at the religeous victory in BMarnz' Inquisition Mod and decided I want to add one more requirement to the existing religious influence setting found in the CIV4VictoryInfo.xml file.
The new requirement is Religeous Unity, which requires the following:
1. All of a player's cities must have the official state religion established.
2. All of a player's cities must not have any non-state religions established.
I wrote the following untested code to determine if a player has achieved Religious Unity:
My question is: How can I add this Religious unity requirement to override the existing religious influence setting found in the CIV4VictoryInfo.xml file with this code?
Also, feel free to make any comments about my proposed religious unity code.
Sincerely,
Orion Veteran
The new requirement is Religeous Unity, which requires the following:
1. All of a player's cities must have the official state religion established.
2. All of a player's cities must not have any non-state religions established.
I wrote the following untested code to determine if a player has achieved Religious Unity:
Code:
Def isReligiousUnity(Self):
# Code to determine if all cities have religious unity
RUnity = True
Player = gc.getActivePlayer()
If pPlayer.getNumCities()>0:
For iReligionLoop in range(gc.getNumReligionInfos()):
# Does the city have a religion?
If pCity.isHasReligion(iReligionLoop):
# Does the religion match the players state religion?
If pPlayer.getStateReligion() != iReligionLoop:
RUnity = False
Else:
# No religion was found in city
RUnity = False
If RUnity = False
# The player has not achieved religious unity
Return False
Else:
# The player has achieved religious unity
If getReligionInfluence(pPlayer.getStateReligion()) = 85
# The religious influence for the players state religion is 85%
Return True
My question is: How can I add this Religious unity requirement to override the existing religious influence setting found in the CIV4VictoryInfo.xml file with this code?
Also, feel free to make any comments about my proposed religious unity code.
Sincerely,
Orion Veteran