Gamedev:Archives: Difference between revisions

From Spring
Jump to navigationJump to search
Gnome (talk | contribs)
m sidepics
Abma (talk | contribs)
wikify
Line 8: Line 8:
An interesting twist is that map archivse can be placed into the /maps/ folder and contains another /maps/ folder inside the archive.
An interesting twist is that map archivse can be placed into the /maps/ folder and contains another /maps/ folder inside the archive.


<table width="75%" border="1">
 
  <tr>
{|
    <th width="5%" bgcolor="#C0C0C0"><h4>Read Order</h4></th>
|-
    <th width="10%" bgcolor="#C0C0C0"><h4>File Extension</h4></th>
|Read Order
    <th width="10%" bgcolor="#C0C0C0"><h4>Compression Method</h4></th>
|File Extension
    <th width="75%" bgcolor="#C0C0C0"><h4>Description</h4></th>
|Compression Method
  </tr>
|Description
  <tr>
|-
    <td width="5%"><h4>1</h4></td>
|1
    <td width="10%" valign="top"><h4><b>SD7</b></h4></td>
|<b>SD7</b>
    <td width="10%"><h4>Non-Solid 7zip</h4></td>
|Non-Solid 7zip
    <td width="75%" valign="top">A 7zip file with the extension changed to .SD7. These files have the same structure as an HAPI file, they are just compressed in a different manner. 7zip compressed archives generally have the highest compression (and therefore lowest filesizes). Files of this type are read first, so any filetypes encountered after .SD7 with the same data will take priority. For example, if you have ARMCOM.FBI in an SD7 file, and a modified version of ARMCOM.FBI in a CCX file, the CCX version will be used.</td>
|A 7zip file with the extension changed to .SD7. These files have the same structure as an HAPI file, they are just compressed in a different manner. 7zip compressed archives generally have the highest compression (and therefore lowest filesizes). Files of this type are read first, so any filetypes encountered after .SD7 with the same data will take priority. For example, if you have ARMCOM.FBI in an SD7 file, and a modified version of ARMCOM.FBI in a CCX file, the CCX version will be used.
  </tr>
|-
  <tr>
|2
    <td width="5%"><h4>2</h4></td>
|<b>SDZ</b>
    <td width="10%" valign="top"><h4><b>SDZ</b></h4></td>
|ZLIB ZIP
    <td width="10%"><h4>ZLIB ZIP</h4></td>
|A zlib ZIP file with the extension changed to .SDZ. These files have the same structure as an HAPI file, they are just compressed in a different manner. Maps and mods alike can be stored in these files. These are read second.
    <td width="75%" valign="top">A zlib ZIP file with the extension changed to .SDZ. These files have the same structure as an HAPI file, they are just compressed in a different manner. Maps and mods alike can be stored in these files. These are read second.</td>
|-
  </tr>
|3
  <tr>
|<b>HPI</b>
    <td width="5%"><h4>3</h4></td>
|HAPI
    <td width="10%" valign="top"><h4><b>HPI</b></h4></td>
|One of the HAPI file format extensions. These are read third.
    <td width="10%"><h4>HAPI</h4></td>
|-
    <td width="75%" valign="top">One of the HAPI file format extensions. These are read third.</td>
|4
  </tr>
|<b>UFO</b>
  <tr>
|HAPI
    <td width="5%"><h4>4</h4></td>
|Another HAPI file extension. Fourth in line of being read.
    <td width="10%" valign="top"><h4><b>UFO</b></h4></td>
|-
    <td width="10%"><h4>HAPI</h4></td>
|5
    <td width="75%" valign="top">Another HAPI file extension. Fourth in line of being read.</td>
|<b>CCX</b>
  </tr>
|HAPI
  <tr>
|Yet another HAPI file. These are fifth in the chain of being read.
    <td width="5%"><h4>5</h4></td>
|-
    <td width="10%" valign="top"><h4><b>CCX</b></h4></td>
|6
    <td width="10%"><h4>HAPI</h4></td>
|<b>GP3</b>
    <td width="75%" valign="top">Yet another HAPI file. These are fifth in the chain of being read.
|HAPI
    </td>
|The sixth in the chain of files being read.
  </tr>
|-
  <tr>
|7
    <td width="5%"><h4>6</h4></td>
|<b>SWX</b>
    <td width="10%" valign="top"><h4><b>GP3</b></h4></td>
|HAPI
    <td width="10%"><h4>HAPI</h4></td>
|The seventh in the chain of command of files. This extension was originally used by the Star Wars Total Annihilation mod, but Spring doesn't care whether or not it's actually used for SWTA. It is an HAPI file.
    <td width="75%" valign="top">The sixth in the chain of files being read.</td>
|-
  </tr>
|8
  <tr>
|<b>GP4</b>
    <td width="5%"><h4>7</h4></td>
|HAPI
    <td width="10%" valign="top"><h4><b>SWX</b></h4></td>
|The eighth filetype read. Any data in a .GP4 file will override any other compressed data in any other files. This is also an HAPI file.
    <td width="10%"><h4>HAPI</h4></td>
|}
    <td width="75%" valign="top">The seventh in the chain of command of files. This extension was originally used by the Star Wars Total Annihilation mod, but Spring doesn't care whether or not it's actually used for SWTA. It is an HAPI file.</td>
  </tr>
  <tr>
    <td width="5%"><h4>8</h4></td>
    <td width="10%" valign="top"><h4><b>GP4</b></h4></td>
    <td width="10%"><h4>HAPI</h4></td>
    <td width="75%" valign="top">The eighth filetype read. Any data in a .GP4 file will override any other compressed data in any other files. This is also an HAPI file.</td>
  </tr>
</table>


The best tools to use to view the contents of a compressed Spring file, and
The best tools to use to view the contents of a compressed Spring file, and
Line 78: Line 69:
There are many other utilities that can also serve the same purpose. Peruse [http://www.fileuniverse.com FileUniverse] if for some reason the tools listed here don't suit you.
There are many other utilities that can also serve the same purpose. Peruse [http://www.fileuniverse.com FileUniverse] if for some reason the tools listed here don't suit you.


<table width="75%" border="1">
{|
  <tr>
|-
    <th width="174" colspan="2" bgcolor="#C0C0C0"><h4>Subdirectory</h4></th>
|Subdirectory|
    <th width="140" valign="top" bgcolor="#C0C0C0"><h4>File Types</h4></th>
|File Types|
    <th width="442" bgcolor="#C0C0C0"><h4>Description</h4></th>
|Description|
  </tr>
|-
  <tr>
|<strong>anims</strong>
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>anims</strong></h4></td>
|[[Mod_Development:Cursors]]
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
|Cursors
    [[Mod_Development:Cursors]]
|-
    </td>
|<strong>download</strong>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Cursors</td>
|[[Units:Download_TDF]]
  </tr>
|Information to assign a unit to a location on a given build menu.
  <tr>
|-
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>download</strong></h4></td>
|<strong>features</strong>
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
|
    [[Units:Download_TDF]]
|Contains information about miscellaneous features, such as corpses, trees, scars, etc., that may or may not be specific to particular maps or map types.&nbsp;  
    </td>
|-
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Information to assign a unit to a location on a given build menu.</td>
|<strong>\corpses</strong>
  </tr>
|TDF
  <tr>
|Information about wreckage left behind when a unit dies.
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>features</strong></h4></td>
|-
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top"></td>
|<strong>\allworlds</strong>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Contains information about miscellaneous features, such as corpses, trees, scars, etc., that may or may not be specific to particular maps or map types.&nbsp; </td>
|TDF
  </tr>
|Information about features (such as trees, scars, etc.) for specific world maps.Other subdirectories may exist alongside &quot;allworlds&quot;, such as &quot;acid&quot;, &quot;crystal&quot;, &quot;green&quot;, etc.
  <tr>
|-
    <td width="82" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>\</strong></h4></td>
|<strong>gamedata</strong>
    <td width="86" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>corpses</strong></h4></td>
|[[Mod_Development:Gamedata]]
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
|General information, such as sound assignments, can-build information, and other such data.
    TDF
|-
    </td>
|<strong>guis</strong>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Information about wreckage left behind when a unit dies.</td>
|GUI
  </tr>
|Alternative build tree definition method
  <tr>
|-
    <td width="82" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>\</strong></h4></td>
|<strong>objects3d</strong>
    <td width="86" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>allworlds</strong></h4></td>
|3DO
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
|3D object definitions for units, unit corpses.
    TDF
|-
    </td>
|<strong>maps</strong>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Information about features (such as trees, scars, etc.) for specific world maps.Other subdirectories may exist alongside &quot;allworlds&quot;, such as &quot;acid&quot;, &quot;crystal&quot;, &quot;green&quot;, etc.</td>
|SMD
  </tr>
|Schema, starting points, and other information pertaining to a particular map.
 
|-
  <tr>
|SMF
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>gamedata</strong></h4></td>
|Map layout, heights, and features information.
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
|-
    [[Mod_Development:Gamedata]]
|<strong>scripts</strong>
    </td>
|BOS
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">General information, such as sound assignments, can-build information, and other such data.</td>
|Text description/subroutines that describe how a unit moves, animates, etc.
  </tr>
|-
  <tr>
|COB
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>guis</strong></h4></td>
|A compiled version of the .BOS file.
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
|-
    GUI
|<strong>sidepics</strong>
    </td>
|BMP
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Alternative build tree definition method</td>
|The faction icons which display in the multiplayer lobby. See [[Mod Development:Sidepics]].
  </tr>
|-
 
|<strong>sounds</strong>
  <tr>
|WAV
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>objects3d</strong></h4></td>
|Sounds.
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
|-
    3DO
|<strong>unitpics</strong>
    </td>
|[[Units:Buildpics]]
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">3D object definitions for units, unit corpses.</td>
|&quot;Large&quot; (96x96) color pictures of units.
  </tr>
|-
  <tr>
|<strong>unittextures</strong>
    <td colspan="2" width="174" valign="top" rowspan="2" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>maps</strong></h4></td>
|DDS and TGA (Maybe BMP)
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
|Textures for S3O models.
    SMD
|-
    </td>
|<strong>\tatex</strong>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Schema, starting points, and other information pertaining to a particular map.</td>
|BMP (also DDS or TGA)<br />[[Units:Textures]]
  </tr>
|Textures for 3DO models(buildings, kbots, vehicles, etc.)
  <tr>
|-
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
|<strong>units</strong>
    SMF
|[[Units:FBI]]
    </td>
|General properties of units.
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Map layout, heights, and features information.</td>
|-
  </tr>
|<strong>weapons</strong>
 
|TDF
  <tr>
|Contains the definition and properties of particular weapons that are used throughout the game.
    <td colspan="2" width="174" valign="top" rowspan="2" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>scripts</strong></h4></td>
|}
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
    BOS
    </td>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Text description/subroutines that describe how a unit moves, animates, etc.</td>
  </tr>
  <tr>
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
    COB
    </td>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">A compiled version of the .BOS file.</td>
  </tr>
 
  <tr>
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>sidepics</strong></h4></td>
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
    BMP
    </td>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">The faction icons which display in the multiplayer lobby. See [[Mod Development:Sidepics]].</td>
  </tr>
 
  <tr>
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>sounds</strong></h4></td>
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
    WAV
    </td>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Sounds.</td>
  </tr>
 
  <tr>
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>unitpics</strong></h4></td>
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
    [[Units:Buildpics]]
    </td>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">&quot;Large&quot; (96x96) color pictures of units.</td>
  </tr>
 
  <tr>
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>unittextures</strong></h4></td>
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
    DDS and TGA (Maybe BMP)
    </td>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Textures for S3O models.</td>
  </tr>
  <tr>
    <td width="82" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>\</strong></h4></td>
    <td width="86" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>tatex</strong></h4></td>
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
    BMP (also DDS or TGA)<br />
    [[Units:Textures]]
    </td>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Textures for 3DO models(buildings, kbots, vehicles, etc.)</td>
  </tr>
 
  <tr>
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>units</strong></h4></td>
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
    [[Units:FBI]]
    </td>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">General properties of units.</td>
  </tr>
  <tr>
    <td colspan="2" width="174" valign="top" bordercolor="#000000" bordercolorlight="#808080"><h4><strong>weapons</strong></h4></td>
    <td width="140" bordercolor="#000000" bordercolorlight="#808080" valign="top">
    TDF
    </td>
    <td width="442" valign="top" bordercolor="#000000" bordercolorlight="#808080">Contains the definition and properties of particular weapons that are used throughout the game.</td>
  </tr>
</table>


[[Category:Mod development]]
[[Category:Mod development]]

Revision as of 12:58, 30 November 2010

The first step in understanding how Spring is put together is to understand where the filetypes came from and how the files are organized, and what all the different files do. In Spring, there are several formats you can use, including relic supported TA formats and standards such as zlib and 7zip.

In Total Annihilation, all files were compressed with a format known as HAPI. Files of this format included .HPI, .UFO, .CCX, and .GP3. For all practical purposes, you can think of the HPI file like their own home-grown ZIP file, containing its own directory structure and groups of files. All HAPI files are compressed in the same way, the only difference is the extension used.

Spring also supports reading from zlib zip and non-solid 7zip files. The filenames for these compression types must be .SDZ for zlib and .SD7 for 7zip respectively. They are standard files, just with different extensions for Spring. Here's a list of all filetypes supported by Spring; a higher read order means the contents of a file of that extension will take priority over files of a lower read order.

An interesting twist is that map archivse can be placed into the /maps/ folder and contains another /maps/ folder inside the archive.


Read Order File Extension Compression Method Description
1 SD7 Non-Solid 7zip A 7zip file with the extension changed to .SD7. These files have the same structure as an HAPI file, they are just compressed in a different manner. 7zip compressed archives generally have the highest compression (and therefore lowest filesizes). Files of this type are read first, so any filetypes encountered after .SD7 with the same data will take priority. For example, if you have ARMCOM.FBI in an SD7 file, and a modified version of ARMCOM.FBI in a CCX file, the CCX version will be used.
2 SDZ ZLIB ZIP A zlib ZIP file with the extension changed to .SDZ. These files have the same structure as an HAPI file, they are just compressed in a different manner. Maps and mods alike can be stored in these files. These are read second.
3 HPI HAPI One of the HAPI file format extensions. These are read third.
4 UFO HAPI Another HAPI file extension. Fourth in line of being read.
5 CCX HAPI Yet another HAPI file. These are fifth in the chain of being read.
6 GP3 HAPI The sixth in the chain of files being read.
7 SWX HAPI The seventh in the chain of command of files. This extension was originally used by the Star Wars Total Annihilation mod, but Spring doesn't care whether or not it's actually used for SWTA. It is an HAPI file.
8 GP4 HAPI The eighth filetype read. Any data in a .GP4 file will override any other compressed data in any other files. This is also an HAPI file.

The best tools to use to view the contents of a compressed Spring file, and to pack and unpack the contents of such a file are:

  • HPIView to view, browse, and extract HAPI files.
  • HPIPack to pack HAPI files.
  • WinRAR to view, browse, extract, and pack SDZ files, or to browse SD7 files.
  • 7zip to view, browse, extract, and pack SD7 files.
  • HPIEdit to view, extract and pack HPI, SDZ or SD7 files.
  • HPI Manager to view extract and pack HPI files aswell.

There are many other utilities that can also serve the same purpose. Peruse FileUniverse if for some reason the tools listed here don't suit you.

anims Mod_Development:Cursors Cursors
download Units:Download_TDF Information to assign a unit to a location on a given build menu.
features Contains information about miscellaneous features, such as corpses, trees, scars, etc., that may or may not be specific to particular maps or map types. 
\corpses TDF Information about wreckage left behind when a unit dies.
\allworlds TDF Information about features (such as trees, scars, etc.) for specific world maps.Other subdirectories may exist alongside "allworlds", such as "acid", "crystal", "green", etc.
gamedata Mod_Development:Gamedata General information, such as sound assignments, can-build information, and other such data.
guis GUI Alternative build tree definition method
objects3d 3DO 3D object definitions for units, unit corpses.
maps SMD Schema, starting points, and other information pertaining to a particular map.
SMF Map layout, heights, and features information.
scripts BOS Text description/subroutines that describe how a unit moves, animates, etc.
COB A compiled version of the .BOS file.
sidepics BMP The faction icons which display in the multiplayer lobby. See Mod Development:Sidepics.
sounds WAV Sounds.
unitpics Units:Buildpics "Large" (96x96) color pictures of units.
unittextures DDS and TGA (Maybe BMP) Textures for S3O models.
\tatex BMP (also DDS or TGA)
Units:Textures
Textures for 3DO models(buildings, kbots, vehicles, etc.)
units Units:FBI General properties of units.
weapons TDF Contains the definition and properties of particular weapons that are used throughout the game.