Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: NFSRacer on March 21, 2010, 08:18:30 am

Title: Cockpit Mod?
Post by: NFSRacer on March 21, 2010, 08:18:30 am
I heard some time ago that there was a mod for FSO that adds a cockpit view.  Is that actually true?
Title: Re: Cockpit Mod?
Post by: The E on March 21, 2010, 08:22:54 am
Yes.


In a way, that is. If you have a fighter with an actual cockpit model, adding the "show ship" flag to it via a tbm makes that cockpit visible.
Title: Re: Cockpit Mod?
Post by: NFSRacer on March 21, 2010, 08:30:19 am
Tbm?

Wait, you mean the TBL files, right?
Title: Re: Cockpit Mod?
Post by: The E on March 21, 2010, 08:33:59 am
No, I mean a tbm, aka a modular table (http://www.hard-light.net/wiki/index.php/Modular_table), aka the tool good modders use.
Title: Re: Cockpit Mod?
Post by: NFSRacer on March 21, 2010, 08:40:20 am
Well, what can I say?  I'm a bit of a rookie FS modder and FREDer.  Only way I can learn if I play around with it.  What VP are the TBMs under, or do I have to make them myself?

EDIT:
I just re-read the Wiki info.  Looks simple enough, right?  Take the info from the TBL file that I want and re-edit it into a TBM?
Title: Re: Cockpit Mod?
Post by: The E on March 21, 2010, 08:47:07 am
In principle, yes.

However, in this case, the solution is rather simple. Take a look at this example:

Code: [Select]
#Ship Classes

$Name: GTF Ulysses
+nocreate
$Flags: ( "show ship" )
+noreplace

$Name:          GTF Hercules
+nocreate
$Flags: ( "show ship" )
+noreplace

#End

This tbm, if saved as, say, showship-shp.tbm (note the -shp part, it's important) will switch on the cockpits for the Ulysses and the Hercules Mk 1. However, not all ships have cockpits at the moment.

An explanation: the -shp part in the filename tells the engine that the following data should be used to modify ships.tbl.

$Name tells the engine which entry to modify, +nocreate tells the engine that the following data should be used to modify an existing entry instead of overwriting an old one or creating a new one. Then comes the data we wish to alter, in this case, only the $Flags field. This has a modifier of its own, called +noreplace, which means that these flags should be added to the existing flags, instead of overwriting the old flags list.
Title: Re: Cockpit Mod?
Post by: NFSRacer on March 21, 2010, 10:02:50 am
Wow! :eek:  That IS simple.  Lol.  I feel like an idiot, now. :warp:

Actually, I just tried your example (I've never tried doing this from scratch) with the Herc MkI and the cockpit didn't show.  How do you know if a ship have a viewable cockpit?  Are they the ships where you can see the pilot in third person view?

Correction, yet again.  NOW I see why it isn't working: I somehow saved it as *.tbm.txt file, and now I can't change it to be JUST a TBM file.  Aside from NotePad, is there any sort of TBL or TBM editor?
Title: Re: Cockpit Mod?
Post by: The E on March 21, 2010, 10:54:54 am
No. As for your problem, disable the never-to-be-sufficiently-cursed "Hide file extensions for known filetypes" option in Windows Explorer. Then you can edit extensions to your hearts' content.
Title: Re: Cockpit Mod?
Post by: NFSRacer on March 21, 2010, 10:59:29 am
No. As for your problem, disable the never-to-be-sufficiently-cursed "Hide file extensions for known filetypes" option in Windows Explorer. Then you can edit extensions to your hearts' content.

Well, that's the problem.  I'm running a Vista OS and, unfortunately, I can't seem to find that option in Windows Explorer (one of the many reasons I HATE this OS :mad: ).
Title: Re: Cockpit Mod?
Post by: The E on March 21, 2010, 11:00:35 am
Open Explorer window. Press alt. Go to Tools -> Folder Options -> View.
Title: Re: Cockpit Mod?
Post by: NFSRacer on March 21, 2010, 11:05:16 am
Open Explorer window. Press alt. Go to Tools -> Folder Options -> View.

Oh.......I know that.  :warp:

Edit:
COOL! IT WORKS!!!  Now to find out which fighters I can apply this mod to...
Title: Re: Cockpit Mod?
Post by: The E on March 21, 2010, 11:07:01 am
O RLY
Title: Re: Cockpit Mod?
Post by: Scooby_Doo on March 22, 2010, 11:41:48 pm
Until someone gets the z-point issue fixed this is the only way to do cockpits.