Okay everyone, I have both versions of the Inquisition mod on my computer. I have attached both below in lieu of Bmanz' absence. I also have posted a comment in the download database directing people to this post.
Excellent, Orion Veteran, thanks for keeping this mod alive!
# City loses population, people get angry
pCity.changePopulation(-1)
pCity.changeHurryAngerTimer(10)
I also really think that there should be some consequence to Inquisitor persecution other than ticking off other civs, like causing temporary unhappiness in the city the way conscription or hurrying production by sacrificing population does, or even making a persecution effort cost population too (after all, "forced conversion" usually also involves weeding out the "stubborn")!
Unfortunately, I'm python-impaired ... could anyone tell me how to do this? Reworking the code the game already uses for hurrying production seems like it C O U L D be easy, say: lose one population, causes 3 unhappiness for 10 turns?
I added this:
Code:# City loses population, people get angry pCity.changePopulation(-1) pCity.changeHurryAngerTimer(10)
It works -- city loses one population and gets one angry person hollering, "We cannot forget your cruel oppression!" I like that much, but I don't know how to increase the amount of anger or make an anger timer independent of the "hurry" function. Increasing amount of population killed has no effect on the amount of anger generated either.
Any thoughts?
... in my mod, non-state religions cause unhappiness as the norm, so removing them is desirable for the player in order to rid himself of this unhappiness. What I want to do, however, is make the player have to choose his time properly -- do I take short term unhappiness now (and the population loss) for long term happiness (and possible Religious victory, if I implement this)?
Anyway, in the end I just want to know how to program the code! Different mods for different folks, I always say.
Respectfully,
Heph
A few thoughts:
2. Assuming you code the game to create unrest when you have a competing religion or religions in a city, then the timing for the unrest must be put off until you have researched Theology. That is when the Inquisitor becomes available to combat heresy and the city population size must be greater than the number of unhappy faces you create for the unrest. For example: One unhappy face for every 4 in population. That is a lot of unrest, which can really stymie city production, not to mention what it would do during war.
4. Next, you would want to impose this unrest penalty only on Organized Religion and Theocracy civics.
5. For every penalty imposed, there should be a corrosponding benefit, as an offset. A good example is the shrine benefit should increase for CIVs that have purged all non-state religions, but their religious influence has not yet achieved 80 percent for a religious victory. Perhaps an additional 25 gold per turn.
6. The hardest part is figuring out the python code to do all these additional things. If you don't mind me asking, where did you place the unrest code, what PY file and which function? As it stands now, the Inquisition Mod seems to be balanced and plays very well. I would love to see Firaxis include this Mod in their official version.
# Add player's state religion
if ( gc.getPlayer( pUnit.getOwner( ) ).getStateReligion( ) != -1 ):
iStateReligion = gc.getPlayer( pUnit.getOwner( ) ).getStateReligion( )
pCity.setHasReligion( iStateReligion, 1, 0, 0 )
# City loses population, people get angry
pCity.changePopulation(-1)
pCity.changeHurryAngerTimer(10)
# Persecution succeeds
CyInterface().addMessage(iPlayer,False,25,CyTranslator().getText("TXT_KEY_MESSAGE_INQUISITION",(pCity.getName(),)),"AS2D_PLAGUE",InterfaceMessageTypes.MESSAGE_TYPE_INFO,pUnit.getButton(),ColorTypes(8),pCity.getX(),pCity.getY(),True,True)
...Both Inquision mod compositions are vastly improved by the update code and are included in one download that contains 2 zip files, one with limited religions, the other without. ...
Enjoy,
Orion Veteran
Hi Orion,
Glad to see that someone is still improving this mod. How exactly is this new code vastly improved? I mean, does the Inquisitor work differently now, are there different requirements or what?
Indeed! Here's the code as it stands in CvEventManager:
Code:# Add player's state religion if ( gc.getPlayer( pUnit.getOwner( ) ).getStateReligion( ) != -1 ): iStateReligion = gc.getPlayer( pUnit.getOwner( ) ).getStateReligion( ) pCity.setHasReligion( iStateReligion, 1, 0, 0 ) # City loses population, people get angry pCity.changePopulation(-1) pCity.changeHurryAngerTimer(10) # Persecution succeeds CyInterface().addMessage(iPlayer,False,25,CyTranslator().getText("TXT_KEY_MESSAGE_INQUISITION",(pCity.getName(),)),"AS2D_PLAGUE",InterfaceMessageTypes.MESSAGE_TYPE_INFO,pUnit.getButton(),ColorTypes(8),pCity.getX(),pCity.getY(),True,True)
def FunctionName(self, argsList):
iPlayer = argsList
pPlayer = gc.getPlayer(iPlayer)
iStateReligion = pPlayer.getStateReligion()
if iStateReligion != -1 :
for pyCity in PyHelpers.PyPlayer(iPlayer).getCityList() :
bCompetingReligion = False
bStateReligion = False
for iReligionLoop in range(gc.getNumReligionInfos()):
if iReligionLoop == iStateReligion :
if pyCity.hasReligion(iReligionLoop) :
# City has the official state religion
bStateReligion = True
elif pyCity.hasReligion(iReligionLoop) :
# City has a non-state religion
bCompetingReligion = True
if bCompetingReligion == 1 and bStateReligion == 1 :
# City loses population, people get angry
pCity.changePopulation(-1)
pCity.changeHurryAngerTimer(10)
# Persecution succeeds
CyInterface().addMessage(iPlayer,False,25,CyTranslator().getText("TXT_KEY_MESSAGE_INQUISITION",(pCity.getName(),)),"AS2D_PLAGUE",InterfaceMessageTypes.MESSAGE_TYPE_INFO,pUnit.getButton(),ColorTypes(8),pCity.getX(),pCity.getY(),True,True)
#Checks religion percents
lReligions = [ ]
bestReligionPercent = 0
iBestReligion = -1
for iReligionLoop in range(gc.getNumReligionInfos( )):
iReligionLevel = gc.getGame().calculateReligionPercent(iReligionLoop)
if iReligionLevel > gc.getGame().calculateReligionPercent(iStateReligion):
lReligions.append( iReligionLoop )
if (iReligionLoop != iStateReligion):
[COLOR="Red"]religionPercent = gc.getGame().calculateReligionPercent(iReligionLoop)[/COLOR]
if (religionPercent > bestReligionPercent):
bestReligionPercent = religionPercent
iBestReligion = iReligionLoop
Are there any restrictions as to when an Inquisitor can be used?
I think Inquisitors should only be buildable (and perform the Inquisition) under Theocracy and Organized Religion. I'm not sure if this is the case under the 'old' Inquisition mod...
Are there any restrictions as to when an Inquisitor can be used? I think Inquisitors should only be buildable (and perform the Inquisition) under Theocracy and Organized Religion. I'm not sure if this is the case under the 'old' Inquisition mod...
I agree. Yet there is no XML tag to make a unit dependent upon a Civic. It would not make much sense for Civs with Pacificism or Free Religion to build an Inquisitor. Like any other unit or building, you have a choice to build it or not based upon your strategy and need. If you don't need it, don't build it.
def cannotTrain(self,argsList):
pCity = argsList[0]
eUnit = argsList[1]
bContinue = argsList[2]
bTestVisible = argsList[3]
bIgnoreCost = argsList[4]
bIgnoreUpgrades = argsList[5]
ePlayer = pCity.getOwner()
pPlayer = gc.getPlayer(ePlayer)
if pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_RELIGION')) == gc.getInfoTypeForString('CIVIC_PACIFISM'):
if eUnit == gc.getInfoTypeForString('UNIT_INQUISITOR'):
return True
if pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_RELIGION')) == gc.getInfoTypeForString('CIVIC_FREE_RELIGION'):
if eUnit == gc.getInfoTypeForString('UNIT_INQUISITOR'):
return True
return False
Hephaistion,
Sounds like a problem with the call to the DLL file. Try downloading Orion's Challenge Mod and see if you get the same error. I'm using a DLL file from Dale's Combat Mod. If you no longer get the error, then the DLL file from your other mod is the problem.