Orion's Inquisition Mod

What exactly does is mean that the inquisitors are decentralized, and that there's one for each religion? Does it mean that I can remove the religions I don't like by building a certain inquisitor? Or is it art-wise?
 
What exactly does is mean that the inquisitors are decentralized, and that there's one for each religion? Does it mean that I can remove the religions I don't like by building a certain inquisitor? Or is it art-wise?

It is with the art, XML and python. The Inquisitor is now a religion specific unit. This matches the religion model for the game. Just as there are 7 missionaries (one for each religion), there are 7 Inquisitors (one for each religion). Each inquisitor removes all religions, except it's own. The missionary spreads your state religion, the inquisitor removes non-state religions.

Orion Veteran :cool:
 
Ehi Orion. Again many thanks for the Limited Religion mod you wrote for me! :bowdown::bowdown::bowdown:

I was thinking... Since you helped me, don't you want to check my mod and see how the Limited Religion is amazing in it?

Here's the link:

http://forums.civfanatics.com/showthread.php?t=248049

;)
 
Ehi Orion. Again many thanks for the Limited Religion mod you wrote for me! :bowdown::bowdown::bowdown:

I was thinking... Since you helped me, don't you want to check my mod and see how the Limited Religion is amazing in it?

Here's the link:

http://forums.civfanatics.com/showthread.php?t=248049

;)

Your mod must be good if it includes Limited Religions. :lol:

Believe it or not I am still working on two more improvements to Limited Religions. They are difficult tasks, but with time I will overcome the obsticles.

Orion Veteran :cool:
 
If I've added new religions to my mod, what changes would I have to make in your python script for them to work correctly? I noticed there are entries in the Inquisition.py file for the different Shrines and Temples, and I have added the new religious structures to there. Is there anything else I need to do?


Do a search for all of the "data, ldata, lShrines" entries. You will have to add one line for each of these functions for the respective unit, building or religion added. Just watch your commas, as the last line must not have one.

For example: To add a Shinto Inquisitor... Add the red line below:

ldata = {
"RELIGION_JUDAISM": "UNIT_JEWISH_INQUISITOR",
"RELIGION_CHRISTIANITY": "UNIT_CHRISTIAN_INQUISITOR",
"RELIGION_ISLAM": "UNIT_ISLAMIC_INQUISITOR",
"RELIGION_HINDUISM": "UNIT_HINDU_INQUISITOR",
"RELIGION_BUDDHISM": "UNIT_BUDDHIST_INQUISITOR",
"RELIGION_CONFUCIANISM": "UNIT_CONFUCIAN_INQUISITOR",
"RELIGION_TAOISM": "UNIT_TAOIST_INQUISITOR",
"RELIGION_SHINTOISM": "UNIT_SHINTO_INQUISITOR"
}


Orion Veteran :cool:
 
I also noticed there was a list of all the techs that grand religions. I tried adding entries for the two techs that provide the new religions in my mod (one an existing tech, the other a new one). When I started up a game, all my interface was gone, indicating I made a mistake in the python code. Here's what I have down.
Code:
def init():
	global bReligiousTechInitDone
	if not bReligiousTechInitDone:
		data = {
			"TECH_MEDITATION": 2,
			"TECH_POLYTHEISM": 2,
			"TECH_POTTERY"2,
			"TECH_MONOTHEISM": 3,
			"TECH_DUALISM": 3,
			"TECH_CODE_OF_LAWS": 5,
			"TECH_THEOLOGY": 5,
			"TECH_PHILOSOPHY": 7,
			"TECH_DIVINE_RIGHT": 7
		}
		for szTech, iMax in data.iteritems():
			iTech = gc.getInfoTypeForString(szTech)
			if iTech != -1:
				RELIGIOUS_TECH_MAX_RELIGIONS[iTech] = iMax
		bReligiousTechInitDone = True
Did I do something wrong here?
I should note I am using an older version of the mod. Specifically, the one included in Ninja2's Merged Mod 0.93.
I'm fine using a single Inquisitor model and Holy Office for all religion since I don't have ones for the two new ones I added.
 
Can you post the contents of logs/PythonErr.log? That will say what Python exception is being raised. That code you posted looks okay to me.
 
...I made a mistake in the python code. Here's what I have down.

Please change this:

Code:
data = {
	"TECH_MEDITATION": 2,
	"TECH_POLYTHEISM": 2,
	"TECH_POTTERY"2,
	"TECH_MONOTHEISM": 3,
	"TECH_DUALISM": 3,
	"TECH_CODE_OF_LAWS": 5,
	"TECH_THEOLOGY": 5,
	"TECH_PHILOSOPHY": 7,
	"TECH_DIVINE_RIGHT": 7
}

To This:

Code:
data = {
	"TECH_MEDITATION": 3,
	"TECH_POLYTHEISM": 3,
	"TECH_POTTERY": 3,
	"TECH_MONOTHEISM": 5,
	"TECH_DUALISM": 5,
	"TECH_CODE_OF_LAWS": 7,
	"TECH_THEOLOGY": 7,
	"TECH_PHILOSOPHY": 9,
	"TECH_DIVINE_RIGHT": 9
}

You were missing a colon and the numbering must change as you add more religions.
This function will become obsolete in my next version, but this should work for you now.

Orion Veteran :cool:
 
OK, i finally got another error message in the Inquis area.

Traceback (most recent call last):

File "CvEventInterface", line 25, in onEvent

File "CvCustomEventManager", line 162, in handleEvent

File "CvCustomEventManager", line 173, in _handleDefaultEvent

File "CvEventManager", line 1956, in onCityRazed

File "Inquisition", line 186, in RemoveAllNonStateReligions

File "Inquisition", line 815, in AIAttitudeAdjustment

AttributeError: PyPlayer instance has no attribute 'AI_changeAttitude'
ERR: Python function onEvent failed, module CvEventInterface

186:
Spoiler :
Code:
elif pCity.isHasReligion( iReligionLoop ):
				# Increases Anger for all AIs who share the purged religion						
				[B]AIAttitudeAdjustment(iPlayer, iReligionLoop, -1, False)[/B]
				# Remove non-state religion
				pCity.setHasReligion(iReligionLoop, 0, 0, 0)
				# Add gold to treasury to compensate for inquisition costs						
				iGoldTotal = iGoldTotal + 100

815:
Spoiler :
Code:
if not AIpPlayer.isNone() and not AIpPlayer.isBarbarian() and not AIpPlayer.isHuman( ) and AIpPlayer.isAlive():
				if AIpPlayer.getStateReligion( ) == iRequiredReligion:
					[B]PyPlayer(AIPlayer).AI_changeAttitude( iPlayer, intAdjustment )[/B]
					#if intAdjustment == -3 or intAdjustment == -7:
					if bDeclareWar == 1:
 
This is a great mod-comp, though I have an Idea for it. Have an option were religions can spread in cities even if they have a religion already in it, thus adding to the importence of inquisition and the bonus of being a Free Religion state :)
Just an idea, love the mod :)
 
OK, i finally got another error message in the Inquis area.

Replace your function with this one:

Spoiler :

Code:
def AIAttitudeAdjustment(iPlayer, iRequiredReligion, intAdjustment, bDeclareWar):
	# Orion's Inquisition Mod
	# Increases anger for Civs who share the religion purged. 
	# Friendly: 10 or above; Pleased: 3 to 9; Cautious: -2 to 2; Annoyed: -9 to -3; Furious: -10 and below
	# 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')
	CvRunTheocracyDeclaredWarMsg = False
		
	for AIiPlayer in range(gc.getMAX_PLAYERS()):
		if AIiPlayer != iPlayer:
			AIpPlayer = gc.getPlayer(AIiPlayer)
			if not AIpPlayer.isNone() and not AIpPlayer.isBarbarian() and not AIpPlayer.isHuman( ) and AIpPlayer.isAlive():
				if AIpPlayer.getStateReligion( ) == iRequiredReligion:
					PyPlayer(AIiPlayer).AI_changeAttitude( iPlayer, intAdjustment )
					
					if bDeclareWar == 1:
						# Does the AI Civ have the Theocracy Civic ***********
						if AIpPlayer.getCivics(eCivicTypeReligion) == eCivicTheocracy:
							AIpPlayerTeam =	gc.getTeam(AIpPlayer.getTeam())
							if (not AIpPlayerTeam.isAtWar(iPlayer)):
								# -3 Attitude adjustments means a Holy City and/or a Shrine is being destroyed.
								if intAdjustment == -3:
									# Declare total war
									AIpPlayerTeam.declareWar(iPlayer, false, WarPlanTypes.WARPLAN_TOTAL)
									CvRunTheocracyDeclaredWarMsg = True
								
								elif intAdjustment == -7:
									# Declare Limited war
									AIpPlayerTeam.declareWar(iPlayer, false, WarPlanTypes.WARPLAN_LIMITED)
								
	if CvRunTheocracyDeclaredWarMsg:
		# iPlayer is the Civ who destroyed the Holy City
		# iRequiredReligion is the state religion of the Holy City
		CyMessageControl().sendModNetMessage(200, iPlayer, iRequiredReligion, -1, -1)
		
	return


Make sure you have PyHelpers declared at the top of the file:

Code:
import PyHelpers

Orion Veteran :cool:
 
Replace your function with this one:

Spoiler :

Code:
def AIAttitudeAdjustment(iPlayer, iRequiredReligion, intAdjustment, bDeclareWar):
	# Orion's Inquisition Mod
	# Increases anger for Civs who share the religion purged. 
	# Friendly: 10 or above; Pleased: 3 to 9; Cautious: -2 to 2; Annoyed: -9 to -3; Furious: -10 and below
	# 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')
	CvRunTheocracyDeclaredWarMsg = False
		
	for AIiPlayer in range(gc.getMAX_PLAYERS()):
		if AIiPlayer != iPlayer:
			AIpPlayer = gc.getPlayer(AIiPlayer)
			if not AIpPlayer.isNone() and not AIpPlayer.isBarbarian() and not AIpPlayer.isHuman( ) and AIpPlayer.isAlive():
				if AIpPlayer.getStateReligion( ) == iRequiredReligion:
					PyPlayer(AIiPlayer).AI_changeAttitude( iPlayer, intAdjustment )
					
					if bDeclareWar == 1:
						# Does the AI Civ have the Theocracy Civic ***********
						if AIpPlayer.getCivics(eCivicTypeReligion) == eCivicTheocracy:
							AIpPlayerTeam =	gc.getTeam(AIpPlayer.getTeam())
							if (not AIpPlayerTeam.isAtWar(iPlayer)):
								# -3 Attitude adjustments means a Holy City and/or a Shrine is being destroyed.
								if intAdjustment == -3:
									# Declare total war
									AIpPlayerTeam.declareWar(iPlayer, false, WarPlanTypes.WARPLAN_TOTAL)
									CvRunTheocracyDeclaredWarMsg = True
								
								elif intAdjustment == -7:
									# Declare Limited war
									AIpPlayerTeam.declareWar(iPlayer, false, WarPlanTypes.WARPLAN_LIMITED)
								
	if CvRunTheocracyDeclaredWarMsg:
		# iPlayer is the Civ who destroyed the Holy City
		# iRequiredReligion is the state religion of the Holy City
		CyMessageControl().sendModNetMessage(200, iPlayer, iRequiredReligion, -1, -1)
		
	return


Make sure you have PyHelpers declared at the top of the file:

Code:
import PyHelpers

Orion Veteran :cool:


I'll take a gander at it, and your right i didnt have Pyhelpers.py, i had to rename it because i was testing another modcomp, and forgot to rename it back. THX.
 
Release of version 2.50B for BTS 3.19

1. Merged Basic limited Religions into the Inquisition mod.

2. Documented python functions to indicate if a function supports limited religions or Inquisitions. This should really help all of the modders out there.

3. Fixed bug in doInquisitorCore_AI function that prevented the AI from conducting inquisitions.

4. The above fix led to an improved the doHolyCitySeekAndDestroy function.

5. Under Limited Religions and Choose Religions, New functions insure all religions will be founded in huge games with more than 7 Civs. Multiple test games founded 7 for 7 religions. Finally, all religions will be founded in huge games.

6. Created code to make a non State Holy City have a much greater religious impact on a Civ that does not have the Holy City for their state religion (See Scenario).

7. Scenario: If you have a Holy City for your state religion and another Civ has adopted your religion, and that Civ suddenly founds a Holy City; then that civ will start spreading the non-state religion of the non-state Holy city until the Civ finally converts it's state religion to the Holy City religion. The impact is fantastic. 505 turns into a test game, and we see 8 Civs in the game and 7 have a Holy City and in all 7 the state religion is the Holy City religion. Look at the attached image. Have you ever seen that before? Rarely! But now it is routine for huge games. And not only that. Inquisitions in each of the respective civs have eliminated most of the non-state religions. At first, I did not like the idea of forcing an AI Civ to change their religion. But the result provided a highly balanced distribution of all of the religions in the game.

Note: Many hours of testing went into this version. This is likely to be the best release to date.

Have Fun,

Orion Veteran
 

Attachments

  • MaxedHolyCities.jpg
    MaxedHolyCities.jpg
    43.5 KB · Views: 66
I'm not sure I like that idea of spontaneous national religious expression, but the rest of it is looking good! Thanks Orion :)
 
Back
Top Bottom