Making new Missile work

This is the place for all questions related to modding Starshatter.
Post Reply
cirlin
Posts: 17
Joined: Sat Apr 03, 2004 12:11 am

Making new Missile work

Post by cirlin »

Hello, I'm working on getting Honor Harrington-like missiles working. I'm using a topic back on page 6 of this forum as a starting point (Defining drones) and at the moment I have this as my .def:

WEAPON

missile: {
name: "Laser Warhead",
target_type: 0x0000fff0,
value: 3,
ammo: 35,
capacity: 2,
recharge_rate: 2,
refire_delay: 0.5,
salvo_delay: 26,
charge: 1,
min_charge: 1,
damage: 100,
speed: 4e3,
life: 45,
guided: 2,
mass: 10,
thrust: 14e3,
drag: 0.2,
roll_rate: 10,
pitch_rate: 10,
yaw_rate: 10,
roll_drag: 1,
pitch_drag: 1,
yaw_drag: 1,
syncro: false,
self_aiming: true,
aim_az_max: 1.5,
aim_el_max: 0.5,
spread_az: 0.7,
spread_el: 0.7,
min_range: 15e3,
max_range: 120e3,
max_track: 120e3,
visible_stores: false,
graphic_type: 1,
model: "Laser Warhead.mag",
det_range: 8e3,
det_count: 5,
det_child: "X-ray laser",
det_spread: 0.6,
explosion: 4,
scale: 6,
flare: "yellowflare.pcx",
flare_scale: 0.5
}

The missiles aren't showing up when I try them (they don't appear in my WEP screen or engineering screen). Naturally this is the 1st weapon I've tried an it's rather unorthodox as the game weapons go, so I'm not really sure where the problem(s) might lie (I did see back in the original post that TheDeadlyShoe had the weapon .def in 2 parts, and I wasn't sure if it was supposed to be 2 .defs, or all in one, or what exactly. That might be part of the issue)
Anyway, thanks a lot for any help you could give me.
User avatar
Dragonlead
Posts: 303
Joined: Sun May 16, 2004 6:25 am

RE: Making new Missile work

Post by Dragonlead »

What is your errorlog showing you?

V/R
USAF Ret.
cirlin
Posts: 17
Joined: Sat Apr 03, 2004 12:11 am

RE: Making new Missile work

Post by cirlin »

I dont think it's generating an error log. It doesn't crash or anything, the weapons just dont show up when I try them on a ship. Or does the error log it update everytime you play?
...Well, it does give me this section:

Loading ship design catalog: Ships/catalog.def
WARNING: term ignored in 'CL.def'
"Cruiser"Add Mod Catalog Entry 'Light' Class 'Cruiser'
Add Mod Catalog Entry 'Minotaur' Class 'Carrier'
WARNING: term ignored in 'DD.def'
"DD"WARNING: term ignored in 'DD.def'
"DD"Add Mod Catalog Entry 'Chanson' Class 'Destroyer'

WARNING: term ignored in 'Hauptman Mk VI.def'
"VI"WARNING: term ignored in 'Hauptman Mk VI.def'
"VI"Add Mod Catalog Entry 'Hauptman' Class 'Cargo'
WARNING: term ignored in 'Prince Consort CA.def'
"Consort"WARNING: term ignored in 'Prince Consort CA.def'
"CA"WARNING: term ignored in 'Prince Consort CA.def'
"Consort"Add Mod Catalog Entry 'Prince' Class 'Cruiser'
WARNING: term ignored in 'Reliant BC.def'
"BC"Add Mod Catalog Entry 'Reliant' Class 'Cruiser'
WARNING: term ignored in 'Shrike LAC.def'
"LAC"Add Mod Catalog Entry 'Shrike' Class 'LCA'
WARNING: term ignored in 'Sultan BC.def'
"BC"Add Mod Catalog Entry 'Sultan' Class 'Cruiser'

I've underlined the ship which I've tried to use the new missiles in. All these ships work fine though, I think maybe there's a missing texture here and there and that might be what's causing the errors (because later on it gives me:

WARNING: term ignored in 'Prince Consort CA.def'
"Consort"WARNING - DataLoader could not load bitmap 'Mods/Ships/Prince Consort CA/hud_icon.pcx'
WARNING - DataLoader could not load texture 'Mods/Ships/Prince Consort CA/blank.pcx'
WARNING: term ignored in 'Prince Consort CA.def'

User avatar
Dragonlead
Posts: 303
Joined: Sun May 16, 2004 6:25 am

RE: Making new Missile work

Post by Dragonlead »

Actually, the warnings are because the code doesn't like spaces between words. The easiest fix is to add an underline mark between your words and those errors should go away. If you don't have a specific file named hud_icon.pcx (notice the underline) in your ship def it will give you that error, and the same is true for the blank.pcx.

Your errorlog does refresh after every episode of play.

Make sure the weapon you are trying to use is in the Weapons folder (both the mag file and the def file and any associated textures.). If you have it saved into a separate subfolder you will have to change the code in your ship def.

If all else fails, post your various defs and other folks can take a look at them as well.

V/R
USAF Ret.
Adonnay
Posts: 101
Joined: Sun May 08, 2005 4:57 pm

RE: Making new Missile work

Post by Adonnay »

Or if you don't want underlined names you can put them into quotes like "Prince Consort CA" and it will recognize it as one string.
User avatar
wdboyd
Posts: 628
Joined: Tue Jun 14, 2005 9:52 pm
Location: Ohio U.S.A

RE: Making new Missile work

Post by wdboyd »

Salutations,

Making visible_stores: false will prevent any weapon from displaying until fired.
Below is a sample of the games Javelin missile def.

missile: {
name: Javelin,
group: SRM,
target_type: 0x000f00ff,
value: 2,
ammo: 2,
recharge_rate: 10,
refire_delay: 1,
salvo_delay: 2,
charge: 1,
min_charge: 1,
damage: 2.5e3,
lethal_radius: 200,
speed: 5e3,
life: 10,
visible_stores: true,

attachment: (-1, 0, 0),
attachment: ( 1, 0, 0),

self_aiming: true,
aim_az_max: 1,
aim_el_max: 1,

min_range: 5e3,
max_range: 25e3,
max_track: 60e3,

carry_mass: 0.54,
carry_resist: 2,

guided: 1,
mass: 0.5,
thrust: 3e3,
drag: 2,
roll_drag: 4,
pitch_drag: 4,
yaw_drag: 4,
roll_rate: 1,
pitch_rate: 4,
yaw_rate: 4,

graphic_type: 1, // solid
scale: 0.15,
light: 200,
model: "missile03.mag", // Replace with your missile .mag file.

trail: "smoke.pcx", // basic game smoke
trail_width: 2,
trail_dim: 7,
flare: "drive.pcx", // basic game drive graphic
flare_scale: 0.25,
sound: "missile.wav", // basic game missile sound
sound_min_dist: 1e3,
sound_max_dist: 15e3
}

Are you includding your .def file into the same folder where your missiles graphic files and sound files are located? If so.... the .def file should be in your mods weapon folder but outside the above mentioned missile name folder that has the graphics.
Your .def file must have the exact same name as your missile folder.

"Time is a great teacher, but unfortunately it kills all its pupils!"
Post Reply

Return to “Starshatter Modding Forum”