hubbabubba
Charter Member
Welcome to this thread.
My main objective here is to show you another way to have fun with CFS1; building things.
Consider this as a hobby, a pastime activity, not as a tutorial on making macros for scenery or making aircraft to fly with. That said, you may just end doing just that!
With the help of a few programs, all free, we will build simple visual objects that can be integrated as static or moving objects into the game. As we go along, structures will get more complicated but, I hope, the learning curve will be very progressive. As I have other activities, time between posts should be irregular and sometimes quite long, but each of them will leave you "enough meat to chew on". Don't hesitate to experiment on your own while waiting for the next installment.
Feel free to ask questions or give your own views on the matter. My assiduity to this post will be directly proportional to the interest it generates. If no-one is interested, this first post may well be the last.
We will work mostly with MDL files, the core of any CFS1 aircraft. So, a short description of it is in order. If you go and open an "aircraft container" (Microsoft® sophisticated way of calling an "aircraft folder") in your CFS1 game folder, you will probably find something like this;
View attachment 35383
This is a "basic" P-51D aircraft container (sorry for the "ugly" W98 style) without any changes.
The P51d_CHECK.CFG file contains the checklist, not always present in all aircraft. It can be opened an modified with at TXT editor, providing that you have privileges to do so.
REMARK; From Windows VISTA and on, you need "user account" control to dabble into configuration files. This apply to all CFS1 CFG files and may apply to other files as well.
The P51d.dp file is also a text file, containing the damage profile. It is also taking care of weapons and special effects.
The P51d.CDP file only exist if you have flown this particular aircraft. It is a "digest version" used by the game engine (COMBATFS.EXE) to speed things up. If you open it with a TXT editor, you will find that most of the inscriptions are not for human consumption. It is never edited. You can delete it safely; it will remake itself next time you fly this plane.
The P51d.air file is taking charge of the mechanics of the aircraft. It can be read and edited with specialized programs (AirEd, FD Editor, AirWrench, to name a few). We don't need to do that for now.
The texture sub-folder contains the textures applied to your specific aircraft. Note that stock aircraft have a "fall-back" set of textures in the main CFS1 texture folder. So, if you emptied the aircraft texture folder, chances are your aircraft would still be painted! With an add-on a/c, you would get unpainted surfaces. The CFS1 main texture folder is also used for buildings and statics objects textures and, since stock aircraft can be used as static objects, their textures can be found there as well. It seems that the game searches first in the aircraft container for textures and, by default, goes to the main texture folder. These textures are using the exact same name but are usually of lesser definition quality.
The sound sub-folder contains a sound.cfg file and, often, WAV (wave sound) files. If you only have a sound.cfg file, chances are your aircraft is using the sounds of another aircraft by aliasing to it. This is a good way to save disk space. The sound.cfg file can be read and edited with a TXT editor, the WAV files with a sound editor.
The panel sub-folder also has a configuration file; panel.cfg. If alone, your panel is probably aliased to another aircraft. You can open and edit this file with a TXT editor but I would recommend the use of CFGEdit, especially for beginners. It is a WYSIWYG environment that makes more sense. Our good friend smilo is an expert in panel configuration and do his own with a TXT editor. I do mine using both methods. The panel sub-folder may also contain BMP files which are used for 2D panels. The panel.cfg file will call these visual elements as well as GAU gauge files, found, in CFS1 gauges folder, to create interactive 2D panels (and 3D non-interactive panels in some cases). There would be more to say on the matter, but this is off-topic... at least for now.
Almost last, but not least, the model sub-folder. Again, we have a configuration file named, here, model.cfg. It can be opened and edited with a TXT editor. Let us have a look into it;
[models]
normal=P51d_n
crash=P51d_c
[colors]
; body - predominate color on plane
00=WHITE
; wing - color of wing, flaps, ailerons
01=WHITE
; altbody - two tone body part
02=WHITE
Under [models] header, we have two MDL files being called. The "normal" represent the model as we see it most of the time. In fact, especially in add-ons aircraft, it is often the only entry in the file. The "crash" model contains the "body parts" that we see flying of an airplane loosing a tail, a wing, and so on.
The [colors] header is the remains of an old texturing technique. The "stock" Sopwith Camel is using it to its full extent. If you want to know more, go download my 10_camel.zip add-on to be found HERE .
The XYZ.mdl file is, as previously stated, the core of any CFS1 aircraft. As I just said, it is often the only other file with the model.cfg file in this folder. This is what we will be working with most of the time. This is our bread n' butter for what we will do, so we will explore it in depth.
If you open it with a txt editor (WordPad will do), you will find a lot of gibberish with tidbits of comprehensible language. Here is the first line;
View attachment 35384
Apart from "This program cannot be run in DOS mode.", not much to make of it. But this little information is useful to learn that, in fact, a MDL file is a program! Without going into details (which, for the most part, I'm ignorant of anyway...), an MDL is a DLL-like program. If you look a bit further, you may find this;
View attachment 35385
In all these hieroglyphics, you can at least understand "P51Tex2.bmp" and "P51Tex1.bmp". These are parts of calling instructions for textures. This is what I referred vaguely to as "the game" in the texture sub-folder paragraph. The MDL file, when used by you or the AI a/c, is a program being called by COMBATFS.EXE, itself calling textures. In fact, it does much more; it contains spatial coordinates indicating pitch, yaw, roll axis, speed, altitude, collision "bubble", gear extension, flaps extension, air brakes... the list goes on. Following that section, the visual model is being called by a BGL-like section, where the textures callings we have seen are being made.
You may have heard of BGL files before; they are commonly found in scenery folders. The type of visual instructions that they contained is virtually identical to what is contained in the virtual instructions of a MDL file. The main difference is that one moves, the other don't (or barely does in relation to a static position). I will let you decide which is which...
To close this first post, a word about one last file; aircraft.cfg.
If XYZ.mdl is the core of an aircraft container, aircraft.cfg is the maestro conducting all parts. Looking at our P51d aircraft.cfg, a TXT editor will do, we see;
[fltsim.0]
title=North American P-51D (This is the name you will see when choosing that aircraft)
sim=P51d (This is the name you will see as a "tag" in the game, it also calls DP, CDP and AIR files )
model= (This is to call the model folder. If left empty, it calls the "model" folder by default)
panel= (This is to call the panel folder. If left empty, it calls the "panel" folder by default)
sound= (This is to call the sound folder. If left empty, it calls the "sound" folder by default)
texture= (This is to call the texture folder. If left empty, it calls the "texture" folder by default)
checklists=P51d_CHECK (this is to call the checklist)
[forcefeedback] (This is for force feedback sticks)
(...)
In the same aircraft container, you may have different combinations of model, textures, panels, sounds, DP, AIR, checklists. In theory, you could take all your aircraft and crammed them into one big aircraft container. In practice, you use that system for a few aircraft that share almost identical material, creating incremental headers [fltsim.n] n=1,2,3,4, etc. I don't know if there is a limit and I'm not tempted to experiment on that subject.
You don't have to learn by heart all of this; just remember where it is for future reference. It may get useful.
Next time; Gutting a model
My main objective here is to show you another way to have fun with CFS1; building things.
Consider this as a hobby, a pastime activity, not as a tutorial on making macros for scenery or making aircraft to fly with. That said, you may just end doing just that!
With the help of a few programs, all free, we will build simple visual objects that can be integrated as static or moving objects into the game. As we go along, structures will get more complicated but, I hope, the learning curve will be very progressive. As I have other activities, time between posts should be irregular and sometimes quite long, but each of them will leave you "enough meat to chew on". Don't hesitate to experiment on your own while waiting for the next installment.
Feel free to ask questions or give your own views on the matter. My assiduity to this post will be directly proportional to the interest it generates. If no-one is interested, this first post may well be the last.
We will work mostly with MDL files, the core of any CFS1 aircraft. So, a short description of it is in order. If you go and open an "aircraft container" (Microsoft® sophisticated way of calling an "aircraft folder") in your CFS1 game folder, you will probably find something like this;
View attachment 35383
This is a "basic" P-51D aircraft container (sorry for the "ugly" W98 style) without any changes.
The P51d_CHECK.CFG file contains the checklist, not always present in all aircraft. It can be opened an modified with at TXT editor, providing that you have privileges to do so.
REMARK; From Windows VISTA and on, you need "user account" control to dabble into configuration files. This apply to all CFS1 CFG files and may apply to other files as well.
The P51d.dp file is also a text file, containing the damage profile. It is also taking care of weapons and special effects.
The P51d.CDP file only exist if you have flown this particular aircraft. It is a "digest version" used by the game engine (COMBATFS.EXE) to speed things up. If you open it with a TXT editor, you will find that most of the inscriptions are not for human consumption. It is never edited. You can delete it safely; it will remake itself next time you fly this plane.
The P51d.air file is taking charge of the mechanics of the aircraft. It can be read and edited with specialized programs (AirEd, FD Editor, AirWrench, to name a few). We don't need to do that for now.
The texture sub-folder contains the textures applied to your specific aircraft. Note that stock aircraft have a "fall-back" set of textures in the main CFS1 texture folder. So, if you emptied the aircraft texture folder, chances are your aircraft would still be painted! With an add-on a/c, you would get unpainted surfaces. The CFS1 main texture folder is also used for buildings and statics objects textures and, since stock aircraft can be used as static objects, their textures can be found there as well. It seems that the game searches first in the aircraft container for textures and, by default, goes to the main texture folder. These textures are using the exact same name but are usually of lesser definition quality.
The sound sub-folder contains a sound.cfg file and, often, WAV (wave sound) files. If you only have a sound.cfg file, chances are your aircraft is using the sounds of another aircraft by aliasing to it. This is a good way to save disk space. The sound.cfg file can be read and edited with a TXT editor, the WAV files with a sound editor.
The panel sub-folder also has a configuration file; panel.cfg. If alone, your panel is probably aliased to another aircraft. You can open and edit this file with a TXT editor but I would recommend the use of CFGEdit, especially for beginners. It is a WYSIWYG environment that makes more sense. Our good friend smilo is an expert in panel configuration and do his own with a TXT editor. I do mine using both methods. The panel sub-folder may also contain BMP files which are used for 2D panels. The panel.cfg file will call these visual elements as well as GAU gauge files, found, in CFS1 gauges folder, to create interactive 2D panels (and 3D non-interactive panels in some cases). There would be more to say on the matter, but this is off-topic... at least for now.
Almost last, but not least, the model sub-folder. Again, we have a configuration file named, here, model.cfg. It can be opened and edited with a TXT editor. Let us have a look into it;
[models]
normal=P51d_n
crash=P51d_c
[colors]
; body - predominate color on plane
00=WHITE
; wing - color of wing, flaps, ailerons
01=WHITE
; altbody - two tone body part
02=WHITE
Under [models] header, we have two MDL files being called. The "normal" represent the model as we see it most of the time. In fact, especially in add-ons aircraft, it is often the only entry in the file. The "crash" model contains the "body parts" that we see flying of an airplane loosing a tail, a wing, and so on.
The [colors] header is the remains of an old texturing technique. The "stock" Sopwith Camel is using it to its full extent. If you want to know more, go download my 10_camel.zip add-on to be found HERE .
The XYZ.mdl file is, as previously stated, the core of any CFS1 aircraft. As I just said, it is often the only other file with the model.cfg file in this folder. This is what we will be working with most of the time. This is our bread n' butter for what we will do, so we will explore it in depth.
If you open it with a txt editor (WordPad will do), you will find a lot of gibberish with tidbits of comprehensible language. Here is the first line;
View attachment 35384
Apart from "This program cannot be run in DOS mode.", not much to make of it. But this little information is useful to learn that, in fact, a MDL file is a program! Without going into details (which, for the most part, I'm ignorant of anyway...), an MDL is a DLL-like program. If you look a bit further, you may find this;
View attachment 35385
In all these hieroglyphics, you can at least understand "P51Tex2.bmp" and "P51Tex1.bmp". These are parts of calling instructions for textures. This is what I referred vaguely to as "the game" in the texture sub-folder paragraph. The MDL file, when used by you or the AI a/c, is a program being called by COMBATFS.EXE, itself calling textures. In fact, it does much more; it contains spatial coordinates indicating pitch, yaw, roll axis, speed, altitude, collision "bubble", gear extension, flaps extension, air brakes... the list goes on. Following that section, the visual model is being called by a BGL-like section, where the textures callings we have seen are being made.
You may have heard of BGL files before; they are commonly found in scenery folders. The type of visual instructions that they contained is virtually identical to what is contained in the virtual instructions of a MDL file. The main difference is that one moves, the other don't (or barely does in relation to a static position). I will let you decide which is which...
To close this first post, a word about one last file; aircraft.cfg.
If XYZ.mdl is the core of an aircraft container, aircraft.cfg is the maestro conducting all parts. Looking at our P51d aircraft.cfg, a TXT editor will do, we see;
[fltsim.0]
title=North American P-51D (This is the name you will see when choosing that aircraft)
sim=P51d (This is the name you will see as a "tag" in the game, it also calls DP, CDP and AIR files )
model= (This is to call the model folder. If left empty, it calls the "model" folder by default)
panel= (This is to call the panel folder. If left empty, it calls the "panel" folder by default)
sound= (This is to call the sound folder. If left empty, it calls the "sound" folder by default)
texture= (This is to call the texture folder. If left empty, it calls the "texture" folder by default)
checklists=P51d_CHECK (this is to call the checklist)
[forcefeedback] (This is for force feedback sticks)
(...)
In the same aircraft container, you may have different combinations of model, textures, panels, sounds, DP, AIR, checklists. In theory, you could take all your aircraft and crammed them into one big aircraft container. In practice, you use that system for a few aircraft that share almost identical material, creating incremental headers [fltsim.n] n=1,2,3,4, etc. I don't know if there is a limit and I'm not tempted to experiment on that subject.
You don't have to learn by heart all of this; just remember where it is for future reference. It may get useful.
Next time; Gutting a model