Minimal Instructions For Python Changes?

deshelbr

International Playboy
Joined
Jan 7, 2003
Messages
455
Location
Azelatrof, Fanatica
I'm having a problem that is driving me insane and I was wondering if someone here can help. I want to make a mod using pythin scripting and I can't get any of my changes to happen.

I created a new directory in the MOD directory named "Quickplay2". Under that directory I've added a "Assets" directory and under that I've added a "Python" directory. I've copied the whole CvEventManager.py file from the regular Assets/Python folder into this directory.

OK, so then I open up this file and I change onBeginGameTurn like this:

def onBeginGameTurn(self, argsList):
'Called at the beginning of the end of each turn'
iGameTurn = argsList[0]
CvTopCivs.CvTopCivs().turnChecker(iGameTurn)
popup = PyPopup.PyPopup()
popup.setBodyString( 'Testing Testing' )
popup.launch()

I deleted everything from the cache directory and I start the mod. Everything looks fine except I never see the "Testing Testing' message when turns begin.

The more general problem is that I just can't get any of my python scripted changes into the mod, but the "Testing Testing" message is just me trying to figure out if I can get anything to work.

I guess I have completely missed some crucial step to making a mod, but I don't know what it is. Can anyone here point out where I've screwed up?
 
Have you got errror messages enabled? It could be that you've got something wrong (like indentation), but because you've got the error messages disabled it's not telling you, and hence not working.

The method you decribe seems a correct one to me.
 
Do you have anything in your custom assets folder?

Do you actualy load the mod when you launch the game?
 
Top Bottom