I'm currently working on the turret minigame in KotOR I. My goals in order of priority are:
Make the game more challenging
Scale the challenge of the minigame with your difficulty setting
Improve graphics, effects, and audio
Diverse enemy types
Remove "random" encounters and make it so the battles occur:
Once when leaving Taris
Once when arriving per planet
Once when leaving per planet
Once when escaping the Leviathan
Once when approaching the Star Forge
Unique stages - not always be six interceptors flying the same loops around you, but different numbers and types of ship, different skybox and eyecandy, different movement for the Ebon Hawk, different objectives (escape, survive, destroy x many fighters in a certain amount of time)
Persistent health - don't take too much damage, or it will be there next time you fight! You must go to a specific location to receive ship repairs, or leverage your own (or companions) repair skill to "heal" the ship
Experience gains for destroying fighters
A questline with T3-M4 that allows you to upgrade the ship's health
A vendor to install more powerful and unique-looking turrets on your ship
While all of these goals are achievable based on what I've observed by going over the data, I know that it's easy to over-promise and under-deliver. Therefore these are mentioned as "possibles". Those in bold above are almost complete. I mention the other goals because I'd like to describe how these could be achieved if my other commitments make it impossible for me.
So, I will go over the more ambitious goals in case future modders are interested in how to implement the changes.
Remove "random" encounters and make it so unique battles occur
This one is pretty easy. At the moment all minigame encounters use exactly the same module: M12ab. Even the battle that occurs over Taris, with it's unique skybox and background Leviathan is still just M12ab. What is actually happening is some scripting that occurs when the encounter is being loaded. When going in to the minigame, KotOR is evaluating your global variables to determine what skybox and audio cues to use (or in the case of the HK-47 practice, whether to apply the holographic visual effect) - in the case of the Taris escape, an animation is actually playing on a loop around you that gives the appearance of the starfield, Taris in the distance, and the Leviathan hovering nearby. This animation can be found in m12ab_01a.mdl/mdx. I've cut out a section of the animation to show you the awesome model that comes in the mdl:
In order to create unique encounters, my thoughts are to either create new modules from copies of M12ab, or to use expanded scripting to make the existing module more flexible. I haven't yet tried duplicating the module and seeing how it would effect things, but that's next on my list. If you wanted to go very basic though, you could just use MDLedit to modify m12ab_01a.mdl, and change the LSP_planettari01 texture mentioned in it to some other planet texture.
I'm completely new to modelling and haven't animated a thing, so just how far I am able to go with this and how much I can learn is anyone's guess. However if there are any talented animators out there who wanted to create a unique animation for a space battle encounter that takes place prior to boarding the Star Forge, you can find an *awesome* Hammerhead model from KotOR II in 104PERg.mdl:
This would come down to scripting. It's possible to decompile all scripts apart from the heatbeat script (thanks to Thor110 for decompiling all the others). Inside the scripts, you can play around a lot with when the encounter ends and under what conditions. Even in the M12ab.are file, it is possible to do a lot with the nature of the encounter. To give you some examples of what is definitely possible:
Spawn fewer enemy fighters - this is a simple matter of deleting the enemy structures in the .are:
Make the Ebon Hawk fly around - this can be done by changing the track listed under the player structure. You could "hijack" the track of an enemy structure, or create your own custom one in Blender. I've had an absolute blast give the Hawk the m12ab_mgt06 track, making it progress at 1/4 speed, and playing the turret game in a moving ship, with interceptors flying all around me
Make the enemies faster
This can be done by editing the enemy tracks in blender - just shrink down the animation to play over a fewer number of frames. At the moment, the interceptors in my modded game are flying around 33% faster, and boy oh boy does it make the game better
GIve enemies more hp, more powerful weapons, more rapid-firing weapons, or unique models
Again, just a matter of making changes to the .are. At the moment, I have 4 normal fighters and 2 "elite" fighters that are colored the same red as the Sith heavy troopers. The elite fighters absolutely rip you apart - they deal +33% damage, fire twice as fast, and have double the hp, so I'm having to actually think in the game and prioritise targets.
Make the enemies chase you while the Ebon Hawk performs evasive manoeuvres
This is just a matter of editing those tracks. I'm no animator/modeller but this would appear to be the most achievable change to make to the game even as an amateur (though it does require that unique copies of M12ab can be created and function, something I have not tested). What you could do for example is create a simple track that would float up and down and side to side, then copy that and move the track back and to the side by a certain distance, maybe give it an additional keyframe at the start so that it gives the illusion of following your ship movement rather than mirroring it. Naturally if the interceptors were behind you the whole time they would rip you to pieces - at this point I am playing around with the possibility of scripting to adjust the frequency of their shots. Inaccuracy is a good variable to adjust - it is a percentage chance to miss you, so this would make prolonged fire from interceptors survivable. Rate of fire is another that would work in this type of situation, it is something like number of shots per second - however in a tail pursuit this may make the fighters shooting you seem a bit odd if they are either constantly rapid-firing or firing on a precision perfect shoot-wait x seconds-shoot-wait x seconds pattern.
There's a lot more I want to say about modding this minigame but I've just looked at the clock so it will have to wait. Suffice to say that there is a LOT of unused potential in KotOR from this game, that was very likely left on the wayside by BioWare due to time constraints.