Help with DEF parameters

This is the place for all questions related to modding Starshatter.
Kuokkanen
Posts: 3748
Joined: Fri Apr 02, 2004 1:16 pm

RE: Help with DEF parameters

Post by Kuokkanen »

Thank you QDaan! You are my hero!
You know what they say, don't you? About how us MechWarriors are the modern knights, how warfare has become civilized now that we have to abide by conventions and rules of war. Don't believe it.

MekWars
Kuokkanen
Posts: 3748
Joined: Fri Apr 02, 2004 1:16 pm

RE: Help with DEF parameters

Post by Kuokkanen »

It is about turrets this time. Yep, time to arm Corvette. Copy/paste from Mehrune's file
weapon: {
type: "LargeTurret",
design: "Bolt Weapon",
name: "Heavy Laser Turret",
abrv: "Turret",
group: "Turret",
rest_azimuth: 0,
rest_elevation: 0.2,
muzzle: ( 6, 0,52),
muzzle: ( -6,0,52),
loc: (0, 102, 208),
size: 12,
hull_factor: 0.2,
explosion: 6
Could someone add comments to parameters? Also other general information about turrets. Corvette has 2 turrets and I want those under 2 groups in weapon control panel. When I know what those parameters and their values mean, I put them to my Corvette file. I already have weapon file done according Mehrune's examples.
You know what they say, don't you? About how us MechWarriors are the modern knights, how warfare has become civilized now that we have to abide by conventions and rules of war. Don't believe it.

MekWars
Mehrunes
Posts: 257
Joined: Wed Mar 31, 2004 6:56 am
Contact:

RE: Help with DEF parameters

Post by Mehrunes »

Group determines what group the weapon is a part of in the fire control screen. Rest azimuth and elevation determine which direction the turret points in when it's not engaging anything.
Kuokkanen
Posts: 3748
Joined: Fri Apr 02, 2004 1:16 pm

RE: Help with DEF parameters

Post by Kuokkanen »

Might finish making that Corvette this week. I still need some ironwire descriptions how to glue turrets in. One turret comes to top, other one comes to below and should be upside down compared to one on the top. How I do it?

What are muzzle parameters? Let me guess: location of the muzzle relative to turret base. What is explosion parameter? What happens if I don't define firing arcs for turret? Does it shoot all over around and damage ship it is on? What are parameters for that,what do they mean (radians, degrees) and what they are related on?
You know what they say, don't you? About how us MechWarriors are the modern knights, how warfare has become civilized now that we have to abide by conventions and rules of war. Don't believe it.

MekWars
User avatar
Diabolico
Posts: 515
Joined: Wed Oct 06, 2004 7:20 pm
Location: France
Contact:

RE: Help with DEF parameters

Post by Diabolico »

Make sure to also make a .dat version of your corvette once it is ready so the rest of us using the commercial version and with no programming knowledge can use it please.
Besides, .dat format alllows for MP.
Thanks in advance,

=S=
Kuokkanen
Posts: 3748
Joined: Fri Apr 02, 2004 1:16 pm

RE: Help with DEF parameters

Post by Kuokkanen »

Stop repeating that .DAT thing! [:-]

Corvette is not designed to work with Starshatter ships. Starshatter fighters are over scaled and I have a feeling that some starships are as well. I mean, look at this:

Image

In that screenshot TIE Fighter's length is 6.3 meters as described in Star Wars Databank. Scale issue isn't only reason. Fighter laser does 100 points of damage per shot and I have planned that turbo laser would do at least 300, probably more (500 even). That is way out of scale for Starshatter ships.
You know what they say, don't you? About how us MechWarriors are the modern knights, how warfare has become civilized now that we have to abide by conventions and rules of war. Don't believe it.

MekWars
Kuokkanen
Posts: 3748
Joined: Fri Apr 02, 2004 1:16 pm

RE: Help with DEF parameters

Post by Kuokkanen »

I have tried glue one turret to Corvette but doesn't seem to work. Does someone else want to try?
http://koti.mbnet.fi/~bigfoot/imperium/corvette.zip

Now I go read for school test which is tomorrow.
You know what they say, don't you? About how us MechWarriors are the modern knights, how warfare has become civilized now that we have to abide by conventions and rules of war. Don't believe it.

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

RE: Help with DEF parameters

Post by Dragonlead »

I'll take a shot at helping you with the turrets, as I've done quite a few myself.

The bottom turret needs to be added as a new weapon. Go to Magic, select all, rotate it along the barrel axis (usually "Y") until it is upside down. Save it as a new file but add something like a 2 to the file name so you don't get confused. Copy your entire weapons .def file, but remember to change the model name and redo muzzle locations if they have moved.

When you add this "new" weapon to the ship .def file simply add it to the same group as the top turret and voila, two turrets oriented the right way.

The muzzle parameter is simply a location value. Find the XYZ coordinates in Magic that correspond to the ends of however many barrels you have on the turret and plug them in. Some of the weapons in SS are not associated with a turret so the muzzle location can be a fixed gun or missile port on the ship itself, that is why there is a separate line for muzzle location.
The explosion parameter is a number value (1-16) that defines what kind of fire or smoke shows up if that system is damaged or destroyed. Some of the modding guides define exactly what they are, but I would recommend experimenting to see which one you like best.
I imagine that if you do not define a firing arc in either wep or ship .def files it can move in any direction. However, according to Milo, no weapon will ever harm the ship it came from, even if obviously firing right through some part of it. Myself, I always define the firing arcs in the ship .def file. I hate seeing my anti-fighter turrets blasting through my bridge to get the guy on my six. I also use the DEGREES: TRUE line before the weapons portion of the file. I can think in degrees much better than radians.
The key to firing arcs IMHO, is figuring out the numbers for azimuth and elevation. Azimuth is the horizontal swing and elevation is the vertical swing. Zero for both is straight down the Y axis of your ship (in Magic). A positive 90 degrees is straight up for elevation and full right for azimuth. A negative 90 degrees is exactly opposite for both, either straight down or full left. There is a trick to azimuth however. (I'm sure the same is true for elevation, but I've never needed it). If you want a rear firing arc, think of the degrees like a compass. A 90 degree arc to the rear would start at 135 degrees and go to 215 degrees.
The command lines are pretty straight forward. "rest_azimuth" tells the ship what horizontal line you want the guns to point at (default is zero, straight ahead). Same thing applies to elevation. So for the rear turret a rest azimuth of 180 would be normal. "rest_elevation" does the same thing in the vertical. "aim_az_max", "aim_el_max", "aim_az_min", and "aim_el_min" define the limits that your turret will travel. So for that rear turret az_max would be 215 and az_min would be 135. Same with the elevation parameters.
A few other notes on turrets: it will rotate around whatever the triple zero point is in Magic, so adjust the location of the turret there. I highly recommend making a turret_base model as well. This allows for an articulated turret like real (wet navy) battelships have. Be aware that the turret base will only rotate.
When setting up the maxs and mins, remember that zero is greater than any negative number, and that -1 is a bigger number than -180. This will prevent things from turning the wrong way and shooting out the wrong side of your ship.
Also, if you want the turret to be able to engage at anything even remotely close, do not set the az_ and el_ min to zero. Set it a couple of degrees lower (ie. -2). Otherwise, Ships can fly right in unmolested unless you cange your own ships attitude.

Sorry this is so long, but you did ask a lot of questions. Hope it helps.

V/R

PS- added a shot of a WIP BB with turrets

Image
Attachments
yamato1.jpg
yamato1.jpg (34.22 KiB) Viewed 291 times
USAF Ret.
User avatar
Diabolico
Posts: 515
Joined: Wed Oct 06, 2004 7:20 pm
Location: France
Contact:

RE: Help with DEF parameters

Post by Diabolico »

WOW ![&o]
I want that BB!!! Awesome work!!! I love BBs!!!
Is it balanced with Milo's ships?
Can I have a copy of it in the .dat format, zipped or unzipped? In alternative, I'd accept the .def files and would ask someone to convert them to .dat for me!!!
I want BBs! They are crucially missing in this game!!!

[&o]


=S=
Kuokkanen
Posts: 3748
Joined: Fri Apr 02, 2004 1:16 pm

RE: Help with DEF parameters

Post by Kuokkanen »

Thank you Dragonlead, that sure is some help... But when turret base and barrels are separate files, how they are glued together? Anyways I need leave this PC for weekend. Meanwhile please take a look yourself to my Corvette and find out what's wrong with it.

http://koti.mbnet.fi/~bigfoot/imperium/corvette.zip
You know what they say, don't you? About how us MechWarriors are the modern knights, how warfare has become civilized now that we have to abide by conventions and rules of war. Don't believe it.

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

RE: Help with DEF parameters

Post by Dragonlead »

Okay, this is how the turret build works (Milo, please correct me if I screw something up here.)

The turret base is primarily for "articulated" turrets (like what exists on wet navy battleships). This means that you can just have a turret model, with no base and whatever you've made in Magic will move as a single item. A good example would be a box missile launcher. If you do this, remember to limit your vertical firing arc to a reasonable span, otherwise it will look like the turret is floating about at odd angles in the game. The cheat is to make the primary shape of the turret a sphere.
For articulated turrets, draw the whole thing (barrels and base) first and save it as a temporary file. Then delete either the barrels or base. If you delete the barrels, save the new file as xx_base.mag. ( I do this to keep things simple, but you can give it whatever name you want.) Reload the temp file. Now delete whatever you kept the last time. In this case, the barrels. Save that as a new mag with the weapon name. What you have just done is create a turret (the barrels only) and a turret base.

WEAPON

beam: {
name: "yamato_maingun",
group: "yamato_maingun",
target_type: 0xfff0,
value: 5,
capacity: 80e4,
recharge_rate: 40e3,
refire_delay: 5,
damage: 0.15,
speed: 30e4
life: 1,
charge: 325e3,
min_charge: 20e3,
min_range: 3e3,
max_range: 88e3,
max_track: 120e3,
self_aiming: true,
aim_az_max: 3.1416,
aim_el_max: 0.17,
aim_az_min: -3.1416,
aim_el_min: -0.17,
slew_rate: 0.08,
spread_el: 0.0,
spread_az: 0.0,
guided: 2,
syncro: true,
graphic_type: 3,
bitmap: "beam2.pcx",
turret: "yam_maingun.mag",
turret_base: "yam_mainturret.mag",
scale: 5,
width: 30,
light: 250,
light_color: (6, 248, 22),
sound: "mlaser.wav",
sound_min_dist: 3e3,
sound_max_dist: 30e3
}

Note the turret_base line in this example (goes with the picture as well). I recommend doing the whole turret together first, because of the scale issue. The default rotation axis for the turret base is the Z axis, but you can change it.
This file setup loads both mag files into one articulated turret. One hint here. Make sure your pivot line for the barrels is on the X axis, otherwise your barrels will "lift" clean out of the turret when they elevate.

I hope this gives you enough info to make things work. I'll look at your ship and see if I can figure out what's going on.

V/R
USAF Ret.
User avatar
Dragonlead
Posts: 303
Joined: Sun May 16, 2004 6:25 am

RE: Help with DEF parameters

Post by Dragonlead »

Diablico,

I could email this to you, if you give me an email address. I don't know how to make .dat files, so it would have to be the uncompressed way.

NOOOO!!!!! It is not balanced with Milo's designs. It will blow anyhting in the game with one full salvo (Please be aware that there are 4 identical turrets on the underside as well, plus 3 standard X-ray lasers (for close-in work) as well as a bazillion torpedos).
Here is a pic for comparison purposes

Image
Attachments
compare.jpg
compare.jpg (85.61 KiB) Viewed 291 times
USAF Ret.
User avatar
Dragonlead
Posts: 303
Joined: Sun May 16, 2004 6:25 am

RE: Help with DEF parameters

Post by Dragonlead »

There are two main problems I see in your info. One, in the ship.def, you left out the design: command. This is a necessary line as far as I know. It can be beam, bolt, missile, and one other that I forget right now. Look at the example I gave you in the previous email. The other is that your folder did not contain the wep.def file. I can't help you with that part until you send it to me.

V/R
USAF Ret.
Kuokkanen
Posts: 3748
Joined: Fri Apr 02, 2004 1:16 pm

RE: Help with DEF parameters

Post by Kuokkanen »

ORIGINAL: Dragonlead

The other is that your folder did not contain the wep.def file.
It is there:
Oops! Deleted it by accident. I get back on it next week.
You know what they say, don't you? About how us MechWarriors are the modern knights, how warfare has become civilized now that we have to abide by conventions and rules of war. Don't believe it.

MekWars
User avatar
Diabolico
Posts: 515
Joined: Wed Oct 06, 2004 7:20 pm
Location: France
Contact:

RE: Help with DEF parameters

Post by Diabolico »

Thank you so much! I will ask someone to compress it to the .dat format!
I have sent you my mail adress. Please check your e-mail.
Thanks in advance,

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

RE: Help with DEF parameters

Post by Dragonlead »

email sent.

V/R
USAF Ret.
User avatar
Diabolico
Posts: 515
Joined: Wed Oct 06, 2004 7:20 pm
Location: France
Contact:

RE: Help with DEF parameters

Post by Diabolico »

Got it thx! But I am having trouble converting it into .dat format :S
Milo should really think of something simpler to make all those ship files into a single file [:-]

Not all of us are DEVs... [:D]

=S=
Kuokkanen
Posts: 3748
Joined: Fri Apr 02, 2004 1:16 pm

RE: Help with DEF parameters

Post by Kuokkanen »

ORIGINAL: Matti Kuokkanen

I get back on it next week.
Right. My new PC is in serviceable service and I didn't make any copies for old PC. At least now I have good reason to complete few other projects I have with old PC...
You know what they say, don't you? About how us MechWarriors are the modern knights, how warfare has become civilized now that we have to abide by conventions and rules of war. Don't believe it.

MekWars
Kuokkanen
Posts: 3748
Joined: Fri Apr 02, 2004 1:16 pm

RE: Help with DEF parameters

Post by Kuokkanen »

Got computer back and running moment ago. Get that Corvette again from here
Hmm... I think server has something wrong. Path should be right, but for some reason I have trouble getting it myself.
You know what they say, don't you? About how us MechWarriors are the modern knights, how warfare has become civilized now that we have to abide by conventions and rules of war. Don't believe it.

MekWars
Kuokkanen
Posts: 3748
Joined: Fri Apr 02, 2004 1:16 pm

RE: Help with DEF parameters

Post by Kuokkanen »

I need some help again. First off Corvette. Please take a look to files Corellian Corvette.def and corvettelaser.def and tell me what are wrong and how to correct them. Maybe someone would make corrections and send files to me?

Second, fighters and their behaviour. In scenario TIE Fighters vs X-Wings AI fighters don't shoot much at each others. It is mostly zig-zag maneuvers around the space. One T/F get shots to X-W, but then said T/F just hangs on X-W's tail and don't shoot anymore. I tweaked maneuverability down but it's no good. Why are they making erratic maneuvers and only rarely get shots in?

If I don't get help with this anytime soon, I'm about concentrate to other projects.
http://koti.mbnet.fi/~bigfoot/imperium/mods.zip

Notes: Fighters are scaled down as defined in Star Wars Databank, but for player it isn't too hard score hits. Play with arcade level.
You know what they say, don't you? About how us MechWarriors are the modern knights, how warfare has become civilized now that we have to abide by conventions and rules of war. Don't believe it.

MekWars
Post Reply

Return to “Starshatter Modding Forum”