MILO - a question about fighter guns

This is the place for all questions related to modding Starshatter.
Post Reply
User avatar
Dragonlead
Posts: 303
Joined: Sun May 16, 2004 6:25 am

MILO - a question about fighter guns

Post by Dragonlead »

Milo,

I have a fighter/attack ship. It has 2 different guns (the standard Delta cannons and a "homemade" anti-cap ship cannon.) However, I cannot get the AI to use the anti-ship cannon and they will not attack anything bigger than a corvette with the Delta guns.

I have included the relevant .def files.
from the weapons folder

WEAPON

primary: {
name: "crusader_cannon",
group: "crusader_cannon",
target_type: 0xffff0,
value: 3,
capacity: 90000,
recharge_rate: 1500,
refire_delay: 1.0,
charge: 1501,
min_charge: 1500,
damage: 0.125,
speed: 25000,
life: 10,
guided: 0,
syncro: false,
self_aiming: false,
aim_az_max: 0,
aim_el_max: 0,
min_range: 0,
max_range: 45e3,
max_track: 75e3,
graphic_type: 3,
width: 1.5,
length: 250,
light: 150,
light_color: (252, 156, 28),
bitmap: "shot0.pcx",
flash: "redblobflare.pcx",
flash_scale: 0.2,
sound: "mlaser.wav",
sound_min_dist: 1e3,
sound_max_dist: 15e3
}

from the ships folder

SHIP

name: Crusader
display_name: Crusader
class: Attack
abrv: "F/A-23"

model: "crusader_fighter.MAG"

mass: 76.7
integrity: 10e3
vlimit: 390
agility: 120
air_factor: 0.035
pitch_rate: 1600
roll_rate: 1600
yaw_rate: 1600
scale: 0.5
acs: 1.1
detet: 50e3

trans_x: 2000
trans_y: 1500
trans_z: 2000

drag: 0.0035
roll_drag: 10
pitch_drag: 10
yaw_drag: 10

CL: 1e-2
CD: 1.5e-5
stall: 0.40

prep_time: 15
repair_teams: 1
repair_speed: 2
repair_auto: true
repair_screen: true
chase: (0, -1200, 250)
bridge: (0, 65, 0)

power: {
type: Fusion,
design: "Fusion Reactor",
max_output: 800,
fuel_range: 3.5,
loc: (0, 0, 0),
size: 32,
hull_factor: 0.75
}

drive: {
type: red,
name: "Plasma Drive",
design: "Plasma Drive",
thrust: 20,
augmenter: 70,
scale: 0.45,
port: (-9, 0, -110),
port: (9, 0, -110),
loc: (0, 0, -50),
size: 16,
hull_factor: 0.85
}

shield: {
type: 1,
design: "Grav Shield",
model: "Crusader_shield.mag",
shield_factor: 1.33,
shield_capacitor: true,
shield_curve: 0.05,
deflection_cost: 0.5,
capacity: 800,
consumption: 500,
pcs: 25,
loc: (0, 0, -40),
size: 24,
hull_factor: 0.7
}

navlight: {
period: 4,
scale: 0.125,
light: {
loc: (-101, 47, -23),
pattern: 0xffffffff ,
type: 3
},
light: {
loc: (101, -50, -20),
pattern: 0xffffffff ,
type: 2
},
light: {
loc: (0, 25, -125),
pattern: 0x3c3c3c3c ,
type: 1
},
light: {
loc: (0, -24, -125),
pattern: 0xc3c3c3c3 ,
type: 4
},
}

weapon: {
type: "Delta Cannon",
design: "Bolt Weapon",
abrv: Cannon,
muzzle: (-29, -14, 46),
muzzle: (-21, -14, 46),
loc: (-25, -14, 0),
size: 16,
hull_factor: 0.5,
}

weapon: {
type: "crusader_cannon",
design: "Bolt Weapon",
abrv: Cru_Cann,
muzzle: (35, -17, 91),
loc: (25, -18, 4),
size: 16,
hull_factor: 0.5,
}

hardpoint: {
type: "Javelin",
type: "Vector",
abrv: "ST-1a",
muzzle: (-96, 55, -26),
loc: (-96, 48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Vector",
abrv: "ST-1b",
muzzle: (-102, 48, -26),
loc: (-96, 48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Javelin",
type: "Vector",
type: "Harpoon",
abrv: "ST-1c",
muzzle: (-96, 41, -24),
loc: (-96, 48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Javelin",
type: "Vector",
abrv: "ST-2a",
muzzle: (96, 55, -26),
loc: (96, 48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Vector",
abrv: "ST-2b",
muzzle: (102, 48, -26),
loc: (96, 48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Javelin",
type: "Vector",
type: "Harpoon",
abrv: "ST-2c",
muzzle: (96, 41, -24),
loc: (96, 48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Javelin",
type: "Vector",
abrv: "ST-3a",
muzzle: (-96, -42, -26),
loc: (-96, -48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Vector",
muzzle: (-102, -49, -26),
loc: (-96, -48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Javelin",
type: "Vector",
type: "Harpoon",
abrv: "ST-3c",
muzzle: (-96, -54, -27),
loc: (-96, -48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Javelin",
type: "Vector",
abrv: "ST-4a",
muzzle: (96, -42, -26),
loc: (96, -48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Vector",
abrv: "ST-4b",
muzzle: (102, -49, -26),
loc: (96, -48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Javelin",
type: "Vector",
type: "Harpoon",
abrv: "ST-4c",
muzzle: (96, -54, -27),
loc: (96, -48, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Harpoon",
type: "Hammer",
abrv: "STA-5",
muzzle: (-50, 15, -40),
loc: (-53, 25, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Harpoon",
type: "Hammer",
abrv: "STA-6",
muzzle: (50, 15, -40),
loc: (53, 25, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Harpoon",
type: "Hammer",
abrv: "STA-7",
muzzle: (-50, -36, -37),
loc: (-53, -26, 0),
size: 16,
hull_factor: 0.2
}

hardpoint: {
type: "Harpoon",
type: "Hammer",
abrv: "STA-8",
muzzle: (50, -36, -37),
loc: (53, -26, 0),
size: 16,
hull_factor: 0.2
}

decoy: {
type: "Fighter Decoy",
design: Decoy,
abrv: Decoy,
muzzle: (0, -22, -64),
muzzle: (0, -22, -64),
loc: (0, -22, -60),
size: 16,
hull_factor: 0.5
}

sensor: {
design: Sensor,
pcs: 25,
active_efficiency: 2e9,
passive_efficiency: 50000,
range: 25e3,
range: 50e3,
range: 75e3,
range: 100e3,
loc: (0, 14, -8),
size: 25,
hull_factor: 0.25
}

computer: {
name: "Avionics Package",
design: Computer,
abrv: HUD,
type: 1,
loc: (-9, -12, 46),
size: 8,
hull_factor: 0.2
}

computer: {
name: "Flight Computer",
design: Computer,
abrv: Flight,
type: 2,
loc: (9, -12, 46),
size: 16,
hull_factor: 0.5
}

gear: {
name: "Undercarriage",
abrv: Gear,
loc: (0, 0, 0),
size: 16,
hull_factor: 0.5,

gear: {
model: "crusader_lt_gear.mag",
start: (30, 25, 0),
end: (2, 0, 0)
},

gear: {
model: "crusader_rt_gear.mag",
start: ( -30, 25, 0),
end: ( -2, 0, 0)
},
}

nav: {
loc: (0, -7, 27),
design: Computer,
size: 16,
hull_factor: 0.1
}

loadout: { name: "Clean", stations: (-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1) }
loadout: { name: "ACM Light", stations: (0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,-1,-1,-1) }
loadout: { name: "ACM Short Range", stations: (0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,-1,-1,-1) }
loadout: { name: "ACM Medium Range", stations: (0,0,1,0,0,1,0,0,1,0,0,1,-1,-1,-1,-1) }
loadout: { name: "Ground Strike", stations: (0,0,1,0,0,1,0,0,1,0,0,1,1,1,1,1) }
loadout: { name: "Ship Strike", stations: (0,0,2,0,0,2,0,0,2,0,0,2,0,0,0,0) }
loadout: { name: "Hvy Ship Strike", stations: (0,0,2,0,0,2,0,0,2,0,0,2,0,0,0,0) }

death_spiral: {
time: 2.75,

explosion_type: 10, // SMALL_EXPLOSION
explosion_time: 1.1,
explosion_loc: (0, 0, -64),

explosion_type: 10, // SMALL_EXPLOSION
explosion_time: 1.5,
explosion_loc: (20, 10, -20),

final_type: 11, // LARGE_EXPLOSION
final_loc: (0, 0, -32),

final_type: 12, // LARGE_BURST
final_loc: (0, 0, -32),
}

map: {
sprite: "map0.pcx",
sprite: "map1.pcx",
sprite: "map2.pcx",
sprite: "map3.pcx",
sprite: "map4.pcx",
sprite: "map5.pcx",
sprite: "map6.pcx",
sprite: "map7.pcx"
}


Any help would be greatly appreciated.

V/R
USAF Ret.
Starbuck
Posts: 17
Joined: Wed Jun 30, 2004 2:33 am

RE: MILO - a question about fighter guns

Post by Starbuck »

Bump

It sounds like the same problem I am having with my Drones - here

http://starshattercentral.com/Core/modu ... 8aece9aad5

Did you get it fixed Dragonlead?

When is the last time anyone heard from Milo?

Image
User avatar
Sky_walker
Posts: 116
Joined: Mon Apr 05, 2004 8:45 am
Location: Poland

RE: MILO - a question about fighter guns

Post by Sky_walker »

AI usually do not use second primary cannon, and eaven if it do - it's very rare. AI don't check if enemy ship is good to destroy it by second primary weapon or not. Mayby Milo will repair this BUG (I hope so).
[center]Republic Assault[/center]
[center]Image[/center]
User avatar
Dragonlead
Posts: 303
Joined: Sun May 16, 2004 6:25 am

RE: MILO - a question about fighter guns

Post by Dragonlead »

I did kinda fix it.

When I swapped over the stock guns to the heavy cannon that the Thunderbolt uses and changed their class to attack, they would engage capital ships. However, the only way I can get the AI to reliably use the secondary gun to send them out in a Clean loadout. If they have even one missile on board, they won't use the second cannon. Even when I monkeyed with the loadouts to replicate a Thunderbolt's Heavy Ship Strike look, they still would not use the second cannon when they made their strafing attacks. So it seems I have the somewhat limited option, if I want them to use that gun.

V/R
USAF Ret.
Post Reply

Return to “Starshatter Modding Forum”