NOTE THAT HACKING THE MAIN YSFLIGHT .EXE IS FORBIDDEN
- Posts: 4357
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 838 times
- Been thanked: 1246 times
If you are reading this, you are most likely very new to the concept of YSFlight Modding, and have no idea what you are doing!
Here, I shall discuss the structure of how YSFlight works.
I apologize in advance for the long read: There is a lot of information to cover but it, for the most part, is simple if you follow along with your YSFlight Install folder open and ready.
The root of all addons: .LST File
YSFlight comes built with a few folders, namely Aircraft, Scenery and Ground.
YSFlight loads addon LISTS from these folders.
Addon lists contain all the information on where an addon is stored in the YSFlight directory tree.
These files are commonly reffered to as LST's by the YSFHQ community, due to their file extension: .LST
How do you open an LST? with notepad or some text editor... They are all plain english, not compressed/encoded etc.
LST's need to start with either air_, sce_ or gro_ for ysflight to successfully see the LST and attempt to load addons for it.
Your standard LST file works by having ONE addon per line.
Each addon requires a minimum of 3 path definitions, and a maximum of 5 path definitions. A path definition, is just the location of a file, relative to the root folder (the folder where fsmaino.exe is, usually c:\Program Files\YSFLIGHT.COM\YSFlight for most users). You will see something like "User\Flake\BlackDragons\_1.dat" followed by a space then another string (bunch of text) similar to it...
Components of a LST Addon Definition.
As previously mentioned: .LST have a minimum of 3, maximum of 5 parts.
Addon Information (.DAT)
Addon Model (.DNM)
Collision Detection Model (.SRF)
Cockpit Model (.SRF)
Coarse Model (.DNM)
The .DAT file - the Aircraft Information - tells YSFlight all the characteristics of the addon: The name of the addon, what type of aircraft (plane/helicopter?) it's power, weight, turn rate, weapons load...
There is a sticky in this forum on dat variables. Your FIRST ADDON should probably be a .dat modification, this will get you started with the YSFlight Structure.
The .DNM file - the Aircraft Model - this is the visual model you see in game. It is a bunch of SRF files (explained below) combined into an animated model that YSFlight displays in game.
DNM's are best edited with DNMViewer and Blender.
The .SRF file - the Collision Model - is VERY low detail, just a few polygons (2d shaped like triangles/rectangles) for ysflight to check aircraft collision/bullet collisions etc. Many Collision files are very very low detail, you can sometimes, just tell what the model would be.
An .SRF file is a "SURF VIEW" file. this is the standard model format used by ysflight.
The .SRF file - the Cockpit Model - this model is shown only when the pilot is flying or has selected the aircraft and is inside of it. it is common practice to separate high detail cockpits into separate .SRF files as to reduce in game lag. Other modelers simply use a "NULL.SRF" file - a "blank" model to overwrite the default grey cockpit case on the model if a cockpit model is NOT defined. a cockpit srf file is OPTIONAL.
The .DNM file - the Coarse Model - this coarse model is shown when the user is far away from the flight model, it has less detail then the standard model and thus has less wear on the graphics resources. it is common for modelers to use a lower quality model here, one that can be clearly identified as the addon but does not look nearly as good. Authors such as TaskForce58 do this to great effect (ysflight.ca)
Standard Model Package practice
Many modelers release their addons in ZIP format (compression drasticly reduces the size of the package, as the game models themselves are plain text - uncompressed and large.)
Often, an addon pack will have just two or three folders: User and then another folder such as Aircraft depending on the addon. These folders are all dragged and dropped into the YSFlight Root folder (see above), merging their contents.
It is very bad practice to name your .LST as "Aircraft.lst" or "Ground.lst" - this OVERWRITES the default pack!
Good naming convention is: Type_Author_PackName eg: "Air_Flake_BlackDragons.LST"
It is also very polite to include a "Credits.txt" document crediting original authors of your derivative works... be sure to check the release policy of the addons you intend to modify: some authors do not like people releasing "butchered" versions of their hard work!
So to summarize: Every addon will have a .LST defining the specific addon vehicles/objects in the pack.
Each list has an information .DAT, a standard quality model .DNM, and a very low quality .SRF
Some addons also have an additional cockpit file .SRF and a lower quality coarse model .DNM.
Eg in LST: Aircraft/F22.dat Aircraft/F22.dnm Aircraft/F22_coll.srf Aircraft/F22_cock.srf Aircraft/F22_coarse.dnm
So what now? You can start by modifying the default addons!
Edit a .DAT with notepad, see what changes.
Repaint a .SRF with gepolyo.exe/Blender, enjoy the new colors!
Create new .SRFs with gepolye.exe/Blender, you've just made your first YSFlight model component!
Add the .SRFs to the .DNM model with DNMViewer/Blender - you've just modified your first YSFlight complete model!
Combine the above: repaint, adjust performance, add logos - you've just made your first addon modification pack!
build your own pack by writing your own LST file and separating the parts into folders and zipping up: You've just made your first YSFLIGHT ADDON.
Good luck, please view the tutorials on this forum for more info on any subject you need help with. The members of the modding team will be glad to help you as well.
The team at YSFlight Headquarters.
ModNotes: Needs screenshots, needs formating, needs peer review.
- Posts: 131
- Joined: Fri Jan 13, 2012 11:47 pm
- Favorite Aircraft: F-16C, A-10A
- Has thanked: 11 times
- Been thanked: 4 times
you can sometimes, just
My Grammar Nazism-OCD tells me that this comma should be burnt.
Burn da hereticomma!
- Posts: 257
- Joined: Mon Mar 10, 2014 9:05 pm
- Favorite Aircraft: F-18 Hornet
- Location: Qc
- OS: Win 7 pro
- Has thanked: 98 times
- Been thanked: 55 times
Users browsing this forum: No registered users and 3 guests