<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hard-light.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ShivanSpS</id>
	<title>FreeSpace Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hard-light.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ShivanSpS"/>
	<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php/Special:Contributions/ShivanSpS"/>
	<updated>2026-11-15T10:20:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64936</id>
		<title>Mod.ini</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64936"/>
		<updated>2023-08-20T15:04:20Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Complete KnossosNET mod.ini Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:(Copied from the mod.ini documentation on wxLauncher&#039;s old Google Code wiki ([https://web.archive.org/web/20150118024053/http://code.google.com/p/wxlauncher/wiki/ModIniOptions https://code.google.com/p/wxlauncher/wiki/ModIniOptions]) with modifications)&lt;br /&gt;
&lt;br /&gt;
This page describes all of the mod.ini options available to mod/[[Total conversions|total conversion (TC)]] authors. Most options are available to both mods and TCs, with the exception that &#039;&#039;&#039;the skin feature is available to TCs only&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
First, take a look at the [[Mod.ini#Complete_mod.ini_sample|complete mod.ini sample]] to get a sense of the new mod.ini format&#039;s capabilities.&lt;br /&gt;
&lt;br /&gt;
About the old format, there are two important points:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ALL of the mod.ini settings are OPTIONAL.&#039;&#039;&#039; The only requirement is that the mod.ini file &#039;&#039;must&#039;&#039; be present, even if it is blank.&lt;br /&gt;
*&#039;&#039;&#039;This format is 100% compatible with the old mod.ini format.&#039;&#039;&#039; Therefore, you can use your existing mod without any changes, as long as the mod has a mod.ini file in its mod folder.&lt;br /&gt;
&lt;br /&gt;
==General notes==&lt;br /&gt;
There are several details that should be considered when creating a mod.ini:&lt;br /&gt;
&lt;br /&gt;
*Resource files specified in the mod.ini do not have to be placed in the same folder as the mod.ini itself. They can be in a subfolder instead. Thus you can have a &amp;quot;resources&amp;quot; subfolder in your mod and place all the files there so that they don&#039;t clutter your main folder. Separate folders must be specified in the mod.ini using a forward slash (&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;), as in &amp;lt;tt&amp;gt;resources/my_image.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*You can add comments to your file by starting lines with a &amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt; character. Those lines will be ignored by the launcher when it reads your mod.ini.&lt;br /&gt;
*No labels should be left without a value. In other words, all lines in the mod.ini that are not comments or section headers (such as &amp;lt;tt&amp;gt;[launcher]&amp;lt;/tt&amp;gt;) should follow the format &amp;lt;tt&amp;gt;label = value&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Edit your file with a syntax-highlighting capable text editor, such as [http://www.notepad-plus-plus.org/ Notepad++] (Windows), [http://www.barebones.com/products/textwrangler/ TextWrangler] or [http://aquamacs.org/ Aquamacs] (OS X), or [http://www.scintilla.org/ Scintilla] or [http://www.vim.org/ Gvim/Vim] (Linux).&lt;br /&gt;
&lt;br /&gt;
==Common sense (aka TLDR)==&lt;br /&gt;
As noted before, all of the options in the mod.ini are optional. However, as a courtesy for the players, you should include at the very least:&lt;br /&gt;
&lt;br /&gt;
*Mod name (&amp;lt;tt&amp;gt;modname&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Your name (&amp;lt;tt&amp;gt;author&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Mod description (&amp;lt;tt&amp;gt;infotext&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*If your mod depends on any mods, list those (&amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
To make things easy, you can copy this [[Mod.ini#Basic_mod.ini_sample|basic mod.ini]] file, fill it in, and include it with your mod. It asks for exactly these pieces of information.&lt;br /&gt;
&lt;br /&gt;
==Sections==&lt;br /&gt;
&lt;br /&gt;
This guide follows the mod.ini sections in the order they appear in the [[Mod.ini#Complete_mod.ini_sample|sample mod.ini]]. To make the examples fit better, long lines are abbreviated using ellipses (...).&lt;br /&gt;
&lt;br /&gt;
As stated in the sample mod.ini, this example deals with a fictional mod named &amp;quot;The Descent&amp;quot; for [http://babylon.hard-light.net/ The Babylon Project].&lt;br /&gt;
&lt;br /&gt;
===[launcher]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence ... towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You&#039;ll need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section is an expanded version of the old mod.ini. It allows you to define basic details about your mod.&lt;br /&gt;
&lt;br /&gt;
====modname====&lt;br /&gt;
Your &amp;quot;fancy&amp;quot; mod name. There is no length limit, although you should keep it below 50 characters, including spaces. This is the name that will appear in the launcher to identify your mod to the player.&lt;br /&gt;
&lt;br /&gt;
====image255x112====&lt;br /&gt;
The image that defines your mod. Must be 255x112 pixels. Although you can use any of BMP, PNG, or GIF formats, you should use BMP if you want to keep your mod compatible with the Windows launcher. If you don&#039;t specify an image, the current skin&#039;s [[Mod.ini#modimage255x112|modimage255x112]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
====image182x80====&lt;br /&gt;
The image that is shown on the mod list. Use it if you don&#039;t like the way the launcher shrinks your big image or if you want to emphasize some detail from it. Try not to confuse the user with two totally different images, though.&lt;br /&gt;
&lt;br /&gt;
====infotext====&lt;br /&gt;
Introductory text for your mod. Summary. Teaser. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; All of the text must be written on a single line in the mod.ini file. However, if you want to have a line break in the text (that is, text on a new line) write &amp;quot;\n&amp;quot; (without the quotes) -- see the sample for an example. Also note that the Windows launcher does not support this and will just print the &amp;quot;\n&amp;quot; as they are. &lt;br /&gt;
&lt;br /&gt;
====author====&lt;br /&gt;
Your name. Or your team&#039;s name. People who play your mod should know whose hard work gives them joy. Or an agonizing death. Depending on your modding skills.&lt;br /&gt;
&lt;br /&gt;
====notes====&lt;br /&gt;
Notes regarding your mod. Technical details. Acknowledgements. You name them. Again, must be one line. See [[Mod.ini#infotext|infotext]] for details.&lt;br /&gt;
&lt;br /&gt;
====warn====&lt;br /&gt;
Give this a value of &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt; (a one, not a lowercase L) if your [[Mod.ini#notes|notes]] are of critical importance to the player.&lt;br /&gt;
&lt;br /&gt;
The effect: a warning sign appears besides your mod once selected and also in the mod detail window beside the note itself.&lt;br /&gt;
&lt;br /&gt;
====website====&lt;br /&gt;
Your mod&#039;s mighty homepage.&lt;br /&gt;
&lt;br /&gt;
====forum====&lt;br /&gt;
A link to a dedicated forum/forum section for your mod. If not specified, the [http://www.hard-light.net/forums/index.php?board=124.0 Missions and Campaigns forum] is used.&lt;br /&gt;
&lt;br /&gt;
====bugs====&lt;br /&gt;
This is where the players should report bugs in your mod. Might be a dedicated bug tracker or a simple forum/forum section.&lt;br /&gt;
&lt;br /&gt;
====support====&lt;br /&gt;
A link to the forum/forum section for support of your mod.&lt;br /&gt;
&lt;br /&gt;
===[resolution]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to specify a minimum resolution for your mod. All resolutions smaller than the one you specify will not appear in the Basic Settings page&#039;s &amp;quot;Resolution&amp;quot; drop down box. This section is useful in cases such as when your mod doesn&#039;t have low-res interface art.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution:&#039;&#039;&#039; Be extra-careful with typos when using this section. If you accidentally specify a super-high resolution (say, 1024x7680), then players will be unable to play your mod.&lt;br /&gt;
&lt;br /&gt;
====minhorizontalres====&lt;br /&gt;
The minimum horizontal resolution supported by your mod. Default value is 640.&lt;br /&gt;
&lt;br /&gt;
====minverticalres====&lt;br /&gt;
The minimum vertical resolution supported by your mod. Default value is 480.&lt;br /&gt;
&lt;br /&gt;
===[multimod]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section lists additional mods that need to be loaded for your mod to work properly.&lt;br /&gt;
&lt;br /&gt;
====primarylist/secondarylist====&lt;br /&gt;
&lt;br /&gt;
Contains mods listed by their folder name.&lt;br /&gt;
&lt;br /&gt;
The mods listed in these values will be added to the [[Command-Line_Reference#-mod|-mod]] command line option for the FS2 Open engine and FRED2 Open editor.&lt;br /&gt;
&lt;br /&gt;
To construct the &amp;lt;tt&amp;gt;-mod&amp;lt;/tt&amp;gt; option, the the current mod&#039;s folder name is appended to the mods in the primary mod list, which then has the secondary mod list appended to it, resulting in &amp;lt;tt&amp;gt;primarylist, folder name, secondarylist&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;lt;tt&amp;gt;secondrylist&amp;lt;/tt&amp;gt; can be used in place of &amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt; because of a bug in the original Windows launcher. However, it is deprecated and should not be used. It is provided for compatibility purposes only.&lt;br /&gt;
&lt;br /&gt;
===[recommendedlighting]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 75 ... -ogl_spec 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to provide a recommended selection of [[Command-Line_Reference#Lighting|lighting settings]] for the player. &#039;&#039;This will replace the &amp;quot;Baseline recommended&amp;quot; entry in the lighting presets GUI.&#039;&#039; These settings are &#039;&#039;not&#039;&#039; graphics settings. They are just the knobs for adjusting the level of ambient light, how shiny ships are, and the like.&lt;br /&gt;
&lt;br /&gt;
====name====&lt;br /&gt;
The name that wxLauncher will use to label these settings in the GUI. Limited to 32 characters.&lt;br /&gt;
&lt;br /&gt;
====flagset====&lt;br /&gt;
The flags to be set.&lt;br /&gt;
&lt;br /&gt;
===[skin] (TCs only)===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Welcome to wxLauncher ... &amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The skin section is where you can change the launcher&#039;s appearance. You can alter several visual elements (window title bar text, window icon, etc) without having to distribute a custom-built launcher. You can also choose to specify only part of the skin. Any parts that you don&#039;t specify will be provided by the default launcher skin. &#039;&#039;&#039;Only TCs can skin the launcher.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====windowtitle====&lt;br /&gt;
The text in the title bar of the launcher window. Use only letters and numbers if possible. There is no official character limit, but keep the text to a reasonable size. Since this is a window title bar, all formatting will be ignored.&lt;br /&gt;
&lt;br /&gt;
====windowicon====&lt;br /&gt;
Launcher&#039;s window icon. Must be in Windows icon (ICO) format. &#039;&#039;&#039;Note:&#039;&#039;&#039; Skinning the window icon is currently not supported on OS X.&lt;br /&gt;
&lt;br /&gt;
====banner====&lt;br /&gt;
The welcome page banner. Must be in PNG format. Recommended size is 600x150, with maximum width of 630 pixels and required height of 150 pixels. Will be centered in the welcome page.&lt;br /&gt;
&lt;br /&gt;
====welcometext====&lt;br /&gt;
The text found on the welcome page. Can contain basic HTML tags (such as &amp;lt;tt&amp;gt;&amp;amp;lt;b&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt;&amp;amp;lt;ul&amp;amp;lt;&amp;amp;lt;p&amp;amp;gt;&amp;amp;lt;a&amp;amp;gt;&amp;amp;lt;ol&amp;amp;gt;&amp;amp;lt;u&amp;amp;gt;&amp;amp;lt;i&amp;amp;gt;&amp;amp;lt;emphasis&amp;amp;gt;&amp;amp;lt;strong&amp;amp;gt;&amp;lt;/tt&amp;gt;) -- see [http://docs.wxwidgets.org/2.8/wx_wxhtml.html#htmltagssupported the wxWidgets wiki] for a complete list.&lt;br /&gt;
&lt;br /&gt;
====modimage255x112====&lt;br /&gt;
The image that is shown in the mod info dialog when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the ordinary mod image (255x112).&lt;br /&gt;
&lt;br /&gt;
====modimage182x80====&lt;br /&gt;
The image that is shown in the mod list when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the mod list-sized image (182x80). If this image is not provided, it will be generated automatically by scaling down the &amp;lt;tt&amp;gt;modimage255x112&amp;lt;/tt&amp;gt; image, if it is provided.&lt;br /&gt;
&lt;br /&gt;
====iconok====&lt;br /&gt;
Icon used in the status bar to indicate that a operation (like news retrieval) succeeded. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarn====&lt;br /&gt;
Icon used in the status bar to indicate that a non-critical operation (like news retrieval) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarnbig====&lt;br /&gt;
Icon used in the modinfo window to indicate that the note specified by the mod author is important and must be read. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconerror====&lt;br /&gt;
Icon used in the status bar to indicate that a critical operation (like launching the game) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfo====&lt;br /&gt;
Icon used in the status bar to indicate various miscellaneous details. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfobig====&lt;br /&gt;
Icon used in the mods page to bring attention to information there. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelp====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 32x32 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelpbig====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconideal====&lt;br /&gt;
Icon that is currently not used but may eventually be used to mark recommended flags. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====newssource====&lt;br /&gt;
The name of the source that wxLauncher should get its news from. Current supported values are &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;diaspora&amp;lt;/tt&amp;gt;, with unrecognized values resulting in the default value &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; being selected. More values will be added as more TCs ship with wxLauncher.&lt;br /&gt;
&lt;br /&gt;
==Samples==&lt;br /&gt;
&lt;br /&gt;
===Basic mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Just replace the text in &amp;lt;&amp;gt; with information about your mod&lt;br /&gt;
# and then put the file in your mod folder.&lt;br /&gt;
# For more things you can do with a mod.ini file, see&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname  = &amp;lt;NameOfYourMod&amp;gt;&lt;br /&gt;
infotext = &amp;lt;Describe your mod. You can use \n to add line breaks.&amp;gt;&lt;br /&gt;
author   = &amp;lt;YourName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# If your mod requires other mods to run, include this section,&lt;br /&gt;
# otherwise remove it.&lt;br /&gt;
[multimod]&lt;br /&gt;
secondarylist = &amp;lt;ModDependency1&amp;gt;,&amp;lt;ModDependency2&amp;gt;,&amp;lt;etc.&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Complete mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This is a fully-fledged mod.ini sample using ALL of the options&lt;br /&gt;
# available to mod/TC authors. Please visit the mod.ini wiki page&lt;br /&gt;
# to learn about what different options do:&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# This sample was created for a fictional mod named &amp;quot;The Descent&amp;quot;&lt;br /&gt;
# for the Babylon Project total conversion.&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence among the stars. An eternity has passed, and the Astrid was still sleeping in the coldness of space. Without warning, her forward thrusters fired with an eerie glow, sending vibrations throughout the ship. Metal screamed in protest, as more thrusters fired, shaking the solar dust of the hull. \n\nThen it was silence again. \n\nNothing appeared to have changed, yet slowly but surely, the destroyer had begun its descent towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You will need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name    = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 90 -spec_exp 0.7 -spec_tube 1.0 -spec_point 0.7 -spec_static 1.0 -ogl_spec 15 -bloom_intensity 20&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;center&amp;gt;&amp;lt;b&amp;gt;&amp;lt;font size=&#039;3&#039;&amp;gt;Welcome to wxLauncher, your one-stop-shop for Freespace 2 and related content&amp;lt;/font&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;If you&#039;re new to the Freespace 2 universe, you might want to check out these links first:&amp;lt;br&amp;gt; = &amp;lt;a href=&#039;http://www.hard-light.net/wiki/index.php/Main_Page&#039;&amp;gt;FS2 Wiki&amp;lt;/a&amp;gt;  = &amp;lt;a href=&#039;http://www.hard-light.net/forums/&#039;&amp;gt;FS2 Forum&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://en.wikipedia.org/wiki/FreeSpace_2&#039;&amp;gt;Wikipedia FS2 page&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://scp.indiegames.us/mantis/main_page.php&#039;&amp;gt; Reporting bugs&amp;lt;/a&amp;gt; =&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Also, don&#039;t  forget the help file, there is a nice &#039;Getting Started&#039; tutorial there.&amp;lt;br&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==KnossosNET Support==&lt;br /&gt;
Knossos.NET can load mod.ini files if the mod.json is not present in the folder, the keys that KnossosNET can use are these ones:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname (defaults to folder name if not present)&lt;br /&gt;
image255x112&lt;br /&gt;
image182x80 (used if image255x112 is not present)&lt;br /&gt;
infotext&lt;br /&gt;
forum&lt;br /&gt;
notes&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist&lt;br /&gt;
secondarylist&lt;br /&gt;
secondrylist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Line terminators (;) arent needed, and will be ignored if they are present.&lt;br /&gt;
&lt;br /&gt;
There is limited support for primarylist, secondarylist... &lt;br /&gt;
Only &#039;&#039;&#039;mediavps, fsport and fsport-mediavps&#039;&#039;&#039; will be detected on those lists, and if they do they are added to the mod dependency list set to always use the newerest version.&lt;br /&gt;
Nevertheless, custom dependencies can be used in launcher to add/remove them or set a version.&lt;br /&gt;
A FSO dependency set to the never version will also be added.&lt;br /&gt;
&lt;br /&gt;
==New section and values==&lt;br /&gt;
All the new values are added to a new section for easy reference, their function is similar or identical to the json equivalents.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mod]&lt;br /&gt;
id&lt;br /&gt;
version&lt;br /&gt;
type&lt;br /&gt;
parent&lt;br /&gt;
tile&lt;br /&gt;
banner&lt;br /&gt;
dependencylist&lt;br /&gt;
cmdline&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====id====&lt;br /&gt;
Defines the mod unique id, defaults to folder name if not set&lt;br /&gt;
====version====&lt;br /&gt;
Mod semantic version, defaults to 1.0.0-&amp;lt;foldername&amp;gt; if not set&lt;br /&gt;
====type====&lt;br /&gt;
Mod type: tc or mod (default: mod)&lt;br /&gt;
====parent====&lt;br /&gt;
Only used if type = mod, defaults to parent folder name if not set&lt;br /&gt;
====tile====&lt;br /&gt;
The 150x225 tile image, image255x112 or image182x80 is used if not present&lt;br /&gt;
====banner====&lt;br /&gt;
1070x300 banner image, image255x112 or image182x80 is used if not present&lt;br /&gt;
====dependencylist====&lt;br /&gt;
This is a mod.ini format of setting mod dependencies, primarylist/secondary used if not set.&lt;br /&gt;
It is a list of modid|version (optional) separated by comas.&lt;br /&gt;
If version is not defined the newerest version is used.&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This adds mediavps version 3.6.12, FSO version 32.2.0-RC1 and CP_m with the newerest version to the mod dependency list.&lt;br /&gt;
====cmdline====&lt;br /&gt;
a optional mod cmdline to pass to fso&lt;br /&gt;
&lt;br /&gt;
==Complete KnossosNET mod.ini Example==&lt;br /&gt;
Compatible with old launchers and KnossosNET&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname      = Shadow Genesis;&lt;br /&gt;
image255x112 = ShadowGenesis.bmp;&lt;br /&gt;
image182x80  = ShadowGenesisSmall.bmp;&lt;br /&gt;
infotext     = It is the year 2390. Lieutenant Nathan Miles begins duty in the 6th Terran Fleet, commonly know as the Wolf&#039;s Fleet. This fleet, having mostly autonomical command structure, is responsible for safety of strategic Alliance systems - the Wolf&#039;s Group, intensively colonized sector where multiple Ancient ruins have been found. Human- and Vasudankind are protected by their powerful navy, but despite that, times are not easy. Mysterious terrorist organization called Cerberus Legacy is rapidly spreading its influence in the GTVA, and their leaders are preparing an intrigue that may lead the Wolf&#039;s Group on the brink of destruction...;&lt;br /&gt;
forum        = http://www.freespace.pl/forum/viewtopic.php?t=5534;&lt;br /&gt;
notes        = This is a legacy mod;&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondrylist = Shadow Genesis,mediavps_3612;&lt;br /&gt;
&lt;br /&gt;
[mod]&lt;br /&gt;
id             = sg_legacy&lt;br /&gt;
version        = 1.0.0-Legacy&lt;br /&gt;
type	       = mod&lt;br /&gt;
parent	       = FS2&lt;br /&gt;
tile           = kn_tile.png&lt;br /&gt;
banner         = kn_banner.png&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
cmdline        = -fps -light 0.8 -ambient 0.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Mod.ini_(old)|Old mod.ini documentation]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64935</id>
		<title>Mod.ini</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64935"/>
		<updated>2023-08-20T15:03:07Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* New section and values */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:(Copied from the mod.ini documentation on wxLauncher&#039;s old Google Code wiki ([https://web.archive.org/web/20150118024053/http://code.google.com/p/wxlauncher/wiki/ModIniOptions https://code.google.com/p/wxlauncher/wiki/ModIniOptions]) with modifications)&lt;br /&gt;
&lt;br /&gt;
This page describes all of the mod.ini options available to mod/[[Total conversions|total conversion (TC)]] authors. Most options are available to both mods and TCs, with the exception that &#039;&#039;&#039;the skin feature is available to TCs only&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
First, take a look at the [[Mod.ini#Complete_mod.ini_sample|complete mod.ini sample]] to get a sense of the new mod.ini format&#039;s capabilities.&lt;br /&gt;
&lt;br /&gt;
About the old format, there are two important points:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ALL of the mod.ini settings are OPTIONAL.&#039;&#039;&#039; The only requirement is that the mod.ini file &#039;&#039;must&#039;&#039; be present, even if it is blank.&lt;br /&gt;
*&#039;&#039;&#039;This format is 100% compatible with the old mod.ini format.&#039;&#039;&#039; Therefore, you can use your existing mod without any changes, as long as the mod has a mod.ini file in its mod folder.&lt;br /&gt;
&lt;br /&gt;
==General notes==&lt;br /&gt;
There are several details that should be considered when creating a mod.ini:&lt;br /&gt;
&lt;br /&gt;
*Resource files specified in the mod.ini do not have to be placed in the same folder as the mod.ini itself. They can be in a subfolder instead. Thus you can have a &amp;quot;resources&amp;quot; subfolder in your mod and place all the files there so that they don&#039;t clutter your main folder. Separate folders must be specified in the mod.ini using a forward slash (&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;), as in &amp;lt;tt&amp;gt;resources/my_image.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*You can add comments to your file by starting lines with a &amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt; character. Those lines will be ignored by the launcher when it reads your mod.ini.&lt;br /&gt;
*No labels should be left without a value. In other words, all lines in the mod.ini that are not comments or section headers (such as &amp;lt;tt&amp;gt;[launcher]&amp;lt;/tt&amp;gt;) should follow the format &amp;lt;tt&amp;gt;label = value&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Edit your file with a syntax-highlighting capable text editor, such as [http://www.notepad-plus-plus.org/ Notepad++] (Windows), [http://www.barebones.com/products/textwrangler/ TextWrangler] or [http://aquamacs.org/ Aquamacs] (OS X), or [http://www.scintilla.org/ Scintilla] or [http://www.vim.org/ Gvim/Vim] (Linux).&lt;br /&gt;
&lt;br /&gt;
==Common sense (aka TLDR)==&lt;br /&gt;
As noted before, all of the options in the mod.ini are optional. However, as a courtesy for the players, you should include at the very least:&lt;br /&gt;
&lt;br /&gt;
*Mod name (&amp;lt;tt&amp;gt;modname&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Your name (&amp;lt;tt&amp;gt;author&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Mod description (&amp;lt;tt&amp;gt;infotext&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*If your mod depends on any mods, list those (&amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
To make things easy, you can copy this [[Mod.ini#Basic_mod.ini_sample|basic mod.ini]] file, fill it in, and include it with your mod. It asks for exactly these pieces of information.&lt;br /&gt;
&lt;br /&gt;
==Sections==&lt;br /&gt;
&lt;br /&gt;
This guide follows the mod.ini sections in the order they appear in the [[Mod.ini#Complete_mod.ini_sample|sample mod.ini]]. To make the examples fit better, long lines are abbreviated using ellipses (...).&lt;br /&gt;
&lt;br /&gt;
As stated in the sample mod.ini, this example deals with a fictional mod named &amp;quot;The Descent&amp;quot; for [http://babylon.hard-light.net/ The Babylon Project].&lt;br /&gt;
&lt;br /&gt;
===[launcher]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence ... towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You&#039;ll need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section is an expanded version of the old mod.ini. It allows you to define basic details about your mod.&lt;br /&gt;
&lt;br /&gt;
====modname====&lt;br /&gt;
Your &amp;quot;fancy&amp;quot; mod name. There is no length limit, although you should keep it below 50 characters, including spaces. This is the name that will appear in the launcher to identify your mod to the player.&lt;br /&gt;
&lt;br /&gt;
====image255x112====&lt;br /&gt;
The image that defines your mod. Must be 255x112 pixels. Although you can use any of BMP, PNG, or GIF formats, you should use BMP if you want to keep your mod compatible with the Windows launcher. If you don&#039;t specify an image, the current skin&#039;s [[Mod.ini#modimage255x112|modimage255x112]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
====image182x80====&lt;br /&gt;
The image that is shown on the mod list. Use it if you don&#039;t like the way the launcher shrinks your big image or if you want to emphasize some detail from it. Try not to confuse the user with two totally different images, though.&lt;br /&gt;
&lt;br /&gt;
====infotext====&lt;br /&gt;
Introductory text for your mod. Summary. Teaser. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; All of the text must be written on a single line in the mod.ini file. However, if you want to have a line break in the text (that is, text on a new line) write &amp;quot;\n&amp;quot; (without the quotes) -- see the sample for an example. Also note that the Windows launcher does not support this and will just print the &amp;quot;\n&amp;quot; as they are. &lt;br /&gt;
&lt;br /&gt;
====author====&lt;br /&gt;
Your name. Or your team&#039;s name. People who play your mod should know whose hard work gives them joy. Or an agonizing death. Depending on your modding skills.&lt;br /&gt;
&lt;br /&gt;
====notes====&lt;br /&gt;
Notes regarding your mod. Technical details. Acknowledgements. You name them. Again, must be one line. See [[Mod.ini#infotext|infotext]] for details.&lt;br /&gt;
&lt;br /&gt;
====warn====&lt;br /&gt;
Give this a value of &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt; (a one, not a lowercase L) if your [[Mod.ini#notes|notes]] are of critical importance to the player.&lt;br /&gt;
&lt;br /&gt;
The effect: a warning sign appears besides your mod once selected and also in the mod detail window beside the note itself.&lt;br /&gt;
&lt;br /&gt;
====website====&lt;br /&gt;
Your mod&#039;s mighty homepage.&lt;br /&gt;
&lt;br /&gt;
====forum====&lt;br /&gt;
A link to a dedicated forum/forum section for your mod. If not specified, the [http://www.hard-light.net/forums/index.php?board=124.0 Missions and Campaigns forum] is used.&lt;br /&gt;
&lt;br /&gt;
====bugs====&lt;br /&gt;
This is where the players should report bugs in your mod. Might be a dedicated bug tracker or a simple forum/forum section.&lt;br /&gt;
&lt;br /&gt;
====support====&lt;br /&gt;
A link to the forum/forum section for support of your mod.&lt;br /&gt;
&lt;br /&gt;
===[resolution]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to specify a minimum resolution for your mod. All resolutions smaller than the one you specify will not appear in the Basic Settings page&#039;s &amp;quot;Resolution&amp;quot; drop down box. This section is useful in cases such as when your mod doesn&#039;t have low-res interface art.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution:&#039;&#039;&#039; Be extra-careful with typos when using this section. If you accidentally specify a super-high resolution (say, 1024x7680), then players will be unable to play your mod.&lt;br /&gt;
&lt;br /&gt;
====minhorizontalres====&lt;br /&gt;
The minimum horizontal resolution supported by your mod. Default value is 640.&lt;br /&gt;
&lt;br /&gt;
====minverticalres====&lt;br /&gt;
The minimum vertical resolution supported by your mod. Default value is 480.&lt;br /&gt;
&lt;br /&gt;
===[multimod]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section lists additional mods that need to be loaded for your mod to work properly.&lt;br /&gt;
&lt;br /&gt;
====primarylist/secondarylist====&lt;br /&gt;
&lt;br /&gt;
Contains mods listed by their folder name.&lt;br /&gt;
&lt;br /&gt;
The mods listed in these values will be added to the [[Command-Line_Reference#-mod|-mod]] command line option for the FS2 Open engine and FRED2 Open editor.&lt;br /&gt;
&lt;br /&gt;
To construct the &amp;lt;tt&amp;gt;-mod&amp;lt;/tt&amp;gt; option, the the current mod&#039;s folder name is appended to the mods in the primary mod list, which then has the secondary mod list appended to it, resulting in &amp;lt;tt&amp;gt;primarylist, folder name, secondarylist&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;lt;tt&amp;gt;secondrylist&amp;lt;/tt&amp;gt; can be used in place of &amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt; because of a bug in the original Windows launcher. However, it is deprecated and should not be used. It is provided for compatibility purposes only.&lt;br /&gt;
&lt;br /&gt;
===[recommendedlighting]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 75 ... -ogl_spec 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to provide a recommended selection of [[Command-Line_Reference#Lighting|lighting settings]] for the player. &#039;&#039;This will replace the &amp;quot;Baseline recommended&amp;quot; entry in the lighting presets GUI.&#039;&#039; These settings are &#039;&#039;not&#039;&#039; graphics settings. They are just the knobs for adjusting the level of ambient light, how shiny ships are, and the like.&lt;br /&gt;
&lt;br /&gt;
====name====&lt;br /&gt;
The name that wxLauncher will use to label these settings in the GUI. Limited to 32 characters.&lt;br /&gt;
&lt;br /&gt;
====flagset====&lt;br /&gt;
The flags to be set.&lt;br /&gt;
&lt;br /&gt;
===[skin] (TCs only)===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Welcome to wxLauncher ... &amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The skin section is where you can change the launcher&#039;s appearance. You can alter several visual elements (window title bar text, window icon, etc) without having to distribute a custom-built launcher. You can also choose to specify only part of the skin. Any parts that you don&#039;t specify will be provided by the default launcher skin. &#039;&#039;&#039;Only TCs can skin the launcher.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====windowtitle====&lt;br /&gt;
The text in the title bar of the launcher window. Use only letters and numbers if possible. There is no official character limit, but keep the text to a reasonable size. Since this is a window title bar, all formatting will be ignored.&lt;br /&gt;
&lt;br /&gt;
====windowicon====&lt;br /&gt;
Launcher&#039;s window icon. Must be in Windows icon (ICO) format. &#039;&#039;&#039;Note:&#039;&#039;&#039; Skinning the window icon is currently not supported on OS X.&lt;br /&gt;
&lt;br /&gt;
====banner====&lt;br /&gt;
The welcome page banner. Must be in PNG format. Recommended size is 600x150, with maximum width of 630 pixels and required height of 150 pixels. Will be centered in the welcome page.&lt;br /&gt;
&lt;br /&gt;
====welcometext====&lt;br /&gt;
The text found on the welcome page. Can contain basic HTML tags (such as &amp;lt;tt&amp;gt;&amp;amp;lt;b&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt;&amp;amp;lt;ul&amp;amp;lt;&amp;amp;lt;p&amp;amp;gt;&amp;amp;lt;a&amp;amp;gt;&amp;amp;lt;ol&amp;amp;gt;&amp;amp;lt;u&amp;amp;gt;&amp;amp;lt;i&amp;amp;gt;&amp;amp;lt;emphasis&amp;amp;gt;&amp;amp;lt;strong&amp;amp;gt;&amp;lt;/tt&amp;gt;) -- see [http://docs.wxwidgets.org/2.8/wx_wxhtml.html#htmltagssupported the wxWidgets wiki] for a complete list.&lt;br /&gt;
&lt;br /&gt;
====modimage255x112====&lt;br /&gt;
The image that is shown in the mod info dialog when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the ordinary mod image (255x112).&lt;br /&gt;
&lt;br /&gt;
====modimage182x80====&lt;br /&gt;
The image that is shown in the mod list when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the mod list-sized image (182x80). If this image is not provided, it will be generated automatically by scaling down the &amp;lt;tt&amp;gt;modimage255x112&amp;lt;/tt&amp;gt; image, if it is provided.&lt;br /&gt;
&lt;br /&gt;
====iconok====&lt;br /&gt;
Icon used in the status bar to indicate that a operation (like news retrieval) succeeded. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarn====&lt;br /&gt;
Icon used in the status bar to indicate that a non-critical operation (like news retrieval) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarnbig====&lt;br /&gt;
Icon used in the modinfo window to indicate that the note specified by the mod author is important and must be read. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconerror====&lt;br /&gt;
Icon used in the status bar to indicate that a critical operation (like launching the game) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfo====&lt;br /&gt;
Icon used in the status bar to indicate various miscellaneous details. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfobig====&lt;br /&gt;
Icon used in the mods page to bring attention to information there. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelp====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 32x32 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelpbig====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconideal====&lt;br /&gt;
Icon that is currently not used but may eventually be used to mark recommended flags. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====newssource====&lt;br /&gt;
The name of the source that wxLauncher should get its news from. Current supported values are &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;diaspora&amp;lt;/tt&amp;gt;, with unrecognized values resulting in the default value &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; being selected. More values will be added as more TCs ship with wxLauncher.&lt;br /&gt;
&lt;br /&gt;
==Samples==&lt;br /&gt;
&lt;br /&gt;
===Basic mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Just replace the text in &amp;lt;&amp;gt; with information about your mod&lt;br /&gt;
# and then put the file in your mod folder.&lt;br /&gt;
# For more things you can do with a mod.ini file, see&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname  = &amp;lt;NameOfYourMod&amp;gt;&lt;br /&gt;
infotext = &amp;lt;Describe your mod. You can use \n to add line breaks.&amp;gt;&lt;br /&gt;
author   = &amp;lt;YourName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# If your mod requires other mods to run, include this section,&lt;br /&gt;
# otherwise remove it.&lt;br /&gt;
[multimod]&lt;br /&gt;
secondarylist = &amp;lt;ModDependency1&amp;gt;,&amp;lt;ModDependency2&amp;gt;,&amp;lt;etc.&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Complete mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This is a fully-fledged mod.ini sample using ALL of the options&lt;br /&gt;
# available to mod/TC authors. Please visit the mod.ini wiki page&lt;br /&gt;
# to learn about what different options do:&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# This sample was created for a fictional mod named &amp;quot;The Descent&amp;quot;&lt;br /&gt;
# for the Babylon Project total conversion.&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence among the stars. An eternity has passed, and the Astrid was still sleeping in the coldness of space. Without warning, her forward thrusters fired with an eerie glow, sending vibrations throughout the ship. Metal screamed in protest, as more thrusters fired, shaking the solar dust of the hull. \n\nThen it was silence again. \n\nNothing appeared to have changed, yet slowly but surely, the destroyer had begun its descent towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You will need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name    = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 90 -spec_exp 0.7 -spec_tube 1.0 -spec_point 0.7 -spec_static 1.0 -ogl_spec 15 -bloom_intensity 20&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;center&amp;gt;&amp;lt;b&amp;gt;&amp;lt;font size=&#039;3&#039;&amp;gt;Welcome to wxLauncher, your one-stop-shop for Freespace 2 and related content&amp;lt;/font&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;If you&#039;re new to the Freespace 2 universe, you might want to check out these links first:&amp;lt;br&amp;gt; = &amp;lt;a href=&#039;http://www.hard-light.net/wiki/index.php/Main_Page&#039;&amp;gt;FS2 Wiki&amp;lt;/a&amp;gt;  = &amp;lt;a href=&#039;http://www.hard-light.net/forums/&#039;&amp;gt;FS2 Forum&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://en.wikipedia.org/wiki/FreeSpace_2&#039;&amp;gt;Wikipedia FS2 page&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://scp.indiegames.us/mantis/main_page.php&#039;&amp;gt; Reporting bugs&amp;lt;/a&amp;gt; =&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Also, don&#039;t  forget the help file, there is a nice &#039;Getting Started&#039; tutorial there.&amp;lt;br&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==KnossosNET Support==&lt;br /&gt;
Knossos.NET can load mod.ini files if the mod.json is not present in the folder, the keys that KnossosNET can use are these ones:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname (defaults to folder name if not present)&lt;br /&gt;
image255x112&lt;br /&gt;
image182x80 (used if image255x112 is not present)&lt;br /&gt;
infotext&lt;br /&gt;
forum&lt;br /&gt;
notes&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist&lt;br /&gt;
secondarylist&lt;br /&gt;
secondrylist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Line terminators (;) arent needed, and will be ignored if they are present.&lt;br /&gt;
&lt;br /&gt;
There is limited support for primarylist, secondarylist... &lt;br /&gt;
Only &#039;&#039;&#039;mediavps, fsport and fsport-mediavps&#039;&#039;&#039; will be detected on those lists, and if they do they are added to the mod dependency list set to always use the newerest version.&lt;br /&gt;
Nevertheless, custom dependencies can be used in launcher to add/remove them or set a version.&lt;br /&gt;
A FSO dependency set to the never version will also be added.&lt;br /&gt;
&lt;br /&gt;
==New section and values==&lt;br /&gt;
All the new values are added to a new section for easy reference, their function is similar or identical to the json equivalents.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mod]&lt;br /&gt;
id&lt;br /&gt;
version&lt;br /&gt;
type&lt;br /&gt;
parent&lt;br /&gt;
tile&lt;br /&gt;
banner&lt;br /&gt;
dependencylist&lt;br /&gt;
cmdline&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====id====&lt;br /&gt;
Defines the mod unique id, defaults to folder name if not set&lt;br /&gt;
====version====&lt;br /&gt;
Mod semantic version, defaults to 1.0.0-&amp;lt;foldername&amp;gt; if not set&lt;br /&gt;
====type====&lt;br /&gt;
Mod type: tc or mod (default: mod)&lt;br /&gt;
====parent====&lt;br /&gt;
Only used if type = mod, defaults to parent folder name if not set&lt;br /&gt;
====tile====&lt;br /&gt;
The 150x225 tile image, image255x112 or image182x80 is used if not present&lt;br /&gt;
====banner====&lt;br /&gt;
1070x300 banner image, image255x112 or image182x80 is used if not present&lt;br /&gt;
====dependencylist====&lt;br /&gt;
This is a mod.ini format of setting mod dependencies, primarylist/secondary used if not set.&lt;br /&gt;
It is a list of modid|version (optional) separated by comas.&lt;br /&gt;
If version is not defined the newerest version is used.&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This adds mediavps version 3.6.12, FSO version 32.2.0-RC1 and CP_m with the newerest version to the mod dependency list.&lt;br /&gt;
====cmdline====&lt;br /&gt;
a optional mod cmdline to pass to fso&lt;br /&gt;
&lt;br /&gt;
==Complete KnossosNET mod.ini Example==&lt;br /&gt;
Compatible with old launchers and KnossosNET&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname      = Shadow Genesis&lt;br /&gt;
image255x112 = ShadowGenesis.bmp;&lt;br /&gt;
image182x80  = ShadowGenesisSmall.bmp;&lt;br /&gt;
infotext     = It is the year 2390. Lieutenant Nathan Miles begins duty in the 6th Terran Fleet, commonly know as the Wolf&#039;s Fleet. This fleet, having mostly autonomical command structure, is responsible for safety of strategic Alliance systems - the Wolf&#039;s Group, intensively colonized sector where multiple Ancient ruins have been found. Human- and Vasudankind are protected by their powerful navy, but despite that, times are not easy. Mysterious terrorist organization called Cerberus Legacy is rapidly spreading its influence in the GTVA, and their leaders are preparing an intrigue that may lead the Wolf&#039;s Group on the brink of destruction...;&lt;br /&gt;
forum        = http://www.freespace.pl/forum/viewtopic.php?t=5534;&lt;br /&gt;
notes        = This is a legacy mod;&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondrylist = Shadow Genesis,mediavps_3612;&lt;br /&gt;
&lt;br /&gt;
[mod]&lt;br /&gt;
id             = sg_legacy&lt;br /&gt;
version        = 1.0.0-Legacy&lt;br /&gt;
type	       = mod&lt;br /&gt;
parent	       = FS2&lt;br /&gt;
tile           = kn_tile.png&lt;br /&gt;
banner         = kn_banner.png&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
cmdline        = -fps -light 0.8 -ambient 0.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Mod.ini_(old)|Old mod.ini documentation]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64934</id>
		<title>Mod.ini</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64934"/>
		<updated>2023-08-20T14:55:34Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* dependencylist */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:(Copied from the mod.ini documentation on wxLauncher&#039;s old Google Code wiki ([https://web.archive.org/web/20150118024053/http://code.google.com/p/wxlauncher/wiki/ModIniOptions https://code.google.com/p/wxlauncher/wiki/ModIniOptions]) with modifications)&lt;br /&gt;
&lt;br /&gt;
This page describes all of the mod.ini options available to mod/[[Total conversions|total conversion (TC)]] authors. Most options are available to both mods and TCs, with the exception that &#039;&#039;&#039;the skin feature is available to TCs only&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
First, take a look at the [[Mod.ini#Complete_mod.ini_sample|complete mod.ini sample]] to get a sense of the new mod.ini format&#039;s capabilities.&lt;br /&gt;
&lt;br /&gt;
About the old format, there are two important points:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ALL of the mod.ini settings are OPTIONAL.&#039;&#039;&#039; The only requirement is that the mod.ini file &#039;&#039;must&#039;&#039; be present, even if it is blank.&lt;br /&gt;
*&#039;&#039;&#039;This format is 100% compatible with the old mod.ini format.&#039;&#039;&#039; Therefore, you can use your existing mod without any changes, as long as the mod has a mod.ini file in its mod folder.&lt;br /&gt;
&lt;br /&gt;
==General notes==&lt;br /&gt;
There are several details that should be considered when creating a mod.ini:&lt;br /&gt;
&lt;br /&gt;
*Resource files specified in the mod.ini do not have to be placed in the same folder as the mod.ini itself. They can be in a subfolder instead. Thus you can have a &amp;quot;resources&amp;quot; subfolder in your mod and place all the files there so that they don&#039;t clutter your main folder. Separate folders must be specified in the mod.ini using a forward slash (&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;), as in &amp;lt;tt&amp;gt;resources/my_image.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*You can add comments to your file by starting lines with a &amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt; character. Those lines will be ignored by the launcher when it reads your mod.ini.&lt;br /&gt;
*No labels should be left without a value. In other words, all lines in the mod.ini that are not comments or section headers (such as &amp;lt;tt&amp;gt;[launcher]&amp;lt;/tt&amp;gt;) should follow the format &amp;lt;tt&amp;gt;label = value&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Edit your file with a syntax-highlighting capable text editor, such as [http://www.notepad-plus-plus.org/ Notepad++] (Windows), [http://www.barebones.com/products/textwrangler/ TextWrangler] or [http://aquamacs.org/ Aquamacs] (OS X), or [http://www.scintilla.org/ Scintilla] or [http://www.vim.org/ Gvim/Vim] (Linux).&lt;br /&gt;
&lt;br /&gt;
==Common sense (aka TLDR)==&lt;br /&gt;
As noted before, all of the options in the mod.ini are optional. However, as a courtesy for the players, you should include at the very least:&lt;br /&gt;
&lt;br /&gt;
*Mod name (&amp;lt;tt&amp;gt;modname&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Your name (&amp;lt;tt&amp;gt;author&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Mod description (&amp;lt;tt&amp;gt;infotext&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*If your mod depends on any mods, list those (&amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
To make things easy, you can copy this [[Mod.ini#Basic_mod.ini_sample|basic mod.ini]] file, fill it in, and include it with your mod. It asks for exactly these pieces of information.&lt;br /&gt;
&lt;br /&gt;
==Sections==&lt;br /&gt;
&lt;br /&gt;
This guide follows the mod.ini sections in the order they appear in the [[Mod.ini#Complete_mod.ini_sample|sample mod.ini]]. To make the examples fit better, long lines are abbreviated using ellipses (...).&lt;br /&gt;
&lt;br /&gt;
As stated in the sample mod.ini, this example deals with a fictional mod named &amp;quot;The Descent&amp;quot; for [http://babylon.hard-light.net/ The Babylon Project].&lt;br /&gt;
&lt;br /&gt;
===[launcher]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence ... towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You&#039;ll need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section is an expanded version of the old mod.ini. It allows you to define basic details about your mod.&lt;br /&gt;
&lt;br /&gt;
====modname====&lt;br /&gt;
Your &amp;quot;fancy&amp;quot; mod name. There is no length limit, although you should keep it below 50 characters, including spaces. This is the name that will appear in the launcher to identify your mod to the player.&lt;br /&gt;
&lt;br /&gt;
====image255x112====&lt;br /&gt;
The image that defines your mod. Must be 255x112 pixels. Although you can use any of BMP, PNG, or GIF formats, you should use BMP if you want to keep your mod compatible with the Windows launcher. If you don&#039;t specify an image, the current skin&#039;s [[Mod.ini#modimage255x112|modimage255x112]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
====image182x80====&lt;br /&gt;
The image that is shown on the mod list. Use it if you don&#039;t like the way the launcher shrinks your big image or if you want to emphasize some detail from it. Try not to confuse the user with two totally different images, though.&lt;br /&gt;
&lt;br /&gt;
====infotext====&lt;br /&gt;
Introductory text for your mod. Summary. Teaser. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; All of the text must be written on a single line in the mod.ini file. However, if you want to have a line break in the text (that is, text on a new line) write &amp;quot;\n&amp;quot; (without the quotes) -- see the sample for an example. Also note that the Windows launcher does not support this and will just print the &amp;quot;\n&amp;quot; as they are. &lt;br /&gt;
&lt;br /&gt;
====author====&lt;br /&gt;
Your name. Or your team&#039;s name. People who play your mod should know whose hard work gives them joy. Or an agonizing death. Depending on your modding skills.&lt;br /&gt;
&lt;br /&gt;
====notes====&lt;br /&gt;
Notes regarding your mod. Technical details. Acknowledgements. You name them. Again, must be one line. See [[Mod.ini#infotext|infotext]] for details.&lt;br /&gt;
&lt;br /&gt;
====warn====&lt;br /&gt;
Give this a value of &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt; (a one, not a lowercase L) if your [[Mod.ini#notes|notes]] are of critical importance to the player.&lt;br /&gt;
&lt;br /&gt;
The effect: a warning sign appears besides your mod once selected and also in the mod detail window beside the note itself.&lt;br /&gt;
&lt;br /&gt;
====website====&lt;br /&gt;
Your mod&#039;s mighty homepage.&lt;br /&gt;
&lt;br /&gt;
====forum====&lt;br /&gt;
A link to a dedicated forum/forum section for your mod. If not specified, the [http://www.hard-light.net/forums/index.php?board=124.0 Missions and Campaigns forum] is used.&lt;br /&gt;
&lt;br /&gt;
====bugs====&lt;br /&gt;
This is where the players should report bugs in your mod. Might be a dedicated bug tracker or a simple forum/forum section.&lt;br /&gt;
&lt;br /&gt;
====support====&lt;br /&gt;
A link to the forum/forum section for support of your mod.&lt;br /&gt;
&lt;br /&gt;
===[resolution]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to specify a minimum resolution for your mod. All resolutions smaller than the one you specify will not appear in the Basic Settings page&#039;s &amp;quot;Resolution&amp;quot; drop down box. This section is useful in cases such as when your mod doesn&#039;t have low-res interface art.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution:&#039;&#039;&#039; Be extra-careful with typos when using this section. If you accidentally specify a super-high resolution (say, 1024x7680), then players will be unable to play your mod.&lt;br /&gt;
&lt;br /&gt;
====minhorizontalres====&lt;br /&gt;
The minimum horizontal resolution supported by your mod. Default value is 640.&lt;br /&gt;
&lt;br /&gt;
====minverticalres====&lt;br /&gt;
The minimum vertical resolution supported by your mod. Default value is 480.&lt;br /&gt;
&lt;br /&gt;
===[multimod]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section lists additional mods that need to be loaded for your mod to work properly.&lt;br /&gt;
&lt;br /&gt;
====primarylist/secondarylist====&lt;br /&gt;
&lt;br /&gt;
Contains mods listed by their folder name.&lt;br /&gt;
&lt;br /&gt;
The mods listed in these values will be added to the [[Command-Line_Reference#-mod|-mod]] command line option for the FS2 Open engine and FRED2 Open editor.&lt;br /&gt;
&lt;br /&gt;
To construct the &amp;lt;tt&amp;gt;-mod&amp;lt;/tt&amp;gt; option, the the current mod&#039;s folder name is appended to the mods in the primary mod list, which then has the secondary mod list appended to it, resulting in &amp;lt;tt&amp;gt;primarylist, folder name, secondarylist&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;lt;tt&amp;gt;secondrylist&amp;lt;/tt&amp;gt; can be used in place of &amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt; because of a bug in the original Windows launcher. However, it is deprecated and should not be used. It is provided for compatibility purposes only.&lt;br /&gt;
&lt;br /&gt;
===[recommendedlighting]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 75 ... -ogl_spec 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to provide a recommended selection of [[Command-Line_Reference#Lighting|lighting settings]] for the player. &#039;&#039;This will replace the &amp;quot;Baseline recommended&amp;quot; entry in the lighting presets GUI.&#039;&#039; These settings are &#039;&#039;not&#039;&#039; graphics settings. They are just the knobs for adjusting the level of ambient light, how shiny ships are, and the like.&lt;br /&gt;
&lt;br /&gt;
====name====&lt;br /&gt;
The name that wxLauncher will use to label these settings in the GUI. Limited to 32 characters.&lt;br /&gt;
&lt;br /&gt;
====flagset====&lt;br /&gt;
The flags to be set.&lt;br /&gt;
&lt;br /&gt;
===[skin] (TCs only)===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Welcome to wxLauncher ... &amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The skin section is where you can change the launcher&#039;s appearance. You can alter several visual elements (window title bar text, window icon, etc) without having to distribute a custom-built launcher. You can also choose to specify only part of the skin. Any parts that you don&#039;t specify will be provided by the default launcher skin. &#039;&#039;&#039;Only TCs can skin the launcher.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====windowtitle====&lt;br /&gt;
The text in the title bar of the launcher window. Use only letters and numbers if possible. There is no official character limit, but keep the text to a reasonable size. Since this is a window title bar, all formatting will be ignored.&lt;br /&gt;
&lt;br /&gt;
====windowicon====&lt;br /&gt;
Launcher&#039;s window icon. Must be in Windows icon (ICO) format. &#039;&#039;&#039;Note:&#039;&#039;&#039; Skinning the window icon is currently not supported on OS X.&lt;br /&gt;
&lt;br /&gt;
====banner====&lt;br /&gt;
The welcome page banner. Must be in PNG format. Recommended size is 600x150, with maximum width of 630 pixels and required height of 150 pixels. Will be centered in the welcome page.&lt;br /&gt;
&lt;br /&gt;
====welcometext====&lt;br /&gt;
The text found on the welcome page. Can contain basic HTML tags (such as &amp;lt;tt&amp;gt;&amp;amp;lt;b&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt;&amp;amp;lt;ul&amp;amp;lt;&amp;amp;lt;p&amp;amp;gt;&amp;amp;lt;a&amp;amp;gt;&amp;amp;lt;ol&amp;amp;gt;&amp;amp;lt;u&amp;amp;gt;&amp;amp;lt;i&amp;amp;gt;&amp;amp;lt;emphasis&amp;amp;gt;&amp;amp;lt;strong&amp;amp;gt;&amp;lt;/tt&amp;gt;) -- see [http://docs.wxwidgets.org/2.8/wx_wxhtml.html#htmltagssupported the wxWidgets wiki] for a complete list.&lt;br /&gt;
&lt;br /&gt;
====modimage255x112====&lt;br /&gt;
The image that is shown in the mod info dialog when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the ordinary mod image (255x112).&lt;br /&gt;
&lt;br /&gt;
====modimage182x80====&lt;br /&gt;
The image that is shown in the mod list when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the mod list-sized image (182x80). If this image is not provided, it will be generated automatically by scaling down the &amp;lt;tt&amp;gt;modimage255x112&amp;lt;/tt&amp;gt; image, if it is provided.&lt;br /&gt;
&lt;br /&gt;
====iconok====&lt;br /&gt;
Icon used in the status bar to indicate that a operation (like news retrieval) succeeded. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarn====&lt;br /&gt;
Icon used in the status bar to indicate that a non-critical operation (like news retrieval) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarnbig====&lt;br /&gt;
Icon used in the modinfo window to indicate that the note specified by the mod author is important and must be read. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconerror====&lt;br /&gt;
Icon used in the status bar to indicate that a critical operation (like launching the game) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfo====&lt;br /&gt;
Icon used in the status bar to indicate various miscellaneous details. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfobig====&lt;br /&gt;
Icon used in the mods page to bring attention to information there. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelp====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 32x32 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelpbig====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconideal====&lt;br /&gt;
Icon that is currently not used but may eventually be used to mark recommended flags. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====newssource====&lt;br /&gt;
The name of the source that wxLauncher should get its news from. Current supported values are &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;diaspora&amp;lt;/tt&amp;gt;, with unrecognized values resulting in the default value &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; being selected. More values will be added as more TCs ship with wxLauncher.&lt;br /&gt;
&lt;br /&gt;
==Samples==&lt;br /&gt;
&lt;br /&gt;
===Basic mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Just replace the text in &amp;lt;&amp;gt; with information about your mod&lt;br /&gt;
# and then put the file in your mod folder.&lt;br /&gt;
# For more things you can do with a mod.ini file, see&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname  = &amp;lt;NameOfYourMod&amp;gt;&lt;br /&gt;
infotext = &amp;lt;Describe your mod. You can use \n to add line breaks.&amp;gt;&lt;br /&gt;
author   = &amp;lt;YourName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# If your mod requires other mods to run, include this section,&lt;br /&gt;
# otherwise remove it.&lt;br /&gt;
[multimod]&lt;br /&gt;
secondarylist = &amp;lt;ModDependency1&amp;gt;,&amp;lt;ModDependency2&amp;gt;,&amp;lt;etc.&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Complete mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This is a fully-fledged mod.ini sample using ALL of the options&lt;br /&gt;
# available to mod/TC authors. Please visit the mod.ini wiki page&lt;br /&gt;
# to learn about what different options do:&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# This sample was created for a fictional mod named &amp;quot;The Descent&amp;quot;&lt;br /&gt;
# for the Babylon Project total conversion.&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence among the stars. An eternity has passed, and the Astrid was still sleeping in the coldness of space. Without warning, her forward thrusters fired with an eerie glow, sending vibrations throughout the ship. Metal screamed in protest, as more thrusters fired, shaking the solar dust of the hull. \n\nThen it was silence again. \n\nNothing appeared to have changed, yet slowly but surely, the destroyer had begun its descent towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You will need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name    = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 90 -spec_exp 0.7 -spec_tube 1.0 -spec_point 0.7 -spec_static 1.0 -ogl_spec 15 -bloom_intensity 20&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;center&amp;gt;&amp;lt;b&amp;gt;&amp;lt;font size=&#039;3&#039;&amp;gt;Welcome to wxLauncher, your one-stop-shop for Freespace 2 and related content&amp;lt;/font&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;If you&#039;re new to the Freespace 2 universe, you might want to check out these links first:&amp;lt;br&amp;gt; = &amp;lt;a href=&#039;http://www.hard-light.net/wiki/index.php/Main_Page&#039;&amp;gt;FS2 Wiki&amp;lt;/a&amp;gt;  = &amp;lt;a href=&#039;http://www.hard-light.net/forums/&#039;&amp;gt;FS2 Forum&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://en.wikipedia.org/wiki/FreeSpace_2&#039;&amp;gt;Wikipedia FS2 page&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://scp.indiegames.us/mantis/main_page.php&#039;&amp;gt; Reporting bugs&amp;lt;/a&amp;gt; =&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Also, don&#039;t  forget the help file, there is a nice &#039;Getting Started&#039; tutorial there.&amp;lt;br&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==KnossosNET Support==&lt;br /&gt;
Knossos.NET can load mod.ini files if the mod.json is not present in the folder, the keys that KnossosNET can use are these ones:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname (defaults to folder name if not present)&lt;br /&gt;
image255x112&lt;br /&gt;
image182x80 (used if image255x112 is not present)&lt;br /&gt;
infotext&lt;br /&gt;
forum&lt;br /&gt;
notes&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist&lt;br /&gt;
secondarylist&lt;br /&gt;
secondrylist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Line terminators (;) arent needed, and will be ignored if they are present.&lt;br /&gt;
&lt;br /&gt;
There is limited support for primarylist, secondarylist... &lt;br /&gt;
Only &#039;&#039;&#039;mediavps, fsport and fsport-mediavps&#039;&#039;&#039; will be detected on those lists, and if they do they are added to the mod dependency list set to always use the newerest version.&lt;br /&gt;
Nevertheless, custom dependencies can be used in launcher to add/remove them or set a version.&lt;br /&gt;
A FSO dependency set to the never version will also be added.&lt;br /&gt;
&lt;br /&gt;
==New section and values==&lt;br /&gt;
All the new values are added to a new section for easy reference, their function is similar or identical to the json equivalents.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mod]&lt;br /&gt;
id&lt;br /&gt;
version&lt;br /&gt;
type&lt;br /&gt;
parent&lt;br /&gt;
tile&lt;br /&gt;
banner&lt;br /&gt;
dependencylist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====id====&lt;br /&gt;
Defines the mod unique id, defaults to folder name if not set&lt;br /&gt;
====version====&lt;br /&gt;
Mod semantic version, defaults to 1.0.0-&amp;lt;foldername&amp;gt; if not set&lt;br /&gt;
====type====&lt;br /&gt;
Mod type: tc or mod (default: mod)&lt;br /&gt;
====parent====&lt;br /&gt;
Only used if type = mod, defaults to parent folder name if not set&lt;br /&gt;
====tile====&lt;br /&gt;
The 150x225 tile image, image255x112 or image182x80 is used if not present&lt;br /&gt;
====banner====&lt;br /&gt;
1070x300 banner image, image255x112 or image182x80 is used if not present&lt;br /&gt;
&lt;br /&gt;
====dependencylist====&lt;br /&gt;
This is a mod.ini format of setting mod dependencies, primarylist/secondary used if not set.&lt;br /&gt;
It is a list of modid|version (optional) separated by comas.&lt;br /&gt;
If version is not defined the newerest version is used.&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This adds mediavps version 3.6.12, FSO version 32.2.0-RC1 and CP_m with the newerest version to the mod dependency list.&lt;br /&gt;
&lt;br /&gt;
==Complete KnossosNET mod.ini Example==&lt;br /&gt;
Compatible with old launchers and KnossosNET&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname      = Shadow Genesis&lt;br /&gt;
image255x112 = ShadowGenesis.bmp;&lt;br /&gt;
image182x80  = ShadowGenesisSmall.bmp;&lt;br /&gt;
infotext     = It is the year 2390. Lieutenant Nathan Miles begins duty in the 6th Terran Fleet, commonly know as the Wolf&#039;s Fleet. This fleet, having mostly autonomical command structure, is responsible for safety of strategic Alliance systems - the Wolf&#039;s Group, intensively colonized sector where multiple Ancient ruins have been found. Human- and Vasudankind are protected by their powerful navy, but despite that, times are not easy. Mysterious terrorist organization called Cerberus Legacy is rapidly spreading its influence in the GTVA, and their leaders are preparing an intrigue that may lead the Wolf&#039;s Group on the brink of destruction...;&lt;br /&gt;
forum        = http://www.freespace.pl/forum/viewtopic.php?t=5534;&lt;br /&gt;
notes        = This is a legacy mod;&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondrylist = Shadow Genesis,mediavps_3612;&lt;br /&gt;
&lt;br /&gt;
[mod]&lt;br /&gt;
id             = sg_legacy&lt;br /&gt;
version        = 1.0.0-Legacy&lt;br /&gt;
type	       = mod&lt;br /&gt;
parent	       = FS2&lt;br /&gt;
tile           = kn_tile.png&lt;br /&gt;
banner         = kn_banner.png&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
cmdline        = -fps -light 0.8 -ambient 0.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Mod.ini_(old)|Old mod.ini documentation]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64933</id>
		<title>Mod.ini</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64933"/>
		<updated>2023-08-20T14:54:35Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* New key values */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:(Copied from the mod.ini documentation on wxLauncher&#039;s old Google Code wiki ([https://web.archive.org/web/20150118024053/http://code.google.com/p/wxlauncher/wiki/ModIniOptions https://code.google.com/p/wxlauncher/wiki/ModIniOptions]) with modifications)&lt;br /&gt;
&lt;br /&gt;
This page describes all of the mod.ini options available to mod/[[Total conversions|total conversion (TC)]] authors. Most options are available to both mods and TCs, with the exception that &#039;&#039;&#039;the skin feature is available to TCs only&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
First, take a look at the [[Mod.ini#Complete_mod.ini_sample|complete mod.ini sample]] to get a sense of the new mod.ini format&#039;s capabilities.&lt;br /&gt;
&lt;br /&gt;
About the old format, there are two important points:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ALL of the mod.ini settings are OPTIONAL.&#039;&#039;&#039; The only requirement is that the mod.ini file &#039;&#039;must&#039;&#039; be present, even if it is blank.&lt;br /&gt;
*&#039;&#039;&#039;This format is 100% compatible with the old mod.ini format.&#039;&#039;&#039; Therefore, you can use your existing mod without any changes, as long as the mod has a mod.ini file in its mod folder.&lt;br /&gt;
&lt;br /&gt;
==General notes==&lt;br /&gt;
There are several details that should be considered when creating a mod.ini:&lt;br /&gt;
&lt;br /&gt;
*Resource files specified in the mod.ini do not have to be placed in the same folder as the mod.ini itself. They can be in a subfolder instead. Thus you can have a &amp;quot;resources&amp;quot; subfolder in your mod and place all the files there so that they don&#039;t clutter your main folder. Separate folders must be specified in the mod.ini using a forward slash (&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;), as in &amp;lt;tt&amp;gt;resources/my_image.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*You can add comments to your file by starting lines with a &amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt; character. Those lines will be ignored by the launcher when it reads your mod.ini.&lt;br /&gt;
*No labels should be left without a value. In other words, all lines in the mod.ini that are not comments or section headers (such as &amp;lt;tt&amp;gt;[launcher]&amp;lt;/tt&amp;gt;) should follow the format &amp;lt;tt&amp;gt;label = value&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Edit your file with a syntax-highlighting capable text editor, such as [http://www.notepad-plus-plus.org/ Notepad++] (Windows), [http://www.barebones.com/products/textwrangler/ TextWrangler] or [http://aquamacs.org/ Aquamacs] (OS X), or [http://www.scintilla.org/ Scintilla] or [http://www.vim.org/ Gvim/Vim] (Linux).&lt;br /&gt;
&lt;br /&gt;
==Common sense (aka TLDR)==&lt;br /&gt;
As noted before, all of the options in the mod.ini are optional. However, as a courtesy for the players, you should include at the very least:&lt;br /&gt;
&lt;br /&gt;
*Mod name (&amp;lt;tt&amp;gt;modname&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Your name (&amp;lt;tt&amp;gt;author&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Mod description (&amp;lt;tt&amp;gt;infotext&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*If your mod depends on any mods, list those (&amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
To make things easy, you can copy this [[Mod.ini#Basic_mod.ini_sample|basic mod.ini]] file, fill it in, and include it with your mod. It asks for exactly these pieces of information.&lt;br /&gt;
&lt;br /&gt;
==Sections==&lt;br /&gt;
&lt;br /&gt;
This guide follows the mod.ini sections in the order they appear in the [[Mod.ini#Complete_mod.ini_sample|sample mod.ini]]. To make the examples fit better, long lines are abbreviated using ellipses (...).&lt;br /&gt;
&lt;br /&gt;
As stated in the sample mod.ini, this example deals with a fictional mod named &amp;quot;The Descent&amp;quot; for [http://babylon.hard-light.net/ The Babylon Project].&lt;br /&gt;
&lt;br /&gt;
===[launcher]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence ... towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You&#039;ll need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section is an expanded version of the old mod.ini. It allows you to define basic details about your mod.&lt;br /&gt;
&lt;br /&gt;
====modname====&lt;br /&gt;
Your &amp;quot;fancy&amp;quot; mod name. There is no length limit, although you should keep it below 50 characters, including spaces. This is the name that will appear in the launcher to identify your mod to the player.&lt;br /&gt;
&lt;br /&gt;
====image255x112====&lt;br /&gt;
The image that defines your mod. Must be 255x112 pixels. Although you can use any of BMP, PNG, or GIF formats, you should use BMP if you want to keep your mod compatible with the Windows launcher. If you don&#039;t specify an image, the current skin&#039;s [[Mod.ini#modimage255x112|modimage255x112]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
====image182x80====&lt;br /&gt;
The image that is shown on the mod list. Use it if you don&#039;t like the way the launcher shrinks your big image or if you want to emphasize some detail from it. Try not to confuse the user with two totally different images, though.&lt;br /&gt;
&lt;br /&gt;
====infotext====&lt;br /&gt;
Introductory text for your mod. Summary. Teaser. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; All of the text must be written on a single line in the mod.ini file. However, if you want to have a line break in the text (that is, text on a new line) write &amp;quot;\n&amp;quot; (without the quotes) -- see the sample for an example. Also note that the Windows launcher does not support this and will just print the &amp;quot;\n&amp;quot; as they are. &lt;br /&gt;
&lt;br /&gt;
====author====&lt;br /&gt;
Your name. Or your team&#039;s name. People who play your mod should know whose hard work gives them joy. Or an agonizing death. Depending on your modding skills.&lt;br /&gt;
&lt;br /&gt;
====notes====&lt;br /&gt;
Notes regarding your mod. Technical details. Acknowledgements. You name them. Again, must be one line. See [[Mod.ini#infotext|infotext]] for details.&lt;br /&gt;
&lt;br /&gt;
====warn====&lt;br /&gt;
Give this a value of &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt; (a one, not a lowercase L) if your [[Mod.ini#notes|notes]] are of critical importance to the player.&lt;br /&gt;
&lt;br /&gt;
The effect: a warning sign appears besides your mod once selected and also in the mod detail window beside the note itself.&lt;br /&gt;
&lt;br /&gt;
====website====&lt;br /&gt;
Your mod&#039;s mighty homepage.&lt;br /&gt;
&lt;br /&gt;
====forum====&lt;br /&gt;
A link to a dedicated forum/forum section for your mod. If not specified, the [http://www.hard-light.net/forums/index.php?board=124.0 Missions and Campaigns forum] is used.&lt;br /&gt;
&lt;br /&gt;
====bugs====&lt;br /&gt;
This is where the players should report bugs in your mod. Might be a dedicated bug tracker or a simple forum/forum section.&lt;br /&gt;
&lt;br /&gt;
====support====&lt;br /&gt;
A link to the forum/forum section for support of your mod.&lt;br /&gt;
&lt;br /&gt;
===[resolution]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to specify a minimum resolution for your mod. All resolutions smaller than the one you specify will not appear in the Basic Settings page&#039;s &amp;quot;Resolution&amp;quot; drop down box. This section is useful in cases such as when your mod doesn&#039;t have low-res interface art.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution:&#039;&#039;&#039; Be extra-careful with typos when using this section. If you accidentally specify a super-high resolution (say, 1024x7680), then players will be unable to play your mod.&lt;br /&gt;
&lt;br /&gt;
====minhorizontalres====&lt;br /&gt;
The minimum horizontal resolution supported by your mod. Default value is 640.&lt;br /&gt;
&lt;br /&gt;
====minverticalres====&lt;br /&gt;
The minimum vertical resolution supported by your mod. Default value is 480.&lt;br /&gt;
&lt;br /&gt;
===[multimod]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section lists additional mods that need to be loaded for your mod to work properly.&lt;br /&gt;
&lt;br /&gt;
====primarylist/secondarylist====&lt;br /&gt;
&lt;br /&gt;
Contains mods listed by their folder name.&lt;br /&gt;
&lt;br /&gt;
The mods listed in these values will be added to the [[Command-Line_Reference#-mod|-mod]] command line option for the FS2 Open engine and FRED2 Open editor.&lt;br /&gt;
&lt;br /&gt;
To construct the &amp;lt;tt&amp;gt;-mod&amp;lt;/tt&amp;gt; option, the the current mod&#039;s folder name is appended to the mods in the primary mod list, which then has the secondary mod list appended to it, resulting in &amp;lt;tt&amp;gt;primarylist, folder name, secondarylist&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;lt;tt&amp;gt;secondrylist&amp;lt;/tt&amp;gt; can be used in place of &amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt; because of a bug in the original Windows launcher. However, it is deprecated and should not be used. It is provided for compatibility purposes only.&lt;br /&gt;
&lt;br /&gt;
===[recommendedlighting]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 75 ... -ogl_spec 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to provide a recommended selection of [[Command-Line_Reference#Lighting|lighting settings]] for the player. &#039;&#039;This will replace the &amp;quot;Baseline recommended&amp;quot; entry in the lighting presets GUI.&#039;&#039; These settings are &#039;&#039;not&#039;&#039; graphics settings. They are just the knobs for adjusting the level of ambient light, how shiny ships are, and the like.&lt;br /&gt;
&lt;br /&gt;
====name====&lt;br /&gt;
The name that wxLauncher will use to label these settings in the GUI. Limited to 32 characters.&lt;br /&gt;
&lt;br /&gt;
====flagset====&lt;br /&gt;
The flags to be set.&lt;br /&gt;
&lt;br /&gt;
===[skin] (TCs only)===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Welcome to wxLauncher ... &amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The skin section is where you can change the launcher&#039;s appearance. You can alter several visual elements (window title bar text, window icon, etc) without having to distribute a custom-built launcher. You can also choose to specify only part of the skin. Any parts that you don&#039;t specify will be provided by the default launcher skin. &#039;&#039;&#039;Only TCs can skin the launcher.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====windowtitle====&lt;br /&gt;
The text in the title bar of the launcher window. Use only letters and numbers if possible. There is no official character limit, but keep the text to a reasonable size. Since this is a window title bar, all formatting will be ignored.&lt;br /&gt;
&lt;br /&gt;
====windowicon====&lt;br /&gt;
Launcher&#039;s window icon. Must be in Windows icon (ICO) format. &#039;&#039;&#039;Note:&#039;&#039;&#039; Skinning the window icon is currently not supported on OS X.&lt;br /&gt;
&lt;br /&gt;
====banner====&lt;br /&gt;
The welcome page banner. Must be in PNG format. Recommended size is 600x150, with maximum width of 630 pixels and required height of 150 pixels. Will be centered in the welcome page.&lt;br /&gt;
&lt;br /&gt;
====welcometext====&lt;br /&gt;
The text found on the welcome page. Can contain basic HTML tags (such as &amp;lt;tt&amp;gt;&amp;amp;lt;b&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt;&amp;amp;lt;ul&amp;amp;lt;&amp;amp;lt;p&amp;amp;gt;&amp;amp;lt;a&amp;amp;gt;&amp;amp;lt;ol&amp;amp;gt;&amp;amp;lt;u&amp;amp;gt;&amp;amp;lt;i&amp;amp;gt;&amp;amp;lt;emphasis&amp;amp;gt;&amp;amp;lt;strong&amp;amp;gt;&amp;lt;/tt&amp;gt;) -- see [http://docs.wxwidgets.org/2.8/wx_wxhtml.html#htmltagssupported the wxWidgets wiki] for a complete list.&lt;br /&gt;
&lt;br /&gt;
====modimage255x112====&lt;br /&gt;
The image that is shown in the mod info dialog when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the ordinary mod image (255x112).&lt;br /&gt;
&lt;br /&gt;
====modimage182x80====&lt;br /&gt;
The image that is shown in the mod list when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the mod list-sized image (182x80). If this image is not provided, it will be generated automatically by scaling down the &amp;lt;tt&amp;gt;modimage255x112&amp;lt;/tt&amp;gt; image, if it is provided.&lt;br /&gt;
&lt;br /&gt;
====iconok====&lt;br /&gt;
Icon used in the status bar to indicate that a operation (like news retrieval) succeeded. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarn====&lt;br /&gt;
Icon used in the status bar to indicate that a non-critical operation (like news retrieval) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarnbig====&lt;br /&gt;
Icon used in the modinfo window to indicate that the note specified by the mod author is important and must be read. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconerror====&lt;br /&gt;
Icon used in the status bar to indicate that a critical operation (like launching the game) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfo====&lt;br /&gt;
Icon used in the status bar to indicate various miscellaneous details. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfobig====&lt;br /&gt;
Icon used in the mods page to bring attention to information there. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelp====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 32x32 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelpbig====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconideal====&lt;br /&gt;
Icon that is currently not used but may eventually be used to mark recommended flags. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====newssource====&lt;br /&gt;
The name of the source that wxLauncher should get its news from. Current supported values are &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;diaspora&amp;lt;/tt&amp;gt;, with unrecognized values resulting in the default value &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; being selected. More values will be added as more TCs ship with wxLauncher.&lt;br /&gt;
&lt;br /&gt;
==Samples==&lt;br /&gt;
&lt;br /&gt;
===Basic mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Just replace the text in &amp;lt;&amp;gt; with information about your mod&lt;br /&gt;
# and then put the file in your mod folder.&lt;br /&gt;
# For more things you can do with a mod.ini file, see&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname  = &amp;lt;NameOfYourMod&amp;gt;&lt;br /&gt;
infotext = &amp;lt;Describe your mod. You can use \n to add line breaks.&amp;gt;&lt;br /&gt;
author   = &amp;lt;YourName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# If your mod requires other mods to run, include this section,&lt;br /&gt;
# otherwise remove it.&lt;br /&gt;
[multimod]&lt;br /&gt;
secondarylist = &amp;lt;ModDependency1&amp;gt;,&amp;lt;ModDependency2&amp;gt;,&amp;lt;etc.&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Complete mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This is a fully-fledged mod.ini sample using ALL of the options&lt;br /&gt;
# available to mod/TC authors. Please visit the mod.ini wiki page&lt;br /&gt;
# to learn about what different options do:&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# This sample was created for a fictional mod named &amp;quot;The Descent&amp;quot;&lt;br /&gt;
# for the Babylon Project total conversion.&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence among the stars. An eternity has passed, and the Astrid was still sleeping in the coldness of space. Without warning, her forward thrusters fired with an eerie glow, sending vibrations throughout the ship. Metal screamed in protest, as more thrusters fired, shaking the solar dust of the hull. \n\nThen it was silence again. \n\nNothing appeared to have changed, yet slowly but surely, the destroyer had begun its descent towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You will need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name    = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 90 -spec_exp 0.7 -spec_tube 1.0 -spec_point 0.7 -spec_static 1.0 -ogl_spec 15 -bloom_intensity 20&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;center&amp;gt;&amp;lt;b&amp;gt;&amp;lt;font size=&#039;3&#039;&amp;gt;Welcome to wxLauncher, your one-stop-shop for Freespace 2 and related content&amp;lt;/font&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;If you&#039;re new to the Freespace 2 universe, you might want to check out these links first:&amp;lt;br&amp;gt; = &amp;lt;a href=&#039;http://www.hard-light.net/wiki/index.php/Main_Page&#039;&amp;gt;FS2 Wiki&amp;lt;/a&amp;gt;  = &amp;lt;a href=&#039;http://www.hard-light.net/forums/&#039;&amp;gt;FS2 Forum&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://en.wikipedia.org/wiki/FreeSpace_2&#039;&amp;gt;Wikipedia FS2 page&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://scp.indiegames.us/mantis/main_page.php&#039;&amp;gt; Reporting bugs&amp;lt;/a&amp;gt; =&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Also, don&#039;t  forget the help file, there is a nice &#039;Getting Started&#039; tutorial there.&amp;lt;br&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==KnossosNET Support==&lt;br /&gt;
Knossos.NET can load mod.ini files if the mod.json is not present in the folder, the keys that KnossosNET can use are these ones:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname (defaults to folder name if not present)&lt;br /&gt;
image255x112&lt;br /&gt;
image182x80 (used if image255x112 is not present)&lt;br /&gt;
infotext&lt;br /&gt;
forum&lt;br /&gt;
notes&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist&lt;br /&gt;
secondarylist&lt;br /&gt;
secondrylist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Line terminators (;) arent needed, and will be ignored if they are present.&lt;br /&gt;
&lt;br /&gt;
There is limited support for primarylist, secondarylist... &lt;br /&gt;
Only &#039;&#039;&#039;mediavps, fsport and fsport-mediavps&#039;&#039;&#039; will be detected on those lists, and if they do they are added to the mod dependency list set to always use the newerest version.&lt;br /&gt;
Nevertheless, custom dependencies can be used in launcher to add/remove them or set a version.&lt;br /&gt;
A FSO dependency set to the never version will also be added.&lt;br /&gt;
&lt;br /&gt;
==New section and values==&lt;br /&gt;
All the new values are added to a new section for easy reference, their function is similar or identical to the json equivalents.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mod]&lt;br /&gt;
id&lt;br /&gt;
version&lt;br /&gt;
type&lt;br /&gt;
parent&lt;br /&gt;
tile&lt;br /&gt;
banner&lt;br /&gt;
dependencylist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====id====&lt;br /&gt;
Defines the mod unique id, defaults to folder name if not set&lt;br /&gt;
====version====&lt;br /&gt;
Mod semantic version, defaults to 1.0.0-&amp;lt;foldername&amp;gt; if not set&lt;br /&gt;
====type====&lt;br /&gt;
Mod type: tc or mod (default: mod)&lt;br /&gt;
====parent====&lt;br /&gt;
Only used if type = mod, defaults to parent folder name if not set&lt;br /&gt;
====tile====&lt;br /&gt;
The 150x225 tile image, image255x112 or image182x80 is used if not present&lt;br /&gt;
====banner====&lt;br /&gt;
1070x300 banner image, image255x112 or image182x80 is used if not present&lt;br /&gt;
&lt;br /&gt;
====dependencylist====&lt;br /&gt;
This is a mod.ini format of setting mod dependencies: it is a list of modid|version (optional) separated by comas.&lt;br /&gt;
If version is not defined the newerest version is used.&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This adds mediavps version 3.6.12, FSO version 32.2.0-RC1 and CP_m with the newerest version to the mod dependency list.&lt;br /&gt;
&lt;br /&gt;
==Complete KnossosNET mod.ini Example==&lt;br /&gt;
Compatible with old launchers and KnossosNET&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname      = Shadow Genesis&lt;br /&gt;
image255x112 = ShadowGenesis.bmp;&lt;br /&gt;
image182x80  = ShadowGenesisSmall.bmp;&lt;br /&gt;
infotext     = It is the year 2390. Lieutenant Nathan Miles begins duty in the 6th Terran Fleet, commonly know as the Wolf&#039;s Fleet. This fleet, having mostly autonomical command structure, is responsible for safety of strategic Alliance systems - the Wolf&#039;s Group, intensively colonized sector where multiple Ancient ruins have been found. Human- and Vasudankind are protected by their powerful navy, but despite that, times are not easy. Mysterious terrorist organization called Cerberus Legacy is rapidly spreading its influence in the GTVA, and their leaders are preparing an intrigue that may lead the Wolf&#039;s Group on the brink of destruction...;&lt;br /&gt;
forum        = http://www.freespace.pl/forum/viewtopic.php?t=5534;&lt;br /&gt;
notes        = This is a legacy mod;&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondrylist = Shadow Genesis,mediavps_3612;&lt;br /&gt;
&lt;br /&gt;
[mod]&lt;br /&gt;
id             = sg_legacy&lt;br /&gt;
version        = 1.0.0-Legacy&lt;br /&gt;
type	       = mod&lt;br /&gt;
parent	       = FS2&lt;br /&gt;
tile           = kn_tile.png&lt;br /&gt;
banner         = kn_banner.png&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
cmdline        = -fps -light 0.8 -ambient 0.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Mod.ini_(old)|Old mod.ini documentation]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64932</id>
		<title>Mod.ini</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64932"/>
		<updated>2023-08-20T14:49:05Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: forgot to add the cmdline key&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:(Copied from the mod.ini documentation on wxLauncher&#039;s old Google Code wiki ([https://web.archive.org/web/20150118024053/http://code.google.com/p/wxlauncher/wiki/ModIniOptions https://code.google.com/p/wxlauncher/wiki/ModIniOptions]) with modifications)&lt;br /&gt;
&lt;br /&gt;
This page describes all of the mod.ini options available to mod/[[Total conversions|total conversion (TC)]] authors. Most options are available to both mods and TCs, with the exception that &#039;&#039;&#039;the skin feature is available to TCs only&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
First, take a look at the [[Mod.ini#Complete_mod.ini_sample|complete mod.ini sample]] to get a sense of the new mod.ini format&#039;s capabilities.&lt;br /&gt;
&lt;br /&gt;
About the old format, there are two important points:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ALL of the mod.ini settings are OPTIONAL.&#039;&#039;&#039; The only requirement is that the mod.ini file &#039;&#039;must&#039;&#039; be present, even if it is blank.&lt;br /&gt;
*&#039;&#039;&#039;This format is 100% compatible with the old mod.ini format.&#039;&#039;&#039; Therefore, you can use your existing mod without any changes, as long as the mod has a mod.ini file in its mod folder.&lt;br /&gt;
&lt;br /&gt;
==General notes==&lt;br /&gt;
There are several details that should be considered when creating a mod.ini:&lt;br /&gt;
&lt;br /&gt;
*Resource files specified in the mod.ini do not have to be placed in the same folder as the mod.ini itself. They can be in a subfolder instead. Thus you can have a &amp;quot;resources&amp;quot; subfolder in your mod and place all the files there so that they don&#039;t clutter your main folder. Separate folders must be specified in the mod.ini using a forward slash (&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;), as in &amp;lt;tt&amp;gt;resources/my_image.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*You can add comments to your file by starting lines with a &amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt; character. Those lines will be ignored by the launcher when it reads your mod.ini.&lt;br /&gt;
*No labels should be left without a value. In other words, all lines in the mod.ini that are not comments or section headers (such as &amp;lt;tt&amp;gt;[launcher]&amp;lt;/tt&amp;gt;) should follow the format &amp;lt;tt&amp;gt;label = value&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Edit your file with a syntax-highlighting capable text editor, such as [http://www.notepad-plus-plus.org/ Notepad++] (Windows), [http://www.barebones.com/products/textwrangler/ TextWrangler] or [http://aquamacs.org/ Aquamacs] (OS X), or [http://www.scintilla.org/ Scintilla] or [http://www.vim.org/ Gvim/Vim] (Linux).&lt;br /&gt;
&lt;br /&gt;
==Common sense (aka TLDR)==&lt;br /&gt;
As noted before, all of the options in the mod.ini are optional. However, as a courtesy for the players, you should include at the very least:&lt;br /&gt;
&lt;br /&gt;
*Mod name (&amp;lt;tt&amp;gt;modname&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Your name (&amp;lt;tt&amp;gt;author&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Mod description (&amp;lt;tt&amp;gt;infotext&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*If your mod depends on any mods, list those (&amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
To make things easy, you can copy this [[Mod.ini#Basic_mod.ini_sample|basic mod.ini]] file, fill it in, and include it with your mod. It asks for exactly these pieces of information.&lt;br /&gt;
&lt;br /&gt;
==Sections==&lt;br /&gt;
&lt;br /&gt;
This guide follows the mod.ini sections in the order they appear in the [[Mod.ini#Complete_mod.ini_sample|sample mod.ini]]. To make the examples fit better, long lines are abbreviated using ellipses (...).&lt;br /&gt;
&lt;br /&gt;
As stated in the sample mod.ini, this example deals with a fictional mod named &amp;quot;The Descent&amp;quot; for [http://babylon.hard-light.net/ The Babylon Project].&lt;br /&gt;
&lt;br /&gt;
===[launcher]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence ... towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You&#039;ll need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section is an expanded version of the old mod.ini. It allows you to define basic details about your mod.&lt;br /&gt;
&lt;br /&gt;
====modname====&lt;br /&gt;
Your &amp;quot;fancy&amp;quot; mod name. There is no length limit, although you should keep it below 50 characters, including spaces. This is the name that will appear in the launcher to identify your mod to the player.&lt;br /&gt;
&lt;br /&gt;
====image255x112====&lt;br /&gt;
The image that defines your mod. Must be 255x112 pixels. Although you can use any of BMP, PNG, or GIF formats, you should use BMP if you want to keep your mod compatible with the Windows launcher. If you don&#039;t specify an image, the current skin&#039;s [[Mod.ini#modimage255x112|modimage255x112]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
====image182x80====&lt;br /&gt;
The image that is shown on the mod list. Use it if you don&#039;t like the way the launcher shrinks your big image or if you want to emphasize some detail from it. Try not to confuse the user with two totally different images, though.&lt;br /&gt;
&lt;br /&gt;
====infotext====&lt;br /&gt;
Introductory text for your mod. Summary. Teaser. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; All of the text must be written on a single line in the mod.ini file. However, if you want to have a line break in the text (that is, text on a new line) write &amp;quot;\n&amp;quot; (without the quotes) -- see the sample for an example. Also note that the Windows launcher does not support this and will just print the &amp;quot;\n&amp;quot; as they are. &lt;br /&gt;
&lt;br /&gt;
====author====&lt;br /&gt;
Your name. Or your team&#039;s name. People who play your mod should know whose hard work gives them joy. Or an agonizing death. Depending on your modding skills.&lt;br /&gt;
&lt;br /&gt;
====notes====&lt;br /&gt;
Notes regarding your mod. Technical details. Acknowledgements. You name them. Again, must be one line. See [[Mod.ini#infotext|infotext]] for details.&lt;br /&gt;
&lt;br /&gt;
====warn====&lt;br /&gt;
Give this a value of &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt; (a one, not a lowercase L) if your [[Mod.ini#notes|notes]] are of critical importance to the player.&lt;br /&gt;
&lt;br /&gt;
The effect: a warning sign appears besides your mod once selected and also in the mod detail window beside the note itself.&lt;br /&gt;
&lt;br /&gt;
====website====&lt;br /&gt;
Your mod&#039;s mighty homepage.&lt;br /&gt;
&lt;br /&gt;
====forum====&lt;br /&gt;
A link to a dedicated forum/forum section for your mod. If not specified, the [http://www.hard-light.net/forums/index.php?board=124.0 Missions and Campaigns forum] is used.&lt;br /&gt;
&lt;br /&gt;
====bugs====&lt;br /&gt;
This is where the players should report bugs in your mod. Might be a dedicated bug tracker or a simple forum/forum section.&lt;br /&gt;
&lt;br /&gt;
====support====&lt;br /&gt;
A link to the forum/forum section for support of your mod.&lt;br /&gt;
&lt;br /&gt;
===[resolution]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to specify a minimum resolution for your mod. All resolutions smaller than the one you specify will not appear in the Basic Settings page&#039;s &amp;quot;Resolution&amp;quot; drop down box. This section is useful in cases such as when your mod doesn&#039;t have low-res interface art.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution:&#039;&#039;&#039; Be extra-careful with typos when using this section. If you accidentally specify a super-high resolution (say, 1024x7680), then players will be unable to play your mod.&lt;br /&gt;
&lt;br /&gt;
====minhorizontalres====&lt;br /&gt;
The minimum horizontal resolution supported by your mod. Default value is 640.&lt;br /&gt;
&lt;br /&gt;
====minverticalres====&lt;br /&gt;
The minimum vertical resolution supported by your mod. Default value is 480.&lt;br /&gt;
&lt;br /&gt;
===[multimod]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section lists additional mods that need to be loaded for your mod to work properly.&lt;br /&gt;
&lt;br /&gt;
====primarylist/secondarylist====&lt;br /&gt;
&lt;br /&gt;
Contains mods listed by their folder name.&lt;br /&gt;
&lt;br /&gt;
The mods listed in these values will be added to the [[Command-Line_Reference#-mod|-mod]] command line option for the FS2 Open engine and FRED2 Open editor.&lt;br /&gt;
&lt;br /&gt;
To construct the &amp;lt;tt&amp;gt;-mod&amp;lt;/tt&amp;gt; option, the the current mod&#039;s folder name is appended to the mods in the primary mod list, which then has the secondary mod list appended to it, resulting in &amp;lt;tt&amp;gt;primarylist, folder name, secondarylist&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;lt;tt&amp;gt;secondrylist&amp;lt;/tt&amp;gt; can be used in place of &amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt; because of a bug in the original Windows launcher. However, it is deprecated and should not be used. It is provided for compatibility purposes only.&lt;br /&gt;
&lt;br /&gt;
===[recommendedlighting]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 75 ... -ogl_spec 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to provide a recommended selection of [[Command-Line_Reference#Lighting|lighting settings]] for the player. &#039;&#039;This will replace the &amp;quot;Baseline recommended&amp;quot; entry in the lighting presets GUI.&#039;&#039; These settings are &#039;&#039;not&#039;&#039; graphics settings. They are just the knobs for adjusting the level of ambient light, how shiny ships are, and the like.&lt;br /&gt;
&lt;br /&gt;
====name====&lt;br /&gt;
The name that wxLauncher will use to label these settings in the GUI. Limited to 32 characters.&lt;br /&gt;
&lt;br /&gt;
====flagset====&lt;br /&gt;
The flags to be set.&lt;br /&gt;
&lt;br /&gt;
===[skin] (TCs only)===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Welcome to wxLauncher ... &amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The skin section is where you can change the launcher&#039;s appearance. You can alter several visual elements (window title bar text, window icon, etc) without having to distribute a custom-built launcher. You can also choose to specify only part of the skin. Any parts that you don&#039;t specify will be provided by the default launcher skin. &#039;&#039;&#039;Only TCs can skin the launcher.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====windowtitle====&lt;br /&gt;
The text in the title bar of the launcher window. Use only letters and numbers if possible. There is no official character limit, but keep the text to a reasonable size. Since this is a window title bar, all formatting will be ignored.&lt;br /&gt;
&lt;br /&gt;
====windowicon====&lt;br /&gt;
Launcher&#039;s window icon. Must be in Windows icon (ICO) format. &#039;&#039;&#039;Note:&#039;&#039;&#039; Skinning the window icon is currently not supported on OS X.&lt;br /&gt;
&lt;br /&gt;
====banner====&lt;br /&gt;
The welcome page banner. Must be in PNG format. Recommended size is 600x150, with maximum width of 630 pixels and required height of 150 pixels. Will be centered in the welcome page.&lt;br /&gt;
&lt;br /&gt;
====welcometext====&lt;br /&gt;
The text found on the welcome page. Can contain basic HTML tags (such as &amp;lt;tt&amp;gt;&amp;amp;lt;b&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt;&amp;amp;lt;ul&amp;amp;lt;&amp;amp;lt;p&amp;amp;gt;&amp;amp;lt;a&amp;amp;gt;&amp;amp;lt;ol&amp;amp;gt;&amp;amp;lt;u&amp;amp;gt;&amp;amp;lt;i&amp;amp;gt;&amp;amp;lt;emphasis&amp;amp;gt;&amp;amp;lt;strong&amp;amp;gt;&amp;lt;/tt&amp;gt;) -- see [http://docs.wxwidgets.org/2.8/wx_wxhtml.html#htmltagssupported the wxWidgets wiki] for a complete list.&lt;br /&gt;
&lt;br /&gt;
====modimage255x112====&lt;br /&gt;
The image that is shown in the mod info dialog when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the ordinary mod image (255x112).&lt;br /&gt;
&lt;br /&gt;
====modimage182x80====&lt;br /&gt;
The image that is shown in the mod list when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the mod list-sized image (182x80). If this image is not provided, it will be generated automatically by scaling down the &amp;lt;tt&amp;gt;modimage255x112&amp;lt;/tt&amp;gt; image, if it is provided.&lt;br /&gt;
&lt;br /&gt;
====iconok====&lt;br /&gt;
Icon used in the status bar to indicate that a operation (like news retrieval) succeeded. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarn====&lt;br /&gt;
Icon used in the status bar to indicate that a non-critical operation (like news retrieval) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarnbig====&lt;br /&gt;
Icon used in the modinfo window to indicate that the note specified by the mod author is important and must be read. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconerror====&lt;br /&gt;
Icon used in the status bar to indicate that a critical operation (like launching the game) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfo====&lt;br /&gt;
Icon used in the status bar to indicate various miscellaneous details. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfobig====&lt;br /&gt;
Icon used in the mods page to bring attention to information there. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelp====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 32x32 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelpbig====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconideal====&lt;br /&gt;
Icon that is currently not used but may eventually be used to mark recommended flags. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====newssource====&lt;br /&gt;
The name of the source that wxLauncher should get its news from. Current supported values are &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;diaspora&amp;lt;/tt&amp;gt;, with unrecognized values resulting in the default value &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; being selected. More values will be added as more TCs ship with wxLauncher.&lt;br /&gt;
&lt;br /&gt;
==Samples==&lt;br /&gt;
&lt;br /&gt;
===Basic mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Just replace the text in &amp;lt;&amp;gt; with information about your mod&lt;br /&gt;
# and then put the file in your mod folder.&lt;br /&gt;
# For more things you can do with a mod.ini file, see&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname  = &amp;lt;NameOfYourMod&amp;gt;&lt;br /&gt;
infotext = &amp;lt;Describe your mod. You can use \n to add line breaks.&amp;gt;&lt;br /&gt;
author   = &amp;lt;YourName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# If your mod requires other mods to run, include this section,&lt;br /&gt;
# otherwise remove it.&lt;br /&gt;
[multimod]&lt;br /&gt;
secondarylist = &amp;lt;ModDependency1&amp;gt;,&amp;lt;ModDependency2&amp;gt;,&amp;lt;etc.&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Complete mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This is a fully-fledged mod.ini sample using ALL of the options&lt;br /&gt;
# available to mod/TC authors. Please visit the mod.ini wiki page&lt;br /&gt;
# to learn about what different options do:&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# This sample was created for a fictional mod named &amp;quot;The Descent&amp;quot;&lt;br /&gt;
# for the Babylon Project total conversion.&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence among the stars. An eternity has passed, and the Astrid was still sleeping in the coldness of space. Without warning, her forward thrusters fired with an eerie glow, sending vibrations throughout the ship. Metal screamed in protest, as more thrusters fired, shaking the solar dust of the hull. \n\nThen it was silence again. \n\nNothing appeared to have changed, yet slowly but surely, the destroyer had begun its descent towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You will need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name    = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 90 -spec_exp 0.7 -spec_tube 1.0 -spec_point 0.7 -spec_static 1.0 -ogl_spec 15 -bloom_intensity 20&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;center&amp;gt;&amp;lt;b&amp;gt;&amp;lt;font size=&#039;3&#039;&amp;gt;Welcome to wxLauncher, your one-stop-shop for Freespace 2 and related content&amp;lt;/font&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;If you&#039;re new to the Freespace 2 universe, you might want to check out these links first:&amp;lt;br&amp;gt; = &amp;lt;a href=&#039;http://www.hard-light.net/wiki/index.php/Main_Page&#039;&amp;gt;FS2 Wiki&amp;lt;/a&amp;gt;  = &amp;lt;a href=&#039;http://www.hard-light.net/forums/&#039;&amp;gt;FS2 Forum&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://en.wikipedia.org/wiki/FreeSpace_2&#039;&amp;gt;Wikipedia FS2 page&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://scp.indiegames.us/mantis/main_page.php&#039;&amp;gt; Reporting bugs&amp;lt;/a&amp;gt; =&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Also, don&#039;t  forget the help file, there is a nice &#039;Getting Started&#039; tutorial there.&amp;lt;br&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==KnossosNET Support==&lt;br /&gt;
Knossos.NET can load mod.ini files if the mod.json is not present in the folder, the keys that KnossosNET can use are these ones:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname (defaults to folder name if not present)&lt;br /&gt;
image255x112&lt;br /&gt;
image182x80 (used if image255x112 is not present)&lt;br /&gt;
infotext&lt;br /&gt;
forum&lt;br /&gt;
notes&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist&lt;br /&gt;
secondarylist&lt;br /&gt;
secondrylist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Line terminators (;) arent needed, and will be ignored if they are present.&lt;br /&gt;
&lt;br /&gt;
There is limited support for primarylist, secondarylist... &lt;br /&gt;
Only &#039;&#039;&#039;mediavps, fsport and fsport-mediavps&#039;&#039;&#039; will be detected on those lists, and if they do they are added to the mod dependency list set to always use the newerest version.&lt;br /&gt;
Nevertheless, custom dependencies can be used in launcher to add/remove them or set a version.&lt;br /&gt;
A FSO dependency set to the never version will also be added.&lt;br /&gt;
&lt;br /&gt;
====New key values====&lt;br /&gt;
All the new values are added to a new section for easy reference&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mod]&lt;br /&gt;
id (defaults to folder name if not set)&lt;br /&gt;
version (defaults to 1.0.0-&amp;lt;foldername&amp;gt; if not set)&lt;br /&gt;
type tc or mod (default: mod)&lt;br /&gt;
parent (only used if type = mod, defaults to parent folder name if not set)&lt;br /&gt;
tile (the 150x225 tile image, image255x112 or image182x80 is used if not present)&lt;br /&gt;
banner (1070x300 banner image, image255x112 or image182x80 is used if not present)&lt;br /&gt;
dependencylist (explained below, primarylist/secondary used if not set)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====dependencylist====&lt;br /&gt;
This is a mod.ini format of setting mod dependencies: it is a list of modid|version (optional) separated by comas.&lt;br /&gt;
If version is not defined the newerest version is used.&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This adds mediavps version 3.6.12, FSO version 32.2.0-RC1 and CP_m with the newerest version to the mod dependency list.&lt;br /&gt;
&lt;br /&gt;
==Complete KnossosNET mod.ini Example==&lt;br /&gt;
Compatible with old launchers and KnossosNET&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname      = Shadow Genesis&lt;br /&gt;
image255x112 = ShadowGenesis.bmp;&lt;br /&gt;
image182x80  = ShadowGenesisSmall.bmp;&lt;br /&gt;
infotext     = It is the year 2390. Lieutenant Nathan Miles begins duty in the 6th Terran Fleet, commonly know as the Wolf&#039;s Fleet. This fleet, having mostly autonomical command structure, is responsible for safety of strategic Alliance systems - the Wolf&#039;s Group, intensively colonized sector where multiple Ancient ruins have been found. Human- and Vasudankind are protected by their powerful navy, but despite that, times are not easy. Mysterious terrorist organization called Cerberus Legacy is rapidly spreading its influence in the GTVA, and their leaders are preparing an intrigue that may lead the Wolf&#039;s Group on the brink of destruction...;&lt;br /&gt;
forum        = http://www.freespace.pl/forum/viewtopic.php?t=5534;&lt;br /&gt;
notes        = This is a legacy mod;&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondrylist = Shadow Genesis,mediavps_3612;&lt;br /&gt;
&lt;br /&gt;
[mod]&lt;br /&gt;
id             = sg_legacy&lt;br /&gt;
version        = 1.0.0-Legacy&lt;br /&gt;
type	       = mod&lt;br /&gt;
parent	       = FS2&lt;br /&gt;
tile           = kn_tile.png&lt;br /&gt;
banner         = kn_banner.png&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
cmdline        = -fps -light 0.8 -ambient 0.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Mod.ini_(old)|Old mod.ini documentation]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64931</id>
		<title>Mod.ini</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Mod.ini&amp;diff=64931"/>
		<updated>2023-08-19T19:53:29Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:(Copied from the mod.ini documentation on wxLauncher&#039;s old Google Code wiki ([https://web.archive.org/web/20150118024053/http://code.google.com/p/wxlauncher/wiki/ModIniOptions https://code.google.com/p/wxlauncher/wiki/ModIniOptions]) with modifications)&lt;br /&gt;
&lt;br /&gt;
This page describes all of the mod.ini options available to mod/[[Total conversions|total conversion (TC)]] authors. Most options are available to both mods and TCs, with the exception that &#039;&#039;&#039;the skin feature is available to TCs only&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
First, take a look at the [[Mod.ini#Complete_mod.ini_sample|complete mod.ini sample]] to get a sense of the new mod.ini format&#039;s capabilities.&lt;br /&gt;
&lt;br /&gt;
About the old format, there are two important points:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ALL of the mod.ini settings are OPTIONAL.&#039;&#039;&#039; The only requirement is that the mod.ini file &#039;&#039;must&#039;&#039; be present, even if it is blank.&lt;br /&gt;
*&#039;&#039;&#039;This format is 100% compatible with the old mod.ini format.&#039;&#039;&#039; Therefore, you can use your existing mod without any changes, as long as the mod has a mod.ini file in its mod folder.&lt;br /&gt;
&lt;br /&gt;
==General notes==&lt;br /&gt;
There are several details that should be considered when creating a mod.ini:&lt;br /&gt;
&lt;br /&gt;
*Resource files specified in the mod.ini do not have to be placed in the same folder as the mod.ini itself. They can be in a subfolder instead. Thus you can have a &amp;quot;resources&amp;quot; subfolder in your mod and place all the files there so that they don&#039;t clutter your main folder. Separate folders must be specified in the mod.ini using a forward slash (&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;), as in &amp;lt;tt&amp;gt;resources/my_image.png&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*You can add comments to your file by starting lines with a &amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt; character. Those lines will be ignored by the launcher when it reads your mod.ini.&lt;br /&gt;
*No labels should be left without a value. In other words, all lines in the mod.ini that are not comments or section headers (such as &amp;lt;tt&amp;gt;[launcher]&amp;lt;/tt&amp;gt;) should follow the format &amp;lt;tt&amp;gt;label = value&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Edit your file with a syntax-highlighting capable text editor, such as [http://www.notepad-plus-plus.org/ Notepad++] (Windows), [http://www.barebones.com/products/textwrangler/ TextWrangler] or [http://aquamacs.org/ Aquamacs] (OS X), or [http://www.scintilla.org/ Scintilla] or [http://www.vim.org/ Gvim/Vim] (Linux).&lt;br /&gt;
&lt;br /&gt;
==Common sense (aka TLDR)==&lt;br /&gt;
As noted before, all of the options in the mod.ini are optional. However, as a courtesy for the players, you should include at the very least:&lt;br /&gt;
&lt;br /&gt;
*Mod name (&amp;lt;tt&amp;gt;modname&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Your name (&amp;lt;tt&amp;gt;author&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*Mod description (&amp;lt;tt&amp;gt;infotext&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*If your mod depends on any mods, list those (&amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
To make things easy, you can copy this [[Mod.ini#Basic_mod.ini_sample|basic mod.ini]] file, fill it in, and include it with your mod. It asks for exactly these pieces of information.&lt;br /&gt;
&lt;br /&gt;
==Sections==&lt;br /&gt;
&lt;br /&gt;
This guide follows the mod.ini sections in the order they appear in the [[Mod.ini#Complete_mod.ini_sample|sample mod.ini]]. To make the examples fit better, long lines are abbreviated using ellipses (...).&lt;br /&gt;
&lt;br /&gt;
As stated in the sample mod.ini, this example deals with a fictional mod named &amp;quot;The Descent&amp;quot; for [http://babylon.hard-light.net/ The Babylon Project].&lt;br /&gt;
&lt;br /&gt;
===[launcher]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence ... towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You&#039;ll need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section is an expanded version of the old mod.ini. It allows you to define basic details about your mod.&lt;br /&gt;
&lt;br /&gt;
====modname====&lt;br /&gt;
Your &amp;quot;fancy&amp;quot; mod name. There is no length limit, although you should keep it below 50 characters, including spaces. This is the name that will appear in the launcher to identify your mod to the player.&lt;br /&gt;
&lt;br /&gt;
====image255x112====&lt;br /&gt;
The image that defines your mod. Must be 255x112 pixels. Although you can use any of BMP, PNG, or GIF formats, you should use BMP if you want to keep your mod compatible with the Windows launcher. If you don&#039;t specify an image, the current skin&#039;s [[Mod.ini#modimage255x112|modimage255x112]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
====image182x80====&lt;br /&gt;
The image that is shown on the mod list. Use it if you don&#039;t like the way the launcher shrinks your big image or if you want to emphasize some detail from it. Try not to confuse the user with two totally different images, though.&lt;br /&gt;
&lt;br /&gt;
====infotext====&lt;br /&gt;
Introductory text for your mod. Summary. Teaser. Use your imagination.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; All of the text must be written on a single line in the mod.ini file. However, if you want to have a line break in the text (that is, text on a new line) write &amp;quot;\n&amp;quot; (without the quotes) -- see the sample for an example. Also note that the Windows launcher does not support this and will just print the &amp;quot;\n&amp;quot; as they are. &lt;br /&gt;
&lt;br /&gt;
====author====&lt;br /&gt;
Your name. Or your team&#039;s name. People who play your mod should know whose hard work gives them joy. Or an agonizing death. Depending on your modding skills.&lt;br /&gt;
&lt;br /&gt;
====notes====&lt;br /&gt;
Notes regarding your mod. Technical details. Acknowledgements. You name them. Again, must be one line. See [[Mod.ini#infotext|infotext]] for details.&lt;br /&gt;
&lt;br /&gt;
====warn====&lt;br /&gt;
Give this a value of &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt; (a one, not a lowercase L) if your [[Mod.ini#notes|notes]] are of critical importance to the player.&lt;br /&gt;
&lt;br /&gt;
The effect: a warning sign appears besides your mod once selected and also in the mod detail window beside the note itself.&lt;br /&gt;
&lt;br /&gt;
====website====&lt;br /&gt;
Your mod&#039;s mighty homepage.&lt;br /&gt;
&lt;br /&gt;
====forum====&lt;br /&gt;
A link to a dedicated forum/forum section for your mod. If not specified, the [http://www.hard-light.net/forums/index.php?board=124.0 Missions and Campaigns forum] is used.&lt;br /&gt;
&lt;br /&gt;
====bugs====&lt;br /&gt;
This is where the players should report bugs in your mod. Might be a dedicated bug tracker or a simple forum/forum section.&lt;br /&gt;
&lt;br /&gt;
====support====&lt;br /&gt;
A link to the forum/forum section for support of your mod.&lt;br /&gt;
&lt;br /&gt;
===[resolution]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to specify a minimum resolution for your mod. All resolutions smaller than the one you specify will not appear in the Basic Settings page&#039;s &amp;quot;Resolution&amp;quot; drop down box. This section is useful in cases such as when your mod doesn&#039;t have low-res interface art.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution:&#039;&#039;&#039; Be extra-careful with typos when using this section. If you accidentally specify a super-high resolution (say, 1024x7680), then players will be unable to play your mod.&lt;br /&gt;
&lt;br /&gt;
====minhorizontalres====&lt;br /&gt;
The minimum horizontal resolution supported by your mod. Default value is 640.&lt;br /&gt;
&lt;br /&gt;
====minverticalres====&lt;br /&gt;
The minimum vertical resolution supported by your mod. Default value is 480.&lt;br /&gt;
&lt;br /&gt;
===[multimod]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section lists additional mods that need to be loaded for your mod to work properly.&lt;br /&gt;
&lt;br /&gt;
====primarylist/secondarylist====&lt;br /&gt;
&lt;br /&gt;
Contains mods listed by their folder name.&lt;br /&gt;
&lt;br /&gt;
The mods listed in these values will be added to the [[Command-Line_Reference#-mod|-mod]] command line option for the FS2 Open engine and FRED2 Open editor.&lt;br /&gt;
&lt;br /&gt;
To construct the &amp;lt;tt&amp;gt;-mod&amp;lt;/tt&amp;gt; option, the the current mod&#039;s folder name is appended to the mods in the primary mod list, which then has the secondary mod list appended to it, resulting in &amp;lt;tt&amp;gt;primarylist, folder name, secondarylist&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;lt;tt&amp;gt;secondrylist&amp;lt;/tt&amp;gt; can be used in place of &amp;lt;tt&amp;gt;secondarylist&amp;lt;/tt&amp;gt; because of a bug in the original Windows launcher. However, it is deprecated and should not be used. It is provided for compatibility purposes only.&lt;br /&gt;
&lt;br /&gt;
===[recommendedlighting]===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 75 ... -ogl_spec 60&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This section allows you to provide a recommended selection of [[Command-Line_Reference#Lighting|lighting settings]] for the player. &#039;&#039;This will replace the &amp;quot;Baseline recommended&amp;quot; entry in the lighting presets GUI.&#039;&#039; These settings are &#039;&#039;not&#039;&#039; graphics settings. They are just the knobs for adjusting the level of ambient light, how shiny ships are, and the like.&lt;br /&gt;
&lt;br /&gt;
====name====&lt;br /&gt;
The name that wxLauncher will use to label these settings in the GUI. Limited to 32 characters.&lt;br /&gt;
&lt;br /&gt;
====flagset====&lt;br /&gt;
The flags to be set.&lt;br /&gt;
&lt;br /&gt;
===[skin] (TCs only)===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Welcome to wxLauncher ... &amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The skin section is where you can change the launcher&#039;s appearance. You can alter several visual elements (window title bar text, window icon, etc) without having to distribute a custom-built launcher. You can also choose to specify only part of the skin. Any parts that you don&#039;t specify will be provided by the default launcher skin. &#039;&#039;&#039;Only TCs can skin the launcher.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====windowtitle====&lt;br /&gt;
The text in the title bar of the launcher window. Use only letters and numbers if possible. There is no official character limit, but keep the text to a reasonable size. Since this is a window title bar, all formatting will be ignored.&lt;br /&gt;
&lt;br /&gt;
====windowicon====&lt;br /&gt;
Launcher&#039;s window icon. Must be in Windows icon (ICO) format. &#039;&#039;&#039;Note:&#039;&#039;&#039; Skinning the window icon is currently not supported on OS X.&lt;br /&gt;
&lt;br /&gt;
====banner====&lt;br /&gt;
The welcome page banner. Must be in PNG format. Recommended size is 600x150, with maximum width of 630 pixels and required height of 150 pixels. Will be centered in the welcome page.&lt;br /&gt;
&lt;br /&gt;
====welcometext====&lt;br /&gt;
The text found on the welcome page. Can contain basic HTML tags (such as &amp;lt;tt&amp;gt;&amp;amp;lt;b&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt;&amp;amp;lt;ul&amp;amp;lt;&amp;amp;lt;p&amp;amp;gt;&amp;amp;lt;a&amp;amp;gt;&amp;amp;lt;ol&amp;amp;gt;&amp;amp;lt;u&amp;amp;gt;&amp;amp;lt;i&amp;amp;gt;&amp;amp;lt;emphasis&amp;amp;gt;&amp;amp;lt;strong&amp;amp;gt;&amp;lt;/tt&amp;gt;) -- see [http://docs.wxwidgets.org/2.8/wx_wxhtml.html#htmltagssupported the wxWidgets wiki] for a complete list.&lt;br /&gt;
&lt;br /&gt;
====modimage255x112====&lt;br /&gt;
The image that is shown in the mod info dialog when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the ordinary mod image (255x112).&lt;br /&gt;
&lt;br /&gt;
====modimage182x80====&lt;br /&gt;
The image that is shown in the mod list when a particular mod doesn&#039;t have an image defined. Must have the same resolution as the mod list-sized image (182x80). If this image is not provided, it will be generated automatically by scaling down the &amp;lt;tt&amp;gt;modimage255x112&amp;lt;/tt&amp;gt; image, if it is provided.&lt;br /&gt;
&lt;br /&gt;
====iconok====&lt;br /&gt;
Icon used in the status bar to indicate that a operation (like news retrieval) succeeded. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarn====&lt;br /&gt;
Icon used in the status bar to indicate that a non-critical operation (like news retrieval) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconwarnbig====&lt;br /&gt;
Icon used in the modinfo window to indicate that the note specified by the mod author is important and must be read. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconerror====&lt;br /&gt;
Icon used in the status bar to indicate that a critical operation (like launching the game) failed. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfo====&lt;br /&gt;
Icon used in the status bar to indicate various miscellaneous details. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconinfobig====&lt;br /&gt;
Icon used in the mods page to bring attention to information there. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelp====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 32x32 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconhelpbig====&lt;br /&gt;
Icon used when asking the player for network access for retrieving the news. Must be in PNG format. Must be 64x64 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====iconideal====&lt;br /&gt;
Icon that is currently not used but may eventually be used to mark recommended flags. Must be in PNG format. Must be 24x24 pixels in size.&lt;br /&gt;
&lt;br /&gt;
====newssource====&lt;br /&gt;
The name of the source that wxLauncher should get its news from. Current supported values are &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;diaspora&amp;lt;/tt&amp;gt;, with unrecognized values resulting in the default value &amp;lt;tt&amp;gt;hlp&amp;lt;/tt&amp;gt; being selected. More values will be added as more TCs ship with wxLauncher.&lt;br /&gt;
&lt;br /&gt;
==Samples==&lt;br /&gt;
&lt;br /&gt;
===Basic mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Just replace the text in &amp;lt;&amp;gt; with information about your mod&lt;br /&gt;
# and then put the file in your mod folder.&lt;br /&gt;
# For more things you can do with a mod.ini file, see&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname  = &amp;lt;NameOfYourMod&amp;gt;&lt;br /&gt;
infotext = &amp;lt;Describe your mod. You can use \n to add line breaks.&amp;gt;&lt;br /&gt;
author   = &amp;lt;YourName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# If your mod requires other mods to run, include this section,&lt;br /&gt;
# otherwise remove it.&lt;br /&gt;
[multimod]&lt;br /&gt;
secondarylist = &amp;lt;ModDependency1&amp;gt;,&amp;lt;ModDependency2&amp;gt;,&amp;lt;etc.&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Complete mod.ini sample===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This is a fully-fledged mod.ini sample using ALL of the options&lt;br /&gt;
# available to mod/TC authors. Please visit the mod.ini wiki page&lt;br /&gt;
# to learn about what different options do:&lt;br /&gt;
# &amp;lt;http://www.hard-light.net/wiki/index.php/Mod.ini&amp;gt;&lt;br /&gt;
# &lt;br /&gt;
# This sample was created for a fictional mod named &amp;quot;The Descent&amp;quot;&lt;br /&gt;
# for the Babylon Project total conversion.&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
modname        = The Descent&lt;br /&gt;
image255x112   = skin/logo.png&lt;br /&gt;
image182x80    = skin/logo_small.png&lt;br /&gt;
infotext       = The aging behemoth was floating in silence among the stars. An eternity has passed, and the Astrid was still sleeping in the coldness of space. Without warning, her forward thrusters fired with an eerie glow, sending vibrations throughout the ship. Metal screamed in protest, as more thrusters fired, shaking the solar dust of the hull. \n\nThen it was silence again. \n\nNothing appeared to have changed, yet slowly but surely, the destroyer had begun its descent towards Earth.&lt;br /&gt;
author         = kkmic&lt;br /&gt;
notes          = You will need the zathras mod to play this&lt;br /&gt;
warn           = 1&lt;br /&gt;
website        = http://www.thedescentmod.com&lt;br /&gt;
forum          = http://www.forum.thedescentmod.com&lt;br /&gt;
bugs           = http://www.bugs.thedescentmod.com&lt;br /&gt;
support        = http://www.support.thedescentmod.com&lt;br /&gt;
&lt;br /&gt;
[resolution]&lt;br /&gt;
minhorizontalres = 1024&lt;br /&gt;
minverticalres   = 768&lt;br /&gt;
&lt;br /&gt;
[recommendedlighting]&lt;br /&gt;
name    = Descent recommended&lt;br /&gt;
flagset = -ambient_factor 90 -spec_exp 0.7 -spec_tube 1.0 -spec_point 0.7 -spec_static 1.0 -ogl_spec 15 -bloom_intensity 20&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondarylist = zathras;&lt;br /&gt;
&lt;br /&gt;
[skin]&lt;br /&gt;
windowtitle = Astrid CIC&lt;br /&gt;
windowicon = skin/astrid.png &lt;br /&gt;
banner = skin/welcome_page_banner.png&lt;br /&gt;
welcometext = &amp;lt;p&amp;gt;&amp;lt;center&amp;gt;&amp;lt;b&amp;gt;&amp;lt;font size=&#039;3&#039;&amp;gt;Welcome to wxLauncher, your one-stop-shop for Freespace 2 and related content&amp;lt;/font&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;If you&#039;re new to the Freespace 2 universe, you might want to check out these links first:&amp;lt;br&amp;gt; = &amp;lt;a href=&#039;http://www.hard-light.net/wiki/index.php/Main_Page&#039;&amp;gt;FS2 Wiki&amp;lt;/a&amp;gt;  = &amp;lt;a href=&#039;http://www.hard-light.net/forums/&#039;&amp;gt;FS2 Forum&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://en.wikipedia.org/wiki/FreeSpace_2&#039;&amp;gt;Wikipedia FS2 page&amp;lt;/a&amp;gt; = &amp;lt;a href=&#039;http://scp.indiegames.us/mantis/main_page.php&#039;&amp;gt; Reporting bugs&amp;lt;/a&amp;gt; =&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Also, don&#039;t  forget the help file, there is a nice &#039;Getting Started&#039; tutorial there.&amp;lt;br&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
modimage255x112 = skin/modimage.png &lt;br /&gt;
modimage182x80 = skin/modimage_small.png&lt;br /&gt;
iconok = skin/icon_ok.png&lt;br /&gt;
iconwarn = skin/icon_warn.png&lt;br /&gt;
iconwarnbig = skin/icon_warn_big.png&lt;br /&gt;
iconerror = skin/icon_error.png&lt;br /&gt;
iconinfo = skin/icon_info.png&lt;br /&gt;
iconinfobig = skin/icon_info_big.png&lt;br /&gt;
iconhelp = skin/icon_help.png&lt;br /&gt;
iconhelpbig = skin/icon_help_big.png&lt;br /&gt;
iconideal = skin/icon_ideal.png&lt;br /&gt;
newssource = hlp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==KnossosNET Support==&lt;br /&gt;
Knossos.NET can load mod.ini files if the mod.json is not present in the folder, the keys that KnossosNET can use are these ones:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname &#039;&#039;&#039;(defaults to folder name if not present)&#039;&#039;&#039;&lt;br /&gt;
image255x112&lt;br /&gt;
image182x80 &#039;&#039;&#039;(used if image255x112 is not present)&#039;&#039;&#039;&lt;br /&gt;
infotext&lt;br /&gt;
forum&lt;br /&gt;
notes&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist&lt;br /&gt;
secondarylist&lt;br /&gt;
secondrylist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Line terminators (;) arent needed, and will be ignored if they are present.&lt;br /&gt;
&lt;br /&gt;
There is limited support for primarylist, secondarylist... &lt;br /&gt;
Only &#039;&#039;&#039;mediavps, fsport and fsport-mediavps&#039;&#039;&#039; will be detected on those lists, and if they do they are added to the mod dependency list set to always use the newerest version.&lt;br /&gt;
Nevertheless, custom dependencies can be used in launcher to add/remove them or set a version.&lt;br /&gt;
A FSO dependency set to the never version will also be added.&lt;br /&gt;
&lt;br /&gt;
====New key values====&lt;br /&gt;
All the new values are added to a new section for easy reference&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mod]&lt;br /&gt;
id (defaults to folder name if not set)&lt;br /&gt;
version (defaults to 1.0.0-&amp;lt;foldername&amp;gt; if not set)&lt;br /&gt;
type tc or mod (default: mod)&lt;br /&gt;
parent (only used if type = mod, defaults to parent folder name if not set)&lt;br /&gt;
tile (the 150x225 tile image, image255x112 or image182x80 is used if not present)&lt;br /&gt;
banner (1070x300 banner image, image255x112 or image182x80 is used if not present)&lt;br /&gt;
dependencylist (explained below, primarylist/secondary used if not set)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====dependencylist====&lt;br /&gt;
This is a mod.ini format of setting mod dependencies: it is a list of modid|version (optional) separated by comas.&lt;br /&gt;
If version is not defined the newerest version is used.&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This adds mediavps version 3.6.12, FSO version 32.2.0-RC1 and CP_m with the newerest version to the mod dependency list.&lt;br /&gt;
&lt;br /&gt;
==Complete KnossosNET mod.ini Example==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[launcher]&lt;br /&gt;
modname      = Shadow Genesis&lt;br /&gt;
image255x112 = ShadowGenesis.bmp;&lt;br /&gt;
image182x80  = ShadowGenesisSmall.bmp;&lt;br /&gt;
infotext     = It is the year 2390. Lieutenant Nathan Miles begins duty in the 6th Terran Fleet, commonly know as the Wolf&#039;s Fleet. This fleet, having mostly autonomical command structure, is responsible for safety of strategic Alliance systems - the Wolf&#039;s Group, intensively colonized sector where multiple Ancient ruins have been found. Human- and Vasudankind are protected by their powerful navy, but despite that, times are not easy. Mysterious terrorist organization called Cerberus Legacy is rapidly spreading its influence in the GTVA, and their leaders are preparing an intrigue that may lead the Wolf&#039;s Group on the brink of destruction...;&lt;br /&gt;
forum        = http://www.freespace.pl/forum/viewtopic.php?t=5534;&lt;br /&gt;
notes        = This is a legacy mod;&lt;br /&gt;
&lt;br /&gt;
[multimod]&lt;br /&gt;
primarylist  = ;&lt;br /&gt;
secondrylist = Shadow Genesis,mediavps_3612;&lt;br /&gt;
&lt;br /&gt;
[mod]&lt;br /&gt;
id             = sg_legacy&lt;br /&gt;
version        = 1.0.0-Legacy&lt;br /&gt;
type	       = mod&lt;br /&gt;
parent	       = FS2&lt;br /&gt;
tile           = kn_tile.png&lt;br /&gt;
banner         = kn_banner.png&lt;br /&gt;
dependencylist = MVPS|3.6.12,FSO|23.2.0-RC1,CP_m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Mod.ini_(old)|Old mod.ini documentation]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64837</id>
		<title>Compression Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64837"/>
		<updated>2023-05-12T00:42:51Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* LZ41 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &#039;&#039;&#039;Compression Support&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
The major problem in supporting compressed files is random access, FSO needs to be able to do all operations on a compressed file as it would normally do with any file; fopen(), fseek(), fread(), fclose(). Whiout having to decompress the entire file and store it in ram to do those operations. .pof parsing specially uses a lot of fseeks() and small freads(). Generally, file compression algos are intended to decompress the entire file from start to finish in one go and thus random access its non standart for the compression format.&lt;br /&gt;
&lt;br /&gt;
In FSO 21.2.0 the first compression support was merged into the code, the first implementation uses LZ4/LZ4-HC and it is called internally as &amp;quot;LZ41&amp;quot;. The LZ41 implementation is mainly intended for loose files but adding those inside VPs is also supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 ==&lt;br /&gt;
The LZ41 design is similar to the lz4 random access example. It uses the lz4 stream compression, with an int table which stores the offsets that indicate at what compressed block the original file position is, an int to indicate the number of these offsets, and the original filesize and blocksize. The major difference being that instead of using a dictionary, the stream is reset at each block, making them independent from each other, and thus you can pick any block you want and decompress that block at will.&lt;br /&gt;
Resetting the stream rather than use a dictionary may be less efficient (this is untested as the time of writing this article), but it was the only way to do it for individual files without having to embed the dictionary too.&lt;br /&gt;
The LZ41 implementation is non-LZ4 format standard, just like the official example for random access is, as the LZ4 data format does not seems to consider what is needed for random access.&lt;br /&gt;
FSO checks for the file header on fopen() and if the file is compressed then the logic for compressed files is used.&lt;br /&gt;
&lt;br /&gt;
== LZ4 Random Access Concept ==&lt;br /&gt;
LZ4 (and any other compression format) is composed out of a chain of blocks. There are two type of blocks, dependant blocks and independient blocks, dependant blocks are far more efficient than indenpendient blocks, but they are intended to be read in order from start to finish, you cant just seek the stream and decompress a block in the middle whiout decompressing all other blocks before it. Independient blocks can always be extracted alone, no matter what. The cons is that the compression ratio is considerably worse.&lt;br /&gt;
&lt;br /&gt;
So each block stores a fixed BLOCK_SIZE of uncompressed data, except maybe the last block. The actual block size will be always dynamic and change depending of how much the data can be compressed, so in order to keep track were each block is a list of offset is needed, this list of offsets contains the seek position of each block.&lt;br /&gt;
Example: Block #1 is 21000 bytes long, Block #2 is 23000 bytes long, Block #3 is 25000 bytes long, the offset list will be like this: 21004, 44004, 69004. (the 4 is because of the starting file header that is 4 bytes long)&lt;br /&gt;
&lt;br /&gt;
So in order to decompress the random data we need, we only need to do a POSITION % BLOCK_SIZE, this gives the block number were that data is. With the block number we go to the offset table and seek to that position. In this way we can read the block and pass it to the decompression function.&lt;br /&gt;
&lt;br /&gt;
Block Number * BLOCK_SIZE gives the starting position of the data on the block, so if we are looking for position 5000 and the starting data in the block starts at 4000 we know that we have to ignore the fist 1000 bytes of the extracted data, this also tells if the block contains all the data we need or if we should move to the next block.&lt;br /&gt;
&lt;br /&gt;
== LZ41 Data Format ==&lt;br /&gt;
4 byte header (&amp;quot;LZ41&amp;quot;) &amp;lt;br&amp;gt;&lt;br /&gt;
N Blocks&amp;lt;br&amp;gt;&lt;br /&gt;
N offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int num_offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int original_filesize&amp;lt;br&amp;gt;&lt;br /&gt;
int blocksize&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_structure.png|300px]]&lt;br /&gt;
&lt;br /&gt;
== LZ41 Tests ==&lt;br /&gt;
&#039;&#039;&#039;Uncompressed MVP 4.4.1&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
12.9GB - Space used on Disk&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Compressed MVP 4.4.1 Block Size: 65536 LZ4-HC L6&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
7.01GB - Space used on disk&amp;lt;br&amp;gt;&lt;br /&gt;
Compression time: 5 minutes (1 thread)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;MVP 4.4.1 - All FS2 Models mission load time&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
1:01 - SSD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:02 - SSD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
1:49 - HDD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
2:30 - HDD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LZ41 Compressor Guidelines ==&lt;br /&gt;
&#039;&#039;&#039;Block Size&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Block size is set by the compressor 8192, 16384, 65536 block sizes were all tested, higher values are untested and may work or not. A higher block size will make the large compressed files smaller, but will also make FSO use slightly more RAM.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ignore text based file formats&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.fc2, .fs2, .tbl, .tbm, .eff: Text files should be ignored.  Compressing them works fine, but there is little to be gained and the only thing it does is to make the file unreadeable by text editors. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Movies are already compressed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.mp4,.ogg,.mve,.webm: the ratio will be negative most of the time, and when is not, you are just saving a few kb, maybe a mb or two.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Audio files&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.ogg, .wav: .wav may give you some marginal gains, but it is just not worth trying. With ogg its the same problem as with movie files, these files are already compressed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;pngs&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.png and apng: These are already compressed and 99% of the time end up with a negative ratio. pngs that aren&#039;t compressed are going to go down in size, considerably, but this is uncommon. It might be possible to check the png header for the compression value they already have before trying to compress them.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Do not keep files that end up with negative ratios&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
No matter if those files are inside a vp or they are loose files, if a compressed file end up being bigger than the original one, it must be discarded.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compression Function Example==&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_example.png|300px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Source: VPC Compressor tool&lt;br /&gt;
&lt;br /&gt;
== LZ41 Design Choices ==&lt;br /&gt;
A non standart format was used since the official random access example was already breaking the lz4 frame format.&amp;lt;br&amp;gt;&lt;br /&gt;
Additional data were added trailing to each file: the offset table, the num offsets, the block size, and the original filesize. Normally, those would be on a container and cached on container load, but it is not possible for loose files.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the 31 chars filename limit, the idea of adding an extra extension to the files was dropped, as changing the filename length was just not an option, and since loose files were not getting an extra extension, an uncompressed .pof would be named the same as a compressed .pof. As a result, no need to store compressed files on a different container rather than plain .VP was seen as needed as there were already no difference for loose files. This was later proven to be a mistake because it could cause user confusion.&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
At some point in 23.X.X versions a new guideline for compressing files will be requiered.&amp;lt;br&amp;gt;&lt;br /&gt;
- The extra extension &amp;quot;.lz41&amp;quot; will be added to loose files. Since recent improvements in FSO code allows for loose files to use more than 31 characters. FSO will ignore this extra extension after load and thus &amp;quot;ship.pof.lz41&amp;quot; will be considered as &amp;quot;ship.pof&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
- New VP container: .VPC&amp;lt;br&amp;gt;&lt;br /&gt;
The .VPC container format is identical to a .VP container in structure and limits, with one key difference: It may contain uncompressed files just like any normal VP, but it has to contain at least 1 compressed file.&lt;br /&gt;
Compressed files stored inside a .vpc container must not have the .lz41 extension or its name changed in any way.&amp;lt;br&amp;gt;&lt;br /&gt;
While .VP can still tecnically be used to store compressed files, it is recommended not to.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
None of these changes break compatibility with files compressed prior to these changes, but just as with any new feature or major changes, older versions of FSO can not use compressed files in this new way.&lt;br /&gt;
&lt;br /&gt;
== Versioning System ==&lt;br /&gt;
In order to avoid compatibility issues with future changes or additions, the file header is used in all fopen(), fseek(), fread() operations, the header tells FSO what to do in those operations, so in the future a new and better way to support compression is found, or a better algo, a different header must be used, lets assume &amp;quot;LZ42&amp;quot;, this means FSO can handle &amp;quot;LZ41&amp;quot; files in a way and &amp;quot;LZ42&amp;quot; files in a totally different way whiout breaking any compatibility.&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64387</id>
		<title>Compression Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64387"/>
		<updated>2023-01-03T01:32:50Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* LZ41 Data Format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &#039;&#039;&#039;Compression Support&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
The major problem in supporting compressed files is random access, FSO needs to be able to do all operations on a compressed file as it would normally do with any file; fopen(), fseek(), fread(), fclose(). Whiout having to decompress the entire file and store it in ram to do those operations. .pof parsing specially uses a lot of fseeks() and small freads(). Generally, file compression algos are intended to decompress the entire file from start to finish in one go and thus random access its non standart for the compression format.&lt;br /&gt;
&lt;br /&gt;
In FSO 21.2.0 the first compression support was merged into the code, the first implementation uses LZ4/LZ4-HC and it is called internally as &amp;quot;LZ41&amp;quot;. The LZ41 implementation is mainly intended for loose files but adding those inside VPs is also supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 ==&lt;br /&gt;
The LZ41 design is similar to the lz4 random access example. It uses the lz4 stream compression, with an int table which stores the offsets that indicate at what compressed block the original file position is, an int to indicate the number of these offsets, and the original filesize and blocksize. The major difference being that instead of using a dictionary, the stream is reset at each block, making them independent from each other, and thus you can pick any block you want and decompress that block at will.&lt;br /&gt;
Resetting the stream rather than use a dictionary may be less efficient (this is untested as the time of writing this article), but it was the only way to do it for individual files without having to embed the dictionary too.&lt;br /&gt;
The LZ41 implementation is non-LZ4 format standard, just like the official example for random access is, as the LZ4 data format does not seems to consider what is needed for random access.&lt;br /&gt;
FSO checks for the file header on fopen() and if the file is compressed then the logic for compressed files is used.&lt;br /&gt;
&lt;br /&gt;
== LZ41 Data Format ==&lt;br /&gt;
4 byte header (&amp;quot;LZ41&amp;quot;) &amp;lt;br&amp;gt;&lt;br /&gt;
N Blocks&amp;lt;br&amp;gt;&lt;br /&gt;
N offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int num_offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int original_filesize&amp;lt;br&amp;gt;&lt;br /&gt;
int blocksize&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_structure.png|300px]]&lt;br /&gt;
&lt;br /&gt;
== LZ41 Tests ==&lt;br /&gt;
&#039;&#039;&#039;Uncompressed MVP 4.4.1&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
12.9GB - Space used on Disk&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Compressed MVP 4.4.1 Block Size: 65536 LZ4-HC L6&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
7.01GB - Space used on disk&amp;lt;br&amp;gt;&lt;br /&gt;
Compression time: 5 minutes (1 thread)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;MVP 4.4.1 - All FS2 Models mission load time&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:01 - SSD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:02 - SSD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
1:49 - HDD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
2:30 - HDD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== LZ41 Compressor Guidelines ==&lt;br /&gt;
&#039;&#039;&#039;Block Size&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Block size is set by the compressor 8192, 16384, 65536 block sizes were all tested, higher values are untested and may work or not, a higher block size will make the large compressed files smaller, higher block size will also make FSO to use more RAM but not by much.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ignore text based file formats&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Text files should be ignored, they do work fine, but there is no much is to be gained and the only thing it does is to make the file unreadeable by text editors: .fc2, .fs2, .tbl, .tbm, .eff.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Movies are already compressed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.mp4,.ogg,.mve,.webm: the ratio will be negative most of the time, and when is not, you are just saving a few kb, maybe a mb or two.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Audio files&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.ogg, .wav: .wav may give you some little gains but it is just not worth to try, with ogg its the same problem as with the movies, these files are already compressed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;pngs&#039;&#039;&#039;&lt;br /&gt;
pngs are already compressed and 99% of the time end up with a negative ratio, and since mods use apngs, you are going to waste time trying to compress them. PNG that arent compressed are going to go down in size, considerably, but this is uncommon, maybe check the png header for the compression value they already have before trying to compress.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Do not keep files that end up with negative ratios&#039;&#039;&#039;&lt;br /&gt;
No matter if those files are inside a vp or they are loose files, if a compressed file end up being bigger than the original one, it must be discarded.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compression Function Example==&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_example.png|300px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Source: VPC Compressor tool&lt;br /&gt;
&lt;br /&gt;
== LZ41 Design Choices ==&lt;br /&gt;
A non standart format was used since the official random access example was already breaking the lz4 frame format.&amp;lt;br&amp;gt;&lt;br /&gt;
Additional data were added trailing to each file, the offset table, the num offsets, the block size, the original filesize, normaly those would be on a container and cached on container load, but it is not possible for loose files.&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the 31 chars filename limit, the idea of adding a extra extension to the files was dropped, as changing the filename lenght was just not an option, and since loose files were getting no extra extension, a uncompressed .pof would be named the same as a compressed .pof, as a result of this, no need to store compressed files on a diferent container rather than plain .VP was seen as needed as there were already no difference for loose files. This will later been prove to be a mistake because it could cause user confunsion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
At some point in 23.X.X versions a new guideline for compressing files will be requiered.&amp;lt;br&amp;gt;&lt;br /&gt;
- The extra extension &amp;quot;.lz41&amp;quot; will be added to loose files. Since recent improvements in FSO code allows for loose files to use more than 31 characters. FSO will ignore this extra extension after load and thus &amp;quot;ship.pof.lz41&amp;quot; will be considered as &amp;quot;ship.pof&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
- New VP container: .VPC&amp;lt;br&amp;gt;&lt;br /&gt;
The VPC container format is identical to a .VP container in structure and limits, with one key difference: It may contain uncompressed files just like any normal VP, but it has to contain at least 1 compressed file.&lt;br /&gt;
Compressed files stored inside a .vpc container must not have the .lz41 extension or its name changed in any way.&amp;lt;br&amp;gt;&lt;br /&gt;
While .VP can still tecnically be used to store compressed files, it is recomended not to.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
None of these changes break compatibility with files compressed prior to these changes, but just as with any new feature or major changes, older versions of FSO can not use compressed files in this new way.&lt;br /&gt;
&lt;br /&gt;
== Versioning System ==&lt;br /&gt;
In order to avoid compatibility issues with future changes or additions, the file header is used in all fopen(), fseek(), fread() operations, the header tells FSO what to do in those operations, so in the future a new and better way to support compression is found, or a better algo, a different header must be used, lets assume &amp;quot;LZ42&amp;quot;, this means FSO can handle &amp;quot;LZ41&amp;quot; files in a way and &amp;quot;LZ42&amp;quot; files in a totally different way whiout breaking any compatibility.&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=FS2_Data_Structure&amp;diff=64385</id>
		<title>FS2 Data Structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=FS2_Data_Structure&amp;diff=64385"/>
		<updated>2023-01-03T00:45:43Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* See Also: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font color=cyan&amp;gt;Although some expert hand has been through the page, where the (original) writer has doubts is marked in blue colour.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
::&amp;lt;font color=red&amp;gt;Through all this page, SCP fs2_open and FRED2_open additions over retail behaviour will be marked in red font.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apart from the game engine or the mission editor, FRED, the game needs data to run; it needs missions, sounds, 3D models, textures... FreeSpace 2 is highly moddable because nearly none of these data are embedded inside the game executable. In this way the user can always change nearly all game behaviour and appearance.&lt;br /&gt;
&lt;br /&gt;
Like all your applications you&#039;ll have FreeSpace 2 installed in one folder in your hard disk drive. We will call this folder &#039;&#039;&#039;/freespace2&#039;&#039;&#039;, although it can have any other name (&#039;&#039;/fs2&#039;&#039;, &#039;&#039;/fspace2&#039;&#039;, or whatever). Inside this folder, FreeSpace 2 stores all its game data in three places (retail version just in two):&lt;br /&gt;
#Unpacked, ie. individual files, inside &#039;&#039;&#039;data&#039;&#039;&#039; folder within FreeSpace 2 installation folder, ie. in &#039;&#039;&#039;/freespace2/data&#039;&#039;&#039;. (&#039;&#039;&#039;data&#039;&#039;&#039; name is compulsory).&amp;lt;br&amp;gt;Inside &#039;&#039;&#039;data&#039;&#039;&#039; folder, the game contents are classified and stored in several subfolders. [[FS2_Data_Structure#data_subfolders|Below]], you have the full list of &#039;&#039;&#039;data&#039;&#039;&#039; subfolders with their description and contents, (remember that all their names are compulsory). The most commonly used and changed are:&lt;br /&gt;
#*[[FS2_Data_Structure#effects|effects]] contains all the textures and animations used in all explosions, weapon glows, smoke, particles and so on.&lt;br /&gt;
#*[[FS2_Data_Structure#maps|maps]] contains all the textures, (and animated textures), used over ship models.&lt;br /&gt;
#*[[FS2_Data_Structure#missions|missions]] contains all the mission ([[%2A.FS2]]) and campaign ([[%2A.FC2]]) definition files.&lt;br /&gt;
#*[[FS2_Data_Structure#models|models]] contains all 3D models ([[%2A.POF]]).&lt;br /&gt;
#*[[FS2_Data_Structure#music|music]] contains all the music files.&lt;br /&gt;
#*[[FS2_Data_Structure#sounds|sounds]] contains all ingame sound effect files.&lt;br /&gt;
#*[[FS2_Data_Structure#tables|tables]] contains all table files. Tables define all the behaviour the game components have. They are the most important thing for modders to know. See [[Tables]] section for deeper info.&lt;br /&gt;
#*[[FS2_Data_Structure#voice|voice]] contains all the ingame voices.&lt;br /&gt;
#Packed in vp archives. This kind of archives just contain individual files in a similar way as &amp;quot;normal&amp;quot; archives like rar or zip do. They are placed in &#039;&#039;&#039;/freespace2&#039;&#039;&#039; folder. Special software, like [[VPMage]], is needed to build them. Another really good utility is [[Maja|WMCoolmon&#039;s Maja]] which comes in a Java cross-platform executable. You can grab it from [http://wmc.freespacemods.net/repository/ WMC::Repository]. If you just want to browse or extract files from existing vps, but not editing or building them, then use [[VPView]]. You&#039;ve got two versions of it in [http://www.descent-network.com/descman Descent Network download page]&amp;lt;br&amp;gt;vp archives also follow the data structure, so, even while packed in a vp archive, your missions will be in /data/missions and your ship 3D models in /data/models. All retail data come packed in several vps. The next, and only the next, are the original game contents (when patched to v1.2):&lt;br /&gt;
#*root_fs2.vp (6,255 KB - 157 files - checksum of 0xce10d76c): Mainly [[FS2_Data_Structure#tables|tables]] and [[FS2_Data_Structure#missions|missions]].&amp;lt;br&amp;gt;&amp;lt;font color=red&amp;gt;(Number of files and checksum as reported in fs2_open.log when running a fs2_open &#039;&#039;debug&#039;&#039; build. Please notice that vp can actually contain more files than the reported number, but these are the pure game data files. As example root_fs2.vp contains 160 files with three useless &#039;&#039;vssver.scc&#039;&#039; in tables, images and squads).&amp;lt;/font&amp;gt;&lt;br /&gt;
#*smarty_fs2.vp (120,241 KB - 10 files - checksum of 0xddeb3b1e): [[FS2_Data_Structure#intelanims|Intelligence animations]].&lt;br /&gt;
#*sparky_fs2.vp (254,457 KB - 3027 files - checksum of 0x164fe65a): Most of the game data, mainly [[FS2_Data_Structure#models|models]], [[FS2_Data_Structure#maps|maps]], [[FS2_Data_Structure#effects|effects]], [[FS2_Data_Structure#hud|hud]], [[FS2_Data_Structure#interface|interface]] and [[FS2_Data_Structure#sounds|sounds]] data.&lt;br /&gt;
#*sparky_hi_fs2.vp (259,026 KB - 1337 files - checksum of 0xa11d56f1): Extra [[FS2_Data_Structure#hud|hud]] and [[FS2_Data_Structure#interface|interface]] data for hi res (1024x768).&lt;br /&gt;
#*stu_fs2.vp (169,108 KB - 2355 files - checksum of 0xd77da83a): [[FS2_Data_Structure#voice|Voice]] data.&lt;br /&gt;
#*tango1_fs2.vp (191,297 KB - 32 files - checksum of 0x4c25221e): 1st pack of [[FS2_Data_Structure#cbanims|Command briefing animations]].&lt;br /&gt;
#*tango2_fs2.vp (71,073 KB - 15 files - checksum of 0x86920b82): 2nd pack of [[FS2_Data_Structure#cbanims|Command briefing animations]].&lt;br /&gt;
#*tango3_fs2.vp (49,314 KB - 10 files - checksum of 0x705e8d71): 3rd pack of [[FS2_Data_Structure#cbanims|Command briefing animations]].&lt;br /&gt;
#*warble_fs2.vp (116,073 KB - 52 files - checksum of 0xd85c305d): [[FS2_Data_Structure#music|Music]] data.&lt;br /&gt;
#*[[%2A.MVE]] movies (cutscenes). They are not originally installed in the user hard disk drive. They are read from game CDs.&lt;br /&gt;
#&amp;lt;font color=red&amp;gt;&#039;&#039;&#039;One of the most important SCP fs2_open additions:&#039;&#039;&#039; Auxiliary data folders loaded through [[Command-Line_Reference#-mod|-MOD launcher flag]]. Retail game only use former both places. But fs2_open, (and FRED2_open), can use any other auxiliary folder in /freespace2 as game data holder. This feature allows installing and using several different mods without having undesired cross-effects.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most important consequence of having several available locations for game data, is that several versions of each file can exist. &#039;&#039;&#039;There&#039;s a priority order between different locations&#039;&#039;&#039; as explained in [[Command-Line_Reference#-mod|-MOD launcher flag help]]. Due to this order, &#039;&#039;&#039;only the highest priority version of each file will be used&#039;&#039;&#039;. This feature allows the user to quickly replace existing &#039;&#039;mission.fs2&#039;&#039; or &#039;&#039;ShipModel.pof&#039;&#039; by new or improved versions, placing them in a higher priority place. There&#039;s no need to remove obsolete files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;The use of [[Command-Line_Reference#-mod|-MOD launcher flag]] implies that there will be two or more /data folder structures. Some game data, mainly model cache files ([[Model files#IBX|*.IBX]]), can be regenerated by the game itself. Unless explicitly specified, these autogenerated files will be placed in the &#039;&#039;highest&#039;&#039; priority /data folder structure.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==data subfolders==&lt;br /&gt;
&lt;br /&gt;
===cache===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Model cache files. In versions of FS2Open prior to 3.7.4, model files were processed to extract the actual render geometry. In 3.7.4, that processing step was optimized so that performing this extraction at runtime was just as fast as reading cache files off of the disk; as a consequence, it was decided to remove the cache file reading and writing code.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**This folder and its contents are obsolete as of FS2Open Release 3.7.4.&lt;br /&gt;
&lt;br /&gt;
===cbanims===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Command and mission briefing animations. (They are assigned to missions through FRED2 editor).&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; [[%2A.ANI]] animations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===config===&lt;br /&gt;
*&amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Contents&#039;&#039;&#039;:&amp;lt;/font&amp;gt; Used by the SCP Builds. Contains (usually by reference) additional data as loaded by Scripts.&lt;br /&gt;
*&amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Supported files&#039;&#039;&#039;:&amp;lt;/font&amp;gt; [[%2A.CFG]] files.&lt;br /&gt;
{{table38|[[%2A.TBL]], [[%2A.TBM]], [[%2A.XML]] and [[%2A.CSV]] files.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===demos===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; This is probably where recordable demos would have been saved.  If you look in the source code, there are functions in place to record events and play the recordings back at a later time.  This code is does not (and in all likely hood will never) work.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; [[%2A.FSD]] (FreeSpace Demo) files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===effects===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Bitmaps and animations for every game effect:&lt;br /&gt;
**All the explosions and weapon effects.&lt;br /&gt;
**Damage smoke animation.&lt;br /&gt;
**Particle animations.&lt;br /&gt;
**Thruster glows and &amp;lt;font color=red&amp;gt;afterburner trails&amp;lt;/font&amp;gt;.&lt;br /&gt;
**All the background images, sun bitmaps, &amp;lt;font color=red&amp;gt;sun glares&amp;lt;/font&amp;gt; and space motion debris (see [[Stars.tbl]] table).&lt;br /&gt;
**Warp-in / warp-out animations.&lt;br /&gt;
**Anything more you can think of in this category. If you have a texture which you know it doesn&#039;t belong to [[FS2_Data_Structure#maps|maps folder]], put it here. If you have doubts, put it here too.&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;Since 3.6.10. version (including previously released nightly builds): GLSL shaders. See [[OpenGL_Shaders_(GLSL)|OpenGL Shaders (GLSL)]]&amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039;&lt;br /&gt;
**Retail: [[%2A.PCX]] for bitmaps, (example, backgrounds) and [[%2A.ANI]] for animations (example: explosions).&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;SCP fs2_open: Both formats and: [[%2A.JPG]], [[%2A.TGA]], [[%2A.PNG]], [[%2A.DDS]], for images, and [[.EFF]] for animations.&amp;lt;/font&amp;gt;&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;Since 3.6.10. version (including previously released nightly builds): [[%2A.SDR]] shader files. See [[OpenGL_Shaders_(GLSL)|OpenGL Shaders (GLSL)]]&amp;lt;/font&amp;gt;&lt;br /&gt;
**&amp;lt;font color=cyan&amp;gt;[[%2A.NEB]] files ?????? &amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**Some effect bitmaps or animations can be assigned by table entries. But the name of many others  is hardcoded, (example particlesmoke01).&lt;br /&gt;
**Not all the effects support animations. Example background bitmaps.&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;[[%2A.PNG]] or [[%2A.DDS]] as/and [[%2A.EFF]] are the preferred formats.&lt;br /&gt;
**See [[Texturing]] section for important info about this aspect of the game. It is more important for [[FS2_Data_Structure#maps|maps folder]] contents, (ie. ship textures), but it also applies here.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===fonts===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; This folder contains font files for the engine to use. Its native format are .VF (&amp;quot;Volition Font&amp;quot;) files, which are bitmapped fonts created using the fonttool.&lt;br /&gt;
{{Table373|TrueType Fonts (ttf) are also supported.}}&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; &amp;lt;font color=cyan&amp;gt;[[%2A.VF]] files, [[%2A.TTF]] files&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===force feedback===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; &amp;lt;font color=cyan&amp;gt;???????&amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; &amp;lt;font color=cyan&amp;gt;???????&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===freddocs===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; This is where the help files for FRED are stored.  Since the help files are viewed in a web browser, they were not able to be stored in the VP files.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; *.html, *.gif, *.jpg, *.png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===hud===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; All HUD building bricks. Anything you see on your HUD while flying is defined through this folder contents.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039;&lt;br /&gt;
**Retail: [[%2A.PCX]] and [[%2A.ANI]].&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;SCP fs2_open: The former ones and [[%2A.TGA]], [[%2A.PNG]] and [[%2A.DDS]] formats.&amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**Most of this folder contents have a hardcoded name.&lt;br /&gt;
**Most of this folder contents are &amp;quot;false&amp;quot; animations. It means that the [[%2A.ANI]] file is only used to pack several related images. Example: every ship shield graphic uses five images, (the ship bitmap and then, front, right, back and left shield quadrants) packed in one [[%2A.ANI]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===intelanims===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Intelligence animations used in &#039;&#039;Technical Database&#039;&#039; &amp;gt; &#039;&#039;Intelligence&#039;&#039; section. They are used through [[Species.tbl]] table.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; [[%2A.ANI]] animations and &amp;lt;font color=red&amp;gt;[[%2A.EFF]]&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===interface===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039;&lt;br /&gt;
**All the game screens and optional mission loading screens.&lt;br /&gt;
**All the button, mouse and icon bitmaps.&lt;br /&gt;
**Map ship icons in &#039;&#039;Briefing&#039;&#039; screen.&lt;br /&gt;
**Ship and weapon animations in &#039;&#039;Ship selection&#039;&#039; and &#039;&#039;Weapon loadout&#039;&#039; screens. These weapon animations are also used in &#039;&#039;Technical Database&#039;&#039; &amp;gt; &#039;&#039;Weapons&#039;&#039; section.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039;&lt;br /&gt;
**Retail: [[%2A.ANI]] animations and [[%2A.PCX]] bitmaps.&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;SCP fs2_open: The former ones and [[%2A.TGA]], [[%2A.PNG]], [[%2A.DDS]] and [[%2A.EFF]] formats.&amp;lt;/font&amp;gt; &lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;Most people use [[Command-Line_Reference#-ship_choice_3d|-ship_choice_3d]] and [[Command-Line_Reference#-weapon_choice_3d|-weapon_choice_3d]] command-line flags. With these flags, only primary weapon animations are needed for the &#039;&#039;Weapon loadout&#039;&#039; screen. There&#039;s no need for ship or secondary weapon animations. Moreover, some mods need a compulsory use of these flags because they have no available animations for their ships or missiles.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===maps===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; All the textures used by 3D [[%2A.POF]] models. [[%2A.POF]] models use textures to &amp;quot;paint&amp;quot; their surfaces and to simulate glow points. [[%2A.POF]] files only have links to the names of their used textures, they don&#039;t have embedded textures. All their used textures are read from this folder.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039;&lt;br /&gt;
**Retail: [[%2A.PCX]] bitmaps.&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;SCP fs2_open: The former and: [[%2A.JPG]], [[%2A.TGA]], [[%2A.PNG]], [[%2A.DDS]] formats. Some of the textures, (example: glow maps), support animated textures so [[%2A.EFF]] and [[%2A.ANI]] are also supported.&amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**See [[Texturing]] section for important info about this aspect of the game.&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;[[%2A.DDS]] and [[%2A.EFF]] are the preferred formats.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===missions===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; All the mission and campaign files.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; Each mission is one [[%2A.FS2]] file and each campaign is one [[%2A.FC2]] file.&lt;br /&gt;
**&amp;lt;font color=cyan&amp;gt;[[%2A.NTL]] and [[%2A.SSV]] files ????? &amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**In &#039;&#039;Mission Simulator&#039;&#039; screen, &#039;&#039;Single Missions&#039;&#039; are just available [[%2A.FS2]] mission files which are not pointed by any of the available [[%2A.FC2]] campaign files. This is the only way to play this kind of missions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===models===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; All the 3D models used by ships, asteroid and debris fields, missiles, subspace model, &amp;lt;font color=red&amp;gt;3D shockwaves, 3D warp-in/warp-out effects and background star-holding model&amp;lt;/font&amp;gt;.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; [[%2A.POF]] model files.&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**[[%2A.POF]] models have direct relation with [[FS2_Data_Structure#maps|maps]] and [[FS2_Data_Structure#cache|cache]] folder contents.&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;3D warp-in/warp-out effects need the usage of [[Command-Line_Reference#-3dwarp|-3dwarp launcher flag]].&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font color=red&amp;gt;movies&amp;lt;/font&amp;gt;===&lt;br /&gt;
*&amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Contents:&#039;&#039;&#039; Game cutscenes.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; [[%2A.MVE]], [[%2A.OGG]], [[%2A.AVI]] and [[%2A.MPG]] clip files.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;This folder is a fully SCP addition. Retail game reads [[%2A.MVE]] cutscenes from game CDs.&lt;br /&gt;
**[[%2A.AVI]] and [[%2A.MPG]] formats are decoded through system player. Their support is [[Deprecation|deprecated]] and therefore not guaranteed in future fs2_open versions.&lt;br /&gt;
**Retail uncompressed [[%2A.MVE]] and Theora compressed [[%2A.OGG]] formats are the preferred ones. fs2_open has built-in support for them both.&lt;br /&gt;
**All the movies can have custom names, (their loading trigger is defined in FRED), but start-up movie. This movie must be called &#039;&#039;&#039;Intro&#039;&#039;&#039;.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===multidata===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; &amp;lt;font color=cyan&amp;gt;???????&amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; [[%2A.PCX]], &amp;lt;font color=red&amp;gt;[[%2A.DDS]], [[%2A.PNG]]&amp;lt;/font&amp;gt; and [[%2A.FS2]] files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===music===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Music files used through [[Music.tbl]] table.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039;&lt;br /&gt;
**Retail: PCM [[%2A.WAV]] sound clips up to 16bit - 22kHz - 2 channels.&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;SCP fs2_open adds support for compressed [[%2A.OGG]] Vorbis sound clips.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===players===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; All game player data. &lt;br /&gt;
**It has 4 subfolders, each one has a deeper explanation below:&lt;br /&gt;
***[[FS2_Data_Structure#images|images]]: Selectable appearances of the player in &#039;&#039;Barracks&#039;&#039; screen.&lt;br /&gt;
***[[FS2_Data_Structure#multi|multi]]: Game data of multiplayer pilots&lt;br /&gt;
***[[FS2_Data_Structure#single|single]]: Game data of single player pilots&lt;br /&gt;
***[[FS2_Data_Structure#squads|squads]]: Selectable squad insignias of the player in &#039;&#039;Barracks&#039;&#039; screen.&lt;br /&gt;
**The main &#039;&#039;&#039;players&#039;&#039;&#039; folder just contains HUD appearance presets, ([[%2A.HCF]] files), which can be loaded, edited and saved in &#039;&#039;Options&#039;&#039; screen &amp;gt; &#039;&#039;HUD Config&#039;&#039; screen. From this screen they can be also applied to player&#039;s HUD settings.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; [[%2A.HCF]] HUD configuration files.&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;Only &#039;&#039;&#039;/freespace2/data/players&#039;&#039;&#039; main folder &#039;&#039;&#039;is used&#039;&#039;&#039; despite the [[Command-Line_Reference#-mod|-MOD launcher flag]] settings. Only [[FS2_Data_Structure#images|images]] and [[FS2_Data_Structure#squads|squads]] subfolders are read from any other locations (vp archives or other /mod/data/players folders).&amp;lt;/font&amp;gt;&lt;br /&gt;
**Of course, [[%2A.HCF]] files can be generated by the game itself, and are the settings for the HUD Options screen.&lt;br /&gt;
&lt;br /&gt;
====images====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Selectable appearances of the player in &#039;&#039;Barracks&#039;&#039; screen, ie. the player&#039;s photograph.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; [[%2A.PCX]] images&lt;br /&gt;
**&#039;&#039;&#039;&amp;lt;font color=red&amp;gt;SCP fs2_open&#039;&#039;&#039;: [[%2A.PNG]] and [[%2A.DDS]] files.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====multi====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Game data of multiplayer pilots.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; [[%2A.PLR]] files.&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;Only &#039;&#039;&#039;/freespace2/data/players/multi&#039;&#039;&#039; folder &#039;&#039;&#039;is used&#039;&#039;&#039; despite the [[Command-Line_Reference#-mod|-MOD launcher flag]] settings.&amp;lt;/font&amp;gt;&lt;br /&gt;
**Of course, multi player data is generated and updated by the game itself.&lt;br /&gt;
&lt;br /&gt;
====single====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Game data of single player pilots.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039;&lt;br /&gt;
**Each pilot consists of several files:&lt;br /&gt;
***One [[%2A.PL2]] file, (let&#039;s call it &#039;&#039;MyPilot.pl2&#039;&#039;), which contains main pilot data.&lt;br /&gt;
***Several [[%2A.CS2]] files. Each of these files is generated for each played campaign. They have the form &#039;&#039;MyPilot.Campaign name.cs2&#039;&#039;.&lt;br /&gt;
***&amp;lt;font color=red&amp;gt;FSO: [[%2A.PLR]], [[%2A.CSG]] and [[%2A.CSS]] files.&amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;Only &#039;&#039;&#039;/freespace2/data/players/single&#039;&#039;&#039; folder &#039;&#039;&#039;is used&#039;&#039;&#039; despite the [[Command-Line_Reference#-mod|-MOD launcher flag]] settings.&amp;lt;/font&amp;gt;&lt;br /&gt;
**Of course, single player data is generated and updated by the game itself.&lt;br /&gt;
**Do not use pilot names longer than 32 characters. The game has problems with them, ie. use short pilot names.&lt;br /&gt;
&lt;br /&gt;
====squads====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Selectable squadron insignias of the player in &#039;&#039;Barracks&#039;&#039; screen.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039;&lt;br /&gt;
**Retail: [[%2A.PCX]] bitmaps.&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;fs2_open: The above format and: [[%2A.PNG]], [[%2A.DDS]] images can be also used. But in order to maintain backwards and multiplayer compatibility, a [[%2A.PCX]] copy of the same insignia &#039;&#039;&#039;MUST&#039;&#039;&#039; be available. More info can be found in [http://scp.indiegames.us/mantis/view.php?id=1834 Mantis report 1834].&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font color=red&amp;gt;scripts&amp;lt;/font&amp;gt;===&lt;br /&gt;
*&amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Contents:&#039;&#039;&#039; &amp;lt;font color=cyan&amp;gt;This has something to do with LUA scripting SCP addition, but I know NOTHING about it. Please some expert fill it.&amp;lt;/font&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
*&amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Supported files:&#039;&#039;&#039; &amp;lt;font color=cyan&amp;gt;[[%2A.LUA]] and [[%2A.LC]] files. ???????&amp;lt;/font&amp;gt;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===sounds===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; All the game sound effects. [[FS2_Data_Structure#music|Music tracks]] or [[FS2_Data_Structure#voices|ingame speech]] which have their own subfolders.&lt;br /&gt;
**It has two folders, [[FS2_Data_Structure#8b22k|8b22k]] and [[FS2_Data_Structure#16b11k|16b11k]] to classify the sounds depending on their quality. &amp;lt;font color=cyan&amp;gt;But using them is not needed, all the sounds can go in the main folder.&amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039;&lt;br /&gt;
**Retail: PCM [[%2A.WAV]] sound clips &amp;lt;font color=cyan&amp;gt;up to 16bit - 22kHz - 2 channels&amp;lt;/font&amp;gt;.&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;SCP fs2_open adds support for compressed [[%2A.OGG]] Vorbis sound clips.&amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**In game sounds are used through [[Sounds.tbl]] table.&lt;br /&gt;
**&amp;lt;font color=cyan&amp;gt;Normally, game sounds only have one channel. Depending on the sound source location, the game will generate different right and left channel volumes.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====8b22k====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Low quality sounds, but just use the main [[FS2_Data_Structure#sounds|sounds]] folder.&lt;br /&gt;
&lt;br /&gt;
====16b11k====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; High quality sounds, but just use the main [[FS2_Data_Structure#sounds|sounds]] folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===tables===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Data tables which set the whole game behaviour.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039;&lt;br /&gt;
**Retail: [[%2A.TBL]] tables.&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;One of the most important SCP fs2_open additions: [[%2A.TBM]] [[Modular_Tables|modular table]] files.&amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
**Tables are just the most important thing for modders to know.&lt;br /&gt;
**There is a lot of useful info about them in [[Tables]] section of the Wiki.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===text===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; &amp;lt;font color=cyan&amp;gt;???????&amp;lt;/font&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; &amp;lt;font color=cyan&amp;gt;[[%2A.TXT]] and [[%2A.NET]] files.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===voice===&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; In game speech. This speech is separated in six different types. Each of them is located in its own subfolder inside voice folder.&lt;br /&gt;
**Campaign command briefing speeches. They are loaded from [[FS2_Data_Structure#command_briefings|command_briefings]] subfolder.&lt;br /&gt;
**Mission briefing explanation speeches. They are loaded from [[FS2_Data_Structure#briefing|briefing]] subfolder.&lt;br /&gt;
**Mission debriefing speeches. They are loaded from [[FS2_Data_Structure#debriefing|debriefing]] subfolder.&lt;br /&gt;
**Mission scripted speech. The voice files are loaded from [[FS2_Data_Structure#special|special]] subfolder.&lt;br /&gt;
**Random speech generated by flying mates or enemies. The voice files are loaded from [[FS2_Data_Structure#personas|personas]] subfolder.&lt;br /&gt;
**A &amp;quot;training&amp;quot; category- identical to [[FS2_Data_Structure#special|special]], but used by Volition to organize training messages.&lt;br /&gt;
*&#039;&#039;&#039;Supported files:&#039;&#039;&#039; All the speech kinds support these formats:&lt;br /&gt;
**Retail: PCM [[%2A.WAV]] sound clips &amp;lt;font color=cyan&amp;gt;up to 16bit - 22kHz - 2 channels&amp;lt;/font&amp;gt;.&lt;br /&gt;
**&amp;lt;font color=red&amp;gt;SCP fs2_open adds support for compressed [[%2A.OGG]] Vorbis sound clips.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====briefing====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Mission briefing explanation speeches. They are set through FRED editor in each [[%2A.FS2]] mission file.&lt;br /&gt;
&lt;br /&gt;
====command_briefings====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; General command briefing speeches you can see before some missions. As example, the  first mission usually have command brienfing. They are set through FRED editor. They are attached to the next mission file.&lt;br /&gt;
&lt;br /&gt;
====debriefing====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Mission debriefing explanation speeches. They are set through FRED editor in each [[%2A.FS2]] mission file.&lt;br /&gt;
&lt;br /&gt;
====personas====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Random speech generated by flying ships or your command, for example to warn the player about &amp;quot;Bandit on your tail&amp;quot; or to praise him with &amp;quot;Good shoot!!&amp;quot; . This feature is used through [[Messages.tbl]] table.&lt;br /&gt;
&lt;br /&gt;
====special====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Scripted speech files in every mission. This speech is set through FRED SEXPs (mainly &#039;&#039;send-message-list&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
====training====&lt;br /&gt;
*&#039;&#039;&#039;Contents:&#039;&#039;&#039; Identical to &#039;&#039;&#039;special&#039;&#039;&#039;, but used by Volition for training messages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Loading order==&lt;br /&gt;
Although each kind of game data has its right folder, they are really looked for in some related folders. As an example, the game looks for ship textures in [[FS2_Data_Structure#maps|maps]] folder but also in [[FS2_Data_Structure#effects|effects]] folder. Also if you have one effect and one ship texture with the same name you are going to have trouble.&lt;br /&gt;
&lt;br /&gt;
Just for reference and troubleshooting, here you have the loading order and searched extensions of each subfolder. &#039;&#039;&#039;But always try to put every file in its right place&#039;&#039;&#039;. (You may see strange locations for some files, please don&#039;t use them).&lt;br /&gt;
&lt;br /&gt;
 /   (mve, avi, mpg, ogg, vp)&lt;br /&gt;
 /data  (cfg, log, txt)&lt;br /&gt;
 /data/maps   (pcx, ani, jpg, tga, eff, png, dds)&lt;br /&gt;
 /data/text   (txt, net)&lt;br /&gt;
 /data/missions   (fs2, fc2, ntl, ssv)&lt;br /&gt;
 /data/models  (pof)&lt;br /&gt;
 /data/tables  (tbl, tbm)&lt;br /&gt;
 /data/sounds  (wav, ogg)&lt;br /&gt;
 /data/sounds/8b22k  (wav, ogg)&lt;br /&gt;
 /data/sounds/16b11k   (wav, ogg)&lt;br /&gt;
 /data/voice  ()&lt;br /&gt;
 /data/voice/briefing  (wav, ogg)&lt;br /&gt;
 /data/voice/command_briefings  (wav, ogg)&lt;br /&gt;
 /data/voice/debriefing  (wav, ogg)&lt;br /&gt;
 /data/voice/personas  (wav, ogg)&lt;br /&gt;
 /data/voice/special  (wav, ogg)&lt;br /&gt;
 /data/voice/training  (wav, ogg)&lt;br /&gt;
 /data/music  (wav, ogg)&lt;br /&gt;
 /data/movies  (mve, msb, avi, mpg, ogg)&lt;br /&gt;
 /data/interface  (pcx, ani, jpg, tga, eff, png, dds)&lt;br /&gt;
 /data/fonts  (vf)&lt;br /&gt;
 /data/effects  (neb, pcx, ani, jpg, tga, eff, png, dds)&lt;br /&gt;
 /data/hud  (pcx, ani, tga, png, dds)&lt;br /&gt;
 /data/players  (plr, csg)&lt;br /&gt;
 /data/players/images (pcx, png, dds)&lt;br /&gt;
 /data/cache  (clr, tmp, ibx)&lt;br /&gt;
 /data/players  (hcf)&lt;br /&gt;
 /data/players/single  (pl2, cs2, plr, csg, css)&lt;br /&gt;
 /data/players/multi  (plr)&lt;br /&gt;
 /data/multidata  (pcx, png, dds, fs2)&lt;br /&gt;
 /data/config  (cfg)&lt;br /&gt;
 /data/players/squads  (pcx, png, dds)&lt;br /&gt;
 /data/demos  (fsd)&lt;br /&gt;
 /data/cbanims  (ani, eff, png, dds)&lt;br /&gt;
 /data/intelanims  (ani, eff, png, dds)&lt;br /&gt;
 /data/scripts  (lua, lc)&lt;br /&gt;
&lt;br /&gt;
==See Also:==&lt;br /&gt;
&lt;br /&gt;
===[[*.VP]]===&lt;br /&gt;
===[[FreeSpace 2 directory structure]]===&lt;br /&gt;
===[[Compression_Support]]===&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64384</id>
		<title>Compression Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64384"/>
		<updated>2023-01-03T00:44:38Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* LZ41 Data Format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &#039;&#039;&#039;Compression Support&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
The major problem in supporting compressed files is random access, FSO needs to be able to do all operations on a compressed file as it would normally do with any file; fopen(), fseek(), fread(), fclose(). Whiout having to decompress the entire file and store it in ram to do those operations. .pof parsing specially uses a lot of fseeks() and small freads(). Generally, file compression algos are intended to decompress the entire file from start to finish in one go and thus random access its non standart for the compression format.&lt;br /&gt;
&lt;br /&gt;
In FSO 21.2.0 the first compression support was merged into the code, the first implementation uses LZ4/LZ4-HC and it is called internally as &amp;quot;LZ41&amp;quot;. The LZ41 implementation is mainly intended for loose files but adding those inside VPs is also supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 ==&lt;br /&gt;
The LZ41 design is similar to the lz4 random access example, it uses the lz4 stream compression, a int table to store the offsets that indicate at what compressed block the original file position is, a int to indicate the number of these offsets, the original filesize and blocksize. The major diference being that instead of using a dictionary, the stream is resetted at each block, making them independient from each other, and thus you can pick any block you want and uncompress that block at will.&lt;br /&gt;
Resetting the stream rather than use a dictionary may be less efficient (this is untested as the time of writting this article), but it was the only way to do it for individual files whiout having to embed the dictionary too.&lt;br /&gt;
The LZ41 implementation is non-LZ4 format standard, just like the official example for random access is, as the LZ4 data format does not seems to consider what is needed for random access.&lt;br /&gt;
FSO checks for the file header on fopen() and if the file is compressed then the logic for compressed files is used.&lt;br /&gt;
&lt;br /&gt;
== LZ41 Data Format ==&lt;br /&gt;
4 byte header (0x31345A4C // &amp;quot;14ZL&amp;quot; -&amp;gt; &amp;quot;LZ41&amp;quot;, inverted) &amp;lt;br&amp;gt;&lt;br /&gt;
N Blocks&amp;lt;br&amp;gt;&lt;br /&gt;
N offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int num_offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int original_filesize&amp;lt;br&amp;gt;&lt;br /&gt;
int blocksize&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_structure.png|300px]]&lt;br /&gt;
&lt;br /&gt;
== LZ41 Tests ==&lt;br /&gt;
&#039;&#039;&#039;Uncompressed MVP 4.4.1&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
12.9GB - Space used on Disk&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Compressed MVP 4.4.1 Block Size: 65536 LZ4-HC L6&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
7.01GB - Space used on disk&amp;lt;br&amp;gt;&lt;br /&gt;
Compression time: 5 minutes (1 thread)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;MVP 4.4.1 - All FS2 Models mission load time&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:01 - SSD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:02 - SSD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
1:49 - HDD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
2:30 - HDD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== LZ41 Compressor Guidelines ==&lt;br /&gt;
&#039;&#039;&#039;Block Size&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Block size is set by the compressor 8192, 16384, 65536 block sizes were all tested, higher values are untested and may work or not, a higher block size will make the large compressed files smaller, higher block size will also make FSO to use more RAM but not by much.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ignore text based file formats&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Text files should be ignored, they do work fine, but there is no much is to be gained and the only thing it does is to make the file unreadeable by text editors: .fc2, .fs2, .tbl, .tbm, .eff.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Movies are already compressed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.mp4,.ogg,.mve,.webm: the ratio will be negative most of the time, and when is not, you are just saving a few kb, maybe a mb or two.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Audio files&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.ogg, .wav: .wav may give you some little gains but it is just not worth to try, with ogg its the same problem as with the movies, these files are already compressed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;pngs&#039;&#039;&#039;&lt;br /&gt;
pngs are already compressed and 99% of the time end up with a negative ratio, and since mods use apngs, you are going to waste time trying to compress them. PNG that arent compressed are going to go down in size, considerably, but this is uncommon, maybe check the png header for the compression value they already have before trying to compress.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Do not keep files that end up with negative ratios&#039;&#039;&#039;&lt;br /&gt;
No matter if those files are inside a vp or they are loose files, if a compressed file end up being bigger than the original one, it must be discarded.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compression Function Example==&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_example.png|300px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Source: VPC Compressor tool&lt;br /&gt;
&lt;br /&gt;
== LZ41 Design Choices ==&lt;br /&gt;
A non standart format was used since the official random access example was already breaking the lz4 frame format.&amp;lt;br&amp;gt;&lt;br /&gt;
Additional data were added trailing to each file, the offset table, the num offsets, the block size, the original filesize, normaly those would be on a container and cached on container load, but it is not possible for loose files.&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the 31 chars filename limit, the idea of adding a extra extension to the files was dropped, as changing the filename lenght was just not an option, and since loose files were getting no extra extension, a uncompressed .pof would be named the same as a compressed .pof, as a result of this, no need to store compressed files on a diferent container rather than plain .VP was seen as needed as there were already no difference for loose files. This will later been prove to be a mistake because it could cause user confunsion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
At some point in 23.X.X versions a new guideline for compressing files will be requiered.&amp;lt;br&amp;gt;&lt;br /&gt;
- The extra extension &amp;quot;.lz41&amp;quot; will be added to loose files. Since recent improvements in FSO code allows for loose files to use more than 31 characters. FSO will ignore this extra extension after load and thus &amp;quot;ship.pof.lz41&amp;quot; will be considered as &amp;quot;ship.pof&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
- New VP container: .VPC&amp;lt;br&amp;gt;&lt;br /&gt;
The VPC container format is identical to a .VP container in structure and limits, with one key difference: It may contain uncompressed files just like any normal VP, but it has to contain at least 1 compressed file.&lt;br /&gt;
Compressed files stored inside a .vpc container must not have the .lz41 extension or its name changed in any way.&amp;lt;br&amp;gt;&lt;br /&gt;
While .VP can still tecnically be used to store compressed files, it is recomended not to.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
None of these changes break compatibility with files compressed prior to these changes, but just as with any new feature or major changes, older versions of FSO can not use compressed files in this new way.&lt;br /&gt;
&lt;br /&gt;
== Versioning System ==&lt;br /&gt;
In order to avoid compatibility issues with future changes or additions, the file header is used in all fopen(), fseek(), fread() operations, the header tells FSO what to do in those operations, so in the future a new and better way to support compression is found, or a better algo, a different header must be used, lets assume &amp;quot;LZ42&amp;quot;, this means FSO can handle &amp;quot;LZ41&amp;quot; files in a way and &amp;quot;LZ42&amp;quot; files in a totally different way whiout breaking any compatibility.&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64383</id>
		<title>Compression Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64383"/>
		<updated>2023-01-03T00:43:41Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Compression Function Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &#039;&#039;&#039;Compression Support&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
The major problem in supporting compressed files is random access, FSO needs to be able to do all operations on a compressed file as it would normally do with any file; fopen(), fseek(), fread(), fclose(). Whiout having to decompress the entire file and store it in ram to do those operations. .pof parsing specially uses a lot of fseeks() and small freads(). Generally, file compression algos are intended to decompress the entire file from start to finish in one go and thus random access its non standart for the compression format.&lt;br /&gt;
&lt;br /&gt;
In FSO 21.2.0 the first compression support was merged into the code, the first implementation uses LZ4/LZ4-HC and it is called internally as &amp;quot;LZ41&amp;quot;. The LZ41 implementation is mainly intended for loose files but adding those inside VPs is also supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 ==&lt;br /&gt;
The LZ41 design is similar to the lz4 random access example, it uses the lz4 stream compression, a int table to store the offsets that indicate at what compressed block the original file position is, a int to indicate the number of these offsets, the original filesize and blocksize. The major diference being that instead of using a dictionary, the stream is resetted at each block, making them independient from each other, and thus you can pick any block you want and uncompress that block at will.&lt;br /&gt;
Resetting the stream rather than use a dictionary may be less efficient (this is untested as the time of writting this article), but it was the only way to do it for individual files whiout having to embed the dictionary too.&lt;br /&gt;
The LZ41 implementation is non-LZ4 format standard, just like the official example for random access is, as the LZ4 data format does not seems to consider what is needed for random access.&lt;br /&gt;
FSO checks for the file header on fopen() and if the file is compressed then the logic for compressed files is used.&lt;br /&gt;
&lt;br /&gt;
== LZ41 Data Format ==&lt;br /&gt;
4 byte header (0x31345A4C // &amp;quot;14ZL&amp;quot; -&amp;gt; &amp;quot;LZ41&amp;quot;, inverted) &amp;lt;br&amp;gt;&lt;br /&gt;
N Blocks&amp;lt;br&amp;gt;&lt;br /&gt;
N offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int num_offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int original_filesize&amp;lt;br&amp;gt;&lt;br /&gt;
int blocksize&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_structure.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 Tests ==&lt;br /&gt;
&#039;&#039;&#039;Uncompressed MVP 4.4.1&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
12.9GB - Space used on Disk&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Compressed MVP 4.4.1 Block Size: 65536 LZ4-HC L6&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
7.01GB - Space used on disk&amp;lt;br&amp;gt;&lt;br /&gt;
Compression time: 5 minutes (1 thread)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;MVP 4.4.1 - All FS2 Models mission load time&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:01 - SSD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:02 - SSD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
1:49 - HDD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
2:30 - HDD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== LZ41 Compressor Guidelines ==&lt;br /&gt;
&#039;&#039;&#039;Block Size&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Block size is set by the compressor 8192, 16384, 65536 block sizes were all tested, higher values are untested and may work or not, a higher block size will make the large compressed files smaller, higher block size will also make FSO to use more RAM but not by much.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ignore text based file formats&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Text files should be ignored, they do work fine, but there is no much is to be gained and the only thing it does is to make the file unreadeable by text editors: .fc2, .fs2, .tbl, .tbm, .eff.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Movies are already compressed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.mp4,.ogg,.mve,.webm: the ratio will be negative most of the time, and when is not, you are just saving a few kb, maybe a mb or two.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Audio files&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.ogg, .wav: .wav may give you some little gains but it is just not worth to try, with ogg its the same problem as with the movies, these files are already compressed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;pngs&#039;&#039;&#039;&lt;br /&gt;
pngs are already compressed and 99% of the time end up with a negative ratio, and since mods use apngs, you are going to waste time trying to compress them. PNG that arent compressed are going to go down in size, considerably, but this is uncommon, maybe check the png header for the compression value they already have before trying to compress.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Do not keep files that end up with negative ratios&#039;&#039;&#039;&lt;br /&gt;
No matter if those files are inside a vp or they are loose files, if a compressed file end up being bigger than the original one, it must be discarded.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compression Function Example==&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_example.png|300px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Source: VPC Compressor tool&lt;br /&gt;
&lt;br /&gt;
== LZ41 Design Choices ==&lt;br /&gt;
A non standart format was used since the official random access example was already breaking the lz4 frame format.&amp;lt;br&amp;gt;&lt;br /&gt;
Additional data were added trailing to each file, the offset table, the num offsets, the block size, the original filesize, normaly those would be on a container and cached on container load, but it is not possible for loose files.&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the 31 chars filename limit, the idea of adding a extra extension to the files was dropped, as changing the filename lenght was just not an option, and since loose files were getting no extra extension, a uncompressed .pof would be named the same as a compressed .pof, as a result of this, no need to store compressed files on a diferent container rather than plain .VP was seen as needed as there were already no difference for loose files. This will later been prove to be a mistake because it could cause user confunsion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
At some point in 23.X.X versions a new guideline for compressing files will be requiered.&amp;lt;br&amp;gt;&lt;br /&gt;
- The extra extension &amp;quot;.lz41&amp;quot; will be added to loose files. Since recent improvements in FSO code allows for loose files to use more than 31 characters. FSO will ignore this extra extension after load and thus &amp;quot;ship.pof.lz41&amp;quot; will be considered as &amp;quot;ship.pof&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
- New VP container: .VPC&amp;lt;br&amp;gt;&lt;br /&gt;
The VPC container format is identical to a .VP container in structure and limits, with one key difference: It may contain uncompressed files just like any normal VP, but it has to contain at least 1 compressed file.&lt;br /&gt;
Compressed files stored inside a .vpc container must not have the .lz41 extension or its name changed in any way.&amp;lt;br&amp;gt;&lt;br /&gt;
While .VP can still tecnically be used to store compressed files, it is recomended not to.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
None of these changes break compatibility with files compressed prior to these changes, but just as with any new feature or major changes, older versions of FSO can not use compressed files in this new way.&lt;br /&gt;
&lt;br /&gt;
== Versioning System ==&lt;br /&gt;
In order to avoid compatibility issues with future changes or additions, the file header is used in all fopen(), fseek(), fread() operations, the header tells FSO what to do in those operations, so in the future a new and better way to support compression is found, or a better algo, a different header must be used, lets assume &amp;quot;LZ42&amp;quot;, this means FSO can handle &amp;quot;LZ41&amp;quot; files in a way and &amp;quot;LZ42&amp;quot; files in a totally different way whiout breaking any compatibility.&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64382</id>
		<title>Compression Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64382"/>
		<updated>2023-01-03T00:43:18Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Compression Function Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &#039;&#039;&#039;Compression Support&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
The major problem in supporting compressed files is random access, FSO needs to be able to do all operations on a compressed file as it would normally do with any file; fopen(), fseek(), fread(), fclose(). Whiout having to decompress the entire file and store it in ram to do those operations. .pof parsing specially uses a lot of fseeks() and small freads(). Generally, file compression algos are intended to decompress the entire file from start to finish in one go and thus random access its non standart for the compression format.&lt;br /&gt;
&lt;br /&gt;
In FSO 21.2.0 the first compression support was merged into the code, the first implementation uses LZ4/LZ4-HC and it is called internally as &amp;quot;LZ41&amp;quot;. The LZ41 implementation is mainly intended for loose files but adding those inside VPs is also supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 ==&lt;br /&gt;
The LZ41 design is similar to the lz4 random access example, it uses the lz4 stream compression, a int table to store the offsets that indicate at what compressed block the original file position is, a int to indicate the number of these offsets, the original filesize and blocksize. The major diference being that instead of using a dictionary, the stream is resetted at each block, making them independient from each other, and thus you can pick any block you want and uncompress that block at will.&lt;br /&gt;
Resetting the stream rather than use a dictionary may be less efficient (this is untested as the time of writting this article), but it was the only way to do it for individual files whiout having to embed the dictionary too.&lt;br /&gt;
The LZ41 implementation is non-LZ4 format standard, just like the official example for random access is, as the LZ4 data format does not seems to consider what is needed for random access.&lt;br /&gt;
FSO checks for the file header on fopen() and if the file is compressed then the logic for compressed files is used.&lt;br /&gt;
&lt;br /&gt;
== LZ41 Data Format ==&lt;br /&gt;
4 byte header (0x31345A4C // &amp;quot;14ZL&amp;quot; -&amp;gt; &amp;quot;LZ41&amp;quot;, inverted) &amp;lt;br&amp;gt;&lt;br /&gt;
N Blocks&amp;lt;br&amp;gt;&lt;br /&gt;
N offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int num_offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int original_filesize&amp;lt;br&amp;gt;&lt;br /&gt;
int blocksize&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_structure.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 Tests ==&lt;br /&gt;
&#039;&#039;&#039;Uncompressed MVP 4.4.1&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
12.9GB - Space used on Disk&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Compressed MVP 4.4.1 Block Size: 65536 LZ4-HC L6&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
7.01GB - Space used on disk&amp;lt;br&amp;gt;&lt;br /&gt;
Compression time: 5 minutes (1 thread)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;MVP 4.4.1 - All FS2 Models mission load time&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:01 - SSD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:02 - SSD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
1:49 - HDD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
2:30 - HDD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== LZ41 Compressor Guidelines ==&lt;br /&gt;
&#039;&#039;&#039;Block Size&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Block size is set by the compressor 8192, 16384, 65536 block sizes were all tested, higher values are untested and may work or not, a higher block size will make the large compressed files smaller, higher block size will also make FSO to use more RAM but not by much.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ignore text based file formats&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Text files should be ignored, they do work fine, but there is no much is to be gained and the only thing it does is to make the file unreadeable by text editors: .fc2, .fs2, .tbl, .tbm, .eff.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Movies are already compressed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.mp4,.ogg,.mve,.webm: the ratio will be negative most of the time, and when is not, you are just saving a few kb, maybe a mb or two.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Audio files&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.ogg, .wav: .wav may give you some little gains but it is just not worth to try, with ogg its the same problem as with the movies, these files are already compressed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;pngs&#039;&#039;&#039;&lt;br /&gt;
pngs are already compressed and 99% of the time end up with a negative ratio, and since mods use apngs, you are going to waste time trying to compress them. PNG that arent compressed are going to go down in size, considerably, but this is uncommon, maybe check the png header for the compression value they already have before trying to compress.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Do not keep files that end up with negative ratios&#039;&#039;&#039;&lt;br /&gt;
No matter if those files are inside a vp or they are loose files, if a compressed file end up being bigger than the original one, it must be discarded.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compression Function Example==&lt;br /&gt;
&lt;br /&gt;
[[Media:lz41_example.png|300px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Source: VPC Compressor tool&lt;br /&gt;
&lt;br /&gt;
== LZ41 Design Choices ==&lt;br /&gt;
A non standart format was used since the official random access example was already breaking the lz4 frame format.&amp;lt;br&amp;gt;&lt;br /&gt;
Additional data were added trailing to each file, the offset table, the num offsets, the block size, the original filesize, normaly those would be on a container and cached on container load, but it is not possible for loose files.&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the 31 chars filename limit, the idea of adding a extra extension to the files was dropped, as changing the filename lenght was just not an option, and since loose files were getting no extra extension, a uncompressed .pof would be named the same as a compressed .pof, as a result of this, no need to store compressed files on a diferent container rather than plain .VP was seen as needed as there were already no difference for loose files. This will later been prove to be a mistake because it could cause user confunsion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
At some point in 23.X.X versions a new guideline for compressing files will be requiered.&amp;lt;br&amp;gt;&lt;br /&gt;
- The extra extension &amp;quot;.lz41&amp;quot; will be added to loose files. Since recent improvements in FSO code allows for loose files to use more than 31 characters. FSO will ignore this extra extension after load and thus &amp;quot;ship.pof.lz41&amp;quot; will be considered as &amp;quot;ship.pof&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
- New VP container: .VPC&amp;lt;br&amp;gt;&lt;br /&gt;
The VPC container format is identical to a .VP container in structure and limits, with one key difference: It may contain uncompressed files just like any normal VP, but it has to contain at least 1 compressed file.&lt;br /&gt;
Compressed files stored inside a .vpc container must not have the .lz41 extension or its name changed in any way.&amp;lt;br&amp;gt;&lt;br /&gt;
While .VP can still tecnically be used to store compressed files, it is recomended not to.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
None of these changes break compatibility with files compressed prior to these changes, but just as with any new feature or major changes, older versions of FSO can not use compressed files in this new way.&lt;br /&gt;
&lt;br /&gt;
== Versioning System ==&lt;br /&gt;
In order to avoid compatibility issues with future changes or additions, the file header is used in all fopen(), fseek(), fread() operations, the header tells FSO what to do in those operations, so in the future a new and better way to support compression is found, or a better algo, a different header must be used, lets assume &amp;quot;LZ42&amp;quot;, this means FSO can handle &amp;quot;LZ41&amp;quot; files in a way and &amp;quot;LZ42&amp;quot; files in a totally different way whiout breaking any compatibility.&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64381</id>
		<title>Compression Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64381"/>
		<updated>2023-01-03T00:42:56Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Compression Function Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &#039;&#039;&#039;Compression Support&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
The major problem in supporting compressed files is random access, FSO needs to be able to do all operations on a compressed file as it would normally do with any file; fopen(), fseek(), fread(), fclose(). Whiout having to decompress the entire file and store it in ram to do those operations. .pof parsing specially uses a lot of fseeks() and small freads(). Generally, file compression algos are intended to decompress the entire file from start to finish in one go and thus random access its non standart for the compression format.&lt;br /&gt;
&lt;br /&gt;
In FSO 21.2.0 the first compression support was merged into the code, the first implementation uses LZ4/LZ4-HC and it is called internally as &amp;quot;LZ41&amp;quot;. The LZ41 implementation is mainly intended for loose files but adding those inside VPs is also supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 ==&lt;br /&gt;
The LZ41 design is similar to the lz4 random access example, it uses the lz4 stream compression, a int table to store the offsets that indicate at what compressed block the original file position is, a int to indicate the number of these offsets, the original filesize and blocksize. The major diference being that instead of using a dictionary, the stream is resetted at each block, making them independient from each other, and thus you can pick any block you want and uncompress that block at will.&lt;br /&gt;
Resetting the stream rather than use a dictionary may be less efficient (this is untested as the time of writting this article), but it was the only way to do it for individual files whiout having to embed the dictionary too.&lt;br /&gt;
The LZ41 implementation is non-LZ4 format standard, just like the official example for random access is, as the LZ4 data format does not seems to consider what is needed for random access.&lt;br /&gt;
FSO checks for the file header on fopen() and if the file is compressed then the logic for compressed files is used.&lt;br /&gt;
&lt;br /&gt;
== LZ41 Data Format ==&lt;br /&gt;
4 byte header (0x31345A4C // &amp;quot;14ZL&amp;quot; -&amp;gt; &amp;quot;LZ41&amp;quot;, inverted) &amp;lt;br&amp;gt;&lt;br /&gt;
N Blocks&amp;lt;br&amp;gt;&lt;br /&gt;
N offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int num_offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int original_filesize&amp;lt;br&amp;gt;&lt;br /&gt;
int blocksize&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_structure.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 Tests ==&lt;br /&gt;
&#039;&#039;&#039;Uncompressed MVP 4.4.1&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
12.9GB - Space used on Disk&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Compressed MVP 4.4.1 Block Size: 65536 LZ4-HC L6&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
7.01GB - Space used on disk&amp;lt;br&amp;gt;&lt;br /&gt;
Compression time: 5 minutes (1 thread)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;MVP 4.4.1 - All FS2 Models mission load time&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:01 - SSD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:02 - SSD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
1:49 - HDD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
2:30 - HDD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== LZ41 Compressor Guidelines ==&lt;br /&gt;
&#039;&#039;&#039;Block Size&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Block size is set by the compressor 8192, 16384, 65536 block sizes were all tested, higher values are untested and may work or not, a higher block size will make the large compressed files smaller, higher block size will also make FSO to use more RAM but not by much.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ignore text based file formats&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Text files should be ignored, they do work fine, but there is no much is to be gained and the only thing it does is to make the file unreadeable by text editors: .fc2, .fs2, .tbl, .tbm, .eff.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Movies are already compressed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.mp4,.ogg,.mve,.webm: the ratio will be negative most of the time, and when is not, you are just saving a few kb, maybe a mb or two.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Audio files&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.ogg, .wav: .wav may give you some little gains but it is just not worth to try, with ogg its the same problem as with the movies, these files are already compressed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;pngs&#039;&#039;&#039;&lt;br /&gt;
pngs are already compressed and 99% of the time end up with a negative ratio, and since mods use apngs, you are going to waste time trying to compress them. PNG that arent compressed are going to go down in size, considerably, but this is uncommon, maybe check the png header for the compression value they already have before trying to compress.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Do not keep files that end up with negative ratios&#039;&#039;&#039;&lt;br /&gt;
No matter if those files are inside a vp or they are loose files, if a compressed file end up being bigger than the original one, it must be discarded.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compression Function Example==&lt;br /&gt;
&lt;br /&gt;
[[Media:lz41_example.png|thumb]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Source: VPC Compressor tool&lt;br /&gt;
&lt;br /&gt;
== LZ41 Design Choices ==&lt;br /&gt;
A non standart format was used since the official random access example was already breaking the lz4 frame format.&amp;lt;br&amp;gt;&lt;br /&gt;
Additional data were added trailing to each file, the offset table, the num offsets, the block size, the original filesize, normaly those would be on a container and cached on container load, but it is not possible for loose files.&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the 31 chars filename limit, the idea of adding a extra extension to the files was dropped, as changing the filename lenght was just not an option, and since loose files were getting no extra extension, a uncompressed .pof would be named the same as a compressed .pof, as a result of this, no need to store compressed files on a diferent container rather than plain .VP was seen as needed as there were already no difference for loose files. This will later been prove to be a mistake because it could cause user confunsion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
At some point in 23.X.X versions a new guideline for compressing files will be requiered.&amp;lt;br&amp;gt;&lt;br /&gt;
- The extra extension &amp;quot;.lz41&amp;quot; will be added to loose files. Since recent improvements in FSO code allows for loose files to use more than 31 characters. FSO will ignore this extra extension after load and thus &amp;quot;ship.pof.lz41&amp;quot; will be considered as &amp;quot;ship.pof&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
- New VP container: .VPC&amp;lt;br&amp;gt;&lt;br /&gt;
The VPC container format is identical to a .VP container in structure and limits, with one key difference: It may contain uncompressed files just like any normal VP, but it has to contain at least 1 compressed file.&lt;br /&gt;
Compressed files stored inside a .vpc container must not have the .lz41 extension or its name changed in any way.&amp;lt;br&amp;gt;&lt;br /&gt;
While .VP can still tecnically be used to store compressed files, it is recomended not to.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
None of these changes break compatibility with files compressed prior to these changes, but just as with any new feature or major changes, older versions of FSO can not use compressed files in this new way.&lt;br /&gt;
&lt;br /&gt;
== Versioning System ==&lt;br /&gt;
In order to avoid compatibility issues with future changes or additions, the file header is used in all fopen(), fseek(), fread() operations, the header tells FSO what to do in those operations, so in the future a new and better way to support compression is found, or a better algo, a different header must be used, lets assume &amp;quot;LZ42&amp;quot;, this means FSO can handle &amp;quot;LZ41&amp;quot; files in a way and &amp;quot;LZ42&amp;quot; files in a totally different way whiout breaking any compatibility.&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=File:Lz41_example.png&amp;diff=64380</id>
		<title>File:Lz41 example.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=File:Lz41_example.png&amp;diff=64380"/>
		<updated>2023-01-03T00:42:35Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64379</id>
		<title>Compression Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64379"/>
		<updated>2023-01-03T00:42:23Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Compression Function Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &#039;&#039;&#039;Compression Support&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
The major problem in supporting compressed files is random access, FSO needs to be able to do all operations on a compressed file as it would normally do with any file; fopen(), fseek(), fread(), fclose(). Whiout having to decompress the entire file and store it in ram to do those operations. .pof parsing specially uses a lot of fseeks() and small freads(). Generally, file compression algos are intended to decompress the entire file from start to finish in one go and thus random access its non standart for the compression format.&lt;br /&gt;
&lt;br /&gt;
In FSO 21.2.0 the first compression support was merged into the code, the first implementation uses LZ4/LZ4-HC and it is called internally as &amp;quot;LZ41&amp;quot;. The LZ41 implementation is mainly intended for loose files but adding those inside VPs is also supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 ==&lt;br /&gt;
The LZ41 design is similar to the lz4 random access example, it uses the lz4 stream compression, a int table to store the offsets that indicate at what compressed block the original file position is, a int to indicate the number of these offsets, the original filesize and blocksize. The major diference being that instead of using a dictionary, the stream is resetted at each block, making them independient from each other, and thus you can pick any block you want and uncompress that block at will.&lt;br /&gt;
Resetting the stream rather than use a dictionary may be less efficient (this is untested as the time of writting this article), but it was the only way to do it for individual files whiout having to embed the dictionary too.&lt;br /&gt;
The LZ41 implementation is non-LZ4 format standard, just like the official example for random access is, as the LZ4 data format does not seems to consider what is needed for random access.&lt;br /&gt;
FSO checks for the file header on fopen() and if the file is compressed then the logic for compressed files is used.&lt;br /&gt;
&lt;br /&gt;
== LZ41 Data Format ==&lt;br /&gt;
4 byte header (0x31345A4C // &amp;quot;14ZL&amp;quot; -&amp;gt; &amp;quot;LZ41&amp;quot;, inverted) &amp;lt;br&amp;gt;&lt;br /&gt;
N Blocks&amp;lt;br&amp;gt;&lt;br /&gt;
N offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int num_offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int original_filesize&amp;lt;br&amp;gt;&lt;br /&gt;
int blocksize&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_structure.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 Tests ==&lt;br /&gt;
&#039;&#039;&#039;Uncompressed MVP 4.4.1&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
12.9GB - Space used on Disk&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Compressed MVP 4.4.1 Block Size: 65536 LZ4-HC L6&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
7.01GB - Space used on disk&amp;lt;br&amp;gt;&lt;br /&gt;
Compression time: 5 minutes (1 thread)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;MVP 4.4.1 - All FS2 Models mission load time&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:01 - SSD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:02 - SSD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
1:49 - HDD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
2:30 - HDD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== LZ41 Compressor Guidelines ==&lt;br /&gt;
&#039;&#039;&#039;Block Size&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Block size is set by the compressor 8192, 16384, 65536 block sizes were all tested, higher values are untested and may work or not, a higher block size will make the large compressed files smaller, higher block size will also make FSO to use more RAM but not by much.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ignore text based file formats&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Text files should be ignored, they do work fine, but there is no much is to be gained and the only thing it does is to make the file unreadeable by text editors: .fc2, .fs2, .tbl, .tbm, .eff.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Movies are already compressed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.mp4,.ogg,.mve,.webm: the ratio will be negative most of the time, and when is not, you are just saving a few kb, maybe a mb or two.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Audio files&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.ogg, .wav: .wav may give you some little gains but it is just not worth to try, with ogg its the same problem as with the movies, these files are already compressed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;pngs&#039;&#039;&#039;&lt;br /&gt;
pngs are already compressed and 99% of the time end up with a negative ratio, and since mods use apngs, you are going to waste time trying to compress them. PNG that arent compressed are going to go down in size, considerably, but this is uncommon, maybe check the png header for the compression value they already have before trying to compress.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Do not keep files that end up with negative ratios&#039;&#039;&#039;&lt;br /&gt;
No matter if those files are inside a vp or they are loose files, if a compressed file end up being bigger than the original one, it must be discarded.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compression Function Example==&lt;br /&gt;
&lt;br /&gt;
[[Media:lz41_example.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Source: VPC Compressor tool&lt;br /&gt;
&lt;br /&gt;
== LZ41 Design Choices ==&lt;br /&gt;
A non standart format was used since the official random access example was already breaking the lz4 frame format.&amp;lt;br&amp;gt;&lt;br /&gt;
Additional data were added trailing to each file, the offset table, the num offsets, the block size, the original filesize, normaly those would be on a container and cached on container load, but it is not possible for loose files.&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the 31 chars filename limit, the idea of adding a extra extension to the files was dropped, as changing the filename lenght was just not an option, and since loose files were getting no extra extension, a uncompressed .pof would be named the same as a compressed .pof, as a result of this, no need to store compressed files on a diferent container rather than plain .VP was seen as needed as there were already no difference for loose files. This will later been prove to be a mistake because it could cause user confunsion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
At some point in 23.X.X versions a new guideline for compressing files will be requiered.&amp;lt;br&amp;gt;&lt;br /&gt;
- The extra extension &amp;quot;.lz41&amp;quot; will be added to loose files. Since recent improvements in FSO code allows for loose files to use more than 31 characters. FSO will ignore this extra extension after load and thus &amp;quot;ship.pof.lz41&amp;quot; will be considered as &amp;quot;ship.pof&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
- New VP container: .VPC&amp;lt;br&amp;gt;&lt;br /&gt;
The VPC container format is identical to a .VP container in structure and limits, with one key difference: It may contain uncompressed files just like any normal VP, but it has to contain at least 1 compressed file.&lt;br /&gt;
Compressed files stored inside a .vpc container must not have the .lz41 extension or its name changed in any way.&amp;lt;br&amp;gt;&lt;br /&gt;
While .VP can still tecnically be used to store compressed files, it is recomended not to.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
None of these changes break compatibility with files compressed prior to these changes, but just as with any new feature or major changes, older versions of FSO can not use compressed files in this new way.&lt;br /&gt;
&lt;br /&gt;
== Versioning System ==&lt;br /&gt;
In order to avoid compatibility issues with future changes or additions, the file header is used in all fopen(), fseek(), fread() operations, the header tells FSO what to do in those operations, so in the future a new and better way to support compression is found, or a better algo, a different header must be used, lets assume &amp;quot;LZ42&amp;quot;, this means FSO can handle &amp;quot;LZ41&amp;quot; files in a way and &amp;quot;LZ42&amp;quot; files in a totally different way whiout breaking any compatibility.&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64378</id>
		<title>Compression Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64378"/>
		<updated>2023-01-03T00:36:27Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &#039;&#039;&#039;Compression Support&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
The major problem in supporting compressed files is random access, FSO needs to be able to do all operations on a compressed file as it would normally do with any file; fopen(), fseek(), fread(), fclose(). Whiout having to decompress the entire file and store it in ram to do those operations. .pof parsing specially uses a lot of fseeks() and small freads(). Generally, file compression algos are intended to decompress the entire file from start to finish in one go and thus random access its non standart for the compression format.&lt;br /&gt;
&lt;br /&gt;
In FSO 21.2.0 the first compression support was merged into the code, the first implementation uses LZ4/LZ4-HC and it is called internally as &amp;quot;LZ41&amp;quot;. The LZ41 implementation is mainly intended for loose files but adding those inside VPs is also supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 ==&lt;br /&gt;
The LZ41 design is similar to the lz4 random access example, it uses the lz4 stream compression, a int table to store the offsets that indicate at what compressed block the original file position is, a int to indicate the number of these offsets, the original filesize and blocksize. The major diference being that instead of using a dictionary, the stream is resetted at each block, making them independient from each other, and thus you can pick any block you want and uncompress that block at will.&lt;br /&gt;
Resetting the stream rather than use a dictionary may be less efficient (this is untested as the time of writting this article), but it was the only way to do it for individual files whiout having to embed the dictionary too.&lt;br /&gt;
The LZ41 implementation is non-LZ4 format standard, just like the official example for random access is, as the LZ4 data format does not seems to consider what is needed for random access.&lt;br /&gt;
FSO checks for the file header on fopen() and if the file is compressed then the logic for compressed files is used.&lt;br /&gt;
&lt;br /&gt;
== LZ41 Data Format ==&lt;br /&gt;
4 byte header (0x31345A4C // &amp;quot;14ZL&amp;quot; -&amp;gt; &amp;quot;LZ41&amp;quot;, inverted) &amp;lt;br&amp;gt;&lt;br /&gt;
N Blocks&amp;lt;br&amp;gt;&lt;br /&gt;
N offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int num_offsets&amp;lt;br&amp;gt;&lt;br /&gt;
int original_filesize&amp;lt;br&amp;gt;&lt;br /&gt;
int blocksize&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_structure.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 Tests ==&lt;br /&gt;
&#039;&#039;&#039;Uncompressed MVP 4.4.1&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
12.9GB - Space used on Disk&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Compressed MVP 4.4.1 Block Size: 65536 LZ4-HC L6&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
7.01GB - Space used on disk&amp;lt;br&amp;gt;&lt;br /&gt;
Compression time: 5 minutes (1 thread)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;MVP 4.4.1 - All FS2 Models mission load time&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
0:50 - NVME Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:01 - SSD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
1:02 - SSD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
1:49 - HDD Compressed LZ4-HC L6, 7.01GB, BS: 65536&amp;lt;br&amp;gt;&lt;br /&gt;
2:30 - HDD Uncompressed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== LZ41 Compressor Guidelines ==&lt;br /&gt;
&#039;&#039;&#039;Block Size&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Block size is set by the compressor 8192, 16384, 65536 block sizes were all tested, higher values are untested and may work or not, a higher block size will make the large compressed files smaller, higher block size will also make FSO to use more RAM but not by much.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Ignore text based file formats&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Text files should be ignored, they do work fine, but there is no much is to be gained and the only thing it does is to make the file unreadeable by text editors: .fc2, .fs2, .tbl, .tbm, .eff.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Movies are already compressed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.mp4,.ogg,.mve,.webm: the ratio will be negative most of the time, and when is not, you are just saving a few kb, maybe a mb or two.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Audio files&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
.ogg, .wav: .wav may give you some little gains but it is just not worth to try, with ogg its the same problem as with the movies, these files are already compressed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;pngs&#039;&#039;&#039;&lt;br /&gt;
pngs are already compressed and 99% of the time end up with a negative ratio, and since mods use apngs, you are going to waste time trying to compress them. PNG that arent compressed are going to go down in size, considerably, but this is uncommon, maybe check the png header for the compression value they already have before trying to compress.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Do not keep files that end up with negative ratios&#039;&#039;&#039;&lt;br /&gt;
No matter if those files are inside a vp or they are loose files, if a compressed file end up being bigger than the original one, it must be discarded.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compression Function Example==&lt;br /&gt;
&lt;br /&gt;
[[Media:lz41_example.cpp]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Source: VPC Compressor tool&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 Design Choices ==&lt;br /&gt;
A non standart format was used since the official random access example was already breaking the lz4 frame format.&amp;lt;br&amp;gt;&lt;br /&gt;
Additional data were added trailing to each file, the offset table, the num offsets, the block size, the original filesize, normaly those would be on a container and cached on container load, but it is not possible for loose files.&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the 31 chars filename limit, the idea of adding a extra extension to the files was dropped, as changing the filename lenght was just not an option, and since loose files were getting no extra extension, a uncompressed .pof would be named the same as a compressed .pof, as a result of this, no need to store compressed files on a diferent container rather than plain .VP was seen as needed as there were already no difference for loose files. This will later been prove to be a mistake because it could cause user confunsion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
At some point in 23.X.X versions a new guideline for compressing files will be requiered.&amp;lt;br&amp;gt;&lt;br /&gt;
- The extra extension &amp;quot;.lz41&amp;quot; will be added to loose files. Since recent improvements in FSO code allows for loose files to use more than 31 characters. FSO will ignore this extra extension after load and thus &amp;quot;ship.pof.lz41&amp;quot; will be considered as &amp;quot;ship.pof&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
- New VP container: .VPC&amp;lt;br&amp;gt;&lt;br /&gt;
The VPC container format is identical to a .VP container in structure and limits, with one key difference: It may contain uncompressed files just like any normal VP, but it has to contain at least 1 compressed file.&lt;br /&gt;
Compressed files stored inside a .vpc container must not have the .lz41 extension or its name changed in any way.&amp;lt;br&amp;gt;&lt;br /&gt;
While .VP can still tecnically be used to store compressed files, it is recomended not to.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
None of these changes break compatibility with files compressed prior to these changes, but just as with any new feature or major changes, older versions of FSO can not use compressed files in this new way.&lt;br /&gt;
&lt;br /&gt;
== Versioning System ==&lt;br /&gt;
In order to avoid compatibility issues with future changes or additions, the file header is used in all fopen(), fseek(), fread() operations, the header tells FSO what to do in those operations, so in the future a new and better way to support compression is found, or a better algo, a different header must be used, lets assume &amp;quot;LZ42&amp;quot;, this means FSO can handle &amp;quot;LZ41&amp;quot; files in a way and &amp;quot;LZ42&amp;quot; files in a totally different way whiout breaking any compatibility.&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=File:Lz41_structure.png&amp;diff=64377</id>
		<title>File:Lz41 structure.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=File:Lz41_structure.png&amp;diff=64377"/>
		<updated>2023-01-02T23:52:49Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64376</id>
		<title>Compression Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Compression_Support&amp;diff=64376"/>
		<updated>2023-01-02T23:52:29Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: Created page with &amp;quot;== &amp;#039;&amp;#039;&amp;#039;Compression Support&amp;#039;&amp;#039;&amp;#039; ==  The major problem in supporting compressed files is random access, FSO needs to be able to do all operations on a compressed file as it would...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &#039;&#039;&#039;Compression Support&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
The major problem in supporting compressed files is random access, FSO needs to be able to do all operations on a compressed file as it would normally do with any file; fopen(), fseek(), fread(), fclose(). Whiout having to decompress the entire file and store it in ram to do those operations. .pof parsing specially uses a lot of fseeks() and small freads(). Generally, file compression algos are intended to decompress the entire file from start to finish in one go and thus random access its non standart for the compression format.&lt;br /&gt;
&lt;br /&gt;
In FSO 21.2.0 the first compression support was merged into the code, the first implementation uses LZ4/LZ4-HC and it is called internally as &amp;quot;LZ41&amp;quot;. The LZ41 implementation is mainly intended for loose files but adding those inside VPs is also supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 ==&lt;br /&gt;
The LZ41 design is similar to the lz4 random access example, it uses the lz4 stream compression, a int table to store the offsets that indicate at what compressed block the original file position is, a int to indicate the number of these offsets, the original filesize and blocksize. The major diference being that instead of using a dictionary, the stream is resetted at each block, making them independient from each other, and thus you can pick any block you want and uncompress that block at will.&lt;br /&gt;
Resetting the stream rather than use a dictionary may be less efficient (this is untested as the time of writting this article), but it was the only way to do it for individual files whiout having to embed the dictionary too.&lt;br /&gt;
The LZ41 implementation is non-LZ4 format standard, just like the official example for random access is, as the LZ4 data format does not seems to consider what is needed for random access.&lt;br /&gt;
&lt;br /&gt;
== LZ41 Data Format ==&lt;br /&gt;
4 byte header&lt;br /&gt;
N Blocks&lt;br /&gt;
N offsets&lt;br /&gt;
int num_offsets&lt;br /&gt;
int original_filesize&lt;br /&gt;
int blocksize&lt;br /&gt;
&lt;br /&gt;
[[File:lz41_structure.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LZ41 Tests ==&lt;br /&gt;
&#039;&#039;&#039;Uncompressed MVP 4.4.1&#039;&#039;&#039;&lt;br /&gt;
12.9GB - Space used on Disk&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compressed MVP 4.4.1 Block Size: 65536 LZ4-HC L6&#039;&#039;&#039;&lt;br /&gt;
7.01GB - Space used on disk&lt;br /&gt;
Compression time: 5 minutes (1 thread)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MVP 4.4.1 - All FS2 Models mission load time&#039;&#039;&#039;&lt;br /&gt;
0:50 - NVME Uncompressed&lt;br /&gt;
0:50 - NVME Compressed LZ4-HC L6, 7.01GB, BS: 65536&lt;br /&gt;
1:01 - SSD Compressed LZ4-HC L6, 7.01GB, BS: 65536&lt;br /&gt;
1:02 - SSD Uncompressed&lt;br /&gt;
1:49 - HDD Compressed LZ4-HC L6, 7.01GB, BS: 65536&lt;br /&gt;
2:30 - HDD Uncompressed&lt;br /&gt;
&lt;br /&gt;
== LZ41 Compressor Guidelines ==&lt;br /&gt;
&#039;&#039;&#039;Block Size&#039;&#039;&#039;&lt;br /&gt;
Block size is set by the compressor 8192, 16384, 65536 block sizes were all tested, higher values are untested and may work or not, a higher block size will make the large compressed files smaller, higher block size will also make FSO to use more RAM but not by much.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ignore text based file formats&#039;&#039;&#039;&lt;br /&gt;
Text files should be ignored, they do work fine, but there is no much is to be gained and the only thing it does is to make the file unreadeable by text editors: .fc2, .fs2, .tbl, .tbm, .eff.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Movies are already compressed&#039;&#039;&#039;&lt;br /&gt;
.mp4,.ogg,.mve,.webm: the ratio will be negative most of the time, and when is not, you are just saving a few kb, maybe a mb or two.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Audio files&#039;&#039;&#039;&lt;br /&gt;
.ogg, .wav: .wav may give you some little gains but it is just not worth to try, with ogg its the same problem as with the movies, these files are already compressed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pngs&#039;&#039;&#039;&lt;br /&gt;
pngs are already compressed and 99% of the time end up with a negative ratio, and since mods use apngs, you are going to waste time trying to compress them. PNG that arent compressed are going to go down in size, considerably, but this is uncommon, maybe check the png header for the compression value they already have before trying to compress.&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=BSP_data_structure&amp;diff=63694</id>
		<title>BSP data structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=BSP_data_structure&amp;diff=63694"/>
		<updated>2022-02-23T21:48:28Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* 3D model data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This info is copied from the Descent Developer&#039;s Network [http://web.archive.org/web/20010906053232/descent-freespace.com/ddn/specs/idta/ bsp_data] page.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The BSP data in FreeSpace in similar to the Descent 1-3 BSP data (also called IDTA). In FreeSpace, the BSP data is located in the POF files.&lt;br /&gt;
&lt;br /&gt;
This document was written by John Slagel from Volition Inc., with revisions and bugfixing from Garry Knudson and Francis &amp;quot;Pastel&amp;quot; Avila.&lt;br /&gt;
&lt;br /&gt;
==3D model data==&lt;br /&gt;
The first byte defines the block now following (0-5, see below). After a block the following byte defines the data of the next block, etc.&lt;br /&gt;
[[Media:Bsp_chunk.png]]&lt;br /&gt;
&lt;br /&gt;
0 - EOF - Means end of tree reached&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 0&lt;br /&gt;
+ 4 int size&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
** Note: EOF chunk lacks the size int after the ID, it should be considered as size 4 due to the rule of other chunks.&lt;br /&gt;
&lt;br /&gt;
1 - DEFPOINTS - Defines the vertices&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 1&lt;br /&gt;
+ 4 int size&lt;br /&gt;
+ 8 int n_verts&lt;br /&gt;
+12 int n_norms&lt;br /&gt;
+16 int offset // from start of chunk to vertex data&lt;br /&gt;
+20 n_verts*char norm_counts&lt;br /&gt;
+offset vertex_data // Each vertex n is a point followed by norm_counts[n] normals.&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
** Note: DEFPOINTS is the only type of chunk on bsp_data that could be unaligned. The offset to vertex data must be divisible by 4. This is a mayor cause of bus errors on ARM arch.&lt;br /&gt;
2 - FLATPOLY - Flat (non-textured) polygon&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 2&lt;br /&gt;
+ 4 int size &lt;br /&gt;
+ 8 vector normal&lt;br /&gt;
+20 vector center&lt;br /&gt;
+32 float radius&lt;br /&gt;
+36 int nverts&lt;br /&gt;
+40 byte red&lt;br /&gt;
+41 byte green&lt;br /&gt;
+42 byte blue&lt;br /&gt;
+43 byte pad&lt;br /&gt;
for each vertex, i {&lt;br /&gt;
 short vertnum[i]&lt;br /&gt;
 short normnum[i]&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
3 - TMAPPOLY - Textured polygons&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 3&lt;br /&gt;
+ 4 int size&lt;br /&gt;
+ 8 vector normal&lt;br /&gt;
+20 vector center&lt;br /&gt;
+32 float radius&lt;br /&gt;
+36 int nverts&lt;br /&gt;
+40 int tmap_num&lt;br /&gt;
for each vertex, i {&lt;br /&gt;
 ushort vertnum[i]&lt;br /&gt;
 ushort normnum[i]&lt;br /&gt;
 float u[i]&lt;br /&gt;
 float v[i]&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
4 - SORTNORM - Sortnorms are planes that split the model recursively&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 4&lt;br /&gt;
+ 4 int size&lt;br /&gt;
+ 8 vector plane_normal&lt;br /&gt;
+20 vector plane_point&lt;br /&gt;
+32 int reserved // set to 0&lt;br /&gt;
+36 int front_offset // Only recurse into this if non-zero.&lt;br /&gt;
+40 int back_offset // Only recurse into this if non-zero.&lt;br /&gt;
+44 int prelist_offset // Only recurse into this if non-zero.&lt;br /&gt;
+48 int postlist_offset // Only recurse into this if non-zero.&lt;br /&gt;
+52 int online_offset // Only recurse into this if non-zero.&lt;br /&gt;
+56 vector min_bounding_box_point // of all polys under here&lt;br /&gt;
+68 vector max_bounding_box_point // of all polys under here&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
5 - BOUNDBOX - Bounding boxes are used to speed up lighting and collision calculations.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 5&lt;br /&gt;
+ 4 int size&lt;br /&gt;
+ 8 vector min_point&lt;br /&gt;
+20 vector max_point&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:File Types]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=FreeSpace_1_Terran_Ship_Database&amp;diff=61351</id>
		<title>FreeSpace 1 Terran Ship Database</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=FreeSpace_1_Terran_Ship_Database&amp;diff=61351"/>
		<updated>2020-07-06T23:20:20Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Galactic Terran Alliance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Galactic Terran Alliance==&lt;br /&gt;
&lt;br /&gt;
====GTS &#039;&#039;Charon&#039;&#039;====&lt;br /&gt;
*[[GTS Centaur|GTS &#039;&#039;Centaur&#039;&#039;]]-class support ship&lt;br /&gt;
*Captured Arjuna 1 during [[Enter the Dragon]]&lt;br /&gt;
&lt;br /&gt;
====GTEP &#039;&#039;Plato Escape&#039;&#039;====&lt;br /&gt;
*[[GTEP Hermes|GTEP &#039;&#039;Hermes&#039;&#039;]]-class escape pod&lt;br /&gt;
*Launched from the GTSC &#039;&#039;Plato&#039;&#039;&lt;br /&gt;
*Escaped to [[Ribos]]&lt;br /&gt;
&lt;br /&gt;
====GTT &#039;&#039;Omega&#039;&#039;====&lt;br /&gt;
*&#039;&#039;&#039;NOTE: generic name&#039;&#039;&#039;&lt;br /&gt;
*[[GTT Elysium|GTT &#039;&#039;Elysium&#039;&#039;]]-class transport&lt;br /&gt;
**CO: [[Alexander_McCarthy|Lieutenant Alexander McCarthy]]&lt;br /&gt;
*Defected to the Vasudans before [[Small Deadly Space]] (sm1-03a)&lt;br /&gt;
*Escaped from the GTD &#039;&#039;Intrepid&#039;&#039;&lt;br /&gt;
*Arrived at a secured Vasudan cargo depot in Antares.&lt;br /&gt;
**Cargo: Nothing&lt;br /&gt;
*Docked and transferred cargo from a cargo container in [[Small Deadly Space]] (sm1-03a)&lt;br /&gt;
**Cargo: Weapon Prototypes&lt;br /&gt;
*Escaped from area after securing prototypes&lt;br /&gt;
*Arrived at a Vasudan rendezvous point to give the [[Avenger|GTW-5 Avenger Prototypes]] to the Vasudans in [[Avenging Angels]] (sm1-04a)&lt;br /&gt;
*Disabled by Alpha and Beta wings of the [[242nd Suicide Kings]] of the [[GTD Galatea]] in [[Avenging Angels]] (sm1-04a)&lt;br /&gt;
*Captured by GTT &#039;&#039;Comet&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====GTT &#039;&#039;Comet&#039;&#039;====&lt;br /&gt;
*[[GTT Elysium|GTT &#039;&#039;Elysium&#039;&#039;]]-class transport&lt;br /&gt;
*Dispatched to capture the rogue GTT &#039;&#039;Omega&#039;&#039; during [[Avenging Angels]] (sm1-04a)&lt;br /&gt;
&lt;br /&gt;
====GTFr &#039;&#039;Halkins&#039;&#039;====&lt;br /&gt;
*[[GTFr Chronos|GTFr &#039;&#039;Chronos&#039;&#039;]]-class freighter&lt;br /&gt;
*Dispatched to capture the SC &#039;&#039;Taranis&#039;&#039; in [[First Strike]] (sm1-10a)&lt;br /&gt;
*Docked with SC &#039;&#039;Taranis&#039;&#039; and towed it to [[Ribos]] after [[First Strike]] (sm1-10a)&lt;br /&gt;
*Destroyed by SD &#039;&#039;Lucifer&#039;&#039; after [[First Strike]] (sm1-10a)&lt;br /&gt;
&lt;br /&gt;
====GTFr &#039;&#039;Nelson&#039;&#039;====&lt;br /&gt;
*[[GTFr Chronos|GTFr &#039;&#039;Chronos&#039;&#039;]]-class freighter&lt;br /&gt;
*Attacked by Vishnu wing in [[The Aftermath]] (player can order it to warp out, preventing the &#039;&#039;Nelson&#039;&#039; from being destroyed)&lt;br /&gt;
&lt;br /&gt;
====GTF &#039;&#039;Mascheri&#039;&#039;====&lt;br /&gt;
&#039;&#039;&#039;NOTE: inconsistency: incorrect affix&#039;&#039;&#039;&lt;br /&gt;
*[[GTFr Poseidon|GTFr &#039;&#039;Poseidon&#039;&#039;]]-class freighter&lt;br /&gt;
*Drops cargo during training exercise&lt;br /&gt;
&lt;br /&gt;
====GTSC &#039;&#039;Plato&#039;&#039;====&lt;br /&gt;
*[[GTSC Faustus|GTSC &#039;&#039;Faustus&#039;&#039;]]-class science cruiser&lt;br /&gt;
*Dispatched to [[Antares]] to transport the [[Avenger|Avenger Prototype]] to Ribos from Antares in [[Out of the Dark, Into the Night]] (sm1-05a)&lt;br /&gt;
*Attacked by the PVC &#039;&#039;Taurus&#039;&#039; and two Vasudan attack squads&lt;br /&gt;
*Witnessed the destruction of the &#039;&#039;Taurus&#039;&#039; and its escorts at the fault of several unknown fighters&lt;br /&gt;
*Attacked by a second wave of unknown fighters&lt;br /&gt;
*Launched a GTEP &#039;&#039;Hermes&#039;&#039;-class escape pod&lt;br /&gt;
*Destroyed by the Shivans&lt;br /&gt;
&lt;br /&gt;
====GTSC &#039;&#039;Asimov&#039;&#039;====&lt;br /&gt;
*[[GTSC Faustus|GTSC &#039;&#039;Faustus&#039;&#039;]]-class science cruiser&lt;br /&gt;
*Assigned to [[GTM Tsunami|Project: Tsunami]]&lt;br /&gt;
*Attacked by Shivan forces in the Antares system&lt;br /&gt;
*Docked with GTT &#039;&#039;Spomer&#039;&#039;&lt;br /&gt;
*Transferred information and crew to GTT &#039;&#039;Spomer&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====GTSC &#039;&#039;Aquilae Communications&#039;&#039;====&lt;br /&gt;
*[[GTSC Faustus|GTSC &#039;&#039;Faustus&#039;&#039;]]-class science cruiser&lt;br /&gt;
*Must be defended in [[A Failure to Communicate]]&lt;br /&gt;
*Receives transmission from Vasudan refugees in the Altair system.&lt;br /&gt;
&lt;br /&gt;
====GTC &#039;&#039;Orff&#039;&#039;====&lt;br /&gt;
*[[GTC Fenris|GTC &#039;&#039;Fenris&#039;&#039;]]-class cruiser&lt;br /&gt;
*Suffered an engine breakdown in the Betelgeuse system before [[Eve of Destruction]] (sm1-01a)&lt;br /&gt;
*Attacked by several Vasudan wings remnant of a convoy the GTA hit a week before&lt;br /&gt;
*Relieved Terran forces attacking a Vasudan cargo depot in Antares after repair.&lt;br /&gt;
*Attacked the [[GTD Hades|GTD &#039;&#039;Hades&#039;&#039;]] in [[Secrets Revealed]]&lt;br /&gt;
&lt;br /&gt;
====GTC &#039;&#039;Gladiator&#039;&#039;====&lt;br /&gt;
*[[GTC Fenris|GTC &#039;&#039;Fenris&#039;&#039;]]-class cruiser&lt;br /&gt;
*It is on the &amp;quot;Clash of the Titans&amp;quot; briefing, but it was never part of the mission. &lt;br /&gt;
&lt;br /&gt;
====GTC &#039;&#039;Neptune&#039;&#039;====&lt;br /&gt;
*[[GTC Leviathan|GTC &#039;&#039;Leviathan&#039;&#039;]]-class cruiser&lt;br /&gt;
*Attacked Alpha 1 during a training exercise&lt;br /&gt;
&lt;br /&gt;
====GTC &#039;&#039;Ravage&#039;&#039;====&lt;br /&gt;
*[[GTC Fenris|GTC &#039;&#039;Fenris&#039;&#039;]]-class cruiser&lt;br /&gt;
&lt;br /&gt;
====GTD &#039;&#039;Goliath&#039;&#039;====&lt;br /&gt;
*Does not appear in any missions&lt;br /&gt;
*Destroyed by [[Vasudan]] kamikaze pilots&lt;br /&gt;
&lt;br /&gt;
====GTD &#039;&#039;Eisenhower&#039;&#039;====&lt;br /&gt;
*Does not appear in any missions&lt;br /&gt;
*Destroyed by a &#039;&#039;[[GVD Typhon|Typhon]]&#039;&#039;-class destroyer (PVD Typhon&#039;s tech desricption)&lt;br /&gt;
&lt;br /&gt;
====GTD &#039;&#039;Galatea&#039;&#039;====&lt;br /&gt;
*[[GTD Orion|GTD &#039;&#039;Orion&#039;&#039;]]-class destroyer&lt;br /&gt;
**Commanding Officer: Admiral Wolf&lt;br /&gt;
*Known squadrons:&lt;br /&gt;
**[[242nd Suicide Kings]]&lt;br /&gt;
*Dispatched to Antares to reinforce [[Operation Thresher|Operation: Thresher]] in [[Eve of Destruction]] (sm1-01a)&lt;br /&gt;
*Ordered to capture traitor Lieutenant Alexander McCarthy after [[Small Deadly Space]] (sm1-03a)&lt;br /&gt;
*Withdrew from Antares after the first sighting of the [[Shivans]]&lt;br /&gt;
*Acquired Shivan shields from a cargo depot in [[Ikeya]] after [[Pandora&#039;s Box (FS1)|Pandora&#039;s Box]] (sm1-07a)&lt;br /&gt;
*Ordered to capture the SC &#039;&#039;Taranis&#039;&#039; before it escaped from [[Ikeya]]&lt;br /&gt;
*Reinforced Alpha and Beta wings after a failed attack on a Hammer of Light depot in Antares&lt;br /&gt;
*Attacked by SC &#039;&#039;Hellions 1&#039;&#039; and SC &#039;&#039;Hellions 2&#039;&#039;.&lt;br /&gt;
*Destroyed SC &#039;&#039;Hellions 1&#039;&#039; and SC &#039;&#039;Hellions 2&#039;&#039;.&lt;br /&gt;
*Ordered to relocate to [[Beta Aquilae]] to blockade [[Vasuda Prime]] from Shivan attack&lt;br /&gt;
*Attacked by Hammer of Light forces&lt;br /&gt;
*Attacked by PVC &#039;&#039;Mauler&#039;&#039;&lt;br /&gt;
*Destroyed PVC &#039;&#039;Mauler&#039;&#039;&lt;br /&gt;
*Attacked by Shivan forces during [[Evangelist]]&lt;br /&gt;
*Ordered to [[Deneb]] with the [[GTD Bastion|GTD &#039;&#039;Bastion&#039;&#039;]] once Shivans circumvented Terran blockade of [[Vasuda Prime]] at [[Antares]] and [[Beta Aquilae]]  &lt;br /&gt;
*Launched 3 GTEP &#039;&#039;Hermes&#039;&#039;-class ecape pods during [[Doomsday]]&lt;br /&gt;
*Attacked by [[SD Lucifer|SD &#039;&#039;Lucifer&#039;&#039;]] in [[Deneb]] during Doomsday&lt;br /&gt;
*Destroyed by &#039;&#039;SD Lucifer&#039;&#039; during Doomsday&lt;br /&gt;
&lt;br /&gt;
====GTD &#039;&#039;Bastion&#039;&#039;====&lt;br /&gt;
*[[GTD Orion|GTD &#039;&#039;Orion&#039;&#039;]]-class destroyer&lt;br /&gt;
**Commanding Officer: Admiral Shima&lt;br /&gt;
*Known squadrons:&lt;br /&gt;
**23rd Flying Panthers &lt;br /&gt;
**109th Flaming Skulls &lt;br /&gt;
**53rd Hammerheads &lt;br /&gt;
**79th Predators &lt;br /&gt;
**13th Reapers &lt;br /&gt;
**47th Cutthroats &lt;br /&gt;
**1st Avenging Angels &lt;br /&gt;
**33rd Jokers &lt;br /&gt;
**66th Black Knights &lt;br /&gt;
**81st Screaming Weasels &lt;br /&gt;
*Sent on a Special Operations mission to acquire Shivan technology in Ikeya&lt;br /&gt;
*Failed to chase the &#039;&#039;Lucifer&#039;&#039; into subspace&lt;br /&gt;
&lt;br /&gt;
====GTD &#039;&#039;Intrepid&#039;&#039;====&lt;br /&gt;
*[[GTD Orion|GTD &#039;&#039;Orion&#039;&#039;]]-class destroyer&lt;br /&gt;
**Commanding Officer: Admiral Po&lt;br /&gt;
*[[McCarthy|Lieutenant Alexander McCarthy]] was stationed on the &#039;&#039;Intrepid&#039;&#039; before stealing the Avenger prototype.&lt;br /&gt;
&lt;br /&gt;
====GTD &#039;&#039;Amadeus&#039;&#039;====&lt;br /&gt;
*Does not appear in any missions&lt;br /&gt;
*[[GTD Orion|GTD &#039;&#039;Orion&#039;&#039;]]-class destroyer?&lt;br /&gt;
*Destroyed by Shivans in Vega&lt;br /&gt;
&lt;br /&gt;
====GTD &#039;&#039;Soyakaze&#039;&#039;====&lt;br /&gt;
*[[GTD Orion|GTD &#039;&#039;Orion&#039;&#039;]]-class destroyer?&lt;br /&gt;
*[[Alpha 1]]&#039;s carrier during the latter part of &#039;&#039;[[Silent Threat]]&#039;&#039;&lt;br /&gt;
*Does not appear in any missions&lt;br /&gt;
&lt;br /&gt;
====GTI &#039;&#039;Riviera&#039;&#039;====&lt;br /&gt;
*Does not appear in any missions&lt;br /&gt;
*Shown in opening cutscene&lt;br /&gt;
*GTA outpost based in [[Ross 128]]&lt;br /&gt;
*Attacked by [[SD Lucifer|SD &#039;&#039;Lucifer&#039;&#039;]]&lt;br /&gt;
*Destroyed by SD &#039;&#039;Lucifer&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*The name [http://en.wikipedia.org/wiki/Riviera Riviera] is usually used to define coastal areas popular with tourists.&lt;br /&gt;
&lt;br /&gt;
====GTI &#039;&#039;Tombaugh&#039;&#039;====&lt;br /&gt;
*Does not appear in any missions&lt;br /&gt;
*GTA outpost based in [[Ribos]]&lt;br /&gt;
*Attacked by [[SD Lucifer|SD &#039;&#039;Lucifer&#039;&#039;]]&lt;br /&gt;
*Destroyed by SD &#039;&#039;Lucifer&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====GTI &#039;&#039;Beta Cygni Installation&#039;&#039;====&lt;br /&gt;
*GTA outpost based in [[Beta Cygni]]&lt;br /&gt;
*Launched shield prototypes in [[The Hammer and the Anvil]] (sm1-08a)&lt;br /&gt;
&lt;br /&gt;
====GTI &#039;&#039;Beta Aquilae Installation&#039;&#039;====&lt;br /&gt;
*GTA outpost based in [[Beta Aquilae]]&lt;br /&gt;
*Launched 4 GTEP &#039;&#039;Hermes&#039;&#039;-class escape pods&lt;br /&gt;
*Destroyed by SD &#039;&#039;Lucifer&#039;&#039; during [[A Failure to Communicate]]&lt;br /&gt;
&lt;br /&gt;
====GTI &#039;&#039;Talus&#039;&#039;====&lt;br /&gt;
*Referred to as &amp;quot;Talus Mining Facility&amp;quot; in [[Cloak and Dagger]] briefing&lt;br /&gt;
*Mined asteroids and produced warheads (presumably) for the GTA&lt;br /&gt;
*Defeated [[pirates|pirate]] attack prior to [[Cloak and Dagger]]&lt;br /&gt;
*Evacuated while under attack from pirates and Shivans&lt;br /&gt;
*Destroyed by Terran bombers to prevent pirate capture&lt;br /&gt;
&lt;br /&gt;
==Galactic Terran Intelligence==&lt;br /&gt;
&lt;br /&gt;
====GTSC &#039;&#039;Einstein&#039;&#039;====&lt;br /&gt;
*[[GTSC Faustus|GTSC &#039;&#039;Faustus&#039;&#039;]]-class science cruiser&lt;br /&gt;
*Reportedly destroyed at the Shivan Ross 128 massacre&lt;br /&gt;
*Arrived in a containment field&lt;br /&gt;
*Destroyed by Alpha and Beta wings&lt;br /&gt;
*Launched several escape pods&lt;br /&gt;
&lt;br /&gt;
====GTC &#039;&#039;Odin&#039;&#039;====&lt;br /&gt;
*[[GTC Leviathan|GTC &#039;&#039;Leviathan&#039;&#039;]]-class cruiser&lt;br /&gt;
*Engaged Shivan forces at Ross 128&lt;br /&gt;
*Destroyed by Alpha and Beta wings&lt;br /&gt;
&lt;br /&gt;
====GTC &#039;&#039;Leviathan&#039;&#039;====&lt;br /&gt;
*[[GTC Leviathan|GTC &#039;&#039;Leviathan&#039;&#039;]]-class cruiser&lt;br /&gt;
*Engaged Shivan forces at Ross 128&lt;br /&gt;
*Destroyed by Alpha and Beta wings&lt;br /&gt;
&lt;br /&gt;
====GTC &#039;&#039;Vidar&#039;&#039;====&lt;br /&gt;
*[[GTC Leviathan|GTC &#039;&#039;Leviathan&#039;&#039;]]-class cruiser&lt;br /&gt;
*Attacked Krios&#039;s escape pods&lt;br /&gt;
*Destroyed by Alpha and Beta wings&lt;br /&gt;
&lt;br /&gt;
====GTD &#039;&#039;Myrmidon&#039;&#039;====&lt;br /&gt;
*[[GTD Orion|GTD &#039;&#039;Orion&#039;&#039;]]-class destroyer&lt;br /&gt;
*Arrived to retrieve the &#039;&#039;Einstein&#039;&#039;&#039;s escape pods&lt;br /&gt;
&lt;br /&gt;
====GTD====&lt;br /&gt;
*&#039;&#039;&#039;NOTE: possible inconsistency or unnamed because it is an unrecognized destroyer: no name&#039;&#039;&#039;&lt;br /&gt;
*[[GTD Orion|GTD &#039;&#039;Orion&#039;&#039;]]-class destroyer&lt;br /&gt;
*Arrived to retrieve the &#039;&#039;Einstein&#039;&#039;&#039;s escape pods&lt;br /&gt;
&lt;br /&gt;
====GTD &#039;&#039;Hades&#039;&#039;====&lt;br /&gt;
*[[GTD Hades|GTD &#039;&#039;Hades&#039;&#039;]]-class superdestroyer&lt;br /&gt;
*Arrived at &#039;&#039;Jotunheim&#039;&#039; to reinforce GTI defenses&lt;br /&gt;
*Destroyed by Alpha and Beta wings and GTC &#039;&#039;Orff&#039;&#039;&lt;br /&gt;
*The only &#039;&#039;Hades&#039;&#039; class to appear in retail&lt;br /&gt;
&lt;br /&gt;
====GTI &#039;&#039;Jotunheim&#039;&#039;====&lt;br /&gt;
*GTI outpost&lt;br /&gt;
*Attacked by Alpha and Beta wings&lt;br /&gt;
*Destroyed by Alpha and Beta wings&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{{stub}}&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58982</id>
		<title>POF data structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58982"/>
		<updated>2019-12-17T01:10:56Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Chunk specs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following information is copied from the Descent Developer&#039;s Network [http://web.archive.org/web/20010619182804/descent-freespace.com/ddn/specs/pof/ pof specs page].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
These files are used to hold the ship model data. The data for the ship is basically a BSP tree that doesn&#039;t split polygons across the planes (since we&#039;re using zbuffering) and the planes are created by halving the largest dimension of each bounding box recursively. Due to the vastness of some of our models, this recursively split structure allows our collision detection and dynamic lighting to do quick out&#039;s on the model. For example, to check if a vector interects the model, I check against the bounding box. If it hits, I then check each of the two boxes it is split into. Then I recursively check each subdivided box as long as the vector is still interesecting.&lt;br /&gt;
&lt;br /&gt;
We create the POF file by exporting a 3DS Max file with a special plugin tool to generate a &amp;quot;.P3D&amp;quot; file, which is essentially a 3d studio file only with texture uv&#039;s stored for each face vertex rather than for each vertex. We then run the .P3D file through an in-house Win32 program called &#039;BSPGEN&#039; which creates the POF file. Depending on the model size, BSPGEN takes a few minutes or so.&lt;br /&gt;
&lt;br /&gt;
Each ship is made up of a lot of subobjects where a subobject is a collection of polygons. For instance, each detail level of a hull of a ship is a subobject. A radar dish is a subobject. A piece of debris that the ship explodes into is a subobject. Each subobject can then have children subobjects. To draw the highest detail model of a ship, draw the subobject identified as detail level 0 and draw all it&#039;s children.&lt;br /&gt;
&lt;br /&gt;
This document was written by John Slagel from Volition Inc., with revisions and bugfixing from Garry Knudson. FreeSpace 2 additions were made by Dave Baranec (Volition Inc.), Garry Knudson and Francis &amp;quot;Pastel&amp;quot; Avila.&lt;br /&gt;
&lt;br /&gt;
[[POF_Order_FS2|POF block order list for retail FS2 models]]&lt;br /&gt;
&lt;br /&gt;
==Data types==&lt;br /&gt;
This uses standard Intel data types.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  (int) == 4 bytes, signed&lt;br /&gt;
  (uint) == 4 bytes, unsigned&lt;br /&gt;
  (short) == 2 bytes, signed&lt;br /&gt;
  (ushort) == 2 bytes, unsigned&lt;br /&gt;
  (char) == 1 byte, signed&lt;br /&gt;
  (ubyte) == 1 byte, unsigned&lt;br /&gt;
  (float) == 4 bytes, signed&lt;br /&gt;
  (vector) == 3 floats, 12 bytes total&lt;br /&gt;
  (string) == an int specifying length of string and char[length] for the string itself&lt;br /&gt;
  (note: it is NOT null-terminated)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic file structure==&lt;br /&gt;
The file format is a binary file using standard Intel data types. The header consists of a signature and the file version number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char[4] file_id   // must be &#039;PSPO&#039;&lt;br /&gt;
int version       // Major*100+Minor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
*PSPO stood for Parallax Software Polygon Object at one time. Conflict, Descent: FreeSpace shipped at POF version 20.14, so version would be equal to 2014 in most POF files (not all). FreeSpace 2 shipped at POF version 21.17, some files are 21.16. POF version 2118 was added on December 2019, this version ensures data alignment and SLC2 chunk presence.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*The rest of the file is a bunch of chunks. Each chunk is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;char[4] chunk_id  // see below for available chunk types&lt;br /&gt;
int length        // length of the chunk.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Contrary to BSP_Data structure, in pof data structure &amp;quot;Length&amp;quot; does not considers the first 8 bytes of the chunk (chunk id+length), so in order to go from the begining of the chunk to the next one you need to do lenght+8.&lt;br /&gt;
[[Media:Pof_chunk.png]]&lt;br /&gt;
&lt;br /&gt;
==Chunk specs==&lt;br /&gt;
Here is a breakdown of each of the chunk types:&lt;br /&gt;
&lt;br /&gt;
*&#039;OHDR&#039; (FreeSpace 1) and &#039;HDR2&#039; (FreeSpace 2) - Object header info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector min_bounding         // min bounding box point&lt;br /&gt;
vector max_bounding         // max bounding box point&lt;br /&gt;
&lt;br /&gt;
int num_detaillevels        // number of detail levels&lt;br /&gt;
for each detail_level, i {&lt;br /&gt;
 int sobj_detailevels[i]    // subobject number for detail level I, 0 being highest.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num_debris              // number of debris pieces that model explodes into&lt;br /&gt;
for each debris piece, i&lt;br /&gt;
 int sobj_debris[i]         // subobject number for debris piece i&lt;br /&gt;
&lt;br /&gt;
#ifdef version1903orhigher&lt;br /&gt;
 float mass                 // see notes below&lt;br /&gt;
 vector mass_center         // center of mass&lt;br /&gt;
 float[3][3] moment_inertia // moment of inertia&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2014orhigher&lt;br /&gt;
 int num_cross_sections     // number of cross sections (used for exploding ship) (*)&lt;br /&gt;
 for each cross_section, i {&lt;br /&gt;
  float depth[i]&lt;br /&gt;
  float radius[i]&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2007orhigher&lt;br /&gt;
 int num_lights             // number of precalculated muzzle flash lights&lt;br /&gt;
 for each light {&lt;br /&gt;
  vector location&lt;br /&gt;
  int light_type            // type of light&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Notes:&lt;br /&gt;
&lt;br /&gt;
for version&amp;lt;2009, mass is a volume mass&lt;br /&gt;
for version&amp;gt;=2009, mass is an area mass&lt;br /&gt;
conversion: area_mass=4.65*(vol_mass^2/3); also scale moment_inertia by vol_mass/area_mass&lt;br /&gt;
(*) if there is no cross_section data, num_cross_sections is -1 instead of 0, as one would expect.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TXTR&#039; - A list of textures used on this ship. The order they appear here is the number that a face uses to reference a particular texture.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_textures&lt;br /&gt;
for each texture,i&lt;br /&gt;
 int tex_filename_length[i] &lt;br /&gt;
 string tex_filename[i]    // texture filename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;PINF&#039; - Miscellaneous info about the POF file, command line, etc.&lt;br /&gt;
&lt;br /&gt;
Contains a block of NULL-terminated strings. Just read chunk size bytes and stuff it into a string.&lt;br /&gt;
&lt;br /&gt;
*&#039;PATH&#039; - Paths for docking and AI ships to follow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_paths&lt;br /&gt;
for each path, p {&lt;br /&gt;
 int name_length&lt;br /&gt;
 string name[p]             // name&lt;br /&gt;
 int parent_length&lt;br /&gt;
 string parent[p]           // parent&#039;s name&lt;br /&gt;
 int num_verts[p]&lt;br /&gt;
 for each vert, v {&lt;br /&gt;
   vector pos[p,v]&lt;br /&gt;
   float radius[p,v]&lt;br /&gt;
   int num_turrets[p,v]&lt;br /&gt;
   for each turret, t {&lt;br /&gt;
    int sobj_number[p,v,t]  // subobject number&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SPCL&#039; - Data for special points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_special_points&lt;br /&gt;
for each special_point, p {&lt;br /&gt;
 int name_length[p]&lt;br /&gt;
 string name[p]&lt;br /&gt;
 int properties_length[p]&lt;br /&gt;
 string properties[p]&lt;br /&gt;
 vector point[p]&lt;br /&gt;
 float radius[p]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SHLD&#039; - Data for the shield mesh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_vertices&lt;br /&gt;
for each vertex, v {&lt;br /&gt;
 vector position[v]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num faces&lt;br /&gt;
for each face, f {&lt;br /&gt;
 vector face_normal[f]&lt;br /&gt;
 int[3] face_vertices    // indexed into vertex list&lt;br /&gt;
 int[3] neighbors        // indexed into face list&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039; EYE&#039; - Data for eye points (Where pilot looks in 1st person views). Note the space in front of EYE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_eye_positions&lt;br /&gt;
for each eye_position, e {&lt;br /&gt;
 int sobj_number[e]      // subobject number this eye is attached to&lt;br /&gt;
 vector sobj_offset[e]   // offset from subobject&lt;br /&gt;
 vector normal[e]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;GPNT&#039; and &#039;MPNT&#039; - Gun and Missile firing points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_slots&lt;br /&gt;
for each slot, s {&lt;br /&gt;
 int num_guns[s]&lt;br /&gt;
 for each gun, g {&lt;br /&gt;
   vector point[g,s]&lt;br /&gt;
   vector norm[g,s]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;slot&amp;quot; is what you see in the loadout screen. Primaries have a max of 2 and secondaries of 3 for player-flyable ships.&lt;br /&gt;
&amp;quot;Guns&amp;quot; are the actual number of barrels and hence projectiles you&#039;ll get when you press the trigger. There is likely no practical max.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TGUN&#039; and &#039;TMIS&#039; - Turret Gun and Turret Missile firing points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_banks&lt;br /&gt;
&lt;br /&gt;
for each bank, b {&lt;br /&gt;
 int sobj_parent[b]       // parent subobject (the subobject with which this turret is associated) (*)&lt;br /&gt;
 int sobj_par_phys[b]     // physical parent subobject (the subobject to which the turret rotates) (*)&lt;br /&gt;
&lt;br /&gt;
 vector turret_normal[b]&lt;br /&gt;
 int num_firing_points[b]&lt;br /&gt;
 for each firing_point {&lt;br /&gt;
  vector position[b,f]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
For multipart turrets, sobj_parent is the &amp;quot;barrel&amp;quot; of a turret, and the firing points will be in this sobj&#039;s axial frame. sobj_par_phys is the &amp;quot;base&amp;quot; of a turret, which the barrel will rotate with.&lt;br /&gt;
For single-part turrets, sobj_parent == sobj_parent_phys.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;DOCK&#039; - Data for docking points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_docks&lt;br /&gt;
&lt;br /&gt;
for each dock, d {&lt;br /&gt;
 int properties_length&lt;br /&gt;
 string properties[d]     // see notes below&lt;br /&gt;
 int num_spline_paths[d]&lt;br /&gt;
 for each spline_path, p {&lt;br /&gt;
  int path_number[d,p]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int num_points&lt;br /&gt;
 for each point, d {&lt;br /&gt;
  vector position&lt;br /&gt;
  vector normal&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Note: Properties… if $name= found, then this is name. If name is cargo then this is a cargo bay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;FUEL&#039; - Data for engine thruster glows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_thrusters&lt;br /&gt;
for each thruster,t {&lt;br /&gt;
 int num glows[t]&lt;br /&gt;
 &lt;br /&gt;
 #ifdef version2117orhigher // FreeSpace 2 change&lt;br /&gt;
  int properties_length&lt;br /&gt;
  string properties&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 for each glow {&lt;br /&gt;
  vector pos[t,g]&lt;br /&gt;
  vector norm[t,g]   // used to tell if behind glow&lt;br /&gt;
  float radius[t,g]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SOBJ&#039; (FreeSpace 1) and &#039;OBJ2&#039; (FreeSpace 2) - Data for a subobject. Contains some info and a bunch of vertices and polygons in the form of a BSP tree or Octree depending on how you look at it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int submodel_number  // What submodel number this is.&lt;br /&gt;
&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector geometric_center&lt;br /&gt;
vector bounding_box_min_point&lt;br /&gt;
vector bounding_box_max_point&lt;br /&gt;
&lt;br /&gt;
int submodel_name_length&lt;br /&gt;
string submodel_name&lt;br /&gt;
int properites_length&lt;br /&gt;
string properites&lt;br /&gt;
int movement_type&lt;br /&gt;
int movement_axis&lt;br /&gt;
&lt;br /&gt;
int reserved         // must be 0&lt;br /&gt;
int bsp_data_size    // number of bytes now following&lt;br /&gt;
char[bsp_data_size] bsp_data  // contains actual polygons, etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Note: bsp_data is explained [[bsp_data_structure|here]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;INSG&#039; - Squad logo/Insignia data chunk (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_insignias&lt;br /&gt;
for each insignia, i {&lt;br /&gt;
 int detail_level // ship detail level&lt;br /&gt;
 int num_faces&lt;br /&gt;
 int num_vertices&lt;br /&gt;
 for each vertice, j {&lt;br /&gt;
  vector vertex_position&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 vector offset // offset of the insignia in model coords&lt;br /&gt;
 for each face, j {&lt;br /&gt;
  for 0 to 2, k {&lt;br /&gt;
   int vertex_index // vertex index for this face&lt;br /&gt;
   float u_texture_coordinate&lt;br /&gt;
   float v_texture_coordinate&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;ACEN&#039; - Auto-Centering info (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector point // autocentering point for the entire model&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The autocentering point was basically just a little convenient extra data we stuck in models where the pivot point of the model wasn&#039;t at the center. Since we rotate ships in the tech room by rotating around the pivot point, it looked dumb when the colossus&#039; rear end was in the middle of the screen and it was spinning on it. So the autocenter point was just a point pretty much near the model we could use to push an extra matrix onto our transform stack and have it show up centered around it. The point itself is in model coordinates.&lt;br /&gt;
&lt;br /&gt;
*&#039;GLOW&#039; - Glowpoint info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_glowbanks&lt;br /&gt;
for each glowbank, g {&lt;br /&gt;
 int disp_time // displacement time for blinking (e.g. for Orion runway lights)&lt;br /&gt;
 int on_time&lt;br /&gt;
 int off_time&lt;br /&gt;
 int obj_parent // parent subobject number&lt;br /&gt;
 int LOD // Should be 0&lt;br /&gt;
 int type // Should also be 0&lt;br /&gt;
 int num_glowpoints // Number of glowpoints in this bank&lt;br /&gt;
 int properties_length&lt;br /&gt;
 string properties // Texture name, no file path or extension, like: &amp;quot;$glow_texture=...&amp;quot;&lt;br /&gt;
 for each glowpoint, p {&lt;br /&gt;
  vector point // location vector&lt;br /&gt;
  vector norm // (0,0,0) is omnidirectional&lt;br /&gt;
  float radius&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SLDC&#039; - Shield mesh collision tree info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint tree_size&lt;br /&gt;
for each node, n {&lt;br /&gt;
 ubyte type // 0 = SPLIT, 1 = LEAF/polylist&lt;br /&gt;
 uint size&lt;br /&gt;
 if !type { // SPLIT&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint front_offset&lt;br /&gt;
  uint back_offset&lt;br /&gt;
 }&lt;br /&gt;
 else { // LEAF&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint num_polygons&lt;br /&gt;
  for each polygon, p {&lt;br /&gt;
   uint polygon_addr // indexed into shield mesh face list?&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The shield mesh collision tree speeds up collision calculation by adding bounding boxes around each polygon in the shield mesh.  It works basically like a [[bsp_data_structure|BSP tree]].&lt;br /&gt;
** The first byte of each node is a size 1 char, this makes all the following data to be in unaligned memory access positions, thus making the SLDC system, as it is, incompatible with ARM arch.&lt;br /&gt;
&lt;br /&gt;
*&#039;SLC2&#039; - Revised version of Shield mesh collision tree info (FS2_Open and POF version 2118 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint tree_size&lt;br /&gt;
for each node, n {&lt;br /&gt;
 int type // 0 = SPLIT, 1 = LEAF/polylist&lt;br /&gt;
 uint size&lt;br /&gt;
 if !type { // SPLIT&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint front_offset&lt;br /&gt;
  uint back_offset&lt;br /&gt;
 }&lt;br /&gt;
 else { // LEAF&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint num_polygons&lt;br /&gt;
  for each polygon, p {&lt;br /&gt;
   uint polygon_addr // indexed into shield mesh face list?&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The shield mesh collision tree speeds up collision calculation by adding bounding boxes around each polygon in the shield mesh.  It works basically like a [[bsp_data_structure|BSP tree]].&lt;br /&gt;
** Revised version of SLDC chunk, now with a int for type to ensure data alignment.&lt;br /&gt;
&lt;br /&gt;
[[Category:File Types]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58981</id>
		<title>POF data structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58981"/>
		<updated>2019-12-17T01:07:54Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Basic file structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following information is copied from the Descent Developer&#039;s Network [http://web.archive.org/web/20010619182804/descent-freespace.com/ddn/specs/pof/ pof specs page].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
These files are used to hold the ship model data. The data for the ship is basically a BSP tree that doesn&#039;t split polygons across the planes (since we&#039;re using zbuffering) and the planes are created by halving the largest dimension of each bounding box recursively. Due to the vastness of some of our models, this recursively split structure allows our collision detection and dynamic lighting to do quick out&#039;s on the model. For example, to check if a vector interects the model, I check against the bounding box. If it hits, I then check each of the two boxes it is split into. Then I recursively check each subdivided box as long as the vector is still interesecting.&lt;br /&gt;
&lt;br /&gt;
We create the POF file by exporting a 3DS Max file with a special plugin tool to generate a &amp;quot;.P3D&amp;quot; file, which is essentially a 3d studio file only with texture uv&#039;s stored for each face vertex rather than for each vertex. We then run the .P3D file through an in-house Win32 program called &#039;BSPGEN&#039; which creates the POF file. Depending on the model size, BSPGEN takes a few minutes or so.&lt;br /&gt;
&lt;br /&gt;
Each ship is made up of a lot of subobjects where a subobject is a collection of polygons. For instance, each detail level of a hull of a ship is a subobject. A radar dish is a subobject. A piece of debris that the ship explodes into is a subobject. Each subobject can then have children subobjects. To draw the highest detail model of a ship, draw the subobject identified as detail level 0 and draw all it&#039;s children.&lt;br /&gt;
&lt;br /&gt;
This document was written by John Slagel from Volition Inc., with revisions and bugfixing from Garry Knudson. FreeSpace 2 additions were made by Dave Baranec (Volition Inc.), Garry Knudson and Francis &amp;quot;Pastel&amp;quot; Avila.&lt;br /&gt;
&lt;br /&gt;
[[POF_Order_FS2|POF block order list for retail FS2 models]]&lt;br /&gt;
&lt;br /&gt;
==Data types==&lt;br /&gt;
This uses standard Intel data types.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  (int) == 4 bytes, signed&lt;br /&gt;
  (uint) == 4 bytes, unsigned&lt;br /&gt;
  (short) == 2 bytes, signed&lt;br /&gt;
  (ushort) == 2 bytes, unsigned&lt;br /&gt;
  (char) == 1 byte, signed&lt;br /&gt;
  (ubyte) == 1 byte, unsigned&lt;br /&gt;
  (float) == 4 bytes, signed&lt;br /&gt;
  (vector) == 3 floats, 12 bytes total&lt;br /&gt;
  (string) == an int specifying length of string and char[length] for the string itself&lt;br /&gt;
  (note: it is NOT null-terminated)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic file structure==&lt;br /&gt;
The file format is a binary file using standard Intel data types. The header consists of a signature and the file version number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char[4] file_id   // must be &#039;PSPO&#039;&lt;br /&gt;
int version       // Major*100+Minor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
*PSPO stood for Parallax Software Polygon Object at one time. Conflict, Descent: FreeSpace shipped at POF version 20.14, so version would be equal to 2014 in most POF files (not all). FreeSpace 2 shipped at POF version 21.17, some files are 21.16. POF version 2118 was added on December 2019, this version ensures data alignment and SLC2 chunk presence.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*The rest of the file is a bunch of chunks. Each chunk is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;char[4] chunk_id  // see below for available chunk types&lt;br /&gt;
int length        // length of the chunk.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Contrary to BSP_Data structure, in pof data structure &amp;quot;Length&amp;quot; does not considers the first 8 bytes of the chunk (chunk id+length), so in order to go from the begining of the chunk to the next one you need to do lenght+8.&lt;br /&gt;
[[Media:Pof_chunk.png]]&lt;br /&gt;
&lt;br /&gt;
==Chunk specs==&lt;br /&gt;
Here is a breakdown of each of the chunk types:&lt;br /&gt;
&lt;br /&gt;
*&#039;OHDR&#039; (FreeSpace 1) and &#039;HDR2&#039; (FreeSpace 2) - Object header info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector min_bounding         // min bounding box point&lt;br /&gt;
vector max_bounding         // max bounding box point&lt;br /&gt;
&lt;br /&gt;
int num_detaillevels        // number of detail levels&lt;br /&gt;
for each detail_level, i {&lt;br /&gt;
 int sobj_detailevels[i]    // subobject number for detail level I, 0 being highest.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num_debris              // number of debris pieces that model explodes into&lt;br /&gt;
for each debris piece, i&lt;br /&gt;
 int sobj_debris[i]         // subobject number for debris piece i&lt;br /&gt;
&lt;br /&gt;
#ifdef version1903orhigher&lt;br /&gt;
 float mass                 // see notes below&lt;br /&gt;
 vector mass_center         // center of mass&lt;br /&gt;
 float[3][3] moment_inertia // moment of inertia&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2014orhigher&lt;br /&gt;
 int num_cross_sections     // number of cross sections (used for exploding ship) (*)&lt;br /&gt;
 for each cross_section, i {&lt;br /&gt;
  float depth[i]&lt;br /&gt;
  float radius[i]&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2007orhigher&lt;br /&gt;
 int num_lights             // number of precalculated muzzle flash lights&lt;br /&gt;
 for each light {&lt;br /&gt;
  vector location&lt;br /&gt;
  int light_type            // type of light&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Notes:&lt;br /&gt;
&lt;br /&gt;
for version&amp;lt;2009, mass is a volume mass&lt;br /&gt;
for version&amp;gt;=2009, mass is an area mass&lt;br /&gt;
conversion: area_mass=4.65*(vol_mass^2/3); also scale moment_inertia by vol_mass/area_mass&lt;br /&gt;
(*) if there is no cross_section data, num_cross_sections is -1 instead of 0, as one would expect.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TXTR&#039; - A list of textures used on this ship. The order they appear here is the number that a face uses to reference a particular texture.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_textures&lt;br /&gt;
for each texture,i&lt;br /&gt;
 int tex_filename_length[i] &lt;br /&gt;
 string tex_filename[i]    // texture filename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;PINF&#039; - Miscellaneous info about the POF file, command line, etc.&lt;br /&gt;
&lt;br /&gt;
Contains a block of NULL-terminated strings. Just read chunk size bytes and stuff it into a string.&lt;br /&gt;
&lt;br /&gt;
*&#039;PATH&#039; - Paths for docking and AI ships to follow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_paths&lt;br /&gt;
for each path, p {&lt;br /&gt;
 int name_length&lt;br /&gt;
 string name[p]             // name&lt;br /&gt;
 int parent_length&lt;br /&gt;
 string parent[p]           // parent&#039;s name&lt;br /&gt;
 int num_verts[p]&lt;br /&gt;
 for each vert, v {&lt;br /&gt;
   vector pos[p,v]&lt;br /&gt;
   float radius[p,v]&lt;br /&gt;
   int num_turrets[p,v]&lt;br /&gt;
   for each turret, t {&lt;br /&gt;
    int sobj_number[p,v,t]  // subobject number&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SPCL&#039; - Data for special points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_special_points&lt;br /&gt;
for each special_point, p {&lt;br /&gt;
 int name_length[p]&lt;br /&gt;
 string name[p]&lt;br /&gt;
 int properties_length[p]&lt;br /&gt;
 string properties[p]&lt;br /&gt;
 vector point[p]&lt;br /&gt;
 float radius[p]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SHLD&#039; - Data for the shield mesh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_vertices&lt;br /&gt;
for each vertex, v {&lt;br /&gt;
 vector position[v]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num faces&lt;br /&gt;
for each face, f {&lt;br /&gt;
 vector face_normal[f]&lt;br /&gt;
 int[3] face_vertices    // indexed into vertex list&lt;br /&gt;
 int[3] neighbors        // indexed into face list&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039; EYE&#039; - Data for eye points (Where pilot looks in 1st person views). Note the space in front of EYE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_eye_positions&lt;br /&gt;
for each eye_position, e {&lt;br /&gt;
 int sobj_number[e]      // subobject number this eye is attached to&lt;br /&gt;
 vector sobj_offset[e]   // offset from subobject&lt;br /&gt;
 vector normal[e]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;GPNT&#039; and &#039;MPNT&#039; - Gun and Missile firing points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_slots&lt;br /&gt;
for each slot, s {&lt;br /&gt;
 int num_guns[s]&lt;br /&gt;
 for each gun, g {&lt;br /&gt;
   vector point[g,s]&lt;br /&gt;
   vector norm[g,s]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;slot&amp;quot; is what you see in the loadout screen. Primaries have a max of 2 and secondaries of 3 for player-flyable ships.&lt;br /&gt;
&amp;quot;Guns&amp;quot; are the actual number of barrels and hence projectiles you&#039;ll get when you press the trigger. There is likely no practical max.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TGUN&#039; and &#039;TMIS&#039; - Turret Gun and Turret Missile firing points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_banks&lt;br /&gt;
&lt;br /&gt;
for each bank, b {&lt;br /&gt;
 int sobj_parent[b]       // parent subobject (the subobject with which this turret is associated) (*)&lt;br /&gt;
 int sobj_par_phys[b]     // physical parent subobject (the subobject to which the turret rotates) (*)&lt;br /&gt;
&lt;br /&gt;
 vector turret_normal[b]&lt;br /&gt;
 int num_firing_points[b]&lt;br /&gt;
 for each firing_point {&lt;br /&gt;
  vector position[b,f]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
For multipart turrets, sobj_parent is the &amp;quot;barrel&amp;quot; of a turret, and the firing points will be in this sobj&#039;s axial frame. sobj_par_phys is the &amp;quot;base&amp;quot; of a turret, which the barrel will rotate with.&lt;br /&gt;
For single-part turrets, sobj_parent == sobj_parent_phys.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;DOCK&#039; - Data for docking points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_docks&lt;br /&gt;
&lt;br /&gt;
for each dock, d {&lt;br /&gt;
 int properties_length&lt;br /&gt;
 string properties[d]     // see notes below&lt;br /&gt;
 int num_spline_paths[d]&lt;br /&gt;
 for each spline_path, p {&lt;br /&gt;
  int path_number[d,p]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int num_points&lt;br /&gt;
 for each point, d {&lt;br /&gt;
  vector position&lt;br /&gt;
  vector normal&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Note: Properties… if $name= found, then this is name. If name is cargo then this is a cargo bay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;FUEL&#039; - Data for engine thruster glows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_thrusters&lt;br /&gt;
for each thruster,t {&lt;br /&gt;
 int num glows[t]&lt;br /&gt;
 &lt;br /&gt;
 #ifdef version2117orhigher // FreeSpace 2 change&lt;br /&gt;
  int properties_length&lt;br /&gt;
  string properties&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 for each glow {&lt;br /&gt;
  vector pos[t,g]&lt;br /&gt;
  vector norm[t,g]   // used to tell if behind glow&lt;br /&gt;
  float radius[t,g]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SOBJ&#039; (FreeSpace 1) and &#039;OBJ2&#039; (FreeSpace 2) - Data for a subobject. Contains some info and a bunch of vertices and polygons in the form of a BSP tree or Octree depending on how you look at it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int submodel_number  // What submodel number this is.&lt;br /&gt;
&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector geometric_center&lt;br /&gt;
vector bounding_box_min_point&lt;br /&gt;
vector bounding_box_max_point&lt;br /&gt;
&lt;br /&gt;
int submodel_name_length&lt;br /&gt;
string submodel_name&lt;br /&gt;
int properites_length&lt;br /&gt;
string properites&lt;br /&gt;
int movement_type&lt;br /&gt;
int movement_axis&lt;br /&gt;
&lt;br /&gt;
int reserved         // must be 0&lt;br /&gt;
int bsp_data_size    // number of bytes now following&lt;br /&gt;
char[bsp_data_size] bsp_data  // contains actual polygons, etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Note: bsp_data is explained [[bsp_data_structure|here]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;INSG&#039; - Squad logo/Insignia data chunk (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_insignias&lt;br /&gt;
for each insignia, i {&lt;br /&gt;
 int detail_level // ship detail level&lt;br /&gt;
 int num_faces&lt;br /&gt;
 int num_vertices&lt;br /&gt;
 for each vertice, j {&lt;br /&gt;
  vector vertex_position&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 vector offset // offset of the insignia in model coords&lt;br /&gt;
 for each face, j {&lt;br /&gt;
  for 0 to 2, k {&lt;br /&gt;
   int vertex_index // vertex index for this face&lt;br /&gt;
   float u_texture_coordinate&lt;br /&gt;
   float v_texture_coordinate&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;ACEN&#039; - Auto-Centering info (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector point // autocentering point for the entire model&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The autocentering point was basically just a little convenient extra data we stuck in models where the pivot point of the model wasn&#039;t at the center. Since we rotate ships in the tech room by rotating around the pivot point, it looked dumb when the colossus&#039; rear end was in the middle of the screen and it was spinning on it. So the autocenter point was just a point pretty much near the model we could use to push an extra matrix onto our transform stack and have it show up centered around it. The point itself is in model coordinates.&lt;br /&gt;
&lt;br /&gt;
*&#039;GLOW&#039; - Glowpoint info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_glowbanks&lt;br /&gt;
for each glowbank, g {&lt;br /&gt;
 int disp_time // displacement time for blinking (e.g. for Orion runway lights)&lt;br /&gt;
 int on_time&lt;br /&gt;
 int off_time&lt;br /&gt;
 int obj_parent // parent subobject number&lt;br /&gt;
 int LOD // Should be 0&lt;br /&gt;
 int type // Should also be 0&lt;br /&gt;
 int num_glowpoints // Number of glowpoints in this bank&lt;br /&gt;
 int properties_length&lt;br /&gt;
 string properties // Texture name, no file path or extension, like: &amp;quot;$glow_texture=...&amp;quot;&lt;br /&gt;
 for each glowpoint, p {&lt;br /&gt;
  vector point // location vector&lt;br /&gt;
  vector norm // (0,0,0) is omnidirectional&lt;br /&gt;
  float radius&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SLDC&#039; - Shield mesh collision tree info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint tree_size&lt;br /&gt;
for each node, n {&lt;br /&gt;
 ubyte type // 0 = SPLIT, 1 = LEAF/polylist&lt;br /&gt;
 uint size&lt;br /&gt;
 if !type { // SPLIT&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint front_offset&lt;br /&gt;
  uint back_offset&lt;br /&gt;
 }&lt;br /&gt;
 else { // LEAF&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint num_polygons&lt;br /&gt;
  for each polygon, p {&lt;br /&gt;
   uint polygon_addr // indexed into shield mesh face list?&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The shield mesh collision tree speeds up collision calculation by adding bounding boxes around each polygon in the shield mesh.  It works basically like a [[bsp_data_structure|BSP tree]].&lt;br /&gt;
** The first byte of each node is a size 1 char, this makes all the following data to be in unaligned memory access positions, thus making the SLDC system, as it is, incompatible with ARM arch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File Types]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58965</id>
		<title>POF data structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58965"/>
		<updated>2019-12-08T02:53:20Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Chunk specs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following information is copied from the Descent Developer&#039;s Network [http://web.archive.org/web/20010619182804/descent-freespace.com/ddn/specs/pof/ pof specs page].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
These files are used to hold the ship model data. The data for the ship is basically a BSP tree that doesn&#039;t split polygons across the planes (since we&#039;re using zbuffering) and the planes are created by halving the largest dimension of each bounding box recursively. Due to the vastness of some of our models, this recursively split structure allows our collision detection and dynamic lighting to do quick out&#039;s on the model. For example, to check if a vector interects the model, I check against the bounding box. If it hits, I then check each of the two boxes it is split into. Then I recursively check each subdivided box as long as the vector is still interesecting.&lt;br /&gt;
&lt;br /&gt;
We create the POF file by exporting a 3DS Max file with a special plugin tool to generate a &amp;quot;.P3D&amp;quot; file, which is essentially a 3d studio file only with texture uv&#039;s stored for each face vertex rather than for each vertex. We then run the .P3D file through an in-house Win32 program called &#039;BSPGEN&#039; which creates the POF file. Depending on the model size, BSPGEN takes a few minutes or so.&lt;br /&gt;
&lt;br /&gt;
Each ship is made up of a lot of subobjects where a subobject is a collection of polygons. For instance, each detail level of a hull of a ship is a subobject. A radar dish is a subobject. A piece of debris that the ship explodes into is a subobject. Each subobject can then have children subobjects. To draw the highest detail model of a ship, draw the subobject identified as detail level 0 and draw all it&#039;s children.&lt;br /&gt;
&lt;br /&gt;
This document was written by John Slagel from Volition Inc., with revisions and bugfixing from Garry Knudson. FreeSpace 2 additions were made by Dave Baranec (Volition Inc.), Garry Knudson and Francis &amp;quot;Pastel&amp;quot; Avila.&lt;br /&gt;
&lt;br /&gt;
[[POF_Order_FS2|POF block order list for retail FS2 models]]&lt;br /&gt;
&lt;br /&gt;
==Data types==&lt;br /&gt;
This uses standard Intel data types.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  (int) == 4 bytes, signed&lt;br /&gt;
  (uint) == 4 bytes, unsigned&lt;br /&gt;
  (short) == 2 bytes, signed&lt;br /&gt;
  (ushort) == 2 bytes, unsigned&lt;br /&gt;
  (char) == 1 byte, signed&lt;br /&gt;
  (ubyte) == 1 byte, unsigned&lt;br /&gt;
  (float) == 4 bytes, signed&lt;br /&gt;
  (vector) == 3 floats, 12 bytes total&lt;br /&gt;
  (string) == an int specifying length of string and char[length] for the string itself&lt;br /&gt;
  (note: it is NOT null-terminated)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic file structure==&lt;br /&gt;
The file format is a binary file using standard Intel data types. The header consists of a signature and the file version number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char[4] file_id   // must be &#039;PSPO&#039;&lt;br /&gt;
int version       // Major*100+Minor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
*PSPO stood for Parallax Software Polygon Object at one time. Conflict, Descent: FreeSpace shipped at POF version 20.14, so version would be equal to 2014 in most POF files (not all). FreeSpace 2 shipped at POF version 21.17, some files are 21.16.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*The rest of the file is a bunch of chunks. Each chunk is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;char[4] chunk_id  // see below for available chunk types&lt;br /&gt;
int length        // length of the chunk.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Contrary to BSP_Data structure, in pof data structure &amp;quot;Length&amp;quot; does not considers the first 8 bytes of the chunk (chunk id+length), so in order to go from the begining of the chunk to the next one you need to do lenght+8.&lt;br /&gt;
[[Media:Pof_chunk.png]]&lt;br /&gt;
&lt;br /&gt;
==Chunk specs==&lt;br /&gt;
Here is a breakdown of each of the chunk types:&lt;br /&gt;
&lt;br /&gt;
*&#039;OHDR&#039; (FreeSpace 1) and &#039;HDR2&#039; (FreeSpace 2) - Object header info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector min_bounding         // min bounding box point&lt;br /&gt;
vector max_bounding         // max bounding box point&lt;br /&gt;
&lt;br /&gt;
int num_detaillevels        // number of detail levels&lt;br /&gt;
for each detail_level, i {&lt;br /&gt;
 int sobj_detailevels[i]    // subobject number for detail level I, 0 being highest.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num_debris              // number of debris pieces that model explodes into&lt;br /&gt;
for each debris piece, i&lt;br /&gt;
 int sobj_debris[i]         // subobject number for debris piece i&lt;br /&gt;
&lt;br /&gt;
#ifdef version1903orhigher&lt;br /&gt;
 float mass                 // see notes below&lt;br /&gt;
 vector mass_center         // center of mass&lt;br /&gt;
 float[3][3] moment_inertia // moment of inertia&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2014orhigher&lt;br /&gt;
 int num_cross_sections     // number of cross sections (used for exploding ship) (*)&lt;br /&gt;
 for each cross_section, i {&lt;br /&gt;
  float depth[i]&lt;br /&gt;
  float radius[i]&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2007orhigher&lt;br /&gt;
 int num_lights             // number of precalculated muzzle flash lights&lt;br /&gt;
 for each light {&lt;br /&gt;
  vector location&lt;br /&gt;
  int light_type            // type of light&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Notes:&lt;br /&gt;
&lt;br /&gt;
for version&amp;lt;2009, mass is a volume mass&lt;br /&gt;
for version&amp;gt;=2009, mass is an area mass&lt;br /&gt;
conversion: area_mass=4.65*(vol_mass^2/3); also scale moment_inertia by vol_mass/area_mass&lt;br /&gt;
(*) if there is no cross_section data, num_cross_sections is -1 instead of 0, as one would expect.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TXTR&#039; - A list of textures used on this ship. The order they appear here is the number that a face uses to reference a particular texture.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_textures&lt;br /&gt;
for each texture,i&lt;br /&gt;
 int tex_filename_length[i] &lt;br /&gt;
 string tex_filename[i]    // texture filename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;PINF&#039; - Miscellaneous info about the POF file, command line, etc.&lt;br /&gt;
&lt;br /&gt;
Contains a block of NULL-terminated strings. Just read chunk size bytes and stuff it into a string.&lt;br /&gt;
&lt;br /&gt;
*&#039;PATH&#039; - Paths for docking and AI ships to follow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_paths&lt;br /&gt;
for each path, p {&lt;br /&gt;
 int name_length&lt;br /&gt;
 string name[p]             // name&lt;br /&gt;
 int parent_length&lt;br /&gt;
 string parent[p]           // parent&#039;s name&lt;br /&gt;
 int num_verts[p]&lt;br /&gt;
 for each vert, v {&lt;br /&gt;
   vector pos[p,v]&lt;br /&gt;
   float radius[p,v]&lt;br /&gt;
   int num_turrets[p,v]&lt;br /&gt;
   for each turret, t {&lt;br /&gt;
    int sobj_number[p,v,t]  // subobject number&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SPCL&#039; - Data for special points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_special_points&lt;br /&gt;
for each special_point, p {&lt;br /&gt;
 int name_length[p]&lt;br /&gt;
 string name[p]&lt;br /&gt;
 int properties_length[p]&lt;br /&gt;
 string properties[p]&lt;br /&gt;
 vector point[p]&lt;br /&gt;
 float radius[p]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SHLD&#039; - Data for the shield mesh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_vertices&lt;br /&gt;
for each vertex, v {&lt;br /&gt;
 vector position[v]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num faces&lt;br /&gt;
for each face, f {&lt;br /&gt;
 vector face_normal[f]&lt;br /&gt;
 int[3] face_vertices    // indexed into vertex list&lt;br /&gt;
 int[3] neighbors        // indexed into face list&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039; EYE&#039; - Data for eye points (Where pilot looks in 1st person views). Note the space in front of EYE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_eye_positions&lt;br /&gt;
for each eye_position, e {&lt;br /&gt;
 int sobj_number[e]      // subobject number this eye is attached to&lt;br /&gt;
 vector sobj_offset[e]   // offset from subobject&lt;br /&gt;
 vector normal[e]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;GPNT&#039; and &#039;MPNT&#039; - Gun and Missile firing points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_slots&lt;br /&gt;
for each slot, s {&lt;br /&gt;
 int num_guns[s]&lt;br /&gt;
 for each gun, g {&lt;br /&gt;
   vector point[g,s]&lt;br /&gt;
   vector norm[g,s]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;slot&amp;quot; is what you see in the loadout screen. Primaries have a max of 2 and secondaries of 3 for player-flyable ships.&lt;br /&gt;
&amp;quot;Guns&amp;quot; are the actual number of barrels and hence projectiles you&#039;ll get when you press the trigger. There is likely no practical max.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TGUN&#039; and &#039;TMIS&#039; - Turret Gun and Turret Missile firing points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_banks&lt;br /&gt;
&lt;br /&gt;
for each bank, b {&lt;br /&gt;
 int sobj_parent[b]       // parent subobject (the subobject with which this turret is associated) (*)&lt;br /&gt;
 int sobj_par_phys[b]     // physical parent subobject (the subobject to which the turret rotates) (*)&lt;br /&gt;
&lt;br /&gt;
 vector turret_normal[b]&lt;br /&gt;
 int num_firing_points[b]&lt;br /&gt;
 for each firing_point {&lt;br /&gt;
  vector position[b,f]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
For multipart turrets, sobj_parent is the &amp;quot;barrel&amp;quot; of a turret, and the firing points will be in this sobj&#039;s axial frame. sobj_par_phys is the &amp;quot;base&amp;quot; of a turret, which the barrel will rotate with.&lt;br /&gt;
For single-part turrets, sobj_parent == sobj_parent_phys.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;DOCK&#039; - Data for docking points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_docks&lt;br /&gt;
&lt;br /&gt;
for each dock, d {&lt;br /&gt;
 int properties_length&lt;br /&gt;
 string properties[d]     // see notes below&lt;br /&gt;
 int num_spline_paths[d]&lt;br /&gt;
 for each spline_path, p {&lt;br /&gt;
  int path_number[d,p]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int num_points&lt;br /&gt;
 for each point, d {&lt;br /&gt;
  vector position&lt;br /&gt;
  vector normal&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Note: Properties… if $name= found, then this is name. If name is cargo then this is a cargo bay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;FUEL&#039; - Data for engine thruster glows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_thrusters&lt;br /&gt;
for each thruster,t {&lt;br /&gt;
 int num glows[t]&lt;br /&gt;
 &lt;br /&gt;
 #ifdef version2117orhigher // FreeSpace 2 change&lt;br /&gt;
  int properties_length&lt;br /&gt;
  string properties&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 for each glow {&lt;br /&gt;
  vector pos[t,g]&lt;br /&gt;
  vector norm[t,g]   // used to tell if behind glow&lt;br /&gt;
  float radius[t,g]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SOBJ&#039; (FreeSpace 1) and &#039;OBJ2&#039; (FreeSpace 2) - Data for a subobject. Contains some info and a bunch of vertices and polygons in the form of a BSP tree or Octree depending on how you look at it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int submodel_number  // What submodel number this is.&lt;br /&gt;
&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector geometric_center&lt;br /&gt;
vector bounding_box_min_point&lt;br /&gt;
vector bounding_box_max_point&lt;br /&gt;
&lt;br /&gt;
int submodel_name_length&lt;br /&gt;
string submodel_name&lt;br /&gt;
int properites_length&lt;br /&gt;
string properites&lt;br /&gt;
int movement_type&lt;br /&gt;
int movement_axis&lt;br /&gt;
&lt;br /&gt;
int reserved         // must be 0&lt;br /&gt;
int bsp_data_size    // number of bytes now following&lt;br /&gt;
char[bsp_data_size] bsp_data  // contains actual polygons, etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Note: bsp_data is explained [[bsp_data_structure|here]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;INSG&#039; - Squad logo/Insignia data chunk (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_insignias&lt;br /&gt;
for each insignia, i {&lt;br /&gt;
 int detail_level // ship detail level&lt;br /&gt;
 int num_faces&lt;br /&gt;
 int num_vertices&lt;br /&gt;
 for each vertice, j {&lt;br /&gt;
  vector vertex_position&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 vector offset // offset of the insignia in model coords&lt;br /&gt;
 for each face, j {&lt;br /&gt;
  for 0 to 2, k {&lt;br /&gt;
   int vertex_index // vertex index for this face&lt;br /&gt;
   float u_texture_coordinate&lt;br /&gt;
   float v_texture_coordinate&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;ACEN&#039; - Auto-Centering info (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector point // autocentering point for the entire model&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The autocentering point was basically just a little convenient extra data we stuck in models where the pivot point of the model wasn&#039;t at the center. Since we rotate ships in the tech room by rotating around the pivot point, it looked dumb when the colossus&#039; rear end was in the middle of the screen and it was spinning on it. So the autocenter point was just a point pretty much near the model we could use to push an extra matrix onto our transform stack and have it show up centered around it. The point itself is in model coordinates.&lt;br /&gt;
&lt;br /&gt;
*&#039;GLOW&#039; - Glowpoint info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_glowbanks&lt;br /&gt;
for each glowbank, g {&lt;br /&gt;
 int disp_time // displacement time for blinking (e.g. for Orion runway lights)&lt;br /&gt;
 int on_time&lt;br /&gt;
 int off_time&lt;br /&gt;
 int obj_parent // parent subobject number&lt;br /&gt;
 int LOD // Should be 0&lt;br /&gt;
 int type // Should also be 0&lt;br /&gt;
 int num_glowpoints // Number of glowpoints in this bank&lt;br /&gt;
 int properties_length&lt;br /&gt;
 string properties // Texture name, no file path or extension, like: &amp;quot;$glow_texture=...&amp;quot;&lt;br /&gt;
 for each glowpoint, p {&lt;br /&gt;
  vector point // location vector&lt;br /&gt;
  vector norm // (0,0,0) is omnidirectional&lt;br /&gt;
  float radius&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SLDC&#039; - Shield mesh collision tree info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint tree_size&lt;br /&gt;
for each node, n {&lt;br /&gt;
 ubyte type // 0 = SPLIT, 1 = LEAF/polylist&lt;br /&gt;
 uint size&lt;br /&gt;
 if !type { // SPLIT&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint front_offset&lt;br /&gt;
  uint back_offset&lt;br /&gt;
 }&lt;br /&gt;
 else { // LEAF&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint num_polygons&lt;br /&gt;
  for each polygon, p {&lt;br /&gt;
   uint polygon_addr // indexed into shield mesh face list?&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The shield mesh collision tree speeds up collision calculation by adding bounding boxes around each polygon in the shield mesh.  It works basically like a [[bsp_data_structure|BSP tree]].&lt;br /&gt;
** The first byte of each node is a size 1 char, this makes all the following data to be in unaligned memory access positions, thus making the SLDC system, as it is, incompatible with ARM arch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File Types]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58964</id>
		<title>POF data structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58964"/>
		<updated>2019-12-07T13:35:19Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Chunk specs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following information is copied from the Descent Developer&#039;s Network [http://web.archive.org/web/20010619182804/descent-freespace.com/ddn/specs/pof/ pof specs page].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
These files are used to hold the ship model data. The data for the ship is basically a BSP tree that doesn&#039;t split polygons across the planes (since we&#039;re using zbuffering) and the planes are created by halving the largest dimension of each bounding box recursively. Due to the vastness of some of our models, this recursively split structure allows our collision detection and dynamic lighting to do quick out&#039;s on the model. For example, to check if a vector interects the model, I check against the bounding box. If it hits, I then check each of the two boxes it is split into. Then I recursively check each subdivided box as long as the vector is still interesecting.&lt;br /&gt;
&lt;br /&gt;
We create the POF file by exporting a 3DS Max file with a special plugin tool to generate a &amp;quot;.P3D&amp;quot; file, which is essentially a 3d studio file only with texture uv&#039;s stored for each face vertex rather than for each vertex. We then run the .P3D file through an in-house Win32 program called &#039;BSPGEN&#039; which creates the POF file. Depending on the model size, BSPGEN takes a few minutes or so.&lt;br /&gt;
&lt;br /&gt;
Each ship is made up of a lot of subobjects where a subobject is a collection of polygons. For instance, each detail level of a hull of a ship is a subobject. A radar dish is a subobject. A piece of debris that the ship explodes into is a subobject. Each subobject can then have children subobjects. To draw the highest detail model of a ship, draw the subobject identified as detail level 0 and draw all it&#039;s children.&lt;br /&gt;
&lt;br /&gt;
This document was written by John Slagel from Volition Inc., with revisions and bugfixing from Garry Knudson. FreeSpace 2 additions were made by Dave Baranec (Volition Inc.), Garry Knudson and Francis &amp;quot;Pastel&amp;quot; Avila.&lt;br /&gt;
&lt;br /&gt;
[[POF_Order_FS2|POF block order list for retail FS2 models]]&lt;br /&gt;
&lt;br /&gt;
==Data types==&lt;br /&gt;
This uses standard Intel data types.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  (int) == 4 bytes, signed&lt;br /&gt;
  (uint) == 4 bytes, unsigned&lt;br /&gt;
  (short) == 2 bytes, signed&lt;br /&gt;
  (ushort) == 2 bytes, unsigned&lt;br /&gt;
  (char) == 1 byte, signed&lt;br /&gt;
  (ubyte) == 1 byte, unsigned&lt;br /&gt;
  (float) == 4 bytes, signed&lt;br /&gt;
  (vector) == 3 floats, 12 bytes total&lt;br /&gt;
  (string) == an int specifying length of string and char[length] for the string itself&lt;br /&gt;
  (note: it is NOT null-terminated)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic file structure==&lt;br /&gt;
The file format is a binary file using standard Intel data types. The header consists of a signature and the file version number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char[4] file_id   // must be &#039;PSPO&#039;&lt;br /&gt;
int version       // Major*100+Minor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
*PSPO stood for Parallax Software Polygon Object at one time. Conflict, Descent: FreeSpace shipped at POF version 20.14, so version would be equal to 2014 in most POF files (not all). FreeSpace 2 shipped at POF version 21.17, some files are 21.16.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*The rest of the file is a bunch of chunks. Each chunk is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;char[4] chunk_id  // see below for available chunk types&lt;br /&gt;
int length        // length of the chunk.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Contrary to BSP_Data structure, in pof data structure &amp;quot;Length&amp;quot; does not considers the first 8 bytes of the chunk (chunk id+length), so in order to go from the begining of the chunk to the next one you need to do lenght+8.&lt;br /&gt;
[[Media:Pof_chunk.png]]&lt;br /&gt;
&lt;br /&gt;
==Chunk specs==&lt;br /&gt;
Here is a breakdown of each of the chunk types:&lt;br /&gt;
&lt;br /&gt;
*&#039;OHDR&#039; (FreeSpace 1) and &#039;HDR2&#039; (FreeSpace 2) - Object header info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector min_bounding         // min bounding box point&lt;br /&gt;
vector max_bounding         // max bounding box point&lt;br /&gt;
&lt;br /&gt;
int num_detaillevels        // number of detail levels&lt;br /&gt;
for each detail_level, i {&lt;br /&gt;
 int sobj_detailevels[i]    // subobject number for detail level I, 0 being highest.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num_debris              // number of debris pieces that model explodes into&lt;br /&gt;
for each debris piece, i&lt;br /&gt;
 int sobj_debris[i]         // subobject number for debris piece i&lt;br /&gt;
&lt;br /&gt;
#ifdef version1903orhigher&lt;br /&gt;
 float mass                 // see notes below&lt;br /&gt;
 vector mass_center         // center of mass&lt;br /&gt;
 float[3][3] moment_inertia // moment of inertia&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2014orhigher&lt;br /&gt;
 int num_cross_sections     // number of cross sections (used for exploding ship) (*)&lt;br /&gt;
 for each cross_section, i {&lt;br /&gt;
  float depth[i]&lt;br /&gt;
  float radius[i]&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2007orhigher&lt;br /&gt;
 int num_lights             // number of precalculated muzzle flash lights&lt;br /&gt;
 for each light {&lt;br /&gt;
  vector location&lt;br /&gt;
  int light_type            // type of light&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Notes:&lt;br /&gt;
&lt;br /&gt;
for version&amp;lt;2009, mass is a volume mass&lt;br /&gt;
for version&amp;gt;=2009, mass is an area mass&lt;br /&gt;
conversion: area_mass=4.65*(vol_mass^2/3); also scale moment_inertia by vol_mass/area_mass&lt;br /&gt;
(*) if there is no cross_section data, num_cross_sections is -1 instead of 0, as one would expect.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TXTR&#039; - A list of textures used on this ship. The order they appear here is the number that a face uses to reference a particular texture.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_textures&lt;br /&gt;
for each texture,i&lt;br /&gt;
 int tex_filename_length[i] &lt;br /&gt;
 string tex_filename[i]    // texture filename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;PINF&#039; - Miscellaneous info about the POF file, command line, etc.&lt;br /&gt;
&lt;br /&gt;
Contains a block of NULL-terminated strings. Just read chunk size bytes and stuff it into a string.&lt;br /&gt;
&lt;br /&gt;
*&#039;PATH&#039; - Paths for docking and AI ships to follow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_paths&lt;br /&gt;
for each path, p {&lt;br /&gt;
 int name_length&lt;br /&gt;
 string name[p]             // name&lt;br /&gt;
 int parent_length&lt;br /&gt;
 string parent[p]           // parent&#039;s name&lt;br /&gt;
 int num_verts[p]&lt;br /&gt;
 for each vert, v {&lt;br /&gt;
   vector pos[p,v]&lt;br /&gt;
   float radius[p,v]&lt;br /&gt;
   int num_turrets[p,v]&lt;br /&gt;
   for each turret, t {&lt;br /&gt;
    int sobj_number[p,v,t]  // subobject number&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SPCL&#039; - Data for special points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_special_points&lt;br /&gt;
for each special_point, p {&lt;br /&gt;
 int name_length[p]&lt;br /&gt;
 string name[p]&lt;br /&gt;
 int properties_length[p]&lt;br /&gt;
 string properties[p]&lt;br /&gt;
 vector point[p]&lt;br /&gt;
 float radius[p]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SHLD&#039; - Data for the shield mesh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_vertices&lt;br /&gt;
for each vertex, v {&lt;br /&gt;
 vector position[v]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num faces&lt;br /&gt;
for each face, f {&lt;br /&gt;
 vector face_normal[f]&lt;br /&gt;
 int[3] face_vertices    // indexed into vertex list&lt;br /&gt;
 int[3] neighbors        // indexed into face list&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039; EYE&#039; - Data for eye points (Where pilot looks in 1st person views). Note the space in front of EYE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_eye_positions&lt;br /&gt;
for each eye_position, e {&lt;br /&gt;
 int sobj_number[e]      // subobject number this eye is attached to&lt;br /&gt;
 vector sobj_offset[e]   // offset from subobject&lt;br /&gt;
 vector normal[e]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;GPNT&#039; and &#039;MPNT&#039; - Gun and Missile firing points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_slots&lt;br /&gt;
for each slot, s {&lt;br /&gt;
 int num_guns[s]&lt;br /&gt;
 for each gun, g {&lt;br /&gt;
   vector point[g,s]&lt;br /&gt;
   vector norm[g,s]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;slot&amp;quot; is what you see in the loadout screen. Primaries have a max of 2 and secondaries of 3 for player-flyable ships.&lt;br /&gt;
&amp;quot;Guns&amp;quot; are the actual number of barrels and hence projectiles you&#039;ll get when you press the trigger. There is likely no practical max.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TGUN&#039; and &#039;TMIS&#039; - Turret Gun and Turret Missile firing points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_banks&lt;br /&gt;
&lt;br /&gt;
for each bank, b {&lt;br /&gt;
 int sobj_parent[b]       // parent subobject (the subobject with which this turret is associated) (*)&lt;br /&gt;
 int sobj_par_phys[b]     // physical parent subobject (the subobject to which the turret rotates) (*)&lt;br /&gt;
&lt;br /&gt;
 vector turret_normal[b]&lt;br /&gt;
 int num_firing_points[b]&lt;br /&gt;
 for each firing_point {&lt;br /&gt;
  vector position[b,f]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
For multipart turrets, sobj_parent is the &amp;quot;barrel&amp;quot; of a turret, and the firing points will be in this sobj&#039;s axial frame. sobj_par_phys is the &amp;quot;base&amp;quot; of a turret, which the barrel will rotate with.&lt;br /&gt;
For single-part turrets, sobj_parent == sobj_parent_phys.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;DOCK&#039; - Data for docking points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_docks&lt;br /&gt;
&lt;br /&gt;
for each dock, d {&lt;br /&gt;
 int properties_length&lt;br /&gt;
 string properties[d]     // see notes below&lt;br /&gt;
 int num_spline_paths[d]&lt;br /&gt;
 for each spline_path, p {&lt;br /&gt;
  int path_number[d,p]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int num_points&lt;br /&gt;
 for each point, d {&lt;br /&gt;
  vector position&lt;br /&gt;
  vector normal&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Note: Properties… if $name= found, then this is name. If name is cargo then this is a cargo bay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;FUEL&#039; - Data for engine thruster glows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_thrusters&lt;br /&gt;
for each thruster,t {&lt;br /&gt;
 int num glows[t]&lt;br /&gt;
 &lt;br /&gt;
 #ifdef version2117orhigher // FreeSpace 2 change&lt;br /&gt;
  int properties_length&lt;br /&gt;
  string properties&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 for each glow {&lt;br /&gt;
  vector pos[t,g]&lt;br /&gt;
  vector norm[t,g]   // used to tell if behind glow&lt;br /&gt;
  float radius[t,g]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SOBJ&#039; (FreeSpace 1) and &#039;OBJ2&#039; (FreeSpace 2) - Data for a subobject. Contains some info and a bunch of vertices and polygons in the form of a BSP tree or Octree depending on how you look at it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int submodel_number  // What submodel number this is.&lt;br /&gt;
&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector geometric_center&lt;br /&gt;
vector bounding_box_min_point&lt;br /&gt;
vector bounding_box_max_point&lt;br /&gt;
&lt;br /&gt;
int submodel_name_length&lt;br /&gt;
string submodel_name&lt;br /&gt;
int properites_length&lt;br /&gt;
string properites&lt;br /&gt;
int movement_type&lt;br /&gt;
int movement_axis&lt;br /&gt;
&lt;br /&gt;
int reserved         // must be 0&lt;br /&gt;
int bsp_data_size    // number of bytes now following&lt;br /&gt;
char[bsp_data_size] bsp_data  // contains actual polygons, etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Note: bsp_data is explained [[bsp_data_structure|here]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;INSG&#039; - Squad logo/Insignia data chunk (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_insignias&lt;br /&gt;
for each insignia, i {&lt;br /&gt;
 int detail_level // ship detail level&lt;br /&gt;
 int num_faces&lt;br /&gt;
 int num_vertices&lt;br /&gt;
 for each vertice, j {&lt;br /&gt;
  vector vertex_position&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 vector offset // offset of the insignia in model coords&lt;br /&gt;
 for each face, j {&lt;br /&gt;
  for 0 to 2, k {&lt;br /&gt;
   int vertex_index // vertex index for this face&lt;br /&gt;
   float u_texture_coordinate&lt;br /&gt;
   float v_texture_coordinate&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;ACEN&#039; - Auto-Centering info (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector point // autocentering point for the entire model&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The autocentering point was basically just a little convenient extra data we stuck in models where the pivot point of the model wasn&#039;t at the center. Since we rotate ships in the tech room by rotating around the pivot point, it looked dumb when the colossus&#039; rear end was in the middle of the screen and it was spinning on it. So the autocenter point was just a point pretty much near the model we could use to push an extra matrix onto our transform stack and have it show up centered around it. The point itself is in model coordinates.&lt;br /&gt;
&lt;br /&gt;
*&#039;GLOW&#039; - Glowpoint info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_glowbanks&lt;br /&gt;
for each glowbank, g {&lt;br /&gt;
 int disp_time // displacement time for blinking (e.g. for Orion runway lights)&lt;br /&gt;
 int on_time&lt;br /&gt;
 int off_time&lt;br /&gt;
 int obj_parent // parent subobject number&lt;br /&gt;
 int LOD // Should be 0&lt;br /&gt;
 int type // Should also be 0&lt;br /&gt;
 int num_glowpoints // Number of glowpoints in this bank&lt;br /&gt;
 string properties // Texture name, no file path or extension, like: &amp;quot;$glow_texture=...&amp;quot;&lt;br /&gt;
 for each glowpoint, p {&lt;br /&gt;
  vector point // location vector&lt;br /&gt;
  vector norm // (0,0,0) is omnidirectional&lt;br /&gt;
  float radius&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SLDC&#039; - Shield mesh collision tree info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint tree_size&lt;br /&gt;
for each node, n {&lt;br /&gt;
 ubyte type // 0 = SPLIT, 1 = LEAF/polylist&lt;br /&gt;
 uint size&lt;br /&gt;
 if !type { // SPLIT&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint front_offset&lt;br /&gt;
  uint back_offset&lt;br /&gt;
 }&lt;br /&gt;
 else { // LEAF&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint num_polygons&lt;br /&gt;
  for each polygon, p {&lt;br /&gt;
   uint polygon_addr // indexed into shield mesh face list?&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The shield mesh collision tree speeds up collision calculation by adding bounding boxes around each polygon in the shield mesh.  It works basically like a [[bsp_data_structure|BSP tree]].&lt;br /&gt;
** The first byte of each node is a size 1 char, this makes all the following data to be in unaligned memory access positions, thus making the SLDC system, as it is, incompatible with ARM arch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File Types]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=File:Bsp_chunk.png&amp;diff=58963</id>
		<title>File:Bsp chunk.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=File:Bsp_chunk.png&amp;diff=58963"/>
		<updated>2019-12-06T01:38:13Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=BSP_data_structure&amp;diff=58962</id>
		<title>BSP data structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=BSP_data_structure&amp;diff=58962"/>
		<updated>2019-12-06T01:37:36Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* 3D model data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This info is copied from the Descent Developer&#039;s Network [http://web.archive.org/web/20010906053232/descent-freespace.com/ddn/specs/idta/ bsp_data] page.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The BSP data in FreeSpace in similar to the Descent 1-3 BSP data (also called IDTA). In FreeSpace, the BSP data is located in the POF files.&lt;br /&gt;
&lt;br /&gt;
This document was written by John Slagel from Volition Inc., with revisions and bugfixing from Garry Knudson and Francis &amp;quot;Pastel&amp;quot; Avila.&lt;br /&gt;
&lt;br /&gt;
==3D model data==&lt;br /&gt;
The first byte defines the block now following (0-5, see below). After a block the following byte defines the data of the next block, etc.&lt;br /&gt;
[[Media:Bsp_chunk.png]]&lt;br /&gt;
&lt;br /&gt;
0 - EOF - Means end of tree reached&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 0&lt;br /&gt;
+ 4 int size&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
** Note: EOF size is read as 0, but is actually 8 (id+size).&lt;br /&gt;
&lt;br /&gt;
1 - DEFPOINTS - Defines the vertices&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 1&lt;br /&gt;
+ 4 int size&lt;br /&gt;
+ 8 int n_verts&lt;br /&gt;
+12 int n_norms&lt;br /&gt;
+16 int offset // from start of chunk to vertex data&lt;br /&gt;
+20 n_verts*char norm_counts&lt;br /&gt;
+offset vertex_data // Each vertex n is a point followed by norm_counts[n] normals.&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
** Note: DEFPOINTS is the only type of chunk on bsp_data that could be unaligned. The offset to vertex data must be divisible by 4. This is a mayor cause of bus errors on ARM arch.&lt;br /&gt;
2 - FLATPOLY - Flat (non-textured) polygon&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 2&lt;br /&gt;
+ 4 int size &lt;br /&gt;
+ 8 vector normal&lt;br /&gt;
+20 vector center&lt;br /&gt;
+32 float radius&lt;br /&gt;
+36 int nverts&lt;br /&gt;
+40 byte red&lt;br /&gt;
+41 byte green&lt;br /&gt;
+42 byte blue&lt;br /&gt;
+43 byte pad&lt;br /&gt;
for each vertex, i {&lt;br /&gt;
 short vertnum[i]&lt;br /&gt;
 short normnum[i]&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
3 - TMAPPOLY - Textured polygons&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 3&lt;br /&gt;
+ 4 int size&lt;br /&gt;
+ 8 vector normal&lt;br /&gt;
+20 vector center&lt;br /&gt;
+32 float radius&lt;br /&gt;
+36 int nverts&lt;br /&gt;
+40 int tmap_num&lt;br /&gt;
for each vertex, i {&lt;br /&gt;
 ushort vertnum[i]&lt;br /&gt;
 ushort normnum[i]&lt;br /&gt;
 float u[i]&lt;br /&gt;
 float v[i]&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
4 - SORTNORM - Sortnorms are planes that split the model recursively&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 4&lt;br /&gt;
+ 4 int size&lt;br /&gt;
+ 8 vector plane_normal&lt;br /&gt;
+20 vector plane_point&lt;br /&gt;
+32 int reserved // set to 0&lt;br /&gt;
+36 int front_offset // Only recurse into this if non-zero.&lt;br /&gt;
+40 int back_offset // Only recurse into this if non-zero.&lt;br /&gt;
+44 int prelist_offset // Only recurse into this if non-zero.&lt;br /&gt;
+48 int postlist_offset // Only recurse into this if non-zero.&lt;br /&gt;
+52 int online_offset // Only recurse into this if non-zero.&lt;br /&gt;
+56 vector min_bounding_box_point // of all polys under here&lt;br /&gt;
+68 vector max_bounding_box_point // of all polys under here&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
5 - BOUNDBOX - Bounding boxes are used to speed up lighting and collision calculations.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;+ 0 int id = 5&lt;br /&gt;
+ 4 int size&lt;br /&gt;
+ 8 vector min_point&lt;br /&gt;
+20 vector max_point&amp;lt;/pre&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:File Types]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58961</id>
		<title>POF data structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58961"/>
		<updated>2019-12-06T01:25:22Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Chunk specs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following information is copied from the Descent Developer&#039;s Network [http://web.archive.org/web/20010619182804/descent-freespace.com/ddn/specs/pof/ pof specs page].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
These files are used to hold the ship model data. The data for the ship is basically a BSP tree that doesn&#039;t split polygons across the planes (since we&#039;re using zbuffering) and the planes are created by halving the largest dimension of each bounding box recursively. Due to the vastness of some of our models, this recursively split structure allows our collision detection and dynamic lighting to do quick out&#039;s on the model. For example, to check if a vector interects the model, I check against the bounding box. If it hits, I then check each of the two boxes it is split into. Then I recursively check each subdivided box as long as the vector is still interesecting.&lt;br /&gt;
&lt;br /&gt;
We create the POF file by exporting a 3DS Max file with a special plugin tool to generate a &amp;quot;.P3D&amp;quot; file, which is essentially a 3d studio file only with texture uv&#039;s stored for each face vertex rather than for each vertex. We then run the .P3D file through an in-house Win32 program called &#039;BSPGEN&#039; which creates the POF file. Depending on the model size, BSPGEN takes a few minutes or so.&lt;br /&gt;
&lt;br /&gt;
Each ship is made up of a lot of subobjects where a subobject is a collection of polygons. For instance, each detail level of a hull of a ship is a subobject. A radar dish is a subobject. A piece of debris that the ship explodes into is a subobject. Each subobject can then have children subobjects. To draw the highest detail model of a ship, draw the subobject identified as detail level 0 and draw all it&#039;s children.&lt;br /&gt;
&lt;br /&gt;
This document was written by John Slagel from Volition Inc., with revisions and bugfixing from Garry Knudson. FreeSpace 2 additions were made by Dave Baranec (Volition Inc.), Garry Knudson and Francis &amp;quot;Pastel&amp;quot; Avila.&lt;br /&gt;
&lt;br /&gt;
[[POF_Order_FS2|POF block order list for retail FS2 models]]&lt;br /&gt;
&lt;br /&gt;
==Data types==&lt;br /&gt;
This uses standard Intel data types.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  (int) == 4 bytes, signed&lt;br /&gt;
  (uint) == 4 bytes, unsigned&lt;br /&gt;
  (short) == 2 bytes, signed&lt;br /&gt;
  (ushort) == 2 bytes, unsigned&lt;br /&gt;
  (char) == 1 byte, signed&lt;br /&gt;
  (ubyte) == 1 byte, unsigned&lt;br /&gt;
  (float) == 4 bytes, signed&lt;br /&gt;
  (vector) == 3 floats, 12 bytes total&lt;br /&gt;
  (string) == an int specifying length of string and char[length] for the string itself&lt;br /&gt;
  (note: it is NOT null-terminated)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic file structure==&lt;br /&gt;
The file format is a binary file using standard Intel data types. The header consists of a signature and the file version number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char[4] file_id   // must be &#039;PSPO&#039;&lt;br /&gt;
int version       // Major*100+Minor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
*PSPO stood for Parallax Software Polygon Object at one time. Conflict, Descent: FreeSpace shipped at POF version 20.14, so version would be equal to 2014 in most POF files (not all). FreeSpace 2 shipped at POF version 21.17, some files are 21.16.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*The rest of the file is a bunch of chunks. Each chunk is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;char[4] chunk_id  // see below for available chunk types&lt;br /&gt;
int length        // length of the chunk.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Contrary to BSP_Data structure, in pof data structure &amp;quot;Length&amp;quot; does not considers the first 8 bytes of the chunk (chunk id+length), so in order to go from the begining of the chunk to the next one you need to do lenght+8.&lt;br /&gt;
[[Media:Pof_chunk.png]]&lt;br /&gt;
&lt;br /&gt;
==Chunk specs==&lt;br /&gt;
Here is a breakdown of each of the chunk types:&lt;br /&gt;
&lt;br /&gt;
*&#039;OHDR&#039; (FreeSpace 1) and &#039;HDR2&#039; (FreeSpace 2) - Object header info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector min_bounding         // min bounding box point&lt;br /&gt;
vector max_bounding         // max bounding box point&lt;br /&gt;
&lt;br /&gt;
int num_detaillevels        // number of detail levels&lt;br /&gt;
for each detail_level, i {&lt;br /&gt;
 int sobj_detailevels[i]    // subobject number for detail level I, 0 being highest.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num_debris              // number of debris pieces that model explodes into&lt;br /&gt;
for each debris piece, i&lt;br /&gt;
 int sobj_debris[i]         // subobject number for debris piece i&lt;br /&gt;
&lt;br /&gt;
#ifdef version1903orhigher&lt;br /&gt;
 float mass                 // see notes below&lt;br /&gt;
 vector mass_center         // center of mass&lt;br /&gt;
 float[3][3] moment_inertia // moment of inertia&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2014orhigher&lt;br /&gt;
 int num_cross_sections     // number of cross sections (used for exploding ship) (*)&lt;br /&gt;
 for each cross_section, i {&lt;br /&gt;
  float depth[i]&lt;br /&gt;
  float radius[i]&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2007orhigher&lt;br /&gt;
 int num_lights             // number of precalculated muzzle flash lights&lt;br /&gt;
 for each light {&lt;br /&gt;
  vector location&lt;br /&gt;
  int light_type            // type of light&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Notes:&lt;br /&gt;
&lt;br /&gt;
for version&amp;lt;2009, mass is a volume mass&lt;br /&gt;
for version&amp;gt;=2009, mass is an area mass&lt;br /&gt;
conversion: area_mass=4.65*(vol_mass^2/3); also scale moment_inertia by vol_mass/area_mass&lt;br /&gt;
(*) if there is no cross_section data, num_cross_sections is -1 instead of 0, as one would expect.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TXTR&#039; - A list of textures used on this ship. The order they appear here is the number that a face uses to reference a particular texture.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_textures&lt;br /&gt;
for each texture,i&lt;br /&gt;
 int tex_filename_length[i] &lt;br /&gt;
 string tex_filename[i]    // texture filename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;PINF&#039; - Miscellaneous info about the POF file, command line, etc.&lt;br /&gt;
&lt;br /&gt;
Contains a block of NULL-terminated strings. Just read chunk size bytes and stuff it into a string.&lt;br /&gt;
&lt;br /&gt;
*&#039;PATH&#039; - Paths for docking and AI ships to follow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_paths&lt;br /&gt;
for each path, p {&lt;br /&gt;
 string name[p]             // name&lt;br /&gt;
 string parent[p]           // parent&#039;s name&lt;br /&gt;
 int num_verts[p]&lt;br /&gt;
 for each vert, v {&lt;br /&gt;
   vector pos[p,v]&lt;br /&gt;
   float radius[p,v]&lt;br /&gt;
   int num_turrets[p,v]&lt;br /&gt;
   for each turret, t {&lt;br /&gt;
    int sobj_number[p,v,t]  // subobject number&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SPCL&#039; - Data for special points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_special_points&lt;br /&gt;
for each special_point, p {&lt;br /&gt;
 int name_length[p]&lt;br /&gt;
 string name[p]&lt;br /&gt;
 int properties_length[p]&lt;br /&gt;
 string properties[p]&lt;br /&gt;
 vector point[p]&lt;br /&gt;
 float radius[p]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SHLD&#039; - Data for the shield mesh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_vertices&lt;br /&gt;
for each vertex, v {&lt;br /&gt;
 vector position[v]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num faces&lt;br /&gt;
for each face, f {&lt;br /&gt;
 vector face_normal[f]&lt;br /&gt;
 int[3] face_vertices    // indexed into vertex list&lt;br /&gt;
 int[3] neighbors        // indexed into face list&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039; EYE&#039; - Data for eye points (Where pilot looks in 1st person views). Note the space in front of EYE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_eye_positions&lt;br /&gt;
for each eye_position, e {&lt;br /&gt;
 int sobj_number[e]      // subobject number this eye is attached to&lt;br /&gt;
 vector sobj_offset[e]   // offset from subobject&lt;br /&gt;
 vector normal[e]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;GPNT&#039; and &#039;MPNT&#039; - Gun and Missile firing points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_slots&lt;br /&gt;
for each slot, s {&lt;br /&gt;
 int num_guns[s]&lt;br /&gt;
 for each gun, g {&lt;br /&gt;
   vector point[g,s]&lt;br /&gt;
   vector norm[g,s]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;slot&amp;quot; is what you see in the loadout screen. Primaries have a max of 2 and secondaries of 3 for player-flyable ships.&lt;br /&gt;
&amp;quot;Guns&amp;quot; are the actual number of barrels and hence projectiles you&#039;ll get when you press the trigger. There is likely no practical max.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TGUN&#039; and &#039;TMIS&#039; - Turret Gun and Turret Missile firing points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_banks&lt;br /&gt;
&lt;br /&gt;
for each bank, b {&lt;br /&gt;
 int sobj_parent[b]       // parent subobject (the subobject with which this turret is associated) (*)&lt;br /&gt;
 int sobj_par_phys[b]     // physical parent subobject (the subobject to which the turret rotates) (*)&lt;br /&gt;
&lt;br /&gt;
 vector turret_normal[b]&lt;br /&gt;
 int num_firing_points[b]&lt;br /&gt;
 for each firing_point {&lt;br /&gt;
  vector position[b,f]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
For multipart turrets, sobj_parent is the &amp;quot;barrel&amp;quot; of a turret, and the firing points will be in this sobj&#039;s axial frame. sobj_par_phys is the &amp;quot;base&amp;quot; of a turret, which the barrel will rotate with.&lt;br /&gt;
For single-part turrets, sobj_parent == sobj_parent_phys.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;DOCK&#039; - Data for docking points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_docks&lt;br /&gt;
&lt;br /&gt;
for each dock, d {&lt;br /&gt;
 string properties[d]     // see notes below&lt;br /&gt;
 int num_spline_paths[d]&lt;br /&gt;
 for each spline_path, p {&lt;br /&gt;
  int path_number[d,p]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int num_points&lt;br /&gt;
 for each point, d {&lt;br /&gt;
  vector position&lt;br /&gt;
  vector normal&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Note: Properties… if $name= found, then this is name. If name is cargo then this is a cargo bay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;FUEL&#039; - Data for engine thruster glows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_thrusters&lt;br /&gt;
for each thruster,t {&lt;br /&gt;
 int num glows[t]&lt;br /&gt;
 &lt;br /&gt;
 #ifdef version2117orhigher // FreeSpace 2 change&lt;br /&gt;
  string properties&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 for each glow {&lt;br /&gt;
  vector pos[t,g]&lt;br /&gt;
  vector norm[t,g]   // used to tell if behind glow&lt;br /&gt;
  float radius[t,g]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SOBJ&#039; (FreeSpace 1) and &#039;OBJ2&#039; (FreeSpace 2) - Data for a subobject. Contains some info and a bunch of vertices and polygons in the form of a BSP tree or Octree depending on how you look at it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int submodel_number  // What submodel number this is.&lt;br /&gt;
&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector geometric_center&lt;br /&gt;
vector bounding_box_min_point&lt;br /&gt;
vector bounding_box_max_point&lt;br /&gt;
&lt;br /&gt;
int submodel_name_length&lt;br /&gt;
string submodel_name&lt;br /&gt;
int properites_length&lt;br /&gt;
string properites&lt;br /&gt;
int movement_type&lt;br /&gt;
int movement_axis&lt;br /&gt;
&lt;br /&gt;
int reserved         // must be 0&lt;br /&gt;
int bsp_data_size    // number of bytes now following&lt;br /&gt;
char[bsp_data_size] bsp_data  // contains actual polygons, etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Note: bsp_data is explained [[bsp_data_structure|here]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;INSG&#039; - Squad logo/Insignia data chunk (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_insignias&lt;br /&gt;
for each insignia, i {&lt;br /&gt;
 int detail_level // ship detail level&lt;br /&gt;
 int num_faces&lt;br /&gt;
 int num_vertices&lt;br /&gt;
 for each vertice, j {&lt;br /&gt;
  vector vertex_position&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 vector offset // offset of the insignia in model coords&lt;br /&gt;
 for each face, j {&lt;br /&gt;
  for 0 to 2, k {&lt;br /&gt;
   int vertex_index // vertex index for this face&lt;br /&gt;
   float u_texture_coordinate&lt;br /&gt;
   float v_texture_coordinate&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;ACEN&#039; - Auto-Centering info (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector point // autocentering point for the entire model&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The autocentering point was basically just a little convenient extra data we stuck in models where the pivot point of the model wasn&#039;t at the center. Since we rotate ships in the tech room by rotating around the pivot point, it looked dumb when the colossus&#039; rear end was in the middle of the screen and it was spinning on it. So the autocenter point was just a point pretty much near the model we could use to push an extra matrix onto our transform stack and have it show up centered around it. The point itself is in model coordinates.&lt;br /&gt;
&lt;br /&gt;
*&#039;GLOW&#039; - Glowpoint info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_glowbanks&lt;br /&gt;
for each glowbank, g {&lt;br /&gt;
 int disp_time // displacement time for blinking (e.g. for Orion runway lights)&lt;br /&gt;
 int on_time&lt;br /&gt;
 int off_time&lt;br /&gt;
 int obj_parent // parent subobject number&lt;br /&gt;
 int LOD // Should be 0&lt;br /&gt;
 int type // Should also be 0&lt;br /&gt;
 int num_glowpoints // Number of glowpoints in this bank&lt;br /&gt;
 string properties // Texture name, no file path or extension, like: &amp;quot;$glow_texture=...&amp;quot;&lt;br /&gt;
 for each glowpoint, p {&lt;br /&gt;
  vector point // location vector&lt;br /&gt;
  vector norm // (0,0,0) is omnidirectional&lt;br /&gt;
  float radius&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SLDC&#039; - Shield mesh collision tree info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint tree_size&lt;br /&gt;
for each node, n {&lt;br /&gt;
 ubyte type // 0 = SPLIT, 1 = LEAF/polylist&lt;br /&gt;
 uint size&lt;br /&gt;
 if !type { // SPLIT&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint front_offset&lt;br /&gt;
  uint back_offset&lt;br /&gt;
 }&lt;br /&gt;
 else { // LEAF&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint num_polygons&lt;br /&gt;
  for each polygon, p {&lt;br /&gt;
   uint polygon_addr // indexed into shield mesh face list?&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The shield mesh collision tree speeds up collision calculation by adding bounding boxes around each polygon in the shield mesh.  It works basically like a [[bsp_data_structure|BSP tree]].&lt;br /&gt;
** The first byte of each node is a size 1 char, this makes all the following data to be in unaligned memory access positions, thus making the SLDC system, as it is, incompatible with ARM arch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File Types]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58960</id>
		<title>POF data structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58960"/>
		<updated>2019-12-06T01:20:54Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Chunk specs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following information is copied from the Descent Developer&#039;s Network [http://web.archive.org/web/20010619182804/descent-freespace.com/ddn/specs/pof/ pof specs page].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
These files are used to hold the ship model data. The data for the ship is basically a BSP tree that doesn&#039;t split polygons across the planes (since we&#039;re using zbuffering) and the planes are created by halving the largest dimension of each bounding box recursively. Due to the vastness of some of our models, this recursively split structure allows our collision detection and dynamic lighting to do quick out&#039;s on the model. For example, to check if a vector interects the model, I check against the bounding box. If it hits, I then check each of the two boxes it is split into. Then I recursively check each subdivided box as long as the vector is still interesecting.&lt;br /&gt;
&lt;br /&gt;
We create the POF file by exporting a 3DS Max file with a special plugin tool to generate a &amp;quot;.P3D&amp;quot; file, which is essentially a 3d studio file only with texture uv&#039;s stored for each face vertex rather than for each vertex. We then run the .P3D file through an in-house Win32 program called &#039;BSPGEN&#039; which creates the POF file. Depending on the model size, BSPGEN takes a few minutes or so.&lt;br /&gt;
&lt;br /&gt;
Each ship is made up of a lot of subobjects where a subobject is a collection of polygons. For instance, each detail level of a hull of a ship is a subobject. A radar dish is a subobject. A piece of debris that the ship explodes into is a subobject. Each subobject can then have children subobjects. To draw the highest detail model of a ship, draw the subobject identified as detail level 0 and draw all it&#039;s children.&lt;br /&gt;
&lt;br /&gt;
This document was written by John Slagel from Volition Inc., with revisions and bugfixing from Garry Knudson. FreeSpace 2 additions were made by Dave Baranec (Volition Inc.), Garry Knudson and Francis &amp;quot;Pastel&amp;quot; Avila.&lt;br /&gt;
&lt;br /&gt;
[[POF_Order_FS2|POF block order list for retail FS2 models]]&lt;br /&gt;
&lt;br /&gt;
==Data types==&lt;br /&gt;
This uses standard Intel data types.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  (int) == 4 bytes, signed&lt;br /&gt;
  (uint) == 4 bytes, unsigned&lt;br /&gt;
  (short) == 2 bytes, signed&lt;br /&gt;
  (ushort) == 2 bytes, unsigned&lt;br /&gt;
  (char) == 1 byte, signed&lt;br /&gt;
  (ubyte) == 1 byte, unsigned&lt;br /&gt;
  (float) == 4 bytes, signed&lt;br /&gt;
  (vector) == 3 floats, 12 bytes total&lt;br /&gt;
  (string) == an int specifying length of string and char[length] for the string itself&lt;br /&gt;
  (note: it is NOT null-terminated)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic file structure==&lt;br /&gt;
The file format is a binary file using standard Intel data types. The header consists of a signature and the file version number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char[4] file_id   // must be &#039;PSPO&#039;&lt;br /&gt;
int version       // Major*100+Minor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
*PSPO stood for Parallax Software Polygon Object at one time. Conflict, Descent: FreeSpace shipped at POF version 20.14, so version would be equal to 2014 in most POF files (not all). FreeSpace 2 shipped at POF version 21.17, some files are 21.16.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*The rest of the file is a bunch of chunks. Each chunk is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;char[4] chunk_id  // see below for available chunk types&lt;br /&gt;
int length        // length of the chunk.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Contrary to BSP_Data structure, in pof data structure &amp;quot;Length&amp;quot; does not considers the first 8 bytes of the chunk (chunk id+length), so in order to go from the begining of the chunk to the next one you need to do lenght+8.&lt;br /&gt;
[[Media:Pof_chunk.png]]&lt;br /&gt;
&lt;br /&gt;
==Chunk specs==&lt;br /&gt;
Here is a breakdown of each of the chunk types:&lt;br /&gt;
&lt;br /&gt;
*&#039;OHDR&#039; (FreeSpace 1) and &#039;HDR2&#039; (FreeSpace 2) - Object header info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector min_bounding         // min bounding box point&lt;br /&gt;
vector max_bounding         // max bounding box point&lt;br /&gt;
&lt;br /&gt;
int num_detaillevels        // number of detail levels&lt;br /&gt;
for each detail_level, i {&lt;br /&gt;
 int sobj_detailevels[i]    // subobject number for detail level I, 0 being highest.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num_debris              // number of debris pieces that model explodes into&lt;br /&gt;
for each debris piece, i&lt;br /&gt;
 int sobj_debris[i]         // subobject number for debris piece i&lt;br /&gt;
&lt;br /&gt;
#ifdef version1903orhigher&lt;br /&gt;
 float mass                 // see notes below&lt;br /&gt;
 vector mass_center         // center of mass&lt;br /&gt;
 float[3][3] moment_inertia // moment of inertia&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2014orhigher&lt;br /&gt;
 int num_cross_sections     // number of cross sections (used for exploding ship) (*)&lt;br /&gt;
 for each cross_section, i {&lt;br /&gt;
  float depth[i]&lt;br /&gt;
  float radius[i]&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2007orhigher&lt;br /&gt;
 int num_lights             // number of precalculated muzzle flash lights&lt;br /&gt;
 for each light {&lt;br /&gt;
  vector location&lt;br /&gt;
  int light_type            // type of light&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Notes:&lt;br /&gt;
&lt;br /&gt;
for version&amp;lt;2009, mass is a volume mass&lt;br /&gt;
for version&amp;gt;=2009, mass is an area mass&lt;br /&gt;
conversion: area_mass=4.65*(vol_mass^2/3); also scale moment_inertia by vol_mass/area_mass&lt;br /&gt;
(*) if there is no cross_section data, num_cross_sections is -1 instead of 0, as one would expect.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TXTR&#039; - A list of textures used on this ship. The order they appear here is the number that a face uses to reference a particular texture.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_textures&lt;br /&gt;
for each texture,i&lt;br /&gt;
 int tex_filename_length[i] &lt;br /&gt;
 string tex_filename[i]    // texture filename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;PINF&#039; - Miscellaneous info about the POF file, command line, etc.&lt;br /&gt;
&lt;br /&gt;
Contains a block of NULL-terminated strings. Just read chunk size bytes and stuff it into a string.&lt;br /&gt;
&lt;br /&gt;
*&#039;PATH&#039; - Paths for docking and AI ships to follow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_paths&lt;br /&gt;
for each path, p {&lt;br /&gt;
 string name[p]             // name&lt;br /&gt;
 string parent[p]           // parent&#039;s name&lt;br /&gt;
 int num_verts[p]&lt;br /&gt;
 for each vert, v {&lt;br /&gt;
   vector pos[p,v]&lt;br /&gt;
   float radius[p,v]&lt;br /&gt;
   int num_turrets[p,v]&lt;br /&gt;
   for each turret, t {&lt;br /&gt;
    int sobj_number[p,v,t]  // subobject number&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SPCL&#039; - Data for special points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_special_points&lt;br /&gt;
for each special_point, p {&lt;br /&gt;
 int name_length[p]&lt;br /&gt;
 string name[p]&lt;br /&gt;
 int properties_length[p]&lt;br /&gt;
 string properties[p]&lt;br /&gt;
 vector point[p]&lt;br /&gt;
 float radius[p]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SHLD&#039; - Data for the shield mesh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_vertices&lt;br /&gt;
for each vertex, v {&lt;br /&gt;
 vector position[v]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num faces&lt;br /&gt;
for each face, f {&lt;br /&gt;
 vector face_normal[f]&lt;br /&gt;
 int[3] face_vertices    // indexed into vertex list&lt;br /&gt;
 int[3] neighbors        // indexed into face list&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039; EYE&#039; - Data for eye points (Where pilot looks in 1st person views). Note the space in front of EYE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_eye_positions&lt;br /&gt;
for each eye_position, e {&lt;br /&gt;
 int sobj_number[e]      // subobject number this eye is attached to&lt;br /&gt;
 vector sobj_offset[e]   // offset from subobject&lt;br /&gt;
 vector normal[e]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;GPNT&#039; and &#039;MPNT&#039; - Gun and Missile firing points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_slots&lt;br /&gt;
for each slot, s {&lt;br /&gt;
 int num_guns[s]&lt;br /&gt;
 for each gun, g {&lt;br /&gt;
   vector point[g,s]&lt;br /&gt;
   vector norm[g,s]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;slot&amp;quot; is what you see in the loadout screen. Primaries have a max of 2 and secondaries of 3 for player-flyable ships.&lt;br /&gt;
&amp;quot;Guns&amp;quot; are the actual number of barrels and hence projectiles you&#039;ll get when you press the trigger. There is likely no practical max.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TGUN&#039; and &#039;TMIS&#039; - Turret Gun and Turret Missile firing points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_banks&lt;br /&gt;
&lt;br /&gt;
for each bank, b {&lt;br /&gt;
 int sobj_parent[b]       // parent subobject (the subobject with which this turret is associated) (*)&lt;br /&gt;
 int sobj_par_phys[b]     // physical parent subobject (the subobject to which the turret rotates) (*)&lt;br /&gt;
&lt;br /&gt;
 vector turret_normal[b]&lt;br /&gt;
 int num_firing_points[b]&lt;br /&gt;
 for each firing_point {&lt;br /&gt;
  vector position[b,f]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
For multipart turrets, sobj_parent is the &amp;quot;barrel&amp;quot; of a turret, and the firing points will be in this sobj&#039;s axial frame. sobj_par_phys is the &amp;quot;base&amp;quot; of a turret, which the barrel will rotate with.&lt;br /&gt;
For single-part turrets, sobj_parent == sobj_parent_phys.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;DOCK&#039; - Data for docking points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_docks&lt;br /&gt;
&lt;br /&gt;
for each dock, d {&lt;br /&gt;
 string properties[d]     // see notes below&lt;br /&gt;
 int num_spline_paths[d]&lt;br /&gt;
 for each spline_path, p {&lt;br /&gt;
  int path_number[d,p]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int num_points&lt;br /&gt;
 for each point, d {&lt;br /&gt;
  vector position&lt;br /&gt;
  vector normal&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Note: Properties… if $name= found, then this is name. If name is cargo then this is a cargo bay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;FUEL&#039; - Data for engine thruster glows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_thrusters&lt;br /&gt;
for each thruster,t {&lt;br /&gt;
 int num glows[t]&lt;br /&gt;
 &lt;br /&gt;
 #ifdef version2117orhigher // FreeSpace 2 change&lt;br /&gt;
  string properties&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 for each glow {&lt;br /&gt;
  vector pos[t,g]&lt;br /&gt;
  vector norm[t,g]   // used to tell if behind glow&lt;br /&gt;
  float radius[t,g]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SOBJ&#039; (FreeSpace 1) and &#039;OBJ2&#039; (FreeSpace 2) - Data for a subobject. Contains some info and a bunch of vertices and polygons in the form of a BSP tree or Octree depending on how you look at it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int submodel_number  // What submodel number this is.&lt;br /&gt;
&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector geometric_center&lt;br /&gt;
vector bounding_box_min_point&lt;br /&gt;
vector bounding_box_max_point&lt;br /&gt;
&lt;br /&gt;
string submodel_name&lt;br /&gt;
string properites&lt;br /&gt;
int movement_type&lt;br /&gt;
int movement_axis&lt;br /&gt;
&lt;br /&gt;
int reserved         // must be 0&lt;br /&gt;
int bsp_data_size    // number of bytes now following&lt;br /&gt;
char[bsp_data_size] bsp_data  // contains actual polygons, etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Note: bsp_data is explained [[bsp_data_structure|here]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;INSG&#039; - Squad logo/Insignia data chunk (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_insignias&lt;br /&gt;
for each insignia, i {&lt;br /&gt;
 int detail_level // ship detail level&lt;br /&gt;
 int num_faces&lt;br /&gt;
 int num_vertices&lt;br /&gt;
 for each vertice, j {&lt;br /&gt;
  vector vertex_position&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 vector offset // offset of the insignia in model coords&lt;br /&gt;
 for each face, j {&lt;br /&gt;
  for 0 to 2, k {&lt;br /&gt;
   int vertex_index // vertex index for this face&lt;br /&gt;
   float u_texture_coordinate&lt;br /&gt;
   float v_texture_coordinate&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;ACEN&#039; - Auto-Centering info (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector point // autocentering point for the entire model&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The autocentering point was basically just a little convenient extra data we stuck in models where the pivot point of the model wasn&#039;t at the center. Since we rotate ships in the tech room by rotating around the pivot point, it looked dumb when the colossus&#039; rear end was in the middle of the screen and it was spinning on it. So the autocenter point was just a point pretty much near the model we could use to push an extra matrix onto our transform stack and have it show up centered around it. The point itself is in model coordinates.&lt;br /&gt;
&lt;br /&gt;
*&#039;GLOW&#039; - Glowpoint info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_glowbanks&lt;br /&gt;
for each glowbank, g {&lt;br /&gt;
 int disp_time // displacement time for blinking (e.g. for Orion runway lights)&lt;br /&gt;
 int on_time&lt;br /&gt;
 int off_time&lt;br /&gt;
 int obj_parent // parent subobject number&lt;br /&gt;
 int LOD // Should be 0&lt;br /&gt;
 int type // Should also be 0&lt;br /&gt;
 int num_glowpoints // Number of glowpoints in this bank&lt;br /&gt;
 string properties // Texture name, no file path or extension, like: &amp;quot;$glow_texture=...&amp;quot;&lt;br /&gt;
 for each glowpoint, p {&lt;br /&gt;
  vector point // location vector&lt;br /&gt;
  vector norm // (0,0,0) is omnidirectional&lt;br /&gt;
  float radius&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SLDC&#039; - Shield mesh collision tree info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint tree_size&lt;br /&gt;
for each node, n {&lt;br /&gt;
 ubyte type // 0 = SPLIT, 1 = LEAF/polylist&lt;br /&gt;
 uint size&lt;br /&gt;
 if !type { // SPLIT&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint front_offset&lt;br /&gt;
  uint back_offset&lt;br /&gt;
 }&lt;br /&gt;
 else { // LEAF&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint num_polygons&lt;br /&gt;
  for each polygon, p {&lt;br /&gt;
   uint polygon_addr // indexed into shield mesh face list?&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The shield mesh collision tree speeds up collision calculation by adding bounding boxes around each polygon in the shield mesh.  It works basically like a [[bsp_data_structure|BSP tree]].&lt;br /&gt;
** The first byte of each node is a size 1 char, this makes all the following data to be in unaligned memory access positions, thus making the SLDC system, as it is, incompatible with ARM arch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File Types]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58959</id>
		<title>POF data structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58959"/>
		<updated>2019-12-06T01:14:32Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Basic file structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following information is copied from the Descent Developer&#039;s Network [http://web.archive.org/web/20010619182804/descent-freespace.com/ddn/specs/pof/ pof specs page].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
These files are used to hold the ship model data. The data for the ship is basically a BSP tree that doesn&#039;t split polygons across the planes (since we&#039;re using zbuffering) and the planes are created by halving the largest dimension of each bounding box recursively. Due to the vastness of some of our models, this recursively split structure allows our collision detection and dynamic lighting to do quick out&#039;s on the model. For example, to check if a vector interects the model, I check against the bounding box. If it hits, I then check each of the two boxes it is split into. Then I recursively check each subdivided box as long as the vector is still interesecting.&lt;br /&gt;
&lt;br /&gt;
We create the POF file by exporting a 3DS Max file with a special plugin tool to generate a &amp;quot;.P3D&amp;quot; file, which is essentially a 3d studio file only with texture uv&#039;s stored for each face vertex rather than for each vertex. We then run the .P3D file through an in-house Win32 program called &#039;BSPGEN&#039; which creates the POF file. Depending on the model size, BSPGEN takes a few minutes or so.&lt;br /&gt;
&lt;br /&gt;
Each ship is made up of a lot of subobjects where a subobject is a collection of polygons. For instance, each detail level of a hull of a ship is a subobject. A radar dish is a subobject. A piece of debris that the ship explodes into is a subobject. Each subobject can then have children subobjects. To draw the highest detail model of a ship, draw the subobject identified as detail level 0 and draw all it&#039;s children.&lt;br /&gt;
&lt;br /&gt;
This document was written by John Slagel from Volition Inc., with revisions and bugfixing from Garry Knudson. FreeSpace 2 additions were made by Dave Baranec (Volition Inc.), Garry Knudson and Francis &amp;quot;Pastel&amp;quot; Avila.&lt;br /&gt;
&lt;br /&gt;
[[POF_Order_FS2|POF block order list for retail FS2 models]]&lt;br /&gt;
&lt;br /&gt;
==Data types==&lt;br /&gt;
This uses standard Intel data types.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  (int) == 4 bytes, signed&lt;br /&gt;
  (uint) == 4 bytes, unsigned&lt;br /&gt;
  (short) == 2 bytes, signed&lt;br /&gt;
  (ushort) == 2 bytes, unsigned&lt;br /&gt;
  (char) == 1 byte, signed&lt;br /&gt;
  (ubyte) == 1 byte, unsigned&lt;br /&gt;
  (float) == 4 bytes, signed&lt;br /&gt;
  (vector) == 3 floats, 12 bytes total&lt;br /&gt;
  (string) == an int specifying length of string and char[length] for the string itself&lt;br /&gt;
  (note: it is NOT null-terminated)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic file structure==&lt;br /&gt;
The file format is a binary file using standard Intel data types. The header consists of a signature and the file version number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char[4] file_id   // must be &#039;PSPO&#039;&lt;br /&gt;
int version       // Major*100+Minor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
*PSPO stood for Parallax Software Polygon Object at one time. Conflict, Descent: FreeSpace shipped at POF version 20.14, so version would be equal to 2014 in most POF files (not all). FreeSpace 2 shipped at POF version 21.17, some files are 21.16.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*The rest of the file is a bunch of chunks. Each chunk is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;char[4] chunk_id  // see below for available chunk types&lt;br /&gt;
int length        // length of the chunk.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Contrary to BSP_Data structure, in pof data structure &amp;quot;Length&amp;quot; does not considers the first 8 bytes of the chunk (chunk id+length), so in order to go from the begining of the chunk to the next one you need to do lenght+8.&lt;br /&gt;
[[Media:Pof_chunk.png]]&lt;br /&gt;
&lt;br /&gt;
==Chunk specs==&lt;br /&gt;
Here is a breakdown of each of the chunk types:&lt;br /&gt;
&lt;br /&gt;
*&#039;OHDR&#039; (FreeSpace 1) and &#039;HDR2&#039; (FreeSpace 2) - Object header info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector min_bounding         // min bounding box point&lt;br /&gt;
vector max_bounding         // max bounding box point&lt;br /&gt;
&lt;br /&gt;
int num_detaillevels        // number of detail levels&lt;br /&gt;
for each detail_level, i {&lt;br /&gt;
 int sobj_detailevels[i]    // subobject number for detail level I, 0 being highest.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num_debris              // number of debris pieces that model explodes into&lt;br /&gt;
for each debris piece, i&lt;br /&gt;
 int sobj_debris[i]         // subobject number for debris piece i&lt;br /&gt;
&lt;br /&gt;
#ifdef version1903orhigher&lt;br /&gt;
 float mass                 // see notes below&lt;br /&gt;
 vector mass_center         // center of mass&lt;br /&gt;
 float[3][3] moment_inertia // moment of inertia&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2014orhigher&lt;br /&gt;
 int num_cross_sections     // number of cross sections (used for exploding ship) (*)&lt;br /&gt;
 for each cross_section, i {&lt;br /&gt;
  float depth[i]&lt;br /&gt;
  float radius[i]&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2007orhigher&lt;br /&gt;
 int num_lights             // number of precalculated muzzle flash lights&lt;br /&gt;
 for each light {&lt;br /&gt;
  vector location&lt;br /&gt;
  int light_type            // type of light&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Notes:&lt;br /&gt;
&lt;br /&gt;
for version&amp;lt;2009, mass is a volume mass&lt;br /&gt;
for version&amp;gt;=2009, mass is an area mass&lt;br /&gt;
conversion: area_mass=4.65*(vol_mass^2/3); also scale moment_inertia by vol_mass/area_mass&lt;br /&gt;
(*) if there is no cross_section data, num_cross_sections is -1 instead of 0, as one would expect.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TXTR&#039; - A list of textures used on this ship. The order they appear here is the number that a face uses to reference a particular texture.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_textures&lt;br /&gt;
for each texture,i&lt;br /&gt;
 string tex_filename[i]    // texture filename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;PINF&#039; - Miscellaneous info about the POF file, command line, etc.&lt;br /&gt;
&lt;br /&gt;
Contains a block of NULL-terminated strings. Just read chunk size bytes and stuff it into a string.&lt;br /&gt;
&lt;br /&gt;
*&#039;PATH&#039; - Paths for docking and AI ships to follow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_paths&lt;br /&gt;
for each path, p {&lt;br /&gt;
 string name[p]             // name&lt;br /&gt;
 string parent[p]           // parent&#039;s name&lt;br /&gt;
 int num_verts[p]&lt;br /&gt;
 for each vert, v {&lt;br /&gt;
   vector pos[p,v]&lt;br /&gt;
   float radius[p,v]&lt;br /&gt;
   int num_turrets[p,v]&lt;br /&gt;
   for each turret, t {&lt;br /&gt;
    int sobj_number[p,v,t]  // subobject number&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SPCL&#039; - Data for special points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_special_points&lt;br /&gt;
for each special_point, p {&lt;br /&gt;
 string name[p]&lt;br /&gt;
 string properties[p]&lt;br /&gt;
 vector point[p]&lt;br /&gt;
 float radius[p]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SHLD&#039; - Data for the shield mesh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_vertices&lt;br /&gt;
for each vertex, v {&lt;br /&gt;
 vector position[v]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num faces&lt;br /&gt;
for each face, f {&lt;br /&gt;
 vector face_normal[f]&lt;br /&gt;
 int[3] face_vertices    // indexed into vertex list&lt;br /&gt;
 int[3] neighbors        // indexed into face list&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039; EYE&#039; - Data for eye points (Where pilot looks in 1st person views). Note the space in front of EYE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_eye_positions&lt;br /&gt;
for each eye_position, e {&lt;br /&gt;
 int sobj_number[e]      // subobject number this eye is attached to&lt;br /&gt;
 vector sobj_offset[e]   // offset from subobject&lt;br /&gt;
 vector normal[e]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;GPNT&#039; and &#039;MPNT&#039; - Gun and Missile firing points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_slots&lt;br /&gt;
for each slot, s {&lt;br /&gt;
 int num_guns[s]&lt;br /&gt;
 for each gun, g {&lt;br /&gt;
   vector point[g,s]&lt;br /&gt;
   vector norm[g,s]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;slot&amp;quot; is what you see in the loadout screen. Primaries have a max of 2 and secondaries of 3 for player-flyable ships.&lt;br /&gt;
&amp;quot;Guns&amp;quot; are the actual number of barrels and hence projectiles you&#039;ll get when you press the trigger. There is likely no practical max.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TGUN&#039; and &#039;TMIS&#039; - Turret Gun and Turret Missile firing points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_banks&lt;br /&gt;
&lt;br /&gt;
for each bank, b {&lt;br /&gt;
 int sobj_parent[b]       // parent subobject (the subobject with which this turret is associated) (*)&lt;br /&gt;
 int sobj_par_phys[b]     // physical parent subobject (the subobject to which the turret rotates) (*)&lt;br /&gt;
&lt;br /&gt;
 vector turret_normal[b]&lt;br /&gt;
 int num_firing_points[b]&lt;br /&gt;
 for each firing_point {&lt;br /&gt;
  vector position[b,f]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
For multipart turrets, sobj_parent is the &amp;quot;barrel&amp;quot; of a turret, and the firing points will be in this sobj&#039;s axial frame. sobj_par_phys is the &amp;quot;base&amp;quot; of a turret, which the barrel will rotate with.&lt;br /&gt;
For single-part turrets, sobj_parent == sobj_parent_phys.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;DOCK&#039; - Data for docking points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_docks&lt;br /&gt;
&lt;br /&gt;
for each dock, d {&lt;br /&gt;
 string properties[d]     // see notes below&lt;br /&gt;
 int num_spline_paths[d]&lt;br /&gt;
 for each spline_path, p {&lt;br /&gt;
  int path_number[d,p]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int num_points&lt;br /&gt;
 for each point, d {&lt;br /&gt;
  vector position&lt;br /&gt;
  vector normal&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Note: Properties… if $name= found, then this is name. If name is cargo then this is a cargo bay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;FUEL&#039; - Data for engine thruster glows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_thrusters&lt;br /&gt;
for each thruster,t {&lt;br /&gt;
 int num glows[t]&lt;br /&gt;
 &lt;br /&gt;
 #ifdef version2117orhigher // FreeSpace 2 change&lt;br /&gt;
  string properties&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 for each glow {&lt;br /&gt;
  vector pos[t,g]&lt;br /&gt;
  vector norm[t,g]   // used to tell if behind glow&lt;br /&gt;
  float radius[t,g]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SOBJ&#039; (FreeSpace 1) and &#039;OBJ2&#039; (FreeSpace 2) - Data for a subobject. Contains some info and a bunch of vertices and polygons in the form of a BSP tree or Octree depending on how you look at it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int submodel_number  // What submodel number this is.&lt;br /&gt;
&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector geometric_center&lt;br /&gt;
vector bounding_box_min_point&lt;br /&gt;
vector bounding_box_max_point&lt;br /&gt;
&lt;br /&gt;
string submodel_name&lt;br /&gt;
string properites&lt;br /&gt;
int movement_type&lt;br /&gt;
int movement_axis&lt;br /&gt;
&lt;br /&gt;
int reserved         // must be 0&lt;br /&gt;
int bsp_data_size    // number of bytes now following&lt;br /&gt;
char[bsp_data_size] bsp_data  // contains actual polygons, etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Note: bsp_data is explained [[bsp_data_structure|here]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;INSG&#039; - Squad logo/Insignia data chunk (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_insignias&lt;br /&gt;
for each insignia, i {&lt;br /&gt;
 int detail_level // ship detail level&lt;br /&gt;
 int num_faces&lt;br /&gt;
 int num_vertices&lt;br /&gt;
 for each vertice, j {&lt;br /&gt;
  vector vertex_position&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 vector offset // offset of the insignia in model coords&lt;br /&gt;
 for each face, j {&lt;br /&gt;
  for 0 to 2, k {&lt;br /&gt;
   int vertex_index // vertex index for this face&lt;br /&gt;
   float u_texture_coordinate&lt;br /&gt;
   float v_texture_coordinate&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;ACEN&#039; - Auto-Centering info (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector point // autocentering point for the entire model&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The autocentering point was basically just a little convenient extra data we stuck in models where the pivot point of the model wasn&#039;t at the center. Since we rotate ships in the tech room by rotating around the pivot point, it looked dumb when the colossus&#039; rear end was in the middle of the screen and it was spinning on it. So the autocenter point was just a point pretty much near the model we could use to push an extra matrix onto our transform stack and have it show up centered around it. The point itself is in model coordinates.&lt;br /&gt;
&lt;br /&gt;
*&#039;GLOW&#039; - Glowpoint info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_glowbanks&lt;br /&gt;
for each glowbank, g {&lt;br /&gt;
 int disp_time // displacement time for blinking (e.g. for Orion runway lights)&lt;br /&gt;
 int on_time&lt;br /&gt;
 int off_time&lt;br /&gt;
 int obj_parent // parent subobject number&lt;br /&gt;
 int LOD // Should be 0&lt;br /&gt;
 int type // Should also be 0&lt;br /&gt;
 int num_glowpoints // Number of glowpoints in this bank&lt;br /&gt;
 string properties // Texture name, no file path or extension, like: &amp;quot;$glow_texture=...&amp;quot;&lt;br /&gt;
 for each glowpoint, p {&lt;br /&gt;
  vector point // location vector&lt;br /&gt;
  vector norm // (0,0,0) is omnidirectional&lt;br /&gt;
  float radius&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SLDC&#039; - Shield mesh collision tree info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint tree_size&lt;br /&gt;
for each node, n {&lt;br /&gt;
 ubyte type // 0 = SPLIT, 1 = LEAF/polylist&lt;br /&gt;
 uint size&lt;br /&gt;
 if !type { // SPLIT&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint front_offset&lt;br /&gt;
  uint back_offset&lt;br /&gt;
 }&lt;br /&gt;
 else { // LEAF&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint num_polygons&lt;br /&gt;
  for each polygon, p {&lt;br /&gt;
   uint polygon_addr // indexed into shield mesh face list?&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The shield mesh collision tree speeds up collision calculation by adding bounding boxes around each polygon in the shield mesh.  It works basically like a [[bsp_data_structure|BSP tree]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File Types]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=File:Pof_chunk.png&amp;diff=58958</id>
		<title>File:Pof chunk.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=File:Pof_chunk.png&amp;diff=58958"/>
		<updated>2019-12-06T01:12:57Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58957</id>
		<title>POF data structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58957"/>
		<updated>2019-12-06T01:10:23Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Basic file structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following information is copied from the Descent Developer&#039;s Network [http://web.archive.org/web/20010619182804/descent-freespace.com/ddn/specs/pof/ pof specs page].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
These files are used to hold the ship model data. The data for the ship is basically a BSP tree that doesn&#039;t split polygons across the planes (since we&#039;re using zbuffering) and the planes are created by halving the largest dimension of each bounding box recursively. Due to the vastness of some of our models, this recursively split structure allows our collision detection and dynamic lighting to do quick out&#039;s on the model. For example, to check if a vector interects the model, I check against the bounding box. If it hits, I then check each of the two boxes it is split into. Then I recursively check each subdivided box as long as the vector is still interesecting.&lt;br /&gt;
&lt;br /&gt;
We create the POF file by exporting a 3DS Max file with a special plugin tool to generate a &amp;quot;.P3D&amp;quot; file, which is essentially a 3d studio file only with texture uv&#039;s stored for each face vertex rather than for each vertex. We then run the .P3D file through an in-house Win32 program called &#039;BSPGEN&#039; which creates the POF file. Depending on the model size, BSPGEN takes a few minutes or so.&lt;br /&gt;
&lt;br /&gt;
Each ship is made up of a lot of subobjects where a subobject is a collection of polygons. For instance, each detail level of a hull of a ship is a subobject. A radar dish is a subobject. A piece of debris that the ship explodes into is a subobject. Each subobject can then have children subobjects. To draw the highest detail model of a ship, draw the subobject identified as detail level 0 and draw all it&#039;s children.&lt;br /&gt;
&lt;br /&gt;
This document was written by John Slagel from Volition Inc., with revisions and bugfixing from Garry Knudson. FreeSpace 2 additions were made by Dave Baranec (Volition Inc.), Garry Knudson and Francis &amp;quot;Pastel&amp;quot; Avila.&lt;br /&gt;
&lt;br /&gt;
[[POF_Order_FS2|POF block order list for retail FS2 models]]&lt;br /&gt;
&lt;br /&gt;
==Data types==&lt;br /&gt;
This uses standard Intel data types.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  (int) == 4 bytes, signed&lt;br /&gt;
  (uint) == 4 bytes, unsigned&lt;br /&gt;
  (short) == 2 bytes, signed&lt;br /&gt;
  (ushort) == 2 bytes, unsigned&lt;br /&gt;
  (char) == 1 byte, signed&lt;br /&gt;
  (ubyte) == 1 byte, unsigned&lt;br /&gt;
  (float) == 4 bytes, signed&lt;br /&gt;
  (vector) == 3 floats, 12 bytes total&lt;br /&gt;
  (string) == an int specifying length of string and char[length] for the string itself&lt;br /&gt;
  (note: it is NOT null-terminated)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic file structure==&lt;br /&gt;
The file format is a binary file using standard Intel data types. The header consists of a signature and the file version number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char[4] file_id   // must be &#039;PSPO&#039;&lt;br /&gt;
int version       // Major*100+Minor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
*PSPO stood for Parallax Software Polygon Object at one time. Conflict, Descent: FreeSpace shipped at POF version 20.14, so version would be equal to 2014 in most POF files (not all). FreeSpace 2 shipped at POF version 21.17, some files are 21.16.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*The rest of the file is a bunch of chunks. Each chunk is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;char[4] chunk_id  // see below for available chunk types&lt;br /&gt;
int length        // length of the chunk.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Contrary to BSP_Data structure, in pof data structure &amp;quot;Length&amp;quot; does not considers the first 8 bytes of the chunk (chunk id+length), so in order to go from the begining of the chunk to the next one you need to do lenght+8.&lt;br /&gt;
[[Media:pof_chunk]]&lt;br /&gt;
&lt;br /&gt;
==Chunk specs==&lt;br /&gt;
Here is a breakdown of each of the chunk types:&lt;br /&gt;
&lt;br /&gt;
*&#039;OHDR&#039; (FreeSpace 1) and &#039;HDR2&#039; (FreeSpace 2) - Object header info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector min_bounding         // min bounding box point&lt;br /&gt;
vector max_bounding         // max bounding box point&lt;br /&gt;
&lt;br /&gt;
int num_detaillevels        // number of detail levels&lt;br /&gt;
for each detail_level, i {&lt;br /&gt;
 int sobj_detailevels[i]    // subobject number for detail level I, 0 being highest.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num_debris              // number of debris pieces that model explodes into&lt;br /&gt;
for each debris piece, i&lt;br /&gt;
 int sobj_debris[i]         // subobject number for debris piece i&lt;br /&gt;
&lt;br /&gt;
#ifdef version1903orhigher&lt;br /&gt;
 float mass                 // see notes below&lt;br /&gt;
 vector mass_center         // center of mass&lt;br /&gt;
 float[3][3] moment_inertia // moment of inertia&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2014orhigher&lt;br /&gt;
 int num_cross_sections     // number of cross sections (used for exploding ship) (*)&lt;br /&gt;
 for each cross_section, i {&lt;br /&gt;
  float depth[i]&lt;br /&gt;
  float radius[i]&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2007orhigher&lt;br /&gt;
 int num_lights             // number of precalculated muzzle flash lights&lt;br /&gt;
 for each light {&lt;br /&gt;
  vector location&lt;br /&gt;
  int light_type            // type of light&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Notes:&lt;br /&gt;
&lt;br /&gt;
for version&amp;lt;2009, mass is a volume mass&lt;br /&gt;
for version&amp;gt;=2009, mass is an area mass&lt;br /&gt;
conversion: area_mass=4.65*(vol_mass^2/3); also scale moment_inertia by vol_mass/area_mass&lt;br /&gt;
(*) if there is no cross_section data, num_cross_sections is -1 instead of 0, as one would expect.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TXTR&#039; - A list of textures used on this ship. The order they appear here is the number that a face uses to reference a particular texture.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_textures&lt;br /&gt;
for each texture,i&lt;br /&gt;
 string tex_filename[i]    // texture filename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;PINF&#039; - Miscellaneous info about the POF file, command line, etc.&lt;br /&gt;
&lt;br /&gt;
Contains a block of NULL-terminated strings. Just read chunk size bytes and stuff it into a string.&lt;br /&gt;
&lt;br /&gt;
*&#039;PATH&#039; - Paths for docking and AI ships to follow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_paths&lt;br /&gt;
for each path, p {&lt;br /&gt;
 string name[p]             // name&lt;br /&gt;
 string parent[p]           // parent&#039;s name&lt;br /&gt;
 int num_verts[p]&lt;br /&gt;
 for each vert, v {&lt;br /&gt;
   vector pos[p,v]&lt;br /&gt;
   float radius[p,v]&lt;br /&gt;
   int num_turrets[p,v]&lt;br /&gt;
   for each turret, t {&lt;br /&gt;
    int sobj_number[p,v,t]  // subobject number&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SPCL&#039; - Data for special points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_special_points&lt;br /&gt;
for each special_point, p {&lt;br /&gt;
 string name[p]&lt;br /&gt;
 string properties[p]&lt;br /&gt;
 vector point[p]&lt;br /&gt;
 float radius[p]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SHLD&#039; - Data for the shield mesh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_vertices&lt;br /&gt;
for each vertex, v {&lt;br /&gt;
 vector position[v]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num faces&lt;br /&gt;
for each face, f {&lt;br /&gt;
 vector face_normal[f]&lt;br /&gt;
 int[3] face_vertices    // indexed into vertex list&lt;br /&gt;
 int[3] neighbors        // indexed into face list&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039; EYE&#039; - Data for eye points (Where pilot looks in 1st person views). Note the space in front of EYE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_eye_positions&lt;br /&gt;
for each eye_position, e {&lt;br /&gt;
 int sobj_number[e]      // subobject number this eye is attached to&lt;br /&gt;
 vector sobj_offset[e]   // offset from subobject&lt;br /&gt;
 vector normal[e]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;GPNT&#039; and &#039;MPNT&#039; - Gun and Missile firing points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_slots&lt;br /&gt;
for each slot, s {&lt;br /&gt;
 int num_guns[s]&lt;br /&gt;
 for each gun, g {&lt;br /&gt;
   vector point[g,s]&lt;br /&gt;
   vector norm[g,s]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;slot&amp;quot; is what you see in the loadout screen. Primaries have a max of 2 and secondaries of 3 for player-flyable ships.&lt;br /&gt;
&amp;quot;Guns&amp;quot; are the actual number of barrels and hence projectiles you&#039;ll get when you press the trigger. There is likely no practical max.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TGUN&#039; and &#039;TMIS&#039; - Turret Gun and Turret Missile firing points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_banks&lt;br /&gt;
&lt;br /&gt;
for each bank, b {&lt;br /&gt;
 int sobj_parent[b]       // parent subobject (the subobject with which this turret is associated) (*)&lt;br /&gt;
 int sobj_par_phys[b]     // physical parent subobject (the subobject to which the turret rotates) (*)&lt;br /&gt;
&lt;br /&gt;
 vector turret_normal[b]&lt;br /&gt;
 int num_firing_points[b]&lt;br /&gt;
 for each firing_point {&lt;br /&gt;
  vector position[b,f]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
For multipart turrets, sobj_parent is the &amp;quot;barrel&amp;quot; of a turret, and the firing points will be in this sobj&#039;s axial frame. sobj_par_phys is the &amp;quot;base&amp;quot; of a turret, which the barrel will rotate with.&lt;br /&gt;
For single-part turrets, sobj_parent == sobj_parent_phys.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;DOCK&#039; - Data for docking points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_docks&lt;br /&gt;
&lt;br /&gt;
for each dock, d {&lt;br /&gt;
 string properties[d]     // see notes below&lt;br /&gt;
 int num_spline_paths[d]&lt;br /&gt;
 for each spline_path, p {&lt;br /&gt;
  int path_number[d,p]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int num_points&lt;br /&gt;
 for each point, d {&lt;br /&gt;
  vector position&lt;br /&gt;
  vector normal&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Note: Properties… if $name= found, then this is name. If name is cargo then this is a cargo bay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;FUEL&#039; - Data for engine thruster glows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_thrusters&lt;br /&gt;
for each thruster,t {&lt;br /&gt;
 int num glows[t]&lt;br /&gt;
 &lt;br /&gt;
 #ifdef version2117orhigher // FreeSpace 2 change&lt;br /&gt;
  string properties&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 for each glow {&lt;br /&gt;
  vector pos[t,g]&lt;br /&gt;
  vector norm[t,g]   // used to tell if behind glow&lt;br /&gt;
  float radius[t,g]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SOBJ&#039; (FreeSpace 1) and &#039;OBJ2&#039; (FreeSpace 2) - Data for a subobject. Contains some info and a bunch of vertices and polygons in the form of a BSP tree or Octree depending on how you look at it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int submodel_number  // What submodel number this is.&lt;br /&gt;
&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector geometric_center&lt;br /&gt;
vector bounding_box_min_point&lt;br /&gt;
vector bounding_box_max_point&lt;br /&gt;
&lt;br /&gt;
string submodel_name&lt;br /&gt;
string properites&lt;br /&gt;
int movement_type&lt;br /&gt;
int movement_axis&lt;br /&gt;
&lt;br /&gt;
int reserved         // must be 0&lt;br /&gt;
int bsp_data_size    // number of bytes now following&lt;br /&gt;
char[bsp_data_size] bsp_data  // contains actual polygons, etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Note: bsp_data is explained [[bsp_data_structure|here]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;INSG&#039; - Squad logo/Insignia data chunk (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_insignias&lt;br /&gt;
for each insignia, i {&lt;br /&gt;
 int detail_level // ship detail level&lt;br /&gt;
 int num_faces&lt;br /&gt;
 int num_vertices&lt;br /&gt;
 for each vertice, j {&lt;br /&gt;
  vector vertex_position&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 vector offset // offset of the insignia in model coords&lt;br /&gt;
 for each face, j {&lt;br /&gt;
  for 0 to 2, k {&lt;br /&gt;
   int vertex_index // vertex index for this face&lt;br /&gt;
   float u_texture_coordinate&lt;br /&gt;
   float v_texture_coordinate&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;ACEN&#039; - Auto-Centering info (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector point // autocentering point for the entire model&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The autocentering point was basically just a little convenient extra data we stuck in models where the pivot point of the model wasn&#039;t at the center. Since we rotate ships in the tech room by rotating around the pivot point, it looked dumb when the colossus&#039; rear end was in the middle of the screen and it was spinning on it. So the autocenter point was just a point pretty much near the model we could use to push an extra matrix onto our transform stack and have it show up centered around it. The point itself is in model coordinates.&lt;br /&gt;
&lt;br /&gt;
*&#039;GLOW&#039; - Glowpoint info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_glowbanks&lt;br /&gt;
for each glowbank, g {&lt;br /&gt;
 int disp_time // displacement time for blinking (e.g. for Orion runway lights)&lt;br /&gt;
 int on_time&lt;br /&gt;
 int off_time&lt;br /&gt;
 int obj_parent // parent subobject number&lt;br /&gt;
 int LOD // Should be 0&lt;br /&gt;
 int type // Should also be 0&lt;br /&gt;
 int num_glowpoints // Number of glowpoints in this bank&lt;br /&gt;
 string properties // Texture name, no file path or extension, like: &amp;quot;$glow_texture=...&amp;quot;&lt;br /&gt;
 for each glowpoint, p {&lt;br /&gt;
  vector point // location vector&lt;br /&gt;
  vector norm // (0,0,0) is omnidirectional&lt;br /&gt;
  float radius&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SLDC&#039; - Shield mesh collision tree info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint tree_size&lt;br /&gt;
for each node, n {&lt;br /&gt;
 ubyte type // 0 = SPLIT, 1 = LEAF/polylist&lt;br /&gt;
 uint size&lt;br /&gt;
 if !type { // SPLIT&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint front_offset&lt;br /&gt;
  uint back_offset&lt;br /&gt;
 }&lt;br /&gt;
 else { // LEAF&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint num_polygons&lt;br /&gt;
  for each polygon, p {&lt;br /&gt;
   uint polygon_addr // indexed into shield mesh face list?&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The shield mesh collision tree speeds up collision calculation by adding bounding boxes around each polygon in the shield mesh.  It works basically like a [[bsp_data_structure|BSP tree]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File Types]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58956</id>
		<title>POF data structure</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=POF_data_structure&amp;diff=58956"/>
		<updated>2019-12-06T01:09:37Z</updated>

		<summary type="html">&lt;p&gt;ShivanSpS: /* Basic file structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following information is copied from the Descent Developer&#039;s Network [http://web.archive.org/web/20010619182804/descent-freespace.com/ddn/specs/pof/ pof specs page].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
These files are used to hold the ship model data. The data for the ship is basically a BSP tree that doesn&#039;t split polygons across the planes (since we&#039;re using zbuffering) and the planes are created by halving the largest dimension of each bounding box recursively. Due to the vastness of some of our models, this recursively split structure allows our collision detection and dynamic lighting to do quick out&#039;s on the model. For example, to check if a vector interects the model, I check against the bounding box. If it hits, I then check each of the two boxes it is split into. Then I recursively check each subdivided box as long as the vector is still interesecting.&lt;br /&gt;
&lt;br /&gt;
We create the POF file by exporting a 3DS Max file with a special plugin tool to generate a &amp;quot;.P3D&amp;quot; file, which is essentially a 3d studio file only with texture uv&#039;s stored for each face vertex rather than for each vertex. We then run the .P3D file through an in-house Win32 program called &#039;BSPGEN&#039; which creates the POF file. Depending on the model size, BSPGEN takes a few minutes or so.&lt;br /&gt;
&lt;br /&gt;
Each ship is made up of a lot of subobjects where a subobject is a collection of polygons. For instance, each detail level of a hull of a ship is a subobject. A radar dish is a subobject. A piece of debris that the ship explodes into is a subobject. Each subobject can then have children subobjects. To draw the highest detail model of a ship, draw the subobject identified as detail level 0 and draw all it&#039;s children.&lt;br /&gt;
&lt;br /&gt;
This document was written by John Slagel from Volition Inc., with revisions and bugfixing from Garry Knudson. FreeSpace 2 additions were made by Dave Baranec (Volition Inc.), Garry Knudson and Francis &amp;quot;Pastel&amp;quot; Avila.&lt;br /&gt;
&lt;br /&gt;
[[POF_Order_FS2|POF block order list for retail FS2 models]]&lt;br /&gt;
&lt;br /&gt;
==Data types==&lt;br /&gt;
This uses standard Intel data types.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  (int) == 4 bytes, signed&lt;br /&gt;
  (uint) == 4 bytes, unsigned&lt;br /&gt;
  (short) == 2 bytes, signed&lt;br /&gt;
  (ushort) == 2 bytes, unsigned&lt;br /&gt;
  (char) == 1 byte, signed&lt;br /&gt;
  (ubyte) == 1 byte, unsigned&lt;br /&gt;
  (float) == 4 bytes, signed&lt;br /&gt;
  (vector) == 3 floats, 12 bytes total&lt;br /&gt;
  (string) == an int specifying length of string and char[length] for the string itself&lt;br /&gt;
  (note: it is NOT null-terminated)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic file structure==&lt;br /&gt;
The file format is a binary file using standard Intel data types. The header consists of a signature and the file version number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
char[4] file_id   // must be &#039;PSPO&#039;&lt;br /&gt;
int version       // Major*100+Minor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
*PSPO stood for Parallax Software Polygon Object at one time. Conflict, Descent: FreeSpace shipped at POF version 20.14, so version would be equal to 2014 in most POF files (not all). FreeSpace 2 shipped at POF version 21.17, some files are 21.16.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*The rest of the file is a bunch of chunks. Each chunk is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;char[4] chunk_id  // see below for available chunk types&lt;br /&gt;
int length        // length of the chunk.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Contrary to BSP_Data structure, in pof data structure &amp;quot;Length&amp;quot; does not considers the first 8 bytes of the chunk (chunk id+length), so in order to go from the begining of the chunk to the next one you need to do lenght+8.&lt;br /&gt;
[[Media:https://i.imgur.com/oa4GLYB.png]]&lt;br /&gt;
&lt;br /&gt;
==Chunk specs==&lt;br /&gt;
Here is a breakdown of each of the chunk types:&lt;br /&gt;
&lt;br /&gt;
*&#039;OHDR&#039; (FreeSpace 1) and &#039;HDR2&#039; (FreeSpace 2) - Object header info&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int num_subobjects         // number of subobjects&lt;br /&gt;
 float max_radius           // maximum radius of entire ship&lt;br /&gt;
 int obj_flags              // object flags. Bit 1 = Textures contain tiling&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector min_bounding         // min bounding box point&lt;br /&gt;
vector max_bounding         // max bounding box point&lt;br /&gt;
&lt;br /&gt;
int num_detaillevels        // number of detail levels&lt;br /&gt;
for each detail_level, i {&lt;br /&gt;
 int sobj_detailevels[i]    // subobject number for detail level I, 0 being highest.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num_debris              // number of debris pieces that model explodes into&lt;br /&gt;
for each debris piece, i&lt;br /&gt;
 int sobj_debris[i]         // subobject number for debris piece i&lt;br /&gt;
&lt;br /&gt;
#ifdef version1903orhigher&lt;br /&gt;
 float mass                 // see notes below&lt;br /&gt;
 vector mass_center         // center of mass&lt;br /&gt;
 float[3][3] moment_inertia // moment of inertia&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2014orhigher&lt;br /&gt;
 int num_cross_sections     // number of cross sections (used for exploding ship) (*)&lt;br /&gt;
 for each cross_section, i {&lt;br /&gt;
  float depth[i]&lt;br /&gt;
  float radius[i]&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef version2007orhigher&lt;br /&gt;
 int num_lights             // number of precalculated muzzle flash lights&lt;br /&gt;
 for each light {&lt;br /&gt;
  vector location&lt;br /&gt;
  int light_type            // type of light&lt;br /&gt;
 }&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Notes:&lt;br /&gt;
&lt;br /&gt;
for version&amp;lt;2009, mass is a volume mass&lt;br /&gt;
for version&amp;gt;=2009, mass is an area mass&lt;br /&gt;
conversion: area_mass=4.65*(vol_mass^2/3); also scale moment_inertia by vol_mass/area_mass&lt;br /&gt;
(*) if there is no cross_section data, num_cross_sections is -1 instead of 0, as one would expect.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TXTR&#039; - A list of textures used on this ship. The order they appear here is the number that a face uses to reference a particular texture.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_textures&lt;br /&gt;
for each texture,i&lt;br /&gt;
 string tex_filename[i]    // texture filename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;PINF&#039; - Miscellaneous info about the POF file, command line, etc.&lt;br /&gt;
&lt;br /&gt;
Contains a block of NULL-terminated strings. Just read chunk size bytes and stuff it into a string.&lt;br /&gt;
&lt;br /&gt;
*&#039;PATH&#039; - Paths for docking and AI ships to follow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_paths&lt;br /&gt;
for each path, p {&lt;br /&gt;
 string name[p]             // name&lt;br /&gt;
 string parent[p]           // parent&#039;s name&lt;br /&gt;
 int num_verts[p]&lt;br /&gt;
 for each vert, v {&lt;br /&gt;
   vector pos[p,v]&lt;br /&gt;
   float radius[p,v]&lt;br /&gt;
   int num_turrets[p,v]&lt;br /&gt;
   for each turret, t {&lt;br /&gt;
    int sobj_number[p,v,t]  // subobject number&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SPCL&#039; - Data for special points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_special_points&lt;br /&gt;
for each special_point, p {&lt;br /&gt;
 string name[p]&lt;br /&gt;
 string properties[p]&lt;br /&gt;
 vector point[p]&lt;br /&gt;
 float radius[p]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SHLD&#039; - Data for the shield mesh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_vertices&lt;br /&gt;
for each vertex, v {&lt;br /&gt;
 vector position[v]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int num faces&lt;br /&gt;
for each face, f {&lt;br /&gt;
 vector face_normal[f]&lt;br /&gt;
 int[3] face_vertices    // indexed into vertex list&lt;br /&gt;
 int[3] neighbors        // indexed into face list&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039; EYE&#039; - Data for eye points (Where pilot looks in 1st person views). Note the space in front of EYE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_eye_positions&lt;br /&gt;
for each eye_position, e {&lt;br /&gt;
 int sobj_number[e]      // subobject number this eye is attached to&lt;br /&gt;
 vector sobj_offset[e]   // offset from subobject&lt;br /&gt;
 vector normal[e]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;GPNT&#039; and &#039;MPNT&#039; - Gun and Missile firing points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_slots&lt;br /&gt;
for each slot, s {&lt;br /&gt;
 int num_guns[s]&lt;br /&gt;
 for each gun, g {&lt;br /&gt;
   vector point[g,s]&lt;br /&gt;
   vector norm[g,s]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;slot&amp;quot; is what you see in the loadout screen. Primaries have a max of 2 and secondaries of 3 for player-flyable ships.&lt;br /&gt;
&amp;quot;Guns&amp;quot; are the actual number of barrels and hence projectiles you&#039;ll get when you press the trigger. There is likely no practical max.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;TGUN&#039; and &#039;TMIS&#039; - Turret Gun and Turret Missile firing points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_banks&lt;br /&gt;
&lt;br /&gt;
for each bank, b {&lt;br /&gt;
 int sobj_parent[b]       // parent subobject (the subobject with which this turret is associated) (*)&lt;br /&gt;
 int sobj_par_phys[b]     // physical parent subobject (the subobject to which the turret rotates) (*)&lt;br /&gt;
&lt;br /&gt;
 vector turret_normal[b]&lt;br /&gt;
 int num_firing_points[b]&lt;br /&gt;
 for each firing_point {&lt;br /&gt;
  vector position[b,f]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Notes:&lt;br /&gt;
&lt;br /&gt;
For multipart turrets, sobj_parent is the &amp;quot;barrel&amp;quot; of a turret, and the firing points will be in this sobj&#039;s axial frame. sobj_par_phys is the &amp;quot;base&amp;quot; of a turret, which the barrel will rotate with.&lt;br /&gt;
For single-part turrets, sobj_parent == sobj_parent_phys.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;DOCK&#039; - Data for docking points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_docks&lt;br /&gt;
&lt;br /&gt;
for each dock, d {&lt;br /&gt;
 string properties[d]     // see notes below&lt;br /&gt;
 int num_spline_paths[d]&lt;br /&gt;
 for each spline_path, p {&lt;br /&gt;
  int path_number[d,p]&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int num_points&lt;br /&gt;
 for each point, d {&lt;br /&gt;
  vector position&lt;br /&gt;
  vector normal&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Note: Properties… if $name= found, then this is name. If name is cargo then this is a cargo bay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;FUEL&#039; - Data for engine thruster glows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_thrusters&lt;br /&gt;
for each thruster,t {&lt;br /&gt;
 int num glows[t]&lt;br /&gt;
 &lt;br /&gt;
 #ifdef version2117orhigher // FreeSpace 2 change&lt;br /&gt;
  string properties&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 for each glow {&lt;br /&gt;
  vector pos[t,g]&lt;br /&gt;
  vector norm[t,g]   // used to tell if behind glow&lt;br /&gt;
  float radius[t,g]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SOBJ&#039; (FreeSpace 1) and &#039;OBJ2&#039; (FreeSpace 2) - Data for a subobject. Contains some info and a bunch of vertices and polygons in the form of a BSP tree or Octree depending on how you look at it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int submodel_number  // What submodel number this is.&lt;br /&gt;
&lt;br /&gt;
#ifdef version2116orhigher&lt;br /&gt;
 // FreeSpace 2&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
#else&lt;br /&gt;
 // FreeSpace 1&lt;br /&gt;
 int submodel_parent // What submodel is this model&#039;s parent. Equal to -1 if none.&lt;br /&gt;
 vector offset       // Offset to from parent object &amp;lt;- Added 09/10/98&lt;br /&gt;
 float radius        // radius of this subobject&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
vector geometric_center&lt;br /&gt;
vector bounding_box_min_point&lt;br /&gt;
vector bounding_box_max_point&lt;br /&gt;
&lt;br /&gt;
string submodel_name&lt;br /&gt;
string properites&lt;br /&gt;
int movement_type&lt;br /&gt;
int movement_axis&lt;br /&gt;
&lt;br /&gt;
int reserved         // must be 0&lt;br /&gt;
int bsp_data_size    // number of bytes now following&lt;br /&gt;
char[bsp_data_size] bsp_data  // contains actual polygons, etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Note: bsp_data is explained [[bsp_data_structure|here]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;INSG&#039; - Squad logo/Insignia data chunk (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_insignias&lt;br /&gt;
for each insignia, i {&lt;br /&gt;
 int detail_level // ship detail level&lt;br /&gt;
 int num_faces&lt;br /&gt;
 int num_vertices&lt;br /&gt;
 for each vertice, j {&lt;br /&gt;
  vector vertex_position&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 vector offset // offset of the insignia in model coords&lt;br /&gt;
 for each face, j {&lt;br /&gt;
  for 0 to 2, k {&lt;br /&gt;
   int vertex_index // vertex index for this face&lt;br /&gt;
   float u_texture_coordinate&lt;br /&gt;
   float v_texture_coordinate&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*&#039;ACEN&#039; - Auto-Centering info (FreeSpace 2 only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector point // autocentering point for the entire model&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The autocentering point was basically just a little convenient extra data we stuck in models where the pivot point of the model wasn&#039;t at the center. Since we rotate ships in the tech room by rotating around the pivot point, it looked dumb when the colossus&#039; rear end was in the middle of the screen and it was spinning on it. So the autocenter point was just a point pretty much near the model we could use to push an extra matrix onto our transform stack and have it show up centered around it. The point itself is in model coordinates.&lt;br /&gt;
&lt;br /&gt;
*&#039;GLOW&#039; - Glowpoint info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int num_glowbanks&lt;br /&gt;
for each glowbank, g {&lt;br /&gt;
 int disp_time // displacement time for blinking (e.g. for Orion runway lights)&lt;br /&gt;
 int on_time&lt;br /&gt;
 int off_time&lt;br /&gt;
 int obj_parent // parent subobject number&lt;br /&gt;
 int LOD // Should be 0&lt;br /&gt;
 int type // Should also be 0&lt;br /&gt;
 int num_glowpoints // Number of glowpoints in this bank&lt;br /&gt;
 string properties // Texture name, no file path or extension, like: &amp;quot;$glow_texture=...&amp;quot;&lt;br /&gt;
 for each glowpoint, p {&lt;br /&gt;
  vector point // location vector&lt;br /&gt;
  vector norm // (0,0,0) is omnidirectional&lt;br /&gt;
  float radius&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;SLDC&#039; - Shield mesh collision tree info (FS2_Open only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint tree_size&lt;br /&gt;
for each node, n {&lt;br /&gt;
 ubyte type // 0 = SPLIT, 1 = LEAF/polylist&lt;br /&gt;
 uint size&lt;br /&gt;
 if !type { // SPLIT&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint front_offset&lt;br /&gt;
  uint back_offset&lt;br /&gt;
 }&lt;br /&gt;
 else { // LEAF&lt;br /&gt;
  vector bound_min&lt;br /&gt;
  vector bound_max&lt;br /&gt;
  uint num_polygons&lt;br /&gt;
  for each polygon, p {&lt;br /&gt;
   uint polygon_addr // indexed into shield mesh face list?&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** The shield mesh collision tree speeds up collision calculation by adding bounding boxes around each polygon in the shield mesh.  It works basically like a [[bsp_data_structure|BSP tree]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File Types]]&lt;/div&gt;</summary>
		<author><name>ShivanSpS</name></author>
	</entry>
</feed>