And then strange things happened.
The gun works fine, and does what it should do. But the damage pattern is bizarre. Small ships die instantly, as expected. Antares freighters take far more hits than I would expect, but do (usually) die.
On attacking a scarab, the first hit resets the damage indicator on the targeting system to 0. The second takes it to roughly 60,000% damage. The third takes it back to "no damage", and sends the hitpoint bar flying off to ther side of the screen. The fourth shot kills the ship.
On attacking a CSC, the first hit instakills the carrier (?!!).
And on attacking the Sister's of Domina, I end up with it alternating between "insanely high" and "massively negative" HP values, and it's now unkillable. Here's the result of several shots, plus switching to a massively sped-up APA to try to "fix" the problem:
That's the negative hitpoint mode. I don't have a screenshot of the overflow mode.
Here's the code. Can anyone see anything immediately that might cause this, or is it a bug in the game? Wolfy think's it's a bug, and I'm inclined to agree....but neither of us is exactly sure what is breaking.
Code: Select all
<ItemType UNID="&itTestGun;"
name= "Test Weapon"
level= "4"
value= "3500"
mass= "3000"
frequency= "notRandom"
attributes= "MajorItem; Rasiermesser"
description= "Used for testing basic scripted weapon effects"
>
<Image imageID="&rsItemsRasiermesser3;" imageX="288" imageY="0" imageWidth="96" imageHeight="96"/>
<Weapon
type= "missile"
damage= "kinetic:4d8; momentum2; WMD2"
fireRate= "120"
missileSpeed= "90"
lifetime= "50"
interaction= "20"
powerUse= "130"
effect= "&efKineticBoltDefault;"
sound= "&snRecoillessCannon;"
>
<Events>
<OnDamageArmor>
(sysCreateWeaponFire
&vtTestGunBlast;
gSource
(objGetPos gSource)
(sysVectorAngle objVel)
(sysVectorSpeed objVel)
Nil)
</OnDamageArmor>
</Events>
</Weapon>
</ItemType>
<ItemType UNID="&vtTestGunBlast;"
name= "Test Gun Effect"
virtual= "true"
>
<Weapon
type= "radius"
canhitsource= "true"
passthrough= "100"
damage= "blast:1d24; momentum5; WMD7"
minRadius= "0"
maxRadius= "15"
>
<Hiteffect>
<Null/>
</Hiteffect>
<Effect>
<Flare
style= "fadingBlast"
radius= "500"
primaryColor= "#dd6200"
lifetime= "14"
/>
<Shockwave
style= "glowRing"
lifetime= "3"
speed= "70"
width= "1"
glowSize= "8"
fadeStart= "0"
primaryColor= "#dd6200"
secondaryColor= "0xc0, 0xc2, 0x85"
/>
<ParticleJet
emitDuration= "3"
emitRate= "500-1000"
emitSpeed= "54-72"
particleLifetime= "7-20"
spreadAngle= "360"
>
<ParticleEffect>
<Particle
style= "flame"
minwidth= "1"
maxWidth= "2-5"
/>
</ParticleEffect>
</ParticleJet>
</Effect>
<Fragment
count= "8d20"
type= "missile"
lifetime= "1d6"
passthrough= "100"
canhitsource= "true"
damage= "blast:2d6; armor7; WMD1"
missileSpeed= "25-55"
>
<Effect>
<ImageAndTail
imageID= "&rsMissiles4;"
imageX= "0"
imageY= "0"
imageWidth= "16"
imageHeight= "16"
imageFrameCount= "4"
imageTicksPerFrame= "1"
length= "32"
width= "1"
primaryColor= "0xff, 0xff, 0xff"
secondaryColor= "0xc0, 0xc2, 0x85"
/>
</Effect>
<Hiteffect>
<Null/>
</Hiteffect>
</Fragment>
</Weapon>
</ItemType>