Orion's Inquisition Mod

Orion if you're available, I have a small issue.

I'm merging this into my personal (non-published mod) and I've gotten everything working (python worked on the first try, which amazed me) except for one minor thing...

The Holy Office shows up as a purple blob on the map. Any ideas on what I did wrong?

Please checkout the inquisition component, (along with the limited religions component), as it contains the latest updates to this mod. I suspect you may find the problem in the CIV4ArtDefines_Building.xml file.
 
My inspiration came from and is dedicated to BMARNZ, who "likely" used your old inquisition mod as his starting point. So, ultimately you deserve some credit for this popular mod.

Huh, cool thanks
 
A thread necromancer has arrived....

Can you upload the source code specifically for the Holy City Relocation? I'm trying to incorporate this into a different mod. Thanks!
 
A thread necromancer has arrived....

Can you upload the source code specifically for the Holy City Relocation? I'm trying to incorporate this into a different mod. Thanks!

This is a value set in XML

Code:
def isOC_RESPAWN_HOLY_CITIES():
	# Orion's Inquisition Mod
	return gc.getDefineINT("OC_RESPAWN_HOLY_CITIES") != 0

This code performs the respawning of a Holy City

Code:
# Set Minimum of Two Cities required for Respawning a Holy City
minCitiesForInfluence = 2

# Check default -- Respawn Holy City?
if isOC_RESPAWN_HOLY_CITIES():
	# Find player with the at least 2 Cities of religious influence to respawn the Holy City.                   
	eBestPlayer = 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
		ReSpawnHolyCity(XpPlayer, iReligionLoop)

This code determines the player with the most number of cities having the specified religion of the Holy City.

Code:
def getPlayerWithMaxInfluenceForReligion(MyHCReligion, minCitiesRequired):
	# Orion's Inquisition Mod
	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

All of this can be found in Orion's Inquisition Mod in the OIM.py file.
 
This is a value set in XML

Code:
def isOC_RESPAWN_HOLY_CITIES():
	# Orion's Inquisition Mod
	return gc.getDefineINT("OC_RESPAWN_HOLY_CITIES") != 0

This code performs the respawning of a Holy City

Code:
# Set Minimum of Two Cities required for Respawning a Holy City
minCitiesForInfluence = 2

# Check default -- Respawn Holy City?
if isOC_RESPAWN_HOLY_CITIES():
	# Find player with the at least 2 Cities of religious influence to respawn the Holy City.                   
	eBestPlayer = 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
		ReSpawnHolyCity(XpPlayer, iReligionLoop)

This code determines the player with the most number of cities having the specified religion of the Holy City.

Code:
def getPlayerWithMaxInfluenceForReligion(MyHCReligion, minCitiesRequired):
	# Orion's Inquisition Mod
	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

All of this can be found in Orion's Inquisition Mod in the OIM.py file.

Thanks!
 
Ok I did the following:

1) Merged all XML file differences between my mod and your mod.
2) Put all your art into my mod's art folder.
3) Put OIM.py into my Assets\Python folder.
4) Copy and pasted the changes in your GlobalDefinesAlt file into my GlobalDefinesAlt

Yet no matter what I set the customizable settings in the GlobalDefinesAlt folder, the game still tells me that Holy City relocation, foreign inquisitions, inquisitions of holy cities, etc. is turned off.

Also, I didn't see an SDK component to the mod. Does the AI know how to use these?

And what is the difference between the WoC and Standard files?
 
Ok I did the following:

1) Merged all XML file differences between my mod and your mod.
2) Put all your art into my mod's art folder.
3) Put OIM.py into my Assets\Python folder.
4) Copy and pasted the changes in your GlobalDefinesAlt file into my GlobalDefinesAlt

Yet no matter what I set the customizable settings in the GlobalDefinesAlt folder, the game still tells me that Holy City relocation, foreign inquisitions, inquisitions of holy cities, etc. is turned off.

Also, I didn't see an SDK component to the mod. Does the AI know how to use these?

And what is the difference between the WoC and Standard files?

1. For compatibility, there is no SDK in OIM.

2. The AI does know how to use Inquisitors and very effectively.

3. Look up World of Civilization (WoC) in the forums and read up on what it is.
 
If the merge is done correctly, then the GlobalDefinesAlt options will work. Since you are new to Civ4, I suggest using the standard version of the mod for your merge.

Lol I'm new to modding, not civ 4.

Alright I must have screwed up something with the merge... I will investigate!
 
I'm having difficulty attempting to merge this mod with Fictionalization IV. Although I'm not absolutely certain, I am fairly that the error is in the Python coding, to be specific this:
Code:
	def onGameStart(self, argsList):
		'Called at the start of the game'
# ###############################################
#            Orion's Game Options Status
# ###############################################
		iPlayerNum = 0
		iHumanCount = 0
		
		if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR") and not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_START)):
			for iPlayer in range(gc.getMAX_PLAYERS()):
				player = gc.getPlayer(iPlayer)
				if player.isAlive():
					iPlayerNum = iPlayerNum + 1
					if player.isHuman():
						iHumanCount = iHumanCount + 1
						if iHumanCount == 1:
							# Orion's Game Options Status Popup
							OIM.DisplayOCCStatus(iPlayer)
							break
# End Orion's Game Options Status popup
		### circus hagenbeck start part 2
	        if (gc.getGame().getGameTurnYear() <> gc.getDefineINT("START_YEAR")):
                        for i in range (gc.getMAX_PLAYERS()):
                                player = gc.getPlayer(iPlayer)
				if player.isAlive():
                                        numbuildings = player.countNumBuildings(gc.getInfoTypeForString("BUILDING_TARDIS"))
                                        if numbuildings>0:
                                                for iCity in range(player.getNumCities()):
                                                        pCity = player.getCity(iCity)
                                                        if pCity.getNumBuilding(gc.getInfoTypeForString("BUILDING_TARDIS"))>0:
                                                                self.oldcity = [iPlayer,iCity]
                                                                return
                ###circus hagenbeck end part 2

Are there any syntax errors that are in here?
 
I'm having difficulty attempting to merge this mod with Fictionalization IV. Although I'm not absolutely certain, I am fairly that the error is in the Python coding, to be specific this:
Spoiler :

Code:
	def onGameStart(self, argsList):
		'Called at the start of the game'
# ###############################################
#            Orion's Game Options Status
# ###############################################
		iPlayerNum = 0
		iHumanCount = 0
		
		if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR") and not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_START)):
			for iPlayer in range(gc.getMAX_PLAYERS()):
				player = gc.getPlayer(iPlayer)
				if player.isAlive():
					iPlayerNum = iPlayerNum + 1
					if player.isHuman():
						iHumanCount = iHumanCount + 1
						if iHumanCount == 1:
							# Orion's Game Options Status Popup
							OIM.DisplayOCCStatus(iPlayer)
							break
# End Orion's Game Options Status popup
		### circus hagenbeck start part 2
	        if (gc.getGame().getGameTurnYear() <> gc.getDefineINT("START_YEAR")):
                        for i in range (gc.getMAX_PLAYERS()):
                                player = gc.getPlayer(iPlayer)
				if player.isAlive():
                                        numbuildings = player.countNumBuildings(gc.getInfoTypeForString("BUILDING_TARDIS"))
                                        if numbuildings>0:
                                                for iCity in range(player.getNumCities()):
                                                        pCity = player.getCity(iCity)
                                                        if pCity.getNumBuilding(gc.getInfoTypeForString("BUILDING_TARDIS"))>0:
                                                                self.oldcity = [iPlayer,iCity]
                                                                return
                ###circus hagenbeck end part 2


Are there any syntax errors that are in here?

Try This:

Spoiler :

Code:
	def onGameStart(self, argsList):
		'Called at the start of the game'
	# ###############################################
	#            Orion's Game Options Status
	# ###############################################
		iPlayerNum = 0
		iHumanCount = 0
		self.oldcity = [-1,-1]
		iCityList = PyPlayer(ePlayer).getCityList()	
		
		if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR") and not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_START)):
			for iPlayer in range(gc.getMAX_PLAYERS()):
				player = gc.getPlayer(iPlayer)
				if player.isAlive():
					iPlayerNum = iPlayerNum + 1
					if player.isHuman():
						iHumanCount = iHumanCount + 1
						if iHumanCount == 1:
							# Orion's Game Options Status Popup
							OIM.DisplayOCCStatus(iPlayer)
							break
								
	# End Orion's Game Options Status popup
		### circus hagenbeck start part 2
		if (gc.getGame().getGameTurnYear() <> gc.getDefineINT("START_YEAR")):
			for iPlayer in range (gc.getMAX_PLAYERS()):
				player = gc.getPlayer(iPlayer)
				if player.isAlive():
					numbuildings = player.countNumBuildings(gc.getInfoTypeForString("BUILDING_TARDIS"))
					if numbuildings > 0:
						for pyCity in iCityList:
							pCity = pyCity.GetCy()
							iCity = pCity.getID()
					
							if pCity.getNumBuilding(gc.getInfoTypeForString("BUILDING_TARDIS")) > 0:
								self.oldcity = [iPlayer, iCity]
								return
				###circus hagenbeck end part 2Are there any syntax errors that are in here?


This mod is obsolete as I have fixed many issues in "Orions Limited Religions" and "Orions Inquisition Component". All of my mods can be found in the latest version of Grand Inquisitions. You might want to check it out and see what else you may want to use. :cool:
 
On a related note, how can I add new Inquisitor units?
 
On a related note, how can I add new Inquisitor units?

In addition to the art files, you have to add a new inquisitor to these XML files:

CIV4ArtDefines_Unit.xml
CIV4UnitClassInfos.xml
CIV4UnitInfos.xml
CIV4GameText.xml
CIV4CivilizationInfos.xml

Use the existing entries in these files as an example for your new Inquisitor.
 
Never mind.
 
Hey Orion, I was wondering if you could help me with this bug:

In my mod, I've included this modcomp, and had no problems until now. The only changes I've made since I last had a working copy that could be relevant are:

1) I changed the position of the Holy Office Building in the XML so it's right after the monasteries

2) I deleted the Holy Offices of all religions except Judaism, Christianity, and Islam (Judaism=Protestantism in my mod)

3) I added a religion (Zoroastrianism)

So here's the bug:

Code:
Traceback (most recent call last):

  File "CvScreensInterface", line 736, in forceScreenRedraw

  File "CvMainInterface", line 789, in redraw

  File "CvMainInterface", line 1712, in updateSelectionButtons

  File "OIM", line 799, in showInquisitionButton

  File "OIM", line 144, in getReligionInquisitor

  File "OIM", line 129, in getReligionHolyOffice

AttributeError: 'NoneType' object has no attribute 'getPrereqReligion'
ERR: Python function forceScreenRedraw failed, module CvScreensInterface

And the offending bit of code:

Code:
def getReligionHolyOffice(iPlayer, iReligion):
	# Orion's Inquisition Mod
	# Returns the Holy Office Name for the specified Religion
	pPlayer = gc.getPlayer(iPlayer)
	pCivilization = gc.getCivilizationInfo(pPlayer.getCivilizationType())
	
	for iBuildingClass in range(gc.getNumBuildingClassInfos()):
		kBuilding = gc.getBuildingInfo(pCivilization.getCivilizationBuildings(iBuildingClass))
		if kBuilding.getPrereqReligion() == iReligion:			
			iBuilding = pCivilization.getCivilizationBuildings(iBuildingClass)
			#CyInterface().addImmediateMessage("C", "")
			if gc.getBuildingInfo(iBuilding).getSpecialBuildingType() == gc.getInfoTypeForString("SPECIALBUILDING_HOLY_OFFICE"):
				MyHolyOfficeName = gc.getBuildingInfo(iBuilding).getType()
				#CyInterface().addImmediateMessage(str(MyHolyOfficeName), "")
				return MyHolyOfficeName
				break

Any ideas?
 
This is indeed caused by your XML. Orion's original code simply isn't written to handle your custom settings. Mostly you need to make sure that the XML is making sense.
 
The current code is designed with a standard setup in mind. As long as any changes to the game are in line with the original setup, you should be fine. But anything breaking the logic would cause the mod-comp to falter. It could be something you've overlooked, or something you added by design. Either way the Inquisitor mod-comp isn't computing your setup.
 
Back
Top Bottom