Descent Freespace

From XentaxWiki
Jump to: navigation, search

VP


Format Specifications

char {4}     - Header (VPVP)
uint32 {4}   - Version (2)
uint32 {4}   - Directory Offset
uint32 {4}   - Number Of Files

byte {X}     - File Data

// Directory

// for each file
uint32 {4}   - File Offset
uint32 {4}   - File Length (0=directory, #=file)
char {32}    - Filename (null)
uint32 {4}   - Type Code? (0=directory)


MultiEx BMS Script

IDString 0 VPVP ;
Get DUMMYL Long 0 ;
Get TAILOFF Long 0 ;
Get FILECNTL Long 0 ;
SavePos FILESTART 0 ;
GoTo TAILOFF 0 ;
Do ;
Get D Long 0 ;
Get FILESIZE Long 0 ;
Get FILENAME String 0 ;
Set FILEOFF Long FILESTART ;
Math TAILOFF += 44 ;
GoTo TAILOFF 0 ;
Math FILESTART += FILESIZE ;
Log FILENAME FILEOFF FILESIZE 0 0 ;
Math EXTRCNT += 1 ;
While EXTRCNT <> FILECNTL ;

Notes and Comments

  • Directories are stored as file entries with a length of 0. Directory names will always build up like as normal file tree. For example, if the directory name is valid, it is assumed that the directory is inside the current directory, but a directory with name ".." means go back up to a previous directory. Using this method, the files and their directories can be built up level by level.

Compatible Programs


Other Games

These games also use this file format

  • Conflict Freespace *.vp
  • Descent Freespace: The Great War *.vp
  • Freespace 2 *.vp