Page 1 of 1

Question: Twin Plasma Cannon stats

Posted: Mon Apr 13, 2015 1:35 pm
by Ngalo
Could someone please tell me (or direct me to) certain stats for the old Twin Plasma Cannon? I'm trying to re-implement something like it by OXP for 1.81 and want to know damage, rate of fire, speed at which the plasma travels, as well as cosmetic stuff like diameter of the plasma balls and separation distance between the two barrels; I have already found the range (5km) somewhere in the documentation but do correct this if it's wrong.

Also, if anyone has some good ideas about how to stop things bouncing when they collide at high speed and how to make an explosion that really looks like the core plasma-splash effect, I am open to suggestions.

In case it matters, the OXP may eventually include a Military Plasma Cannon (increased damage as per the Galactic Navy Frigate's turrets) and a Plasma Beam Cannon (really high damage rate, quick overheat) as well as the standard one and modifications of some of Commander McLane's old railguns to mount and fire like lasers (that bit is already working).

Re: Question: Twin Plasma Cannon stats

Posted: Mon Apr 13, 2015 4:52 pm
by cim
Range: 5km, correct.
Damage: 6 per shot
Rate of fire: 4 shots per second
Heat: 8 per shot
Shot speed: 1500m/s
Separation: 20m
Size: 12m

Stopping bouncing - watch the shipTakingDamage event for "scrape" damage, and zeroing the velocity when it happens should work.

You might be able to get that sort of explosion by using the explosion.plist parameters with the plasma splash texture as the image.

Re: Question: Twin Plasma Cannon stats

Posted: Tue Apr 21, 2015 1:07 pm
by Ngalo
Thanks.
I'm still having a few bounce problems: I can get the plasma itself to stop on hitting something, but setting the velocity of the ship it hit either to a zero vector or to equal its thrustVector doesn't seem to stop it being knocked away. Any ideas what I'm doing wrong?

Re: Question: Twin Plasma Cannon stats

Posted: Tue Apr 21, 2015 5:16 pm
by cim
Ngalo wrote:
Thanks.
I'm still having a few bounce problems: I can get the plasma itself to stop on hitting something, but setting the velocity of the ship it hit either to a zero vector or to equal its thrustVector doesn't seem to stop it being knocked away. Any ideas what I'm doing wrong?
Could be an order of events issue - the collision damage is applied to the two entities separately, so you might be zeroing the velocity in the first event, only to then have the collision processed for the second event add it on. You could test that by making a test ship which has a similar function in its ship script... if that works, though, applying that event handler is going to be tricky because the other ship might already have one set.

If the plasma explodes, that will also transfer momentum to the ship hit, but that should only be marginally noticeable.

As a workaround, you could set the density property of the plasma ball really low - it shouldn't then transfer much momentum (though you'll definitely need to be zeroing its velocity). If you're relying on its mass to do the damage, you'll need to adjust that too, of course.