You should not be assigning a random event's Python function to a game event of any sort. Random events run their own checks independent of game events. The two things have nothing to do with each other, directly. The Python functions that are called by the DLL for event triggers, and events, go in CvRandomEventInterface.py. That is where the random event stuff in the DLL looks for the function names that are given in the XML, so that is where they need to be. As an aside... You can manually activate a "random" event trigger (in which case it is not really random) in a game event handler. The Partisans event that happens when a city is razed is done this way. See the BtS CvEventManager.py file's onCityRazed function. That fires off the trigger, which then applies all of its criteria (like the TechPrereq) and, if it passes, does what it does. But you should not need to do that, since the example in the tutorial doesn't and what you are doing is pretty much exactly the same sort of thing it is doing.