Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: SadisticSid on October 16, 2005, 11:36:21 am

Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: SadisticSid on October 16, 2005, 11:36:21 am
Pretty much self-explanatory. For dumbfire secondaries, it should work as per primaries (fire the weapon at this range even if incapable of hitting the target from velocity*lifetime) whereas aspect and heat seekers would lock on and fire at the specified range.
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: Starman01 on October 17, 2005, 03:23:18 pm
I've totally overlooked this here

I would like to add that I fully support this request, it would be really convinient :)
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: phreak on October 17, 2005, 05:32:15 pm
weapon range works the other way.  Thats the maximum distance the ai will start shooting even if lifetime * velocity is larger.
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: SadisticSid on October 17, 2005, 05:37:05 pm
Hmm I always thought it worked the opposite way - is there any chance this could work regardless of velocity*lifetime? Or would that cause conflicts with retail?

(EDIT: It's a weapon concept for Inferno, where I'd prefer the missile to detonate before it reaches the target, and spawns something else to actually hit the thing it's fired at. Phreak, you might want to check out or fire a few rounds of EA-AF-LCM-A+ in Inferno to see what I mean. ;))
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: Goober5000 on October 17, 2005, 05:42:17 pm
We should add +Max Firing Range and +Min Firing Range to weapons.tbl to make things clearer.

What we could do, to satisfy SadisticSid's request, is add something like +Premature Detonation Range.  (This might need a better name.)
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: FireCrack on October 17, 2005, 06:07:36 pm
try +Pre-Detonante or +Pre-Burst Time
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: phreak on October 17, 2005, 07:13:21 pm
Quote
Originally posted by SadisticSid
Hmm I always thought it worked the opposite way - is there any chance this could work regardless of velocity*lifetime? Or would that cause conflicts with retail?


Yea, the HL-7 has "+Weapon Range:" set to 100,000
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: SadisticSid on October 19, 2005, 07:14:56 am
Indeed, pre-detonation range would be a much better solution than just a weapon range alteration. One could conceivably make a sort of 'bouncing betty' missile which explodes prematurely and sprays a cone of flak at the target with this and the revised spawn angle code, for example.
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: phreak on October 19, 2005, 03:48:36 pm
like a  "+Proximity Fuse:" parameter, i'd imagine?  It would probably go as a subfield of homing properties, since doing this for unguided missiles wouldn't make sense.  I'd say that'll make a pretty nasty missile there.
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: Goober5000 on October 19, 2005, 04:03:46 pm
Quote
Originally posted by PhReAk
like a  "+Proximity Fuse:" parameter, i'd imagine?  It would probably go as a subfield of homing properties, since doing this for unguided missiles wouldn't make sense.  I'd say that'll make a pretty nasty missile there.
No no, it would make sense even for unguided missiles.  Shoot it in one direction and after a certain time it detonates and spawns all the child missiles.

In fact, I would even propose adding +Min Detonation Time - the time the missile requires to arm itself - and +Max Detonation Time - the time at which the missile explodes even if it hasn't yet reached its target.

This would allow an element of strategy in placing certain weapons.  If a weapon hits its target before +Min Detonation Time, it won't do any damage (or if you want to be really clever, it ricochets off in another direction ;7). Whereas +Max Detonation Time would serve SadisticSid's purpose.
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: CaptJosh on October 19, 2005, 04:27:32 pm
+Min Detonation Time or something similar, such as...I dunno, may be +Arming Distance(?) would be perfect for a submarine battle mod. Torpedoes have safeties so that they don't go active until they're a certain distance from the launching submarine, so that they won't lock on to the boat that launched them, and don't arm unless they've traveled a certain distance as computed and set by the fire control computer on the boat.

A missile that simply breaks up on impact if it hits before its warhead is armed would be great for say...a Hunt for Red October mod mission if anyone wanted to make it, or a generic submarine combat mod. (Can't you just imagine the voiceovers for one of those?) Though it would be a totally different style of combat. No primaries. Only secondaries in the form of torpedoes.
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: phreak on October 20, 2005, 12:31:54 am
Quote
Originally posted by Goober5000
No no, it would make sense even for unguided missiles.  Shoot it in one direction and after a certain time it detonates and spawns all the child missiles.

In fact, I would even propose adding +Min Detonation Time - the time the missile requires to arm itself - and +Max Detonation Time - the time at which the missile explodes even if it hasn't yet reached its target.

This would allow an element of strategy in placing certain weapons.  If a weapon hits its target before +Min Detonation Time, it won't do any damage (or if you want to be really clever, it ricochets off in another direction ;7). Whereas +Max Detonation Time would serve SadisticSid's purpose.


ok i think we misread each other.  "+Proximity Fuse:" would be launch time independant and explode when the missile gets within the specified distance of what its homing on.
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: Wanderer on October 20, 2005, 01:08:06 am
BTW modern AA-guns (not gatlings or such like Phalanx) use proximity fuse. Round detonates before the target and fills a cone in front of it with shrapnels so i see no point why it couldn't be used also by ballistic primaries (perhaps a flak gun variant). It's just like modern missiles, only method of delivering the explosive and the fragments close to the target differ. Both could be made quite simply with proximity fuse and spawn angle flags (it could spawn unguided missiles, fragments) like modern ABF warheads (annular blast fragmentation)
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: phreak on October 20, 2005, 09:56:14 am
i think the flak does do the proximity detonation already, except its fudged a bit.  what happens is that the game will set the lifetime of the flak equal to (distance to the current target * velocity of shell) and perturb it slightly so not all shells land right on top of it.  you can add the "flak" flag to primaries since 3.2 (i think), so thats already been taken care of.
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: Wanderer on October 20, 2005, 10:15:19 am
I know that the flak primaries work but what i meant was that similar system (proximity & angled fragments) to the missiles is currently present in gun shells. So it perhaps wouldn't hurt to give the option also to primary weapons. In this with primary weapon i mean everything that is normally in the tables under the primary weapon division (capship guns, flaks, fighter primaries etc.).

So with this option you could 'build' different flak guns. But as you said there is already a flak gun existing so there is no real practical need for this function for the primaries.
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: CaptJosh on October 20, 2005, 10:22:00 am
I thought that secondary weapons were the topic...
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: Goober5000 on October 20, 2005, 11:22:14 am
Quote
Originally posted by PhReAk
ok i think we misread each other.  "+Proximity Fuse:" would be launch time independant and explode when the missile gets within the specified distance of what its homing on.
Ah, okay, those are two rather different things.

+Proximity Fuse would be useful for mines; launch a mine with zero velocity, infinite lifetime, and a proximity fuse. :)
Title: 'Minor' request: make +Weapon Range work for secondaries
Post by: CaptJosh on October 20, 2005, 11:53:58 am
A proximity fuse would alse be useful in a submarine simulation, as there were torpedoes with magenetic fuzes designed to go off as the passed under the hull of surface shipping. However, a sub warfare mod has one big issue. You can't see anything you're fighting, except for using a periscope occasionally when attacking surface traffic. It really wouldn't fit. So much for that idea.