Orion's Inquisition Mod

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 won't allow the human to game the system.

There is a difference between an AP vote vs. religious betrayal. The decision of an AP vote affects every CIV, while religious betrayal only affects those Civs who share the same religion. So the religious betrayal does not make the player a "world" villian, as Civs having different religions couldn't care less about who betrayed who in a non-state religious squabble. But this might just be symantics.

Basically, you want to add anger to every city having the state religion. My question is: For how long? ...and do you have a python line that would add anger to a city? For example:

Code:
# Code to Anger people in City
pCity.ChangeAnger(-1) ?????  (does this exist?)
pCity.changeHurryAngerTimer(10)

Any ideas?


Orion Veteran :cool:
 
I like this new idea about religious betrayal. I would add to the "No, we will not declare war" option a lot of unhappyness (like 10 turns of 3 angries per city) and/or Anarchy from forcing you to go to Paganism (to represent the "doves" regime toppled).
 
I like this new idea about religious betrayal. I would add to the "No, we will not declare war" option a lot of unhappyness (like 10 turns of 3 angries per city) and/or Anarchy from forcing you to go to Paganism (to represent the "doves" regime toppled).

I have the popup menus working and received help on how to add unhappiness to all of a player's cities for a set amount of turns. Tonight I will attempt to slide them into the correct functions. :)

Orion Veteran :cool:
 
I decided to improve the code that founds religions with the CHOOSE RELIGIONS game option enabled. Purpose: Efficiency and to insure Liambane's concern is resolved. A test game with 7 Civs revealed all religions were founded, only one Holy City per civ and they were all precisely founded on the correct techs. Now that's perfection! ...and this improved code will be released in my next update.

Note: I'm still testing the religious betrayal code. So, it might be a few more days until I am sure it works.

Orion Veteran :cool:
 
Please explain in detail what happened. Are you using the latest version?

Hi Orion. First of all compliments for your mod.

Using "Choose Religion" option let the civilization act strange, here's what happened at least 4-5 times in a row:

1- The First religion founded was ALWAYS judaism
2- The Second was ALWAYS christian (lots of time in the same turn of judaism)
3 - The Third was ALWAYS Confucian.

After that I saw on the technology green bar that a religion was available with MEDITATION... but still 3 religions was founded.

Hope my experience helped orion.
Cya
 
Hi Orion. First of all compliments for your mod.

Using "Choose Religion" option let the civilization act strange, here's what happened at least 4-5 times in a row:

1- The First religion founded was ALWAYS judaism
2- The Second was ALWAYS christian (lots of time in the same turn of judaism)
3 - The Third was ALWAYS Confucian.

After that I saw on the technology green bar that a religion was available with MEDITATION... but still 3 religions was founded.

Hope my experience helped orion.
Cya

Under "Choose Religions," human players can pick any religion still available on the popup list. However, the computer must still select a religion for all AI CIVs. The order of discovery is based upon how the function works. The function looks for the first available religion and selects that religion for the AI. It appears that Judaism just so happens to be at the top of the list in the search sequence, followed by Christianity, etc.

I think the new code will better define if a religious tech can found a religion or not. Last nights' test had no duplicate foundings and the timing was flawless (i.e. Meditation can found a Religion if there are less than 2 religions previously founded).

Orion Veteran :cool:
 
Hi, while attempting to merge the Abandon City mod with Rise of Mankind 2.6 I need to ensure that I do the same stuff as your mod does to be consistant. However after looking at your code I became confused. It is probably my lack of python that is causing the confusion but in the onCityRazed event the code appears to give bonuses and penalties then if the respawn holy cities is on it applies another bunch of bonuses and penalties. Am I reading the code right or is there something I am missing?

Also why is there no penalty and bonus for destroying your state religion's holy city? I know that it is unlikely for someone to do this but it happens.

RoM 2.6 does not use Inqusition 2.00f yet but the code for onCityrazed is the same in the version it does use.

Btw thanks for making this work for cities which have multiple holy shrines.
 
Hi, while attempting to merge the Abandon City mod with Rise of Mankind 2.6 I need to ensure that I do the same stuff as your mod does to be consistant. However after looking at your code I became confused. It is probably my lack of python that is causing the confusion but in the onCityRazed event the code appears to give bonuses and penalties then if the respawn holy cities is on it applies another bunch of bonuses and penalties. Am I reading the code right or is there something I am missing?

Also why is there no penalty and bonus for destroying your state religion's holy city? I know that it is unlikely for someone to do this but it happens.

RoM 2.6 does not use Inqusition 2.00f yet but the code for onCityrazed is the same in the version it does use.

Btw thanks for making this work for cities which have multiple holy shrines.

If you look closely at the onCityRazed event in version 2.00F: There are AI attitude adjustments and gold bonuses based upon whether or not a non-state religion, building or Holy City exists. They all have separate checks, affects on the AI and gold yields.

1. The first part of the code removes all non-state religious buildings from the city (including any non-state Shrines). The removal of a non-state religious building angers AI Theocracies by -1 and yields 250 gold each. If a non-state Shrine is removed, the AI Theocracies are angered by -3 and they will declare total war. The gold yield is 500 for each non-state shrine.

2. The second part of the code checks for any non-state religions and Holy Cities. Based upon a game option the code will remove the Holy City identifier. This will anger AI Theocracies by -3 and they will declare total war. The gold yield is 500 for each Holy City removed. The removal of a non-state religion angers AI Theocracies by -1 and yields 100 gold for each religion removed.

The purging or razing of a Holy City and or Shrine does not happen too often. When it does, there is now certainty you will have total war declared against you by any AI Theocracies, who just lost their most Holy City and or Shrine. You will never be at peace with them for the rest of the game. The destruction of Holy Cities is considered to be an unforgiveable act of war. However, with great risk is great reward. When you sum everything up, the gold value of Holy Cities can be significant. :D

Bottom Line: There is nothing wrong with the code, as it all works perfectly. :)

On a deep second look, there is a way to improve the code. I'll make the change in the next release.


Orion Veteran :cool:
 
Thanks for that. I definately missed the difference between holy shrine the building and the holy shrine marker. Now that I type this it clears almost everything up. Yes, I am easily confused. :) It still looks like you are penalising the use of the respawn option.

Just looking at the angered bit for a single non-state Holy Shrine.

Part 1. gives -3 and removes the non-state shrine.

Then part 2 (respawn bit). removes the Holy City marker for another -3.

As I said I need to understand the reasons behind this to merge the Abandon City mod into Rise of mankind 2.6. In which it is possible to have 10 buildings which require a religion to build; 3 standard buildings, one crusade building, 5 crusade national wonders and a world wonder! Which I think means another -10 attitude adgustment.

So if I want to safely destroy a holy city I should convert to that religion first then destroy it and then convert back - no money and only small penalties if the city had multiple buildings of multiple religions.:mischief:
 
It still looks like you are penalising the use of the respawn option.
The improvement to this large function will move the check for Respawning to a place much further into the code. Here is the change (in Red) that will be in the next version.

Code:
# Removes all non-state Religions and HolyCities
for iReligionLoop in range(gc.getNumReligionInfos()):
	# Make sure only non-state religions are selected
	if iReligionLoop != iStateReligion:
		# Is this a non-state Holy City?
		if city.isHolyCityByType( iReligionLoop ):
			# Increases Anger for all AIs who share the purged Holy City
			CvUtil.AIAttitudeAdjustment(iPlayer, iReligionLoop, -3, True)
			# Remove non-state Holy City identifier
			gc.getGame( ).clearHolyCity( iReligionLoop )
			# Add gold to treasury for pillaging the non-state Holy City
			iGoldTotal = iGoldTotal + 500
			# Increases Anger for all AIs who share the purged religion
			CvUtil.AIAttitudeAdjustment(iPlayer, iReligionLoop, -1, False)
			# Remove non-state religion
			city.setHasReligion(iReligionLoop, 0, 0, 0)
			# Add gold to treasury to compensate for inquisition costs
			iGoldTotal = iGoldTotal + 100
			CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Destruction of a non-state Holy City has angered AI Civs!','AS2D_DISCOVERBONUS',1,'Art/Interface/Buttons/TerrainFeatures/Forest.dds',ColorTypes(7),0,0,False,False)
			# Check default -- Respawn Holy City?
			[B][COLOR="Red"]if CvUtil.isOC_RESPAWN_HOLY_CITIES():[/COLOR][/B]
				# Is there at least 1 non Holy City remaining with HC Religion?  
				if CvUtil.findCityWithXReligion(iReligionLoop):
					# Set Minimum of Two Cities required for Respawning a Holy City
					minCitiesForInfluence = 2
					# Find player with the greatest Religious Influence for Religion 
					eBestPlayer = CvUtil.getPlayerWithMaxInfluenceForReligion(iReligionLoop, minCitiesForInfluence)	
					# If there is a player with enough Religious Influence for Religion
					if eBestPlayer >= 0:
						XpPlayer = gc.getPlayer(eBestPlayer)
						# Respawn the Holy City 
						CvUtil.ReSpawnHolyCity(XpPlayer, iReligionLoop)

Just looking at the angered bit for a single non-state Holy Shrine.

Part 1. gives -3 and removes the non-state shrine.

Then part 2 (respawn bit). removes the Holy City marker for another -3.

As I said I need to understand the reasons behind this to merge the Abandon City mod into Rise of mankind 2.6. In which it is possible to have 10 buildings which require a religion to build; 3 standard buildings, one crusade building, 5 crusade national wonders and a world wonder! Which I think means another -10 attitude adgustment.

So if I want to safely destroy a holy city I should convert to that religion first then destroy it and then convert back - no money and only small penalties if the city had multiple buildings of multiple religions.:mischief:

Any AI Theocracy that shares the state religion of the destroyed Holy City and or Shrine will declare war on the player (aggressor) and the attitude adjustment is at least -7 when a shrine exists in the Holy City. This amounts to 2 full changes in negative attitude towards the player. The intent is to discourage the destruction of a Holy City, as there is certain retaliation by AI Theocracies, who share the religion. Hope that helps.

Orion Veteran :cool:
 
Hey OrionVeteran, I'm adding a unit to my mod that should only be buildable under Emancipation. I was wondering how you've set up the Civic dependant buildability of Inquisitors, but wasn't able to find it in a brief scan of the Python. Could you direct me to the specific python file, and some text I could search for that would show how to limit the buildability of a unit to a specific civic?
 
Hey OrionVeteran, I'm adding a unit to my mod that should only be buildable under Emancipation. I was wondering how you've set up the Civic dependant buildability of Inquisitors, but wasn't able to find it in a brief scan of the Python. Could you direct me to the specific python file, and some text I could search for that would show how to limit the buildability of a unit to a specific civic?

Sure: check out the CVGameUtils.py file for these functions:

Code:
def canTrain(self,argsList):
	pCity = argsList[0]
	eUnit = argsList[1]
	bContinue = argsList[2]
	bTestVisible = argsList[3]
	bIgnoreCost = argsList[4]
	bIgnoreUpgrades = argsList[5]
	# Inquisition Mod
	if self.isInquisitionConditions(pCity.getOwner()):
		if eUnit == gc.getInfoTypeForString('UNIT_INQUISITOR'):
			return True
	# End Inquisition Mod
	return False

def cannotTrain(self,argsList):
	pCity = argsList[0]
	eUnit = argsList[1]
	bContinue = argsList[2]
	bTestVisible = argsList[3]
	bIgnoreCost = argsList[4]
	bIgnoreUpgrades = argsList[5]
	# Inquisition Mod
	if not self.isInquisitionConditions(pCity.getOwner()):
		if eUnit == gc.getInfoTypeForString('UNIT_INQUISITOR'):
			return True
	# End Inquisition Mod
	return False


def isInquisitionConditions(self, playerID):
	pPlayer = gc.getPlayer(playerID)
	if not gc.getTeam(pPlayer.getTeam()).isHasTech(gc.getInfoTypeForString('TECH_THEOLOGY')):
		return False
	if pPlayer.getStateReligion( ) < 0:
		return False
	if pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_RELIGION')) == gc.getInfoTypeForString('CIVIC_PACIFISM'):
		return False
	if pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_RELIGION')) == gc.getInfoTypeForString('CIVIC_FREE_RELIGION'):
		return False
	return True


Orion Veteran :cool:
 
Thanks Orion Veteran. I'm using your mod too, and I want to keep inquisitors restricted. I can't see an obvious way to add a second unit here, how would I do this?
 
Back
Top Bottom