Open NodokaHanamura opened 1 year ago
I have assigned a lot of the people who are active (and semi-active) to this issue as we should address this collaboratively.
I don't expect for us to implement this overnight - far from it - in fact, this is something that we should refine and mature until it is ready for a preliminary feature release and building it up as we work on other features.
I'm thinking we will want glide and parachute weapons as well. Any idea if we could implement laser guidance? Currently if a weapon reaches end of fuel it disappears, how about adding a "you didn't hit anything, de-spawn after x time".
I'm thinking we will want glide and parachute weapons as well.
Yeah, we can definitely implement that as behavior that can be part of the stock types.
Any idea if we could implement laser guidance?
We'd have to make it a seperate issue, but we could.
Laser and EO would effectively be the same, with the difference being the former broadcasts a target coordinate over a 'code channel' which missiles can receive targeting data from and guide towards as long as they're in launch range. Lynn and I were talking, and they suggested reimplementing the turret code and adapting it to work for a baseline for a Laser designator code, but that'd require discussing in its' own issue.
Currently if a weapon reaches end of fuel it disappears, how about adding a "you didn't hit anything, de-spawn after x time".
Currently, I think it'd be better if we have a check to see if the missile: A. Makes contact with a flare (since right now flares and chaff are one and the same) B. within 300m for one reason or another, the rate of closure goes negative (implying that the missile failed to hit C. No longer has the original target within a 10 degree (later definable when we implement weapon sensors) FOV.
Addenum - we may want to allow server owners to blacklist certain weapons.
Feature Description Implement a framework for custom weapons, and a new 'weapon archetype' system to replace the existing static weapon codebase. How would this function work? The framework would work similar to how we already have dats for aircraft and some ground objects such as SPAAGs and the sort.
There will be (initially) two components to these weapons:
Later, once if, and when we implement lua scripting as a feature for gamemodes, this can be extended for special weapons that are capable of providing multiple features or advanced guidance, such as cruise missiles with terrain following capability, or weapons with special animations for firing, like a railgun or anything of the sort. (Lest we forget about the magical girls..)
Why is this feature important?
Custom weapons has been an oft requested feature within YSFlight's history, and with its' rudimentary implementation by JTF108, it is entirely possible to implement custom weapons, but through the above method, this allows for end-user customization.
Concerns about compatibility are to be had, yes - and eventually client-side matters can be dealt with by developing a back-compat tool for converting aircraft targeting YSCE being made available for base YSFlight if one so desires - regardless, due to the server-authoritative nature of YSFlight, it is unlikely that implementing this framework will cause incompatibility with multiplayer.
This is because as shown below, all YSCE weapons must declare the WEPLGCYNAME variable value, and it must match one of the preexisting YSFlight weapon types, which in YSCE, for backwards compatibility with existing aircraft, will be reimplemented as close to their stock values as the new system allows.
When YSCE acts as a server, it will initially declare the weapon's legacy name as the weapon used, with a packet sent either on a second port or in such a way that it does not cause erroneous behavior in stock YSFlight, with the actual weapon type. if it does not exist on the client, it will fallback to the legacy version. If it does, its' visual model will replace the existing model (since DAT computation is not done on the client for non-local aircraft)
Any examples as to how this feature would work? An example weapon archetype DAT is shown below, and is to be considered a prototype. Not all variables are required for implementation (for example, WEPCLSLT doesn't need to be defined for an AGM-88.) and is only used as a technical design concept for capabilities of the framework, and may be expanded upon or revised.