Weapon Behavior code is currently monolithic, handling cooldowns, power consumption, ammo consumption, burst fire, heat generation, visibility, everything a weapon can do is contained within the hierarchy of weapon Behaviors. The same Behavior is used for both energy weapons and ballistic weapons, with certain stats being ignored depending on what kind of weapon the designer intends.
This runs completely counter to the composability philosophy of the Behavior system. The only thing a weapon Behavior should do is immediately fire the weapon when executed, and nothing else. Any other effects should be created by composing various other Behaviors in sequence with the weapon within that Behavior execution group. This almost certainly requires some modification to the Behavior execution system in order to make such composition more viable, but will enhance the flexibility of item design in the future.
For example, one thing which is currently completely impossible is for a consumable item to generate a weapon effect. The way things work right now also completely makes it impossible to implement the energy system overhaul for weapons, as the energy consumption is too tightly integrated with weapon behavior execution, meaning there is no way for energy scaling to intelligently affect the characteristics of a weapon's effect. In addition, all weapons would need to be IPowerConsumers, which means they would be exposed in the power management interface even if they are ballistics that use no energy, unless we were to implement an ugly hack to ignore zeroed power requirements, but that could cause problems down the line for items which only intermittently require any power, as those would still need to be power-managed.
It's just an ugly mess, and we can and should do better.
Weapon Behavior code is currently monolithic, handling cooldowns, power consumption, ammo consumption, burst fire, heat generation, visibility, everything a weapon can do is contained within the hierarchy of weapon Behaviors. The same Behavior is used for both energy weapons and ballistic weapons, with certain stats being ignored depending on what kind of weapon the designer intends.
This runs completely counter to the composability philosophy of the Behavior system. The only thing a weapon Behavior should do is immediately fire the weapon when executed, and nothing else. Any other effects should be created by composing various other Behaviors in sequence with the weapon within that Behavior execution group. This almost certainly requires some modification to the Behavior execution system in order to make such composition more viable, but will enhance the flexibility of item design in the future.
For example, one thing which is currently completely impossible is for a consumable item to generate a weapon effect. The way things work right now also completely makes it impossible to implement the energy system overhaul for weapons, as the energy consumption is too tightly integrated with weapon behavior execution, meaning there is no way for energy scaling to intelligently affect the characteristics of a weapon's effect. In addition, all weapons would need to be IPowerConsumers, which means they would be exposed in the power management interface even if they are ballistics that use no energy, unless we were to implement an ugly hack to ignore zeroed power requirements, but that could cause problems down the line for items which only intermittently require any power, as those would still need to be power-managed.
It's just an ugly mess, and we can and should do better.