Multi guns on NPC

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Multi guns on NPC

Post by Killer Wolf »

Is adding subents the only way of doing this?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Yes. I suppose you're talking about lasers. Each subentity may have one laser, so you have to add as much subentities as you want lasers. (And the main entity may have one as well. Actually two, one front, one aft.)

And of course, for turrets it's basically the same. Each turret its own subentity.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

cheers bud. fast reply!
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Sub-ent lasers and the "main" ship lasers can also have different targets, although all the sub-ent lasers (if there are multiple) will have the same target. Same applies to turrets iirc.

The Aquatics system platforms show it quite well sometimes.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

hmm, didn't know that Thargoid, interesting.

anyways, i was thinking of a multi-laser design and got wondering about guns built into wings like a WWII fighter, but if i need a subent i don't think it would work in a neat fashion. the wings could be defined as subents but that might be problematic if they're destroyed. i was also wondering about defining a small subent cube or summat and burying it just under the wing. if i wanted 2 guns per wing tho it means adding 4 subents, and while that's not a massive number compared to some other OXP ships, i kinda like to keep things as compact as possible.
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Post by Zieman »

@ Killer Wolf:
Make the main model so that the wings are included. Then make a wing-gun subentity and place as many of them as you want to suitable places in the wings. And if you're worried about the guns getting destroyed - just set

Code: Select all

frangible = false;
(or set max_energy & energy_recharge_rate high enough for the gun subentity) in your ship's shipdata.plist entry.
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
User avatar
ADCK
---- E L I T E ----
---- E L I T E ----
Posts: 771
Joined: Thu Dec 24, 2009 12:30 am
Location: Sydney
Contact:

Post by ADCK »

i'm guessing you could also prpbably do it the lazy way by using subentities too small to see or models using nothing but the "hole" material if you wanted to add them to a pre-existing model...
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

Zieman wrote:
And if you're worried about the guns getting destroyed - just set

Code: Select all

frangible = false;
(or set max_energy & energy_recharge_rate high enough for the gun subentity) in your ship's shipdata.plist entry.
Shooting the lasers off a multi-gun NPC like a Cat or an Iguana is always fun – plus it's a good leveller. If the subentities are small (like the front spikes/guns on a Wolf) it makes it more challenging, but still possible. I think it would make it a bit unfair if you didn't make them frangible – although this of course depends on what role you want for the NPC.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

@KW - have a look in detail at Aquatics, specifically the system platform and the Kraken. They both do something along those lines.

The sub-ent weapons are very small and not part of the main model at all. On the Kraken the carried platform's guns are actually sub-ents of the hauler herself, and there's JS code in there that if the carried platforms (also sub-ents of the hauler) are destroyed, then the relevant weapons (that irl would be on the carried platform) are also removed by the script.
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Post by Cmdr Wyvern »

Disembodied wrote:
Shooting the lasers off a multi-gun NPC like a Cat or an Iguana is always fun – plus it's a good leveller. If the subentities are small (like the front spikes/guns on a Wolf) it makes it more challenging, but still possible. I think it would make it a bit unfair if you didn't make them frangible – although this of course depends on what role you want for the NPC.
Oy, the Iguana! Of all the ships with subent weapons, the Iguana is a real pain in my tailend. It's nippy for it's size, is almost always found packing injectors, and that it's pilots tend to be a tad demented don't help.
I don't manage to kill one too often, unless the crazy bastard burns up all his fuel zipping about like a moth on a coffee overdose. I usually manage to force him to run away.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

Cmdr Wyvern wrote:
Oy, the Iguana! Of all the ships with subent weapons, the Iguana is a real pain in my tailend. It's nippy for it's size, is almost always found packing injectors, and that it's pilots tend to be a tad demented don't help.
I don't manage to kill one too often, unless the crazy bastard burns up all his fuel zipping about like a moth on a coffee overdose. I usually manage to force him to run away.
Yup, same here ... forcing a retreat is a good result against an Iggie. If you time the rear-laser bursts right though – if you can let the little swine close in on your tail without losing most of your shield – then it's possible to flip around and finish the bugger off. Even if you manage to shoot off one of his guns (or better still, both) though they're still potentially dangerous thanks to the high levels of lunacy.

I once saw an Iguana take out a Behemoth. I think he was the last survivor of a pirate pack, but an impressive achievement nonetheless. I did spoil it a bit immediately thereafter by drilling a big hole through him, though. :twisted:
Post Reply