Limiting Field of Fire / Missile Salvos?


#1

Is it possible to limit the field of fire for a turret? Reason being I am coding the Warlock Class Destroyer from Babylon 5 and it has a huge narly railgun on the bow that realistically would not be able to fire at 90+degrees to the port or starboard. Several Earth Alliance ships also have aft batteries that shouldn’t be able to fire forward, batteries on the side of the hull etc. It might be nit picky, but I think it would be cool to be able to do this.

I am also having trouble with the Salvo function on a missile battery. here is the code?

[code][config]
unlockcost = 0
lockable = 0
armour_penetration = 75
category = “WEAPONS”
classname = “SIM_MissileModule”
cost = 200
crew_required = 24
damage = 90
description = “The Warlock Destroyer requires a new breed long range anti-ship guided missile.”
fire_interval = 50
salvo_interval = 5000
salvo_size = 5
flareuvid = 2
fuel = 2500
guiname = “Warlock Anti-Ship Missile”
has_splines = 0
has_flare = 1
has_decoys = 0
hitpoints = 145
icon = turret_miss_vee5.png
min_range = 450
max_range = 1750
missilelength = 25
missilespeed = 0.30
missilewidth = 7
name = “Warlock Missile”
powerconsumed = 10
shield_penetration = 75
size = “CRUISER”
sound = “B5/data/sounds/Stinger Missile.mp3”
soundvolume = 2.0
tracking_speed = 0.90
trail_fade_time = 200
turnspeed = 0.99
turret_sprite = “EA WCD_missile”
turretsize = 0
warhead = EXPLOSIVE
weight = 140
slot_type = TURRET
uisortpos = 33000
restricted = “earth alliance”

[dataitems]
0 = cost,DECIMAL
1 = weight,DECIMAL
2 = hitpoints,DECIMAL
3 = powerconsumed,DECIMAL
4 = max_range,DECIMAL
5 = damage,DECIMAL
6 = fire_interval,INTEGER
7 = tracking_speed,DECIMAL
8 = shield_penetration,DECIMAL
9 = armour_penetration,DECIMAL
10 = crew_required,INTEGER
11 = min_range,DECIMAL
12 = has_decoys,BOOL
13 = missilespeed,DECIMAL[/code]


#2

No. All weapons are 360 degrees. Sorry. :frowning:


#3

Can you be more specific about the trouble you are having?

The primary thing to remember about missile turrets is that each turret can only have one missile out at a time. From the code you’ve posted, it looks like you’re trying to get several missiles fired in quick succession, then a delay. That sort of thing can be done with bullet, kinetic, plasm and beam weapons, but not missiles.


#4

That is correct…I likes WAVES of missiles:) Oh well, guess the Warlock will get 3 missile batteries per winglet.


#5

Even though missile salvos aren’t a feature of GSB, you can always use the Multi-Warhead design option instead. Lots of tactical flexibility here, depending on how far you wish to implement it.


#6

As Archduke mentioned, a multi-warhead missile with a real (not dummy) payload and a huge separation range will essentially look (and act) like a multiple missile barrage.


#7

If you want to have a missile salvo the ONLY way that it is possable to do something like that is this way, BUT it is very limited to 2 though 6 only!

has_decoys = 1
min_range = 600
max_range = 2000
decoy_release_range = 2000
submunitionslive = 1
num_submunitions = 6

This code is taken from my Maverick Cluster missile system that i have in development in my Corvettes, Destroyer and Super-Cruiser mod. You need to have has_decoys, and submunitionslive set to 1, Your max_range and decoy_release_range MUST be the same or max_range shorter than decoy_release_range. Or the missile will not look like a salvo. num_submunitions can only be 2 thru 6, any more than 6 will not work and i forgot if it would crash the game or the module will only fire one. I also recommend that if you want the module to do 36 damage and fire a salvo of 6 that you set the damage to 6 and not 36 as the damage is what EACH missile (submunition) will do.

As for limited field of fire For GSB to do that We would need to rewrite the hard code of the game, and then program the AI on how to use such a limited weapon. Cliff or Cliffski as his nickname is on here has moved on to another game and has said that he will not go back over the code except to fix bugs, or update minor things.


#8

Missiles work like plasma used to; each launcher can only have 1 missle (or missle cluster) on the screen at a time, however as long as the fire interval is shorter than the missle’s flight time (determined by speed, fuel and maximum range) as soon as the first missle hits it’s target or dies the second will immediately fire. This will repeat itself until the salvo size is exhausted and then the salvo interval will kick in.

what I do NOT know is whether the new Max simultaneous code for the plasma launcher will apply to missles. My guess is it won’t.


#9

Lonestar I incorporated that code type and it works great.