Whow, this thread is pure gold when trying to learn the first steps into CIV4 mofifications. Thank You, Baldyr, you did really a great job with this!
Actually I love this rebel theme and want to use it in my further civ4 games. And with the help of this guide it is possible even to do some small improvements too.

I have some experience in C, but to write the magic "Hello world" program is one thing (yeah, I know, programming is just debugging an empty file) and to get it compiled & linked & run another ...

... the part describing the EventManager entries helps so much!!!
Of course I have some questions:
1.) How would the popupMessage look like, if it transports a parameter?
modPopup.setBodyString(popupMessage, iNumRebels)
(with
popupMessage = "This city is threatened by %% rebels"
iNumRebels = 2)
--- just wild guessing.
2.) I suppose variables assigned outside of checkTurn() keep their value from one turn to the next?! So I can simply define a turncounter outside and handle it inside:
Code:
<TD class=code>
iturn_counter = 15 + cyGame.getSorenRandNum(10, "rebels tci")
def checkTurn():
if iturn_counter > 0: # no rebelion this turn
iturn_counter -= 1
return False
else:
iturn_counter = 15 + cyGame.getSorenRandNum(10, "rebels tc")
"""Checks if the CyCity instance is valid for the rebels event."""
...
</TD>
Would this work? I like it better to have those 20 turns just on average.
3.) I don't want to burden the AIplayers with additional fighting. How would I make the whole joy for the human player(s) only? something like:
pyHuman = PyPlayer(gc.getHUMAN_PLAYER())
??