a threat fulfilled
Back in March of last year, I posted the Complete Guide to Spob-Based Weapons, and said that if I got a positive response, I'd do a guide to submunitions. Well, I didn't get much of a response at all, but an old post I read a few days ago got me started looking at submunitions again. A couple days of testing later, here's the guide. It's a wee bit longer than the last one:
---------- INTRODUCTION ----------
Weapon submunitions are a powerful feature of Nova that allow you to have a weapon transform into one or more copies of another type of weapon (or the same weapon, which is called "recursive submunitioning") when the first weapon either reaches the end of its life or hits a ship. Uses for this include having a missile split into many sub-missiles when it nears a wing of fighters, or having a weapon shot suddenly change its behaviour after a certain period of time.
This guide is an in-depth explaination of how submunitions behave. Any questions you have about submunitions should be answered here. If they aren't, please let me know, so I can add in the answers.
The guide is divided into four sections:
Weapon Types: The basics of how each weapon type acts when used as a submunition.
Fields: Explains just what each submunition-related field does.
Flags: The behavior of a few submunition-related flags.
Other Notes: A few points about submunitions that don't fit very well in any other section.
---------- WEAPON TYPES ----------
------------------- Behaviors of Weapon Types:
Unguided: Fires as if from a motionless ship positioned at the point where the submunitions are created. That is, if two submunitions appear when a shot dies, one going forward, one going back, they will move at the same speed relative to the system background.
Guided: Acts like Unguided, except:
If the firing ship had no target selected when they fired the original weapon, guided submunitions will fly straight and not impact any ships (unless they have the "Any Ship Triggers ProxRadius" flag set).
If the firing ship did have a target selected when they fired the original weapon, any guided submunitions will lock onto and follow that target.
If one of the stages of the weapon is created with the "fire at nearest target" flag, subsequent guided stages will track that target (see below).
Beam: Acts exactly like Unguided, except that there is no fading effect from the FallOff field. Repeat: Beam-type submunitions create projectiles , not beams.
Turreted Beam: Acts exactly like Beam.
Turreted Unguided: Acts exactly like Unguided.
Freefall Bomb: Acts exactly like Unguided.
Free-flight Rocket: When it is created, it starts out with the velocity of the parent shot, and then accelerates until it is going at its maximum velocity relative to the system background.
Example: The first stage of a submunition chain is an unguided shot with a Speed of 1000, and the second stage is a free-flight rocket with a Speed of 0. When the first stage expires, the second stage will be created traveling at the same speed as the first stage. The second stage will then decelerate until it is completely motionless.
Front-quadrant Turret: Acts exactly like Unguided.
Rear-quadrant Turret: Acts exactly like Unguided.
Point Defense Turret: Acts just like Unguided, except that it can only hit guided weapons, not ships (even if they have the "Vulnerable to PD" flag set). However, if you set the weapon's "Proximity Triggered by Any Ship" flag, and ProxRadius is greater than 0, it will impact ships properly, regardless of whether the ships are "Vulnerable to PD".
Also, it seems that the "Immune to Point Defense" seeker flag only applies when the PD weapon is an initial shot (fired directly from the ship)- PD Turret-type submunitions can hit guided weapons regardless of whether or not they have that flag set.
Finally, once a PD Turret has been used in a chain of submunitions, all subsequent Guided weapons will be unable to track ships, and no subsequent weapon will be able to use the "Fires at Nearest Ship" flag.
Point Defense Beam: Acts exactly like Beam. Cannot hit guided weapons, can hit ships regardless of whether they have the "Vulnerable to PD" flag set.
Carried Ship: Acts exactly like Unguided. Repeat: Creates weapon projectiles, not ships.
---------- FIELDS ----------
Quite simply, this is the number of submunitions created when a shot dies. Any number higher than 0 is valid, although you should keep in mind that there can only be 128 shots in a system at a time.
The RID of the weapon to be created as submunitions when a shot dies. Despite what the Bible says, beams and carried fighters do not cause problems as of Nova 1.0.9 (see above for what they actually do).
SubTheta is the amount of inaccuracy in the direction a submunition is fired. It is applied to submunitions of the weapon for which it is set, and the submunitions' own Inaccuracy field is ignored.
For all submunition types, if SubTheta is positive, each submunition will shoot at a random angle up to SubTheta degrees to each side of straight ahead.* So, if forward-shooting cannon has a SubTheta of 90, its submunitions will fire in any direction in a 180 degree arc forward of the firing ship.
If SubTheta is negative, then the submunitions will be evenly spaced, with absoluteValue(SubTheta) being the angle between each shot. (I.E. if a weapon has a SubCount of 2 and a SubTheta of -90, then the submunitions will appear with one going 45 degrees to the right of straight, and one going 45 degrees to the left of straight. If it has a SubCount of 3 and a SubTheta of -90, one submunition will go straight, one due right, and one due left.)
*Note: SubTheta is added after the direction of the sub is chosen by either the "Fires at Nearest Target" flag or the Guided weapon type (see above).
The number of times this weapon can submunition into itself (1 will allow first shot + one sub, 2 will allow first shot plus two subs, etc.). Has no effect if the weapon does not submunition into itself, even if it subs into another weapon that then subs into the first.
---------- FLAGS ----------
The "Subs Fail When Shot Expires" flag:
Does exactly what it says it does. The weapon will only produce submunitions if it impacts a ship or asteroid (via ProxRadius- see "Proximity to Target" below) before its Count runs out. No exceptions.
The "One Shot at a Time" flag:
If the first submunition is of a different wëap resource than the initial weapon, the firing ship will be able to fire the initial weapon again as soon as the first submunitions appears.
If the initial weapon uses itself as a recursive submunition, the firing ship will not be able to fire the initial weapon again until the entire chain of recursive submunitions finishes.
NOTE: The "One Shot at a Time" flag prevents reloading during the time that the shot exists. That is, the time until the weapon can fire again is the life of the shot PLUS the reload time of the weapon.
Also, the "One Shot at a Time" flag seems to be ignored if the weapon has a Reload of 0.
Submunitions Fire at Nearest Target flag:
Unguided submunitions: When created, each submunition will fire at a non-escort ship, regardless of whether you have any ship targeted, and regardless of whether the ship is disabled or not. If you do have a ship targeted, that ship will be added to the list of ships that will be fired at, even if it would not normally be fired at.
Unfortunately, I do not have the faintest idea how each submunition decides which ship to target. In a test with several ships scattered throughout a system, some disabled, some not, the shots seemed to randomly switch between the various ships, showing no preference for near over far, for active over disabled, for in-range over out-of-range, or even for enemy over neutral. The only ships that were ignored were my escorts and ships with the wrong planet/non-planet type for the weapon (unless I targeted them). There did seem to be a preference for more distant ships over close ships, but that may have been because the more distant ships had been created earlier.
Guided submunitions: The flag has no effect. If a non-guided submunition had this flag set for its creation, a subsequent guided submunition will track the target that the unguided submunition was fired at, but that will happen whether or not the guided sub was created with this flag.
Finally, there seems to be about a small error rate in whether a particular submunition successfully aims at any "nearest target", or whether it continues straight. This error rate may be affected by the number of submunitions (it seemed to be almost zero with just one submunition, but I measured a 15% error rate with 100 submunitions). It also seems to be much higher when there is a negative SubTheta.
---------- OTHER NOTES ----------
When Nova starts up, it calculates the maximum range of each weapon by adding the ranges of every submunition to the range of the primary shot. This causes a crash if you set two weapons to submunition into each other, as Nova will add their ranges forever.
This ability to add range to a weapon by adding a "dud" submunition can be useful for influencing the AI's choice of weapons.
When a submunition is created, it plays the sound associated with its firing, and not the explosion sound for the parent weapon (unless the parent weapon hit a ship).
Proximity to Target:
Submunitions will not appear unless their parent shot detonates at some distance from whatever they hit. Therefore, a weapon with a ProxRadius of 0 will not produce any submunitions on impact. Also, Point Defense weapons impacting Guided weapons cannot produce submunitions, as PD-Guided collisions do not use proximity fuses.
It seems that the parent shot needs to explode at least at the edge of the target ship. I am not certain just how ProxRadius impacts are calculated, but I think I recall a statement that it needs to be around 40 in order to work properly with most ships in Nova. What I have tested is that 10 works about 80% of the time on a squarish ship 40 pixels on a side.
Although AI ships will not fire a weapon if the primary shot is of the wrong type to damage a ship, they do not care about the types of the submunitions.
However, if a submunition is created with the "Fires at Nearest Target" flag, it will not aim at any ship of the wrong type, unless that ship is targeted by the firing ship.
Since you've read this far (I hope), here's a nice trick you can do with submunitions: Create a recursively submunitioning free-flight rocket with a SubTheta of 180 and a Count of 20 to 30. What you get is a weapon that curves smoothly through space, much like the EVO SAD/SAE Pods, only randomly.
---------- THE END ----------
Well, that's the guide. It's rather long, but it's a complex subject, and I wanted to make myself clear on several of those points. Please make comments, point out things I missed, etc., but please don't quote the whole thing as a single block in your comments.
This post has been edited by Edwards : 19 June 2006 - 06:17 PM