Start BtS in debug mode (by setting CheatCode=chipotle in the ini file). Start a new game in the Future era. Now, press Shift+~ (tilde) to bring up the in-game Python console. You’ll need to find out the ID of the trigger you added. To do so, in the console, enter
Code:
import CvUtil
num = CvUtil.findInfoTypeNum(gc.getEventTriggerInfo, gc.getNumEventTriggerInfos(), ‘EVENTTRIGGER_CIV_GAME’)
print num
That will output the ID of the Civ Game trigger. It was 176 for me. You don’t have to enter the print num line, but it’s a way of checking if you did everything correctly. If it outputs -1, something went wrong. The same result can be achieved by using another function. Instead of the above, you could do
Code:
num = gc.getInfoTypeForString(“EVENTTRIGGER_CIV_GAME”)
print num
It’s essentially the same, but I prefer the first way for reasons I can’t explain myself. Anyway, when you’ve obtained the trigger number, you need to trigger it for yourself. In the Python console, do:
Code:
p = gc.getPlayer(0) p.trigger(num)
In single-player, the player with an ID of 0 is always the human, so the first line will give a reference to you. After the second line, a popup should appear just as if the event happened.
It’s important to note that, while the trigger() function can be used to forcefully activate a trigger, it will only work if the requirements are met. That’s why it was important to start a Future era game to test this addition – in the Future era, you already start with Computers. If you had started an Ancient era game, nothing would have happened after using the trigger() function.
Quelle:
http://civ4.wikidot.com/kael-xml-changes-bts#toc46