View Full Version : buildFighter in Events?


wotan321
Sep 14, 2007, 04:59 AM
I am having a crash a few turns in.

I have edited the mod, but I am hoping you can give me some insight into how I can fix the part I have broken. Here is what I get in my PythonErr.log
Traceback (most recent call last):

File "CvEventInterface", line 25, in onEvent

File "CvEventManager", line 198, in handleEvent

File "CvEventManager", line 451, in onBeginGameTurn

File "CvRtWEventManager", line 102, in turnChecker

File "CvRtWEventManager", line 1060, in buildFighter

RuntimeError: unidentifiable C++ exception
ERR: Python function onEvent failed, module CvEventInterface

I have added UUs, a few techs, some new events.

It loads fine, plays about 4 or 5 turns, then I get a CTD that blames the main EXE file.

What does the buildFighter module do? What would be the effect of editing it out of the CvRtWEventManager? Can I cure this problem while leaving it in?

I know I don't provide all the info you may need, but any help would be appreciated.

Dale
Sep 15, 2007, 02:34 PM
Did you change any fighters?

Anyways, I'll tell you what it does:
It helps the AI to have a decent airforce. A small cheat if you will. ;)

You can disable it totally by deleting the following lines from near the top of that python file:

# Fighters
if (self.Map < 99):
for i in range(gc.getMAX_CIV_PLAYERS()):
self.buildFighter(i)

wotan321
Sep 16, 2007, 05:09 AM
Thanks, I did that. I never could figure out WHY those lines caused a problem, it is doubtless some change I made that hosed it for me.

wotan321
Sep 17, 2007, 07:15 AM
Dale,

I wasn't able to figure out the problem with the Python that was crashing the mod for me. As mentioned, I simply ## out the lines for the BuildFighter stuff. I simply went back and halved the cost of all fighters to see if that would make a difference. Later on, I noticed my neighbors had 3 or 4 fighters circling each city, so I guess my little change helped. Every civ was not doing it, but some were, making bombing very costly for me.

Gwynin
Sep 21, 2007, 05:42 PM
Some testing games Ive been playing with beta 3 Ive seen cities with 15+ fighters on intercept, needless to say that my airfoce only was used for defense :)