[FEATURE] Custom Weapons & Weapon Archetypes #55
Labels
aircraft
Bug/Feature relates to aircraft.
feature request
Feature Request
help wanted
Extra attention is needed
long-term
Feature is expected to be developed over time as other features are added or fleshed out.
weapons
Bug/Feature relates to weapons systems.
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.
The text was updated successfully, but these errors were encountered: