Gaius Octavius' Civ Specific Great People Mod

J.Rowand

Chieftain
Joined
Aug 26, 2008
Messages
21
Gaius Octavius made this awesome mod where great people were civ specific. Sojourner Truth wouldn't be born in Babylon, for example, an influential Babylonian mystic would instead. The download has been down forever, I could only get these files by taking them from another mod and they don't seem to work by themselves.

I have tried to figure out Python, but it is way over my head. Does anyone know how to get these to work, specifically with Varitas Delectat. Thanks for your help.
 

Attachments

I didn't look at the files, but your pretty much have to put the .py files into the \Beyond the Sword\Mods\Varitas Delectat\Assets\Python\ folder. Then you have to connect the CvCivSpecificGreatPeopleModEventManager.py file to the CvEventManager.py file of the Varitas Delectat mod. But it could be way trickier than that - I haven't actually looked into it. (I don't have VD on my own system so it wouldn't do much good anyway.)

It could simply be a matter of adding a couple of lines of code into the Event Manager.
 
Yeah, the files are in the right place, and I've tried looking at the CvEventManager.py but I can't see where anything from CvCivSpecificGreatPeopleModEventManager.py would fit in.
VD doesn't actually have any python components, so that shouldn't be a problem right?
Anyway, thanks for your help.
 
Note that you need a copy of the CvEventManager.py file for your mod. This is the entry point for the game, so to speak. It is from this file all calls to other .py files are made.

I'm not even sure you need CvCivSpecificGreatPeopleModEventManager if you copy-paste all calls to CivSpecificGreatPeopleModNameUtils in the corresponding place in CvEventManager.

I guess this is confusing stuff when you don't know any Python...
 
I've got the CvEventManager.py in place. I've tried sticking the entries from the modEventManager into it several different ways, but like I said there doesn't seem to be any place where they fit in. Sorry, I'm just a real imbecile when it comes to this kind of stuff.
 
Looking at the custom Event Manager I realize I was wrong. What you need is some code in CvEventManager that calls on the custom Event Manager whenever a GP is created in the game. And to do that you need to know programming. And to figure out how these Event Managers operate you need to know some pretty advanced programming. Sorry. :p

Unless you're looking to get into Python programming, because then you will eventually be able to get the job done. Are you?
 
Shoot.
I've learned a little bit as I've gone along, but I am close to reaching my breaking point. In the mean time I am going to try and extract this freakin thing from another mod. Gaius Octavius included this in a WWII mod he made. Is there anything else I should look at besides the ModEventManager?
 
*bang!*

I've learned a little bit as I've gone along, but I am close to reaching my breaking point.
If you spent more than 10 hours on this thing then you could have learned pretty much all you ever need to know about Python as such - for modding purposes anyway - in that same amount of time. So thats wasted time.

In the mean time I am going to try and extract this freakin thing from another mod. Gaius Octavius included this in a WWII mod he made. Is there anything else I should look at besides the ModEventManager?
Yeah, look in the CvEventManager.py file for the WWII mod. There should be a import statement at the beginning of the file referring to the GP Event Manager, and then there should be a bunch of code under the definition line for "onUnitCreated", ending with a call to the GP Event Manager.

Try copy-pasting that stuff into your CvEventManager.py file.
 
Point taken.
I'll see what I can do, and then I'm going to have to take a break before my head explodes. If I can't come up with anything, then I'll immerse myself in what looks to be quite a comprehensive tutorial.
Thanks for all of your help.
 
If you post the onUnitCreated part of CvEventManager for the WWII mod I could probably point out what code you need to copy-paste. But this merging business is really hard if you don't know what it is you're actually doing.

Also, enabling Python Exceptions is a must for modding. Otherwise you won't know why things aren't working. And most of the time they aren't. Remember that as long as the game is throwing tantrums, I mean exceptions, your code isn't working and you need to fix it. Otherwise there will be unforeseen consequences down the line. (Because all Python basically stops working once an exception occurs. Any number of things might get screwed up, a lot like switching off the computer in mid-game.)
 
Thanks for the info about the python exceptions.
This is the Unitcreated thing:
Code:
	def onUnitCreated(self, argsList):
		'Unit Completed'
		self.parent.onUnitCreated(self, argsList)

		dw.updateExtraUnitCosts()

But this WWIIEventManager is also different from the standard one. It starts with this,
Code:
 class CvWWIIPacEventManager(CvEventManager.CvEventManager, object):
	def __init__(self, *args, **kwargs):
		# initialize base class
		self.parent = CvEventManager.CvEventManager
		self.parent.__init__(self)
		super(CvWWIIPacEventManager, 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 <--
		CvCivSpecificGreatPeopleModEventManager.CvCivSpecificGreatPeopleModEventManager(self)
 
Ah, that was the onUnitCreated from CvWWIIPacEventManager, right? What does the CvEventManager entry look like?
 
I would bet this is designed to work with Dr. Elmer Jiggles's CvCustomEventManager which you can find here. It is a replacement for CvEventManager that allows you to "plug in" other event managers.
 
Back
Top Bottom