Orion's Inquisition Mod

Release of Version 2.00C

More python propblems came up after fixing line 976 on the onTechAcquired function in the CvEventManager.py file. :mad:

I could not in good conscience just leave the 2.00B version out there the way it was. All of the python problems were resolved and tested successfully. This crucial code now works properly in version 2.00C. I'm sorry I had to turn out a new version so quickly, but it had to be done.

Sincerely,

Orion Veteran :cool:
 
A friend of mine has a proposal he wants in limited religions. He suggests that each of the religious techs should provide some kind of benefit upon discovery, if a religion is not founded. The effect is you either get to found a Holy City religion or you receive a benefit if you already have a Holy City. Ideas for a benefit range from getting free money to getting a free tech. I'm on the fence for this idea and wanted to run it by all of you before making a decision. :undecide:

Should there be a benefit if you don't receive a religion on a religious tech? If so, what kind of benefit or range of benefits would make the most sense? Would a game option for this idea be good? Please share your thoughts and ideas.

Sincerely,

Orion Veteran :cool:
 
I'm still slowly working on Revolutions Inquistions. There is a behaviour in the doInquisitorPersecution() code that you might be interested in changing. If holy city respawning is turned on, and there is a city with multiple holy cities, only one holy city is respawned and the other's die. I have had to fix it for Revolution Inquisitions so that all holy cities in the city get a chance to relocate. The fix turns out to be simple if you want me to send it to you.

Thanks again.
Cheers.
 
I'm still slowly working on Revolutions Inquistions. There is a behaviour in the doInquisitorPersecution() code that you might be interested in changing. If holy city respawning is turned on, and there is a city with multiple holy cities, only one holy city is respawned and the other's die. I have had to fix it for Revolution Inquisitions so that all holy cities in the city get a chance to relocate. The fix turns out to be simple if you want me to send it to you.

Thanks again.
Cheers.

Ah. Another rare situation. Sure please send it to me in a PM or post the fix and I will add it to the next release. With each tweak the mod just gets better and better.

:thanx:

Orion Veteran :cool:
 
With each tweak the mod just gets better and better

Very true. This can be said more generally for the entire game as well. The thing is, civ is worth continually improving because it is one of the greatest games ever conceived.

In doInquisitorPersecution(), delete this slab (because it needs to be updated for each holy city in the loop further down):
Spoiler :

Code:
		if CvUtil.isOC_INQISITOR_CAN_REMOVE_HOLY_CITY():
			if CvUtil.isOC_RESPAWN_HOLY_CITIES():
				# Get Relocation Data to Respawn the Holy City
				if CvUtil.isHoly(pCity):
					# Get Holy City Religion 
					MyHCReligion = CvUtil.getHolyCityReligion(pCity)
					# Is there at least 1 non Holy City remaining with MyHCReligion?  
					if CvUtil.findCityWithXReligion(MyHCReligion):
						OnlyHCWithMyHCReligion = False
						# Find player with the greatest Religious Influence for Religion
						eBestPlayer = CvUtil.getPlayerWithMaxInfluenceForReligion(MyHCReligion)
						XpPlayer = gc.getPlayer(eBestPlayer)
And then utilise this simplified algorithm in the section of code beginning with "#remove religions", making small adjustments you need for refering to the mod variables etc.
Spoiler :
Code:
			# remove religions
			iStateReligion = gc.getPlayer( pUnit.getOwner( ) ).getStateReligion( )
			for iReligionLoop in range(gc.getNumReligionInfos()):
				if iReligionLoop != iStateReligion:
					if RevDCMOpt.isOC_RESPAWN_HOLY_CITIES():
						if pCity.isHolyCityByType(iReligionLoop):
							gc.getGame().clearHolyCity(iReligionLoop)
							pCity.setHasReligion(iReligionLoop, 0, 0, 0)
							minCitiesForInfluence = 2
							eBestPlayer = CvUtil.getPlayerWithMaxInfluenceForReligion(iReligionLoop, minCitiesForInfluence)
							if eBestPlayer >= 0:
								XpPlayer = gc.getPlayer(eBestPlayer)
								CvUtil.ReSpawnHolyCity(XpPlayer, iReligionLoop)
					if not pCity.isHolyCityByType(iReligionLoop):
						pCity.setHasReligion(iReligionLoop, 0, 0, 0)
Note that this algorithm does not accomodate the holy city elimination option, just respawning.

On another topic OrionVeteran, what's your thoughts about how "shrines" are not removed when an inquisitor conducts a successful inquisition? As it is now, all other religious buildings get wiped but not the holy shrine. I think it is good to keep the holy shrine because otherwise there is too much penalty for conducting an inquisition. The idea in terms of "reality guessing" would be that an inquistion burns down all the infrastructure of the religion and kills all it's followers, but the biggest symbol is kept so that in the future, the empire can use it as a tourist attraction to make money out of :rolleyes:

The code needed to delete shrines as well would be:
Code:
					#iRequiredReligion = pBuilding.getReligionType( )
instead of:
Code:
					iRequiredReligion = pBuilding.getPrereqReligion( )

Cheers.
 
Note that this algorithm does not accomodate the holy city elimination option, just respawning.

Of course my version will retain the Holy City elimination as an option.

On another topic OrionVeteran, what's your thoughts about how "shrines" are not removed when an inquisitor conducts a successful inquisition? As it is now, all other religious buildings get wiped but not the holy shrine. I think it is good to keep the holy shrine because otherwise there is too much penalty for conducting an inquisition. The idea in terms of "reality guessing" would be that an inquistion burns down all the infrastructure of the religion and kills all it's followers, but the biggest symbol is kept so that in the future, the empire can use it as a tourist attraction to make money out of :rolleyes:

My idea for non-state shrines is perhaps a bit more greedy. :D Perhaps we should wipe out the non-state shrine along with all the other religious buildings. When you wipe out a non-state shrine, then the income for your state shrine should increase by +1 gold per city. So if you were getting +1 gold, now you get + 2 gold for each city that has your state religion. This conversion could be considered another form of confiscation to the state. :drool:

Unfortunately, my idea is not practical. In reality, if you take out a religious shrine, then you would anger all civs that share that religion.


How did you change the getPlayerWithMaxInfluenceForReligion function?

Orion Veteran :cool:
 
I kinda like your idea about adding income to your state holy shrine, if the non-state holy shrine is eliminated. It's an idea at least.

Code:
def getPlayerWithMaxInfluenceForReligion(MyHCReligion, minCitiesRequired):
	eBestPlayer = -1
	iBestCount = 0
		
	for ePlayer in range(gc.getMAX_PLAYERS()):
		pPlayer = gc.getPlayer(ePlayer)
		# skip invalid or dead players
		if not pPlayer.isNone():
			if pPlayer.isAlive():
				iCount = pPlayer.getHasReligionCount(MyHCReligion)			
				if iCount > iBestCount:
					iBestCount = iCount
					eBestPlayer = ePlayer

	if iBestCount >= minCitiesRequired:
		return eBestPlayer
	else:
		return -1
Cheers.
 
In my next release of Orion's Inquisition Mod (ver 2.00D), I will have a function that will increase AI anger under these conditions:

If a successful inquisition takes out a non-state religion: -1
If a successful inquisition takes out a non-state Holy City: -3
If a successful inquisition takes out a non-state Holy Shrine: -3
If a successful inquisition takes out other non-state religious buildings -1

If a non-state religion is razed: -1
If a non-state Holy City is razed: -3
If a non-state Holy Shrine is razed: -3
If a non-state religious buildings are razed -1
(values subject to change).

To balance this out, I need a function that will either increase shrine income or provide a one lump sum of gold to the player's treasury for each building destroyed. Does anyone know of a python command line for adding money to a player's treasury?

Orion Veteran :cool:
 
Release of Version 2.00D

Lots of python code changes. A new function has been added to anger Civs who share the non-state religion your inquisitor removes or your army razed. A player must now make a strategic decision whether or not the extra gold :gold: :commerce: is worth angering the AI. :D

See first post for additional details.

Enjoy!

Orion Veteran :cool:
 
IMO, that's a pretty pathetic bonus for the long-term disadvantage of disallowing other religions. What I said was that there should be a bonus for having your state religion AND NO OTHERS.

This comment bugged me for a while and I thought about it for a long time. My conclusion is that Tephros was actually correct and his idea formed the basis for version 2.00D. So Tephros, you have my thanks. :thanx: I would have never made this change without your criticism. ;)

History shows the confiscation of property became a lucrative business. :gold: The previous versions of this mod broke even late in the game. :sad: There is now modest profit made on every inquisition conducted. The amount of gold received on each inquisition is far more realistic to my previous idea of doubling the shrine income. However, for every bonus received, there is a corrosponding negative consequence: The angering of AI civs, who share any religion purged. This calls for a strategic decision and thus, version 2.00D is very realistic and a bit more challenging. The python code is a vast improvement. :thumbsup:

I hope everyone enjoys this big advancement to this mod. :)

Sincerely,

Orion Veteran :cool:
 
The next change I'm working on will make AI Theocracies, who share a given religion, Holy City and Shrine, that are respectively destroyed through an inquisition, to declare war against the player.

Example: If you destroy Islam's Holy City and or the Holy Shrine, then all AI Theocracies, who share Islam as their state religion, will automatically declare war on you. :D

Initial testing is flawless. This change adds even more realism to this mod. :)

Orion Veteran :cool:
 
Brilliant idea, OV! I haven't merged any changes since 2.00B, because you keep dev'ing this mod. :D
 
Release of Version 2.00E

I modified the "AIAttitudeAdjustment" function: All AI Theocracies will automatically declare war against any player who razes or conducts an inquisition, which destroys the AI's shared Holy City or Shrine. This change more accurately reflects how a Theocracy would respond, if their Holy sites were deliberately destroyed. They will declare war! :ar15:

Enjoy,

Orion Veteran :cool:
 
Could you post a snippet of that code so I can adjust it to "All Players" declare war. I don't think the AI should be forced into a war, and humans left off the hook, if it's a feature of the game--ie a game rule--, it should apply to all players.
 
Could you post a snippet of that code so I can adjust it to "All Players" declare war. I don't think the AI should be forced into a war, and humans left off the hook, if it's a feature of the game--ie a game rule--, it should apply to all players.

Sure. I modified the AIAttitudeAdjustment function.

Code:
def AIAttitudeAdjustment(iPlayer, iRequiredReligion, intAdjustment):
	# Increases anger for Civs who share the religion purged. 
	# AI Civs who share the religion purged, will declare war if Holy City or Religious Shrine is destroyed 
	eCivicTypeReligion = gc.getInfoTypeForString('CIVICOPTION_RELIGION')
	eCivicTheocracy = gc.getInfoTypeForString('CIVIC_THEOCRACY')
	
	for AIPlayer in range(gc.getMAX_PLAYERS()):
		if AIPlayer != iPlayer:
			AIpPlayer = gc.getPlayer(AIPlayer)
			if not AIpPlayer.isNone() and not AIpPlayer.isBarbarian() and not AIpPlayer.isHuman( ) and AIpPlayer.isAlive():
				if AIpPlayer.getStateReligion( ) == iRequiredReligion:
					PyPlayer(AIPlayer).AI_changeAttitude( iPlayer, intAdjustment )
					# -3 Attitude adjustments means a Holy City and/or a Shrine is being destroyed.
					if intAdjustment == -3:
						# Does the AI Civ have the Theocracy Civic
						if AIpPlayer.getCivics(eCivicTypeReligion) == eCivicTheocracy:
							AIpPlayerTeam =	gc.getTeam(AIpPlayer.getTeam())
							if (not AIpPlayerTeam.isAtWar(iPlayer)):
								# Declare war
								AIpPlayerTeam.declareWar(iPlayer, false, WarPlanTypes.WARPLAN_TOTAL)
								
	return

Justification for this code: A Theocracy is a govenment where a state is governed by religious officials. The only authorized religion is the official state religion. All other religions are condemed as non-believers and they are not tolerated. A Theocracy will celebrate the destruction of non-state religions and their associated buildings. But, if a non-state religion destroys the Holy religious buildings that belong to a Theocracy, it is an act of war against the state. This code makes the AI Civs respond in a very realistic fashion by declaring war against the attacker of their shared religion. :D

As for human players, I believe they should have total control over all important decisions concerning their respective empires and that includes the decision about going to war. Your strategy is yours, not the computer's. :king:

Orion Veteran :cool:
 
Will a Theocracy attempt to gain control (either own or vassalize) of the holy city of it's religion, if it doesn't own it already, and the civ who DOES own it has a different state religion? Maybe it should... :)
 
Will a Theocracy attempt to gain control (either own or vassalize) of the holy city of it's religion, if it doesn't own it already, and the civ who DOES own it has a different state religion? Maybe it should... :)


It all depends. If you have the respawning option set to true, then the Civ with the highest number of cities matching the religion of destroyed Holy City, will have one of it's cities respawn the Holy City. This could be any Civ that shares the same state religion.

In most cases the offending Civ, who has a different state religion, will have acquired the city through battle. Razing the non-state Holy City or conducting an inquisition will make other civs very angry. The only Civs that will become angry are those Theocracies who have the same state religion as the destroyed Holy City and or Shrine. Other civs, who have a different state religion, couldn't care less.

Reality: The willful destruction of a Holy City is perfect justification for an increase in anger and a declaration of total war against the offending Civ. The offending Civ must make the decision if razing the city or conducting an inquisition to purge the city is worth the price of going to war against other Civs. :undecide:

Strategy: If your Civ is not well defended, it may be wise to wait (i.e. not destroy the Holy City). After all, the last thing you may want is to open up additional war fronts against several angry and hostile Theocracies. Thus, the Holy city just might survive to live another round. :bowdown::religion: ...or maybe not! :cowboy: You get to decide. :)

Orion Veteran :cool:
 
Forcing all AI players to declare war through game rules, and leaving an option to the human player is a pretty underhanded design. The human player is already much smarter then the AI, I don't see why the human should be given this advantage. Basically you are setting up a game rule where the AI is forced to throw away a +12 friendly relationship that could very well give it the ability to win via future defense packs or permanent alliances, or just via trade etc, while at the same time, you are giving the human player the option to force AIs into wars it doesn't want to be in, and the option to be let off the hook if a forced war dogpile occures, which basically give the human the option to get a +2 diplo bonus since someone will come asking to join the war.

To be honest, I know you worked hard on this, but it's implementation is not balanced, and is simply terrible design. If you're going to make forced war declarations, it should apply to all players, or none at all.

Imagine if the AP votes and UN votes only applied to the AI. This is exactly what you've set up here.

What you've done with this mechanic is nerf the AI and buff the human. This broken feature needs to be toggleable via the XML.
 
Forcing all AI players to declare war through game rules, and leaving an option to the human player is a pretty underhanded design. The human player is already much smarter then the AI, I don't see why the human should be given this advantage. Basically you are setting up a game rule where the AI is forced to throw away a +12 friendly relationship that could very well give it the ability to win via future defense packs or permanent alliances, or just via trade etc, while at the same time, you are giving the human player the option to force AIs into wars it doesn't want to be in, and the option to be let off the hook if a forced war dogpile occures, which basically give the human the option to get a +2 diplo bonus since someone will come asking to join the war.

To be honest, I know you worked hard on this, but it's implementation is not balanced, and is simply terrible design. If you're going to make forced war declarations, it should apply to all players, or none at all.

Imagine if the AP votes and UN votes only applied to the AI. This is exactly what you've set up here.

What you've done with this mechanic is nerf the AI and buff the human. This broken feature needs to be toggleable via the XML.

1. If the Human player is the one who is razing or purging a non-state Holy City, then it is the human player who can expect multiple Civs to declare war in retaliation. Without this feature, these Theocracies did nothing but decrease their attitude a few points against the human. This is simply not realistic! The fact is a Theocracy will declare war against any nation that destroys their Holy City or Shrine. Imagine if Israel obliterated the Holy City for Muslims by bombing Mecca in Saudi Arabia. Do you really think the Muslim countries of the world, like Iran, would sit quietly by and do nothing? No! They would declare Holy War against Israel and attack. The design of this feature is to make the aggressor think twice about taking out a non-state Holy City, which increases the likelihood the Holy place will survive. However, I do believe you are on to something and I have a way to fix it. ;)

2. If the human player is a Theocracy who shares the religion of a razed or purged Holy City; then the human player should be given a popup message saying, “A Godless infidel has destroyed the Holy City of our religion. Will you stand with your brothers in faith and declare war against the infidel?” If the answer is “Yes, declare war”; then your relationship with all Theocracies, who share your state religion, will be strengthened, with a positive attitude adjustment of +5 for each Theocracy. The reply: “Thank you for honoring our faith.” But, if you refuse: “No, I will not go to war”; then the human player will suffer a negative attitude adjustment of -7 and each of these Theocracies will declare war against the human player and respond with a message: “You shall pay the price for betraying our religious faith. We are now at WAR!” :D

Will this idea work for you?


Orion Veteran :cool:
 
Actually that seems sort of balanced, thought it really should cause the "The World Considers You a Villain!" penalty in all cities that have the religion. I think it would just be simpler to have the human auto declare war as well, but I guess you're not going to budge there so yeah, I can live with that proposed change. I basically just thought it was a poor feature if the human had no penalty for playing by the same rules as the AI.

Edit: How about you implement it the same way as an AP declare war vote? Make it function the same, with the exception that if a player opts out (AIs using the logic to Defy resolution), the others still go to war, but they suffer the tWCYaV happiness penalty in all cities with the religion. That way it's balanced, effects humans and AIs the same, and it's effect will be the same as you desire (everyone declares war against the infidel), but it wol't allow the human to game the system.
 
Back
Top Bottom