Modder warning - potential range check errors
I have discovered a way you can introduce range check errors with a mod that folks might want to be aware of. I got used to being able to lay all the mines I could carry from a transport full of cargo bays with only one mine layer component, so when MM changed it to 1 per turn per mine layer component I modded it back. I gave the mine layer components a per strategic turn launch ability of 3056, which was calculated to support a large transport loaded with Mine I's. Got through a full game without any problems.
Second game with this mod installed, I tried a stategic experiment: play like a neutral race until some AI creates first contact by entering my home system. This allows the AI's to get really big & advanced, even though the game started at low tech. I started getting RCE's during the AI's turns. Investigation showed that every RCE was the result of a dreadnought-hulled mine layer (loaded with max mine layer components - the one I counted had 26) trying to remote launch mines.
I theorized that there is some number the program uses for how many mines a particular ship can launch in a turn, and if this is too big (probably bigger than the word size allotted) an RCE occurs even though the number of mines actually being launched is very small (none of them had more than 10 mines aboard total). So, I changed the number in components.txt from 3056 per strategic turn to 459 (calculated to support a large transport carrying Mine III's). No RCE's since this change.
The long-term fix will be to edit all the AI design files to design mine layer ships the way I do, then put the value back to 3056.
Anyway, it looks like there are some inherent maximum values of the parameters in the text files that can bite you.
[This message has been edited by Barnacle Bill (edited 28 January 2001).]
|