Orion's Inquisition Mod

I'm sure you have already gone over this, but I couldn't seem to find it in this thread. What file is this you are referencing here:

Remember this?

If you don't want to use the DLL, this is all you have to do! All marked in Red...

Code:
from CvPythonExtensions import *
import CvEventManager
[COLOR="red"]# import AIAutoPlay
# import ChangePlayer
# import Tester[/COLOR]
import InquisitionEvents
#INSERT IMPORTS


gc = CyGlobalContext()
#INSERT DEFINES


#################### INITIALIZER ###########################
class CvCustomEventManager(CvEventManager.CvEventManager, object):
	def __init__(self, *args, **kwargs):

		super(CvCustomEventManager, self).__init__(*args, **kwargs)

		# map the initial EventHandlerMap values into the new data structure
		for eventType, eventHandler in self.EventHandlerMap.iteritems():
			self.setEventHandler(eventType, eventHandler)
				# --> INSERT EVENT HANDLER INITIALIZATION HERE <--
		
[COLOR="Red"]#		AIAutoPlay.AIAutoPlay(self)
#		ChangePlayer.ChangePlayer(self)
#		Tester.Tester(self)[/COLOR]
		InquisitionEvents.InquisitionEvents(self)

...Then discard these files:

CvInfoScreen.py
AIAutoPlay.py
Tester.py
ChangePlayer.py
CvGameCoreDLL.dll


Orion Veteran :cool:

I need to get this merged without a DLL. Thanks.
 
Alright, I found it, so I deleted the listed files and then commented-out the stuff you said to. That's all I have to do? I just want to make sure that is correct before merging this in.

Damn, I just realized you have inquisitors for each religion separately. My mod has like eleven new religions in it, so how do I edit this to work appropriately? Which files do I have to alter?

I also should note that I am using NextWar as a base for my mod, and when I tried to do the python there were a lot of conflicts. I am not sure if I merged it correctly. Are the things I need to merge marked, and if so should I only merge those things over? I am using WinMerge so it shows me all of the conflicts, and I wasn't really sure which ones to merge over and which ones to leave, so hopefully I did it right. But if I didn't could you tell me if they are marked and which code NEEDS to be involved? I know that is kind of a tall order, but it would be helpful to me if you could let me know what to do in that regard.

EDIT: Ugh, my first attempt was riddled with problems. I got a horsehockyload of python error pop-ups and then it wouldn't let me go into the Civilopedia. So I guess I'll make another attempt. :sad:
 
Alright, I found it, so I deleted the listed files and then commented-out the stuff you said to. That's all I have to do? I just want to make sure that is correct before merging this in.

It is almost that easy. You have two more lines to comment out in the CvMainInterface.py file: Lines 2815 and 2816, then it will run.

Damn, I just realized you have inquisitors for each religion separately. My mod has like eleven new religions in it, so how do I edit this to work appropriately? Which files do I have to alter?

See post 177

I also should note that I am using NextWar as a base for my mod, and when I tried to do the python there were a lot of conflicts. I am not sure if I merged it correctly. Are the things I need to merge marked, and if so should I only merge those things over? I am using WinMerge so it shows me all of the conflicts, and I wasn't really sure which ones to merge over and which ones to leave, so hopefully I did it right. But if I didn't could you tell me if they are marked and which code NEEDS to be involved? I know that is kind of a tall order, but it would be helpful to me if you could let me know what to do in that regard.

Sure. I'll do my best to help you out.

EDIT: Ugh, my first attempt was riddled with problems. I got a horsehockyload of python error pop-ups and then it wouldn't let me go into the Civilopedia. So I guess I'll make another attempt. :sad:

The Inquisition mod has modular python, while Nextwar does not. You will need to either convert Next war to modular python or convert the Inquisition mod back to non-modular format. There are previous discussions with StategyOnly on how to convert the python, whether modular or back to non-modular format. See posts 208, 220, 264 and 328.

Respectfully,

Orion Veteran :cool:
 
What is modular python?

Take for instance the CvEventManager.py file.

1. Non-Modular format includes all of the functions in the CvEventManager.py file.

2. Modular format includes only those functions that have been modified in the CvEventManager.py file and puts these functions in a new file. In this case you have the 8 modified functions placed in the InquisitionEvents.py file and you have a standard Event Manager file called CvCustomEventManager.py. The advantage to this format is that only the modified functions are included in the InquisitionEvents.py file, so it makes it easy to determine what functions are new.

Orion Veteran :cool:
 
So basically I have to merge the code from the InquisitionEvents.py into the CvCustomEventManager.py?

Now as far as the rest of it goes; if I am NOT using the Better AI (or whatever it is called) as you described before, what code do I use from the other python files? Are they all marked or is there some code/changes to code that are not marked?
 
So basically I have to merge the code from the InquisitionEvents.py into the CvCustomEventManager.py?

Now as far as the rest of it goes; if I am NOT using the Better AI (or whatever it is called) as you described before, what code do I use from the other python files? Are they all marked or is there some code/changes to code that are not marked?

No. You merge the all functions except the first function from the InquisitionEvents.py file into the CvEventManager.py file. Also merge all functions from the InquisitionGameUtils file into the CvGameUtils.py file. You will need to delete CvEventInterface.py and the CvGameInterfaceFile.py files. All of the rest you will need.

Orion Veteran :cool:
 
I have one other issue for this. I notice you have an inquisitor for each religion (rather than a general inquisitor), well I have added a bunch of reilgions to my mod (like JARM), so my question is whether or not I have to alter python files to add these new inquisitors or if I only have to edit XML?
 
^You'll have to do that, but I remember he made it a lot easier than it was before (unfortuantely I forgot how, but it should be either in the first post or somewhere in this thread).

I think the only changes you'd need to do are XML, if I remember correctly; he put a place in the python where there's a list of all the religions, and you just need to tack on the appropriate XML tags, and voila, no hard work needed.

EDIT: Although that'd mean you have to have your own inquisitor units/reskins/whatevers.
 
^You'll have to do that, but I remember he made it a lot easier than it was before (unfortuantely I forgot how, but it should be either in the first post or somewhere in this thread).

I think the only changes you'd need to do are XML, if I remember correctly; he put a place in the python where there's a list of all the religions, and you just need to tack on the appropriate XML tags, and voila, no hard work needed.

EDIT: Although that'd mean you have to have your own inquisitor units/reskins/whatevers.

That's correct: The XML is standard. For Python, you add one line, per new religion, to the dReligionData dictionary in the Inquisition.py file. The most difficult part is reskinning the new Inquisitors.

Orion Veteran :cool:
 
Alright, well I plan on adding this to my mod after I finish up all the LHs I have to make (I have made three out of the twelve so far, with a fourth nearly finished) and then I have to add BUG to my mod, and THEN I think I am going to put in the Inquisitors. So don't get upset if I come back in a few weeks and have more questions. :goodjob:

I really liked the last version of this I played, and I can't wait to get this in, I appreciate the work you've done.
 
Alright, well I plan on adding this to my mod after I finish up all the LHs I have to make (I have made three out of the twelve so far, with a fourth nearly finished) and then I have to add BUG to my mod, and THEN I think I am going to put in the Inquisitors. So don't get upset if I come back in a few weeks and have more questions. :goodjob:

No problem. I think a lot of people might be interested in your 12 new inquisitor units, including me. Perhaps you might post the skins when you are finished. :please:

I really liked the last version of this I played, and I can't wait to get this in, I appreciate the work you've done.

Thank you for your kind words. :)

Sincerely,

Orion Veteran :cool:
 
Hey, I don't know if I asked this before, but what would I need to do to remove the Malleus Maleficarum wonder, python-wise? Would it be very difficult?

Thanks in advance. :)
 
Hey, I don't know if I asked this before, but what would I need to do to remove the Malleus Maleficarum wonder, python-wise? Would it be very difficult?

Thanks in advance. :)

Remove the reference entries in:

CIV4BuildingInfos.xml
CIV4BuildingClassInfos.xml
CIV4ArtDefines_Building.xml
CIV4ArtDefines_Movie.xml
CIV4GameText_Inquisitor.xml
Wonders.py

Delete the following folders:

Malleus Maleficarum:
Movies

All references are clearly documented.

Cheers,

Orion Veteran :cool:
 
Alright, so just to make sure, there is only one python file to take care of? Wow. That's easier than I thought.

Thanks a lot, man!

EDIT: I noticed in the Wonders.py there was some code concerning the Great Bath and Petra Monastery Wonders. I'm assuming that these wonders do not appear in the game at all, and the code for them can be removed... right?
 
Alright, so just to make sure, there is only one python file to take care of? Wow. That's easier than I thought.

Thanks a lot, man!

You are welcome.

EDIT: I noticed in the Wonders.py there was some code concerning the Great Bath and Petra Monastery Wonders. I'm assuming that these wonders do not appear in the game at all, and the code for them can be removed... right?

Petra and Great Bath were tests. So yes, you can delete those references.

Orion Veteran :cool:
 
I successfully removed the Malleus Malifarcium wonder-thingy! THanks for the help. :D

Anyhow, I also have another quick question (hopefully a pretty simple python thing) - at the beginning of a game there is that screen which pops up, listing the 4 variables in the GlobalDefinesAlt; how would I stop that screen from popping up?

Thanks in advance,

cybrxkhan
 
I successfully removed the Malleus Malifarcium wonder-thingy! THanks for the help. :D

Anyhow, I also have another quick question (hopefully a pretty simple python thing) - at the beginning of a game there is that screen which pops up, listing the 4 variables in the GlobalDefinesAlt; how would I stop that screen from popping up?

Thanks in advance,

cybrxkhan

Open the InquisitionEvents.py file. Find the onGameStart function. Comment out the following line:

Inquisition.DisplayOCCStatus(iPlayer)

That's it.

Orion Veteran :cool:
 
Alright, sorry to bother you again, but it seems I'm encountering a small problem - I think it's just a simple python thing, hopefully.

Anyhow, I'm trying to remove the AIAutoPlay and the dll. As posted in earlier posts, I have commented out the necessary lines in CvCustomEventManager, and I have also removed the specified python files and the dll.

However, when I do so, the game loads fine - except that there is one issue. I can't see the scoreboard. I double-checked, tripled-checked, quadruple-checked, I started over from scratch not just once but 5 times, but every time I try to follow the previous instructions to remove the dll, I still can't get the scoreboard up, no matter what I try.

I have attached an image just in case you don't know what I mean.

I am safe to assume that this is a very small thing that can easily be solved, right? :confused:


Thanks in advance,

cybrxkhan


P.S. Also, it seems that religions are founded randomly (i.e. I play a normal game, but when I discover Meditation, I could found Islam or Christianity, even though I didn't do custom religions). Is this also due to me removing or incorrectly modifying some parts of the python, or was this a game feature you added? Thanks, again.
 

Attachments

  • MessedUpInterface.JPG
    MessedUpInterface.JPG
    122.6 KB · Views: 67
Top Bottom