Integer Overflow caused by modding counter-intel
I just discovered that if you mod the intelprojects.txt, it's not a good idea to set the Effect Amount of a counter-intelligence project too high. The game will crash with an integer overflow error when another empire uses an intel attack against the empire that is using the modded counter-intelligence project.
I wanted to create a race that is immune to intel attacks, so I made a racial trait that gives a new counter-intel project with Effect Amount = 3000. That doesn't work, and I had a difficult time figuring it out because the game doesn't crash until turn #100 or so when intel projects start being used. I kept thinking that I had too many planets or something, but that wasn't the cause. After wasting a lot of time unsuccessfully going back to saved games, then starting new games and having them also crash, and then re-installing SEIV, I finally figured it out. Once I set the effect amount to a smaller number, it no longer crashed.
It's strange that SEIV accepts really big numbers for the cost of intel projects but not for the effect amount.
|