In order to replace the current system (fire lasers of turret null) there are several problems to overcome.
- get attacker
Any "scripted" damage is not caused by THIS as far as the engine is concerned.
Therefore, a ship can not respond to such an "attack", neither does SIGNAL_ATTACKED fire.
set attacker may have to be used somehow to force the current attacker. No idea on the signal. - Any DPS accounting/creating script must be highly optimised or it may use massive amounts of CPU power.
Any realistic (aka complicated) system is hard to precompute. - Creating damage:
What damage is done, what hit percentage do lasers have, etc.
Let's assume these variables are known:- Laser Shield DPS
- Laser Hull DPS
- Laser range (add 2/3 of THIS get size ?)
- Laser bullet speed
- Laser special type (PSG, Flamer)
- Ship size
Possibly important since a Phoenix' lasers have an extra 2km reach from the ship's "position" - Target object class
- Target size
- Target speed
- Missiles.
Right now there is no defense against them.
A (dumbfire) Tornado will hit an M5 with 100 % certainty at 20 km range.
A cap ship with 6 turrets has no chance to intercept even the slowest incoming missile.
Stats known about missiles:- Speed
- Range
- all flags, such as Dumbfire or Swarm
This table could be updated 1 (or less) minutes after the ship goes OOS, then rechecked once after 5 and 10 minutes.
After that, no more changes are to be expected.
As a result of that, does the OOS weapon changing of AI ships need tweaking to be competitive with "properly" equipped player ships?
What exactly such a table should contain is the big question...
The more that has to be dynamically calculated at runtime (during combat) the bigger the slowdown.
Can weapons and/or targets be grouped into a few classes? If so, by which system?
I expect that cobbleing together a concept that at least works on paper will require more than a few bright ideas.
Oh, and vague white noise posts like "it should work like IS" are not going to be helpful. Thank you.