Hi, I don't know if this is the right place to ask, but is there any way we could get API support for playable fighters?
You might have remembered me asking about this a few months ago. By setting hull and collisionclass to FIGHTER, you get a broadly playable analog that behaves how you'd expect - but there are two major impediments to this approach that had me initially give up the concept. Instead I made "hybrid" ship, with frigate hullsize and fighter collision, but this had unintended effect of breaking lot of custom AI and other things, so I revisited this topic and was able to make something that was playable, outside of a few issues. I think if this support could be added, it would make it a lot easier for people to explore in the future and also eliminate the weird edge cases I experienced.
The main issue is that the game crash when ship tries to retreat from battles. I don't 100% know why except its caused by RetreatManuever(?), I assume there is no "retreat manuever" for fighters?.
The second issue is there is no real UI/HUD for fighters - for instance, a piloted fighter only appears as a green triangle on the command UI, so if you were to swap to another ship, swapping back to it, or commanding it is impossible.
In the mod I made, I was able to circumvent this by turning the "fighter" back into a frigate when it was within the retreat radius, and when the Command UI was open. But there are a few other edge cases where things get weird - this particular mod ship, for example, cannot be "disabled" like a normal ship can. It can be blown up in combat, and be knocked down to 0% hull, but always is recoverable, so I also had to add a condition where once HP is below 2% threshold, the hullsize reverts back to FRIGATE so it can be properly disabled.
Onto to the less pressing issues, there are no warnings for the end of peak performance/low CR and overloading(Either the warning that appears at the top of the screen, or over the ship), and no hull/flux indicators over the ship. With scripting and MagicLIB it's easy enough to atleast loosely replicate a hull/flux indicator, as well as an overload pop-up over affected ships, though.
Anyway, I have a simple(i think) proposal that should make a lot easier to implement for people who want to play around with this concept.
is there anyway to add something like a FIGHTER tag (like CARRIER tag) that could be used to give "playable" fighters special behavior? What MesoTroniK suggest, was if there was a condition evaluated (like if(ship.isPlayableFighter)), the default behavior of fighters could be preserved, but the boolean returning as true would allow for slightly different behavior. I'm just guessing since I have no idea whats under the hood of the AI implementation for retreat, but with something like this, I'd imagine something simple like switching the ship to frigate hullsize before it retreated or such could be done, or just having it do the same method normal ships do on retreat, as well as serving as a toggle that would let ships like this appear in the Command UI and retain a HUD Status bar.
Sorry again if this is not really the right place to ask.