Page 1 of 2
Ballistic Weapons?
Posted: Fri Sep 18, 2015 1:54 pm
by Cmdr Memelord
What do you guys think of an OXZ that allows you to mount a ballistic weapon in place of a laser weapon? I know there's already a Railgun OXP, but it would be cool to use a chaingun instead of a laser.
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 2:04 pm
by Disembodied
It would be an interesting experiment, but you'd have to have some way of removing the slugs from the universe after a set length of time, to avoid the game having to constantly keep track of hundreds or thousands of extra entities.
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 2:31 pm
by Layne
Disembodied wrote:It would be an interesting experiment, but you'd have to have some way of removing the slugs from the universe after a set length of time, to avoid the game having to constantly keep track of hundreds or thousands of extra entities.
There's another problem with the Railgun OXP-- if you fire too quickly you can hit your own railgun slugs, which not only destroys them, but, (at least when I tried it in 1.80) counts as a kill towards Elite status! I was amazed to find my Elite ranking had jumped by about thirty points after only one combat, when I knew I'd only splashed two or three ships at the most. It wasn't until I put the Trophy Collector OXP on that I confirmed it, and saw 'Railgun Shot' or whatever the entity is called under my trophies as having 'killed' over twenty of them.
Doing my part to curb the railgun ammo menace in this quadrant, yup, that's me.
(I removed the OXP and reverted to an earlier save to clean up my Elite record. Killing innocent railgun ammunition isn't my style.)
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 2:39 pm
by Smivs
It needs "counts_as_kill" = no; in shipdata perhaps?
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 2:43 pm
by Layne
Smivs wrote:It needs "counts_as_kill" = no; in shipdata perhaps?
Very likely! But this was when I was new to Oolite and hadn't started tinkering in OXP's yet, so I never had a closer look.
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 2:43 pm
by Cody
The railgun was interesting ordnance, especially once I'd tinkered with the slugs. At one stage, I disabled my laser and used the trigger for the railgun. It was a strange feeling when the magazine ran-out - all 100 slugs gone, and no other weapon to use. At close quarters, it was an easy-to-use killer, but long-range accuracy required practice - splashing a bandit at 10km or more needed skill!
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 2:46 pm
by Cmdr Memelord
If I recall, in the code the railgun projectile model is just a cargo canister defined as a ship entity. So yeah, turning off "counts_as_kill" should keep you from gaining kills by shooting other railgun explody things.
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 2:53 pm
by Layne
Also, as I recall, it was one of those weapon upgrades that none of the NPC's were able to use. One thing I like about Redspear's New Lasers for 1.82 is that the shipdata has been tweaked to give many of the NPC ships access to the greater variety of weapons. Fair play's a jewel. Even if you could equip NPC ships with the railgun, I'm not sure they've got the AI to handle using it well; as Cody notes, it's a different sort of weapon and needs different tactics.
Anyhow, off topic-- I do like the idea of some sort of an ammo-based ballistic weapon (perhaps even with an add-on equipment to manufacture ammunition using raw alloys or minerals), but it'd have to be something the enemy gets to play with as well.
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 3:09 pm
by Disembodied
Layne wrote:I do like the idea of some sort of an ammo-based ballistic weapon (perhaps even with an add-on equipment to manufacture ammunition using raw alloys or minerals), but it'd have to be something the enemy gets to play with as well.
That might
really cause problems, though - imagine a dozen or more NPCs spread throughout a system, all pop-pop-popping new entities at each other all over the place! Even if slugs were just little flat metal plates (with an improbably high mass, presumably, if they're going to do any damage), any sort of chain-gun could seriously overload things.
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 3:14 pm
by Cody
Disembodied wrote:... any sort of chain-gun could seriously overload things.
<nods sagely> Is it still 2048 entities for a full universe? Or have I mis-remembered something?
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 3:20 pm
by Layne
Disembodied wrote:Layne wrote:I do like the idea of some sort of an ammo-based ballistic weapon (perhaps even with an add-on equipment to manufacture ammunition using raw alloys or minerals), but it'd have to be something the enemy gets to play with as well.
That might
really cause problems, though - imagine a dozen or more NPCs spread throughout a system, all pop-pop-popping new entities at each other all over the place! Even if slugs were just little flat metal plates (with an improbably high mass, presumably, if they're going to do any damage), any sort of chain-gun could seriously overload things.
Now, I'm not up on all the game mechanics, but as I recall, too many entities even stops lasers from working-- which implies laser beams are entities too. (Side note: That needs to be a ship bumpersticker; 'Laser Beams Are Entities Too!' They deserve photon rights!) Is their nearly instant dispersal what keeps the same issue from cropping up?
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 3:23 pm
by Cody
Don't know about lasers, but hit the entity limit and the whole game can lock-up!
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 3:33 pm
by Wildeblood
Laser beams are indeed entities too.
Captan Okti long ago made a Rocket Launcher OXP that fired several missiles simultaneously, said missiles having no manoeuvrability so they flew straight.
Re: Ballistic Weapons?
Posted: Fri Sep 18, 2015 5:48 pm
by Norby
Cody wrote:Is it still 2048 entities for a full universe?
Yes, but with proper coding it is possible to put all slugs into the same entity. I plan the next [wiki]Trails[/wiki] in the same way, using a single entity for each ship with many individually repositioned subentities.
Re: Ballistic Weapons?
Posted: Sat Sep 19, 2015 8:12 am
by cim
Norby wrote:Yes, but with proper coding it is possible to put all slugs into the same entity.
Collision detection doesn't reliably determine which subentity was hit, though.
Disembodied wrote:(with an improbably high mass, presumably, if they're going to do any damage)
E=mv² - even a small projectile if it's moving fast enough to actually hit anything is going to do a lot of damage. Though, if it's going fast enough, depending on the frame rate it may end up going from in front of the target to behind it without ever hitting it.