Software Documentation

EffectsDocumentation

AdvancedIntegration Last updated: September 27, 2019

8 Cake and candle duration (and prefire)

Generally speaking, the duration of a cake or candle is “first launch to last break” if the last effect in the cake or candle is a shell. All other effect types — comets, mines, etc. — are considered to have a break time of zero, so for non-shells this calculation is equivalent to “first to last launch”.

Most of the exceptions to this rule are obvious once you think about them. For example, a single-shot shell candle has the same duration as the shell itself: “break to expiration of stars”. Similarly, an all-at-once fan cake of shells or comets has the same duration as the shells or comets themselves, since they are all shot at once. So for most people, a perfectly useful definition of the duration of cakes and candles is “first launch to last break, except when it’s not, in which case it is obvious.”

For people who need to understand the details, here they are:

Type of cake or candle Prefire Duration Timeline duration
Single-shot cake or candle The value specified in the prefire column, if present, else in the VDL, as in “Single-Shot Peony Candle 0.0 PFT”, else the default lift time for a shell of this caliber; the lift time of the with shell shell being adjusted to equal the specified prefire only if it is non-zero Expiration of the stars minus the prefire if the prefire is specified as non-zero; else the expiration of the stars minus the default lift time for a shell of this caliber Expiration of the stars minus the prefire
Multi-shot, not-all-at-once cake or candle with first shot being a shell and last shot being a different effect from first shot The value specified in the prefire column, if present, else in the VDL, as in “Single-Shot Peony Candle 0.0 PFT”, else the default lift time for a shell of this caliber; the lift time of the first shell being adjusted to equal the specified prefire only if it is non-zero Effect time of the last shot (its break time if it is a shell or launch time otherwise) minus the launch time of the first shell; the lift time of the last effect being unaffected by any prefire specification in the VDL or prefire column Expiration of the stars of the last shot minus the prefire; the lift time of the last effect being unaffected by any prefire specification in the VDL or prefire column
Multi-shot, not-all-at-once cake or candle with first shot being a shell and last shot being the same effect as the first shot The value specified in the prefire column, if present, else in the VDL, as in “Single-Shot Peony Candle 0.0 PFT”, else the default lift time for a shell of this caliber; the lift time of the first shell being adjusted to equal the specified prefire only if it is non-zero Effect time of the last shot (its break time if it is a shell or launch time otherwise) minus the launch time of the first shell; the lift time of the last effect being adjusted to equal the prefire specification in the VDL or prefire column, if present and non-zero Expiration of the stars of the last shot minus the prefire; the lift time of the last effect being adjusted to equal the explicit specification of the prefire in the VDL or prefire column, if present and non-zero
Multi-shot, all-at-once cake or candle with first shot being a shell and last shot being a different effect from first shot The value specified in the prefire column, if present, else in the VDL, as in “Single-Shot Peony Candle 0.0 PFT”, else the default lift time for a shell of this caliber; the lift time of the first shell being adjusted to equal the specified prefire only if it is non-zero Zero Expiration of the stars of the last shot minus the prefire; the lift time of the last effect being unaffected by any prefire specification in the VDL or prefire column
Multi-shot, all-at-once cake or candle with first shot being a shell and last shot being the same effect as the first shot The value specified in the prefire column, if present, else in the VDL, as in “Single-Shot Peony Candle 0.0 PFT”, else the default lift time for a shell of this caliber; the lift time of the first shell being adjusted to equal the specified prefire only if it is non-zero Zero Expiration of the stars of the last shot minus the prefire; the lift time of the last effect being adjusted to equal the explicit specification of the prefire in the VDL or prefire column, if present and non-zero
Single-shot cake or candle with non-shell The value specified in the prefire column, if present, else in the VDL, as in “Single-Shot Comet Candle 0.0 PFT”, else zero; a non-zero prefire representing an offset into the effect, not a delay before the effect launches or begins emission in the case of a fountain Expiration of the star or stars in the case of a comet or mine, or expiration of the continuous emission in the case of a fountain Expiration of the star or stars in the case of a comet or mine, or expiration of the continuous emission in the case of a fountain — minus the prefire; or zero if that would be negative
Multi-shot, not-all-at-once cake or candle with first shot not being a shell The value specified in the prefire column, if present, else in the VDL, as in “Single-Shot Comet Candle 0.0 PFT”, else zero; a non-zero prefire representing an offset into the effect, not a delay before the effect launches or begins emission in the case of a fountain Effect time of the last shot (its break time if it is a shell or launch time if it is a mine or comet or emission begin time if it is a fountain) Expiration of the star or stars in the case of a comet or mine, or expiration of the continuous emission in the case of a fountain, of the last shot — minus the prefire; or zero if that would be negative
Multi-shot, all-at-once cake or candle with first shot not being a shell The value specified in the prefire column, if present, else in the VDL, as in “Single-Shot Comet Candle 0.0 PFT”, else zero; a non-zero prefire representing an offset into the effect, not a delay before the effect launches or begins emission in the case of a fountain Zero Expiration of the star or stars in the case of a comet or mine, or expiration of the continuous emission in the case of a fountain, of the last shot — minus the prefire; or zero if that would be negative

To calculate the delays in between the shots of a basic sequential shooting cake based the duration of the cake, you must subtract the lift time the last effect in the cake from the cake’s duration if the last effect is a shell, and then divide by the number of shots minus one.

ShotSeparation = ( CakeDuration - LastShotLiftTimeIfShell ) / ( NumberOfShots - 1 )

For cakes and candles with first shot being a shell, the shell’s lift time will be adjusted to equal the prefire if explicitly specified as non-zero in the VDL or in the prefire column. Moreover, if the last shot in the cake (or any other shot in the cake) has the same effect as the first, that shot’s lift time will also be so adjusted, since it is the same effect.