SpellForce PAK: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Ikskoks
m (Ikskoks moved page Spellforce to Spellforce PAK)
imported>Ikskoks
 
(33 intermediate revisions by the same user not shown)
Line 6: Line 6:


* ''' Format Type ''':    Archive <br>  
* ''' Format Type ''':    Archive <br>  
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br>  
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br>
* ''' Signature ''':    MASSIVE PAKFILE V 4.0 <br> 




=== Format Specifications ===  
=== Format Specifications ===  


<tt><b>
<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:800px; overflow:auto;">
uint32 {4}&nbsp;&nbsp; - Version <font color="purple">(4)</font> <br>
<pre>
char {22}&nbsp;&nbsp;&nbsp; - Header <font color="purple">(MASSIVE PAKFILE V 4.0 + <font color="purple">(bytes)</font>13,10)</font> <br>
// SpellForce 1 (PC) PAK file format
byte {44}&nbsp;&nbsp;&nbsp; - <font color="red"> '' Unknown '' </font> <br>
uint32 {4}&nbsp;&nbsp; - <font color="red"> '' Unknown '' </font> <br>
uint32 {4}&nbsp;&nbsp; - Number Of Files <br>
uint32 {4}&nbsp;&nbsp; - <font color="red"> '' Unknown '' </font> <br>
uint32 {4}&nbsp;&nbsp; - First File Offset <br>
uint32 {4}&nbsp;&nbsp; - Archive Length <br>
<br>
<font color="blue"> ''' // for each file ''' </font> <br>
: uint32 {4}&nbsp;&nbsp; - File Length <br>
: uint32 {4}&nbsp;&nbsp; - Data Offset <font color="darkgreen">[+firstFileOffset]</font> <br>
: uint32 {4}&nbsp;&nbsp; - Filename Offset <font color="darkgreen">[+94 + numFiles*16]</font> <br>
: uint32 {4}&nbsp;&nbsp; - <font color="red"> '' Unknown '' </font> <br>  
<br>
<font color="blue"> ''' // for each file ''' </font> <br>
: char {X}&nbsp;&nbsp;&nbsp;&nbsp; - Filename <font color="purple">(reversed)</font> <br>
: byte {1}&nbsp;&nbsp;&nbsp;&nbsp; - null Filename Terminator <br>
<br>
byte {X}&nbsp;&nbsp;&nbsp;&nbsp; - File Data <br>
<br>
</b></tt>


=== MultiEx BMS Script ===
// little endian


Not written yet<br><br>
 
// header (92 bytes in total)
4 bytes (uint32) - version number  // 4
24 bytes (char) - signature  // "MASSIVE PAKFILE V 4.0\r\n\0"
48 bytes (12 * uint32) - unknown values
4 bytes (uint32) - number of files
4 bytes (uint32) - root index
4 bytes (uint32) - data start offset
4 bytes (uint32) - archive size
 
 
 
// directory  (16 bytes per entry)
number_of_files *
{
  4 bytes (uint32) - file size
  4 bytes (uint32) - file offset (relative to data_start_offset)
  4 bytes (uint32) - filename offset (relative to name_list_offset_start)
  4 bytes (uint32) - directory offset (relative to name_list_offset_start)
}
 
 
 
// name list
2 bytes (uint16) - name list hash?
number_of_entries *
{
  x bytes (char) - filename or directory name  // all strings are reversed
  1 byte (uint8) - null terminator
}
 
 
// data
number_of_files *
{
  x bytes - file data
{
 
 
x bytes - padding
</pre>
</div>
 
=== Games ===
List of games using this format:
 
* SpellForce: The Order of Dawn (PC) (*.PAK)
* SpellForce: The Breath of Winter (PC) (*.PAK)
* SpellForce: Shadow of The Phoenix (PC) (*.PAK)
 
=== QuickBMS Script ===
 
* [https://github.com/bartlomiejduda/Tools/blob/master/NEW%20Tools/SpellForce/SpellForce_PAK_script.bms SpellForce_PAK_script.bms]


=== Compatible Programs ===  
=== Compatible Programs ===  


* Dragon Unpacker
* [[Game Extractor|Game Extractor]]<br>
* [[Game Extractor|Game Extractor]]<br>
* Game Archive UnPacker (GAUP plugin)
* [https://forum.xentax.com/download/file.php?id=14707 SpellForce RE Tool]
=== See Also ===
* [https://github.com/wattostudios/GameExtractor/blob/master/src/org/watto/ge/plugin/archive/Plugin_PAK_MASSIVE.java Plugin_PAK_MASSIVE.java] (from Game Extractor source code)
<br><br>




[[Category:Complete Almost Done|SpellForce PAK]]
[[Category:Platform PC|SpellForce PAK]]
[[Category:CE None|SpellForce PAK]]
[[Category:Format_Archive | Type: Archive]]
[[Category:Extension_pak | Extension: pak]]
[[Category:File Format]]
[[Category:File Format]]

Latest revision as of 20:03, 27 October 2022

Choose archive extension:

PAK

  • Format Type : Archive
  • Endian Order : Little Endian
  • Signature : MASSIVE PAKFILE V 4.0


Format Specifications

// SpellForce 1 (PC) PAK file format

// little endian


// header (92 bytes in total)
4 bytes (uint32) - version number  // 4
24 bytes (char) - signature  // "MASSIVE PAKFILE V 4.0\r\n\0"
48 bytes (12 * uint32) - unknown values
4 bytes (uint32) - number of files
4 bytes (uint32) - root index
4 bytes (uint32) - data start offset
4 bytes (uint32) - archive size



// directory  (16 bytes per entry)
number_of_files *
{
   4 bytes (uint32) - file size
   4 bytes (uint32) - file offset (relative to data_start_offset)
   4 bytes (uint32) - filename offset (relative to name_list_offset_start)
   4 bytes (uint32) - directory offset (relative to name_list_offset_start)
}



// name list
2 bytes (uint16) - name list hash?
number_of_entries *
{
   x bytes (char) - filename or directory name  // all strings are reversed
   1 byte (uint8) - null terminator
}


// data
number_of_files *
{
   x bytes - file data
{


x bytes - padding

Games

List of games using this format:

  • SpellForce: The Order of Dawn (PC) (*.PAK)
  • SpellForce: The Breath of Winter (PC) (*.PAK)
  • SpellForce: Shadow of The Phoenix (PC) (*.PAK)

QuickBMS Script

Compatible Programs

See Also