Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: killface on April 23, 2008, 11:07:30 pm

Title: Question about bombs
Post by: killface on April 23, 2008, 11:07:30 pm

Is it possible to create a primary weapon for a turret which will targets bombs ONLY?  I'm aware of the turret-set-target-order function, which I can use to force given turrets to target bombs PRIMARILY.  My problem comes in the fact that once the bombs are dealt with, the turrets go on to target the fighters that launched them.  I'm attempting to create a small cruiser that defends its larger bretheren against bombs exclusively.  I could create a beam weapon and beam protect the enemy fighters, but I was hoping to avoid that route.  Ideas?
Title: Re: Question about bombs
Post by: killface on April 25, 2008, 06:03:32 pm

Wow, no bites?  I can't believe it!
Title: Re: Question about bombs
Post by: Droid803 on April 25, 2008, 06:06:47 pm
Mostly because none of us have any ideas.
And besides, what is wrong with attacking fighters.
Title: Re: Question about bombs
Post by: Zoltan on April 25, 2008, 06:41:07 pm

Wow, no bites?  I can't believe it!

The question has been proposed in the past, and satisfactory solutions were lacking. Of course there are various ways that you can make a weapon worthless against fighters, while retaining its ability to destroy bombs.
Title: Re: Question about bombs
Post by: Bob-san on April 25, 2008, 06:48:36 pm
Why not make it do 0 shield damage and a few HP worth of hull damage?
Title: Re: Question about bombs
Post by: blowfish on April 25, 2008, 06:54:20 pm
You should make it do at least 50 hull damage, since that's how many HP bombs have.
Title: Re: Question about bombs
Post by: Zoltan on April 25, 2008, 06:56:50 pm
You should make it do at least 50 hull damage, since that's how many HP bombs have.

I didn't think that HPs mattered for bombs; I just thought it was the contact, though I could be wrong.
Title: Re: Question about bombs
Post by: blowfish on April 25, 2008, 07:47:16 pm
That's what I thought too at first.  The code says differently though.
Title: Re: Question about bombs
Post by: colecampbell666 on April 25, 2008, 08:11:50 pm
You should make it do at least 50 hull damage, since that's how many HP bombs have.
You should make it do at least 50 hull damage, since that's how many HP bombs have.

I didn't think that HPs mattered for bombs; I just thought it was the contact, though I could be wrong.
That's what I thought too at first.  The code says differently though.
The bombs in  INFR1 have tons of HP.

Code a new type of "Bomb only" turret.

The "B" key is used to track bombs and then if there are none, bombers. Have the turret use this somehow.
Title: Re: Question about bombs
Post by: blowfish on April 25, 2008, 08:16:10 pm
The bombs in  INFR1 have tons of HP.

No they don't.  Bombs have 50 hitpoints no matter what (though there were plans to impelment custom HP for bombs).  I have heard, however, that bombs don't have real collision detection, so you have to shoot straight through the center for it to hit.  That is probably what you are experiencing.
Title: Re: Question about bombs
Post by: Zoltan on April 25, 2008, 08:45:09 pm
No they don't.  Bombs have 50 hitpoints no matter what (though there were plans to impelment custom HP for bombs).  I have heard, however, that bombs don't have real collision detection, so you have to shoot straight through the center for it to hit.  That is probably what you are experiencing.

I knew that bombs don't use normal collision detection, but I thought they were destroyed by shots that hit "close enough" (as in a fixed radius).
Title: Re: Question about bombs
Post by: Retsof on April 25, 2008, 08:54:26 pm
I noticed you could hit a cyclops with a "close enough" shot, but the rebel bomb (that little thing that looks a bubble popping when it hits) is nearly impossible to hit.
Title: Re: Question about bombs
Post by: killface on April 26, 2008, 06:37:11 pm

Alright, how about this one...is there any NON-weapon way to make bombs explode in mid-flight?  I'm 99% sure that the answer is no...but I gots to try.   :p
Title: Re: Question about bombs
Post by: JGZinv on April 26, 2008, 07:42:35 pm
Wouldn't that be just a modified form of flak then?
Title: Re: Question about bombs
Post by: Retsof on April 26, 2008, 09:19:41 pm

Alright, how about this one...is there any NON-weapon way to make bombs explode in mid-flight?  I'm 99% sure that the answer is no...but I gots to try.   :p
Uhhh, you could run into it  :P
Title: Re: Question about bombs
Post by: blowfish on April 26, 2008, 09:21:35 pm
That's always fun ... unless you have damaged shields or are playing Blue Planet :shaking:
Title: Re: Question about bombs
Post by: Nuke on April 26, 2008, 09:57:06 pm
wouldn't mind having this flag for secondaries. thought about a fast bomb busting missile that could be carried by interceptors. only problem is making the ai use it properly. i see no reason why it cant apply to both prims and secondaries. i did make a bomb that launches a bunch of dummy bombs that can occupy a ship's turrets long enough so that you can land a real bomb.
Title: Re: Question about bombs
Post by: Retsof on April 27, 2008, 05:43:30 pm
I made a small missile that does nearly no damage but has a short emp effect that can't really do anything to your fighter but will dissable bombs. *gasp*
Title: Re: Question about bombs
Post by: BengalTiger on April 28, 2008, 11:27:04 am
Question about bombs:

Is there a way to encourage the AI to use a weapon to disable and disarm stuff?
I'm thinking of something like the "bomber+" flag that encourages AI to use weapons with it against bombers.
Title: Re: Question about bombs
Post by: Titan on April 28, 2008, 11:36:09 am
wouldn't a laser turret for this role be properly considered as a 'point defence turret'?
Title: Re: Question about bombs
Post by: colecampbell666 on April 28, 2008, 12:46:55 pm
Question about bombs:

Is there a way to encourage the AI to use a weapon to disable and disarm stuff?
I'm thinking of something like the "bomber+" flag that encourages AI to use weapons with it against bombers.
Look at the table entry for the Stiletto.
Title: Re: Question about bombs
Post by: Nuke on April 28, 2008, 09:48:45 pm
wouldn't a laser turret for this role be properly considered as a 'point defence turret'?

that would be correct. but i don't see why the same turret couldn't be used against fighters when it is free. its likes the phalanx turrets on us carriers. they can shoot at incoming anti ship missiles just as well as incoming fighters. i don't even go through the trouble of putting blob turrets on my ships, i find a couple extra flak guns makes up for the absence of 12 or so blob turrets. a shotgun or scattering gatling type weapon would be a perfect weapon to have to kill incoming warheads.
Title: Re: Question about bombs
Post by: Titan on April 29, 2008, 02:08:12 pm
shotgun... me likes. Steve-O made a weapon that does that perfectly. can't remember what it was...
Title: Re: Question about bombs
Post by: Nuke on April 29, 2008, 04:12:34 pm
also another cool feature is to have turrets armed with both a light, fast firing weapon for hitting bombs and a heavier, slower weapon for hitting fighters and bombers. just a matter of making the ai use the right weapon for the right job.
Title: Re: Question about bombs
Post by: colecampbell666 on April 30, 2008, 06:19:21 pm
Look at the ancient weapons in PI.
Title: Re: Question about bombs
Post by: --Steve-O-- on May 02, 2008, 09:07:10 am
i did make a bomb that launches a bunch of dummy bombs that can occupy a ship's turrets long enough so that you can land a real bomb.

damn...you beat me to the Bomber Buddytm idea
not really tm though.
Title: Re: Question about bombs
Post by: Polpolion on May 04, 2008, 12:44:53 pm
wouldn't a laser turret for this role be properly considered as a 'point defence turret'?

that would be correct. but i don't see why the same turret couldn't be used against fighters when it is free. its likes the phalanx turrets on us carriers. they can shoot at incoming anti ship missiles just as well as incoming fighters. i don't even go through the trouble of putting blob turrets on my ships, i find a couple extra flak guns makes up for the absence of 12 or so blob turrets. a shotgun or scattering gatling type weapon would be a perfect weapon to have to kill incoming warheads.

From what the first post says, I think these turrets are having trouble prioritizing bombs over fighters/bombers.

Regardless, you have the "small_only" flag in there, right? That forces the turret to only attack fighters, bombers, and bombs.

EDIT: That guy who said bombs had 50hp according to the code: Where does it say that in the code? I looked at first in the object.cpp, but it's not exactly easy looking for this stuff.
Title: Re: Question about bombs
Post by: Wanderer on May 04, 2008, 01:15:06 pm
See weapons.cpp line 5639 or so...
Title: Re: Question about bombs
Post by: Nuke on May 05, 2008, 02:19:35 am
it would probibly be a good idea to go over nukemod's weapons. theres tonnes of new flags added since i last updated them, some of which i was waiting to mature. i made alot of weapon models that arent in he last version. i gotta script the rumrunner's gatling turretsto spin when firing. and swap the valhalla's missile turrets with railgun turrets. weapons alone would be a major overhaul.