Having jumped on Mr. Moromisato's suggestion, I now have an afterburner 'weapon' that I'm 90% happy with. It looks okay and makes you go fast, but I'm not sure how to go about making it drain lots of fuel. Setting powerUse makes it use power just by being installed, which isn't right at all. Are beams the only weapon type that use more power while firing?
Code:
<ItemType UNID="&itZorch3;"
name="Afterburner"
level="1"
value="500"
mass="500"
modifiers="EnergyWeapon; MajorItem"
frequency="uncommon"
description="[Insert Fluff Here]"
>
<Image imageID="&rsItems1;" imageX="96" imageY="384" imageWidth="96" imageHeight="96"/>
<Weapon
type="particles"
particleCount="1"
particleSpreadAngle="8"
fireRate="1"
missileSpeed="8"
lifetime="16"
damage="plasma:2d8"
powerUse="2000"
sound="&snShipExplosion1;"
recoil="16"
>
<Configuration>
<Shot posAngle="+160" posRadius="56" angle="180"/>
<Shot posAngle="-160" posRadius="56" angle="180"/>
</Configuration>
<Image imageID="&rsMediumExplosions;" imageX="0" imageY="64" imageWidth="64" imageHeight="64" imageFrameCount="16" imageTicksPerFrame="1" blend="brighten" />
</Weapon>
</ItemType>
Afterburner fuel drain?
But some weapons, typically beam type guns, use much more power while you're holding down fire than they do whilst idle. That's the bit I seem to be missing, for both this and the flamethrower. Can't have an afterburner that doesn't splurge fuel!
I'm not sure if it will help in this case, but check the config of that howitzer V cannon. It practically spikes the "energy used" bar only when fired, but doesn't appear to drain power while idle (not used). Hope that can be useful.
Well, it's useful to know which weapons spike the energy use and which don't.. But I can't see anything in the Howitzer xml that tells me what actually causes it.
Just tried it at 100 damage per particle, and it still doesn't use power, so it's nothing to do with that. Hmm. The PK25 uses a big power spike, too. Right then, I'll clone that and turn in into an afterburner one step at a time until it breaks..
[Time Passes..]
O-kay. Turns out that it has been using a reasonable amount of power all along, but if a weapon's fire rate is faster than about 5, the power use doesn't display on the reactor gauge. Seems I've found me a glitch.
Looks like weapons draw about 10 x their coded powerUse whilst firing. Fair enough. It would be nice to have a second power stat that could override this for special cases, though - I'd prefer the afterburner to use zero power whilst idle, but fully drain a newbie reactor to use.
Just tried it at 100 damage per particle, and it still doesn't use power, so it's nothing to do with that. Hmm. The PK25 uses a big power spike, too. Right then, I'll clone that and turn in into an afterburner one step at a time until it breaks..
[Time Passes..]
O-kay. Turns out that it has been using a reasonable amount of power all along, but if a weapon's fire rate is faster than about 5, the power use doesn't display on the reactor gauge. Seems I've found me a glitch.
Looks like weapons draw about 10 x their coded powerUse whilst firing. Fair enough. It would be nice to have a second power stat that could override this for special cases, though - I'd prefer the afterburner to use zero power whilst idle, but fully drain a newbie reactor to use.