Warhead= field in the weapon for a double-break explosion
Posted: 21 Nov 2006, 03:32
I like the explosion generators used in Spring, how you can customize the fX for each and every weapon. But a simple addition to the weapon would allow for a host of new effects, a warhead added onto the existing weapon types.
Why a warhead? Because with a warhead you define two damage lists for a weapon. A paralyzer could actually do real damage, not just freeze a unit. And you could have fuses... and duds! Think about a free fall bomb hitting and not exploding. The kinetic energy of the dud should still do some damage, but your dud's explosion (that did not happen afterall) would not.
A fuse could be defined with a timer and dud percentage. Your anti-ship missile might hit the ship, wait two full seconds for the aircraft that dropped it to fly over, then explode. Maybe you want the tank shell to hit with a kinetic effect on a pinpoint target yet also immediately explode to hurt nearby thin-skinned units. Fuses could also fail at a regular percentage, say 20% for free fall bombs. The possibilities with this simple add-in are amazingly complex.
Whether or not a warhead has its own graphical explosion could be up to the creator of the patch. Yeah, it would be cool to have also, but its not a gamebreaker if it did not. A defined fuse is also not a big deal if its too complex to code. Keeping the add-in simple would make it easier to accomplish.
How could it be implemented? Add in the warhead= field in the weapon tdf. Tag the weapon's warhead effects on after the normal weapon explosion, perhaps just after the original DamageArray routine. Run back through the DamageArray using the new definitions. Voila!
Why a warhead? Because with a warhead you define two damage lists for a weapon. A paralyzer could actually do real damage, not just freeze a unit. And you could have fuses... and duds! Think about a free fall bomb hitting and not exploding. The kinetic energy of the dud should still do some damage, but your dud's explosion (that did not happen afterall) would not.
A fuse could be defined with a timer and dud percentage. Your anti-ship missile might hit the ship, wait two full seconds for the aircraft that dropped it to fly over, then explode. Maybe you want the tank shell to hit with a kinetic effect on a pinpoint target yet also immediately explode to hurt nearby thin-skinned units. Fuses could also fail at a regular percentage, say 20% for free fall bombs. The possibilities with this simple add-in are amazingly complex.
Whether or not a warhead has its own graphical explosion could be up to the creator of the patch. Yeah, it would be cool to have also, but its not a gamebreaker if it did not. A defined fuse is also not a big deal if its too complex to code. Keeping the add-in simple would make it easier to accomplish.
How could it be implemented? Add in the warhead= field in the weapon tdf. Tag the weapon's warhead effects on after the normal weapon explosion, perhaps just after the original DamageArray routine. Run back through the DamageArray using the new definitions. Voila!