One thing that the Morrowind Scripting Engine lacks is the ability to determine what NPC is in the player's crosshair at a distance. I have conceptualized two ways of achieving this effect, the only issue I have with implementation is my lack of mathematical and modeling skills. Here are the systems:
#1) "Blind Man with a Cane" Directly in front of the player is an invisible rod a couple hundred feet long that has a collision mesh. Once the player looks at an NPC and the "cane" touches, the script locates all the NPCs in the cell and gets their position. Knowing the position and orientation of the player along with the position of the NPC allows one to use some math to determine if the player is looking at the NPC or not. There are some other smaller details in this system that are there for the sake of optimization of the CPU, but that's the basics.
#2) "Projected Image" One issue with the above system has to do with the size of the NPC. The size can only be expressed as a + or - variation from the coord that the NPC is expressed as. In this system, the script determines which NPCs the player might look at based on orientation and FOV. An invisible box is then selected that best describes the size and shape of that NPC. The box is then "projected" from the position of the NPC to just in front of the player, scaling down so that the box is proportional to the size of the NPC at a distance. It's then rather easy to tell if the player is looking at that box, and therefore, the NPC. http://en.wikipedia.org/wiki/3D_projection#Perspective_projection
If you are good at math or modeling and have a free minute to help, I could really use it. 'Tis the only help I need in this. This will be released as a modding resource.