How can I make a weapon capacitor draw power while charging?

Freeform discussion about anything related to modding Transcendence.
Post Reply
Yama
Militia Lieutenant
Militia Lieutenant
Posts: 114
Joined: Mon Feb 07, 2011 1:32 am
Location: in the apprenticeship program at a Tinker station....

I'm working on a Tinker-built energy weapon that incorporates a capacitor (like a Lightning turret) to achieve limited bursts of very rapid fire. Here's my XML:

Code: Select all

		<Weapon
				type=				"beam"
				minFireArc=			"351"
				maxFireArc=			"9"
				directional=		"true"				
				damage=				"particle:6d8; WMD2"
				fireRate=			"3"
				lifetime=			"40"
				powerUse=			"400"
			
				counter=			"capacitor"
				counterActivate=	"-5"
				counterUpdate=		"2"
				counterUpdateRate=	"6"				
				sound=				"&snLaserCannon;"
				>
			<Configuration 
				aimTolerance="5"
				alternating= "true"
				repeating= "1"
				>
				<Shot posAngle="25" posRadius="6" angle="0"/>
				<Shot posAngle="335" posRadius="6" angle="0"/>
				
			</Configuration>						
			<Effect>
	
				<Beam
						beamType=			"heavyblaster"
						primaryColor=		"0xe6, 0xff, 0x6f"
						secondaryColor=		"0xff, 0x8c, 0x00"
						intensity=			"7"
						/>
			</Effect>
		</Weapon>
This works fine, except for one thing. The weapon only draws power while it's actually being fired; nothing beyond the default 4 mw idlePowerUse while the capacitor is charging. :? I thought that a weapon with a capacitor timer should draw full power while it's capacitor is charging, the way the capacitor in a Transpace Jumpdrive does. I'd always assumed that the Ares Lightning turret worked that way, but of course I was wrong. :roll: It too draws no extra power while it's capacitor charges. :x

This makes no sense when comparing the powerUse and DPS (damage per second) of the Ares Lightning cannon with that of the Lightning turret. The powerUse of the Lightning turret is 100 mw, which is less than three times the 35 mw powerUse of the Lightning cannon. Yet the DPS of the Lightning turret is 320, almost five and a half times the 59 DPS of the Lightning cannon. :shock: This would be reasonable if the weapon drew full power while the capacitor was charging; sufficient power could be stored in the capacitor during charging, to makeup the shortfall during firing. But how can significant power be stored in the capacitor, when it draws nothing but idle power during charging??

Which brings me back to my question: I there any way I can make my weapon draw full power while the capacitor is charging (the way that a Transpace Jumpdrive does)?

When examining the xml for the Jumpdrive, I found this:

Code: Select all

		<MiscellaneousDevice
				powerUse=			"100"
				capacitorPowerUse=	"900"
				powerToActivate=	"1000000"
				/>
So I tried adding....

Code: Select all

				capacitorPowerUse=	"400"	
....right after....

Code: Select all

				powerUse=			"400"
....in my XML, but that had no effect at all.

Then I tried replacing...

Code: Select all

				powerUse=			"400"
....with....

Code: Select all

				capacitorPowerUse=	"400"	
This resulted in a weapon that draws no power whatsoever, even when firing. :oops:

I've searched the forums, the wiki, and xelerus, reading everything (perhaps I should say what little) I can find on the topic, and am out of ideas.

Any help you can offer will be most sincerely appreciated.
"A good ship should not look like a plumber's nightmare."
- Atarlost
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

I think this is the game engine's fault. Weapons and misc devices work differently, so the fact that the lightning turret draws less power is something to think about.

As for making a capacitor weapon draw full power while it's idle, I think that a workaround is needed, as the game probably does not make a distinction between capacitor and non-capacitor weapons.
A cheap way to forcibly draw power would be to install a "computer program" virtual item (so that it can't be removed) that "draws full power" of the capacitor weapon. It could be installed in the <OnInstall> and removed in the <OnUninstall> so that you could draw the difference in idling power.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Yama
Militia Lieutenant
Militia Lieutenant
Posts: 114
Joined: Mon Feb 07, 2011 1:32 am
Location: in the apprenticeship program at a Tinker station....

RPC wrote:I think this is the game engine's fault. Weapons and misc devices work differently, so the fact that the lightning turret draws less power is something to think about.

As for making a capacitor weapon draw full power while it's idle, I think that a workaround is needed, as the game probably does not make a distinction between capacitor and non-capacitor weapons.
A cheap way to forcibly draw power would be to install a "computer program" virtual item (so that it can't be removed) that "draws full power" of the capacitor weapon. It could be installed in the <OnInstall> and removed in the <OnUninstall> so that you could draw the difference in idling power.
Thanks for your thoughts RPC. :)

I guess I didn't make myself clear in my first post. Making the weapon draw full power at idle isn't what I'm looking for. I think that would actually be easy in 1.06 and later. If I'm not mistaken....

Code: Select all

            powerUse=         "400"
            IdlePowerUse=     "400"
.... would make the weapon draw 40 mw both when being fired and at idle.

What I'm seeking is a way to make a capacitor weapon draw 40 mw when being fired, and after firing continue to draw 40 mw until the capacitor finishes charging, at which time the power draw would drop back to 4 mw (the default 10% idle power use).
"A good ship should not look like a plumber's nightmare."
- Atarlost
Post Reply