More attributes for weapons
Posted: Thu Feb 13, 2020 5:30 pm
From the discussion about missiles, missiles should be able to be shot down before they hit, and the change in the backend to allow this is not quite complex: involves separating the shots done on each bout into two phases, with a call to CullTheDead() in between, and making the missiles attack on the second phase (rest on first one). That way, if they get damage from flaks, interceptors, etc. on a given bout, they are removed before attacking anyone. If at any time in the future one wants to make another weapon shoot on that second phase, s/he will have to work with the backend, because there is no way to specify such behaviour in FOCS files.
When I was working on diversified weapons for a multi-theme tech tree, more than once I thought it could be nice to have ignoring-shield cannon variants, or even non-ignoring-shield fighters, but it wasn't possible to set that in FOCS because the backend has that attribute coupled to the part class: cannons (class = ShortRange) can't ignore shields, and fighters (class = Fighter) always ignore shields. I'd like those too characteristics specified in separate attributes.
There is also the matter of the combat ranges, that is a possibly incoming feature. Shall we want to implement that with current attributes of ship parts, class should be overloaded as with IgnoreShields.
So I'd like to add new attributes to ship parts
Already present:
* Class (for weapons: cannon/fighter/missile):
- Cannon: direct damage (beam/ballistic).
- Fighter: autonomous vessel, does not attack the bout it's launched, can be shot down.
- Missile: suicidal autonomous vessel, does not attack the bout it's launched, can be shot down, dies on first hit.
* Damage, fire rate / launch bay capacity, and ammunition / hangar capacity are represented with attributes that depending on the part being internal (hangar, ammo storage) or external (weapon, launch bay) mean one thing or the other. That's a bit confusing but it's fine if it saves some memory and CPU time. (These attributes, IIRC strength, capacity and secondaryStat, or something like that, are also reused for non weapon parts.)
* Targets.
I propose to add three new attributes:
* Range (Close/Short/Long):
- Long: shoots from first bout on.
- Short: shoots from second bout on.
- Close: shoots from third bout on.
* First Strike (yes/no):
- Yes: Shoots on first phase of each bout.
- No: Shoots on second phase of each bout (will not shoot if killed on first phase). Primarily for anti-ship missiles, maybe also for bombers and anti-fighter/missile missiles.
* Ignores shields (yes/no).
Current weapons are:
When I was working on diversified weapons for a multi-theme tech tree, more than once I thought it could be nice to have ignoring-shield cannon variants, or even non-ignoring-shield fighters, but it wasn't possible to set that in FOCS because the backend has that attribute coupled to the part class: cannons (class = ShortRange) can't ignore shields, and fighters (class = Fighter) always ignore shields. I'd like those too characteristics specified in separate attributes.
There is also the matter of the combat ranges, that is a possibly incoming feature. Shall we want to implement that with current attributes of ship parts, class should be overloaded as with IgnoreShields.
So I'd like to add new attributes to ship parts
Already present:
* Class (for weapons: cannon/fighter/missile):
- Cannon: direct damage (beam/ballistic).
- Fighter: autonomous vessel, does not attack the bout it's launched, can be shot down.
- Missile: suicidal autonomous vessel, does not attack the bout it's launched, can be shot down, dies on first hit.
* Damage, fire rate / launch bay capacity, and ammunition / hangar capacity are represented with attributes that depending on the part being internal (hangar, ammo storage) or external (weapon, launch bay) mean one thing or the other. That's a bit confusing but it's fine if it saves some memory and CPU time. (These attributes, IIRC strength, capacity and secondaryStat, or something like that, are also reused for non weapon parts.)
* Targets.
I propose to add three new attributes:
* Range (Close/Short/Long):
- Long: shoots from first bout on.
- Short: shoots from second bout on.
- Close: shoots from third bout on.
* First Strike (yes/no):
- Yes: Shoots on first phase of each bout.
- No: Shoots on second phase of each bout (will not shoot if killed on first phase). Primarily for anti-ship missiles, maybe also for bombers and anti-fighter/missile missiles.
* Ignores shields (yes/no).
Current weapons are:
- MD..DR: Cannon, LongRange, FirstStrike, TargetsEverything (or TargetsPlanetsShips), FireRate 1, Ammunition infinite.
- Gamma Burst Slingshot (incoming): Cannon, ShortRange, TargetsEverything, FireRate 3.
- Bomber: Fighter, LongRange, FirstStrike, IgnoreShields, TargetsShips, FireRate 2, Ammunition 2.
- Fighters: Fighter, LongRange, FirstStrike, IgnoreShields, TargetsShipsFighters, FireRate 2, Ammunition 3.
- Interceptors: Fighter, LongRange, FirstStrike, IgnoreShields, TargetsFighters, FireRate 4, Ammunition 4.
- Torpedoes: Missile, LongRange, TargetsShipsPlanets.
- Missiles: Missile, LongRange, FirstStrike, TargetsMissilesFighters.
- Cannons with different ranges (shorter range, greater damage) and fire rates (higher rates, smaller damage). This mostly for themed tech tree.
- Cannons with ammunition (need an internal part)?: can't be shot down, but can run out of ammo when out of supply.