Hard Light Productions Forums
General FreeSpace => FreeSpace Discussion => Topic started by: Darkhill on March 20, 2004, 01:05:20 pm
-
Does anybody have the *complete* specs to Freespace 2 pilots? Not the generalized one from the developer network. Want to do a viewer/editor and it would be nice to know where all the medals/MP kills/etc are without going through the hassle of a hex editor. If there is already a viewer/editor out there that would work just as well. The viewer that comes with DMTOOLs gives me a error for any pilot I give it.
-
You're trying it with FS2_Open pilots aren't you? It doesn't like them but it works fine with standard ones.
-
Yeah I am using the FS2_Open pilots. And actually I don't really need the specs all I have to do is look them up in the code.
-
//First the type definition of a string in Volition's code
typedef struct STRING
{
int len;
char text[len];
}
//Then some constants
#define PLRVERSION_FREESPACE1 100 //64 hex
#define PLRVERSION_FREESPACE2 140 //8C hex
//------------------------------------------------------------------
//Now to the file format itself
char signature[4]; // "FSPF" = FreeSpace Player File
int version; // FreeSpace 1: $64/100 - FreeSpace 2: $8C/140
if (version==PLRVERSION_FREESPACE1)
{
int unknown1;
short mainhall; //FS1: 0=Galatea, 1=Bastion
STRING pilot_pic;
STRING current_campaign;
STRING ship_name;
BYTE unknown5;
short DataBlock1[210];
BYTE DataBlock2[113];
int num_lastplayedmissions;
STRING lastplayedmission[num_missions];
int score;
int unknown6;
int assists;
int DataBlock3[16]; //unknown
int num_ship_destroyed_entries;
int ship_destroyed_entry[num_ship_destroyed_entries];
}
if (version==PLRVERSION_FREESPACE2)
{
int unknown1;
short mainhall; //FS2: 0=Aquitaine (Terran), 1=Psamtik (Vasudan)
int unknown3;
STRING pilot_pic;
STRING squad_name;
STRING squad_pic;
int unknown4;
STRING ship_name;
BYTE unknown5;
short DataBlock1[216];
BYTE DataBlock2[1177];
int num_lastplayedmissions;
STRING lastplayedmission[num_missions];
int score;
int unknown6;
int assists;
int DataBlock3[18]; //unknown
int num_ship_destroyed_entries;
short ship_destroyed_entry[num_ship_destroyed_entries];
}
//In both cases now the interesting data comes
int unknown7;
int num_kills;
int pri_shots;
int sec_shots;
int pri_hits;
int sec_hits;
int pri_friendly_hits;
int sec_friendly_hits;
//What now follows is 27 more ints and lots of other unknown and rather uninteresting information
...
-
Thats what I wasn't looking for. I was looking for *everything* like medals awarded, rank, etc. Stuff so I could do a complete pilot editor since the FS2 one doesn't like FS2 Open pilots.