A general advice first:
Are you aware of the
scripting documentation on the Wiki? Please take your time to ingest it (
all of it, basically) and some of the
general information on scripting, before you begin your project, and while you go along. Personally, when I'm OXPing, I have a lot of these Wiki documents opened and ready in over a dozen browser tabs for fast and easy referencing. I recommend this to all OXPers.
If you go through the documentation, you will soon notice that the
equipment
array is a standard property of
all ships in the game, as
documented here. The same goes for
forwardWeapon
and its three sisters, which I'm not going to link individually. These properties aren't even particularly new. They exist since Oolite 1.74 in June 2010. And when searching for a property of NPC ships, the
Ship
class documentation page is
really the very first page where you ought to look.
One of the first things I thought of upon seeing the changes implemented in 1.77 was that accuracy could be used as the basis of an Galactic Federation Elite rating for each NPC.
That's a fascinating idea, and I also like your approach going from accuracy, and taking weapons and equipment into account. This certainly makes sense.
A couple of things you should keep in mind, though:
1) Elite pilots are
rare. There are not many of them in the whole Ooniverse, not more than some handfuls. And not all of them will be flying all the time. They're more the stuff of legends than something that an ordinary space farer actually sees. And if he does get lucky enough to fly alongside an Elite pilot, he'll be bragging about it in ZeroG-Bars for the rest of his life. Thus an encounter with an Elite pilot should be exceedingly rare.
2) The system populator only adds ships with an accuracy between -5 and 5, if I'm recalling correctly. Thus, in the higher ranks you'll only have OXP ships that have their accuracy specifically set. Which effect this has on the rarity (or abundance) of "Deadly" and "Elite"-ranked pilots during normal game play I cannot say. But this is where I guess you will need to do a fair amount of balancing. I for one wouldn't want to fly in a Ooniverse where every second ship I meet is "Elite". If "Elite" pilots are a dime for a dozen, the whole ranking is in danger of losing its meaning.
3) The Elite rating isn't advertised, and I assume most Elite pilots to fly "incognito" almost all of the time. Whether someone is "Dangerous" or "Elite" can't be determined from the outside, other than by the look of their ship. And that one can be deceptive. I'd be totally opposed to a mechanism that for instance displays a pilot's Elite rating next to the ship name.
4) Therefore I'm a little skeptical with regards to basing combat tactics on the opponent's Elite rating, because usually this rating won't be known to anyone else. A pirate group will attack a single worn-down Cobra III, and will only find out that the pilot was "Elite", because they'll all be dead or disabled after the fight. This is—I think—how it should be, and it's also realistic.
5) When binding the Elite rating to the accuracy property, there's the problem of how you determine your opponent's accuracy in the first place. Yes, I know that the NPC script can just look it up, but that's not realistic, that's an exploit. In-Ooniverse, only magic could tell you how accurate your opponent is, before you've actually fought him. You will only find out through observation during the fight how often your opponent misses and how well he hits. You can't know that beforehand, and NPCs shouldn't be able to, either.
6) The same goes for equipment. You can't look into your opponent's ship and determine which equipment he has installed, and NPCs shouldn't be able to, either.
7) And finally: How will a pirate group measure their odds against the player by this method? The player ship's accuracy property does exist, but is meaningless. It doesn't allow any guess as regards the player's Elite rating.