Re: An idea for AI ship weapons
Yes, that would be convenient to have and make an AI modders life a little easier. I am not sure how easy that would be to implement.
However, something very similar can be modded already without any hardcode change. The answer is weapon numbers. Let's take the APB as an example. Currently it has weapon number 1 for all levels. If you'd break the levels apart a bit, say, give APB I-IV, APB V-VIII, and APB IX-XII weapon numbers 301, 201, and 1, respectively, the Narn (using weapon number 1) in the mentioned example would only use the APB, if they had level 9 or higher. You can introduce the APB in the mid-game at level 5 and skip the lower levels by using the 201. If you want to start with APB right away you'd use the 301. I have done something like this in Devnull Mod to break the high-energy weapons apart (Ripper-WMG). This way you can use Rippers without having to worry about them being "upgraded" to Incinerator Beams and you can also use WMGs without having to go all through the other weapons. You can even use Rippers and WMG at the same time, if you wanted.
Without any modding to the components there are some ways an AI modder can (more or less) prevent such things from happening, if he uses more ship designs. I assume the APB was meant to be used on the dreadnought and for full-tech games. So if the dreadnought had its own design (min. size 1000) and have the APB in the weapon list, while the normal design up to BB (max. size 800) didn't have the APB, then the battleship would still use the PPB. If the APB gets researched early enough to have a high level (maybe 9 or 10) before the DN is available, then the DN will start using a rather effective weapon right away. Another option can be "must have" abilities. For example, if Quantum Reactor is a must have for a design that uses the APB, then APB will only be used in the late game or at full-tech. Again, if the research takes care that several weapon levels of APB are researched before the Quantum Reactor, early levels of APB will not be used.
A combination of size restrictions and "must haves" can make an AI a little bit safer against unwanted tech either from ruins or from gifts of "benevolent" players. It can also be used to introduce a change of tactics and weapons for different ship sizes and use high levels of certain weapons right away (Ionic Dispersers and Null-Space, for example).
Rollo
|