pixellegolas wrote:this might be a stupid question but what files will come out? Any 3d files i can use? Like .3ds or .obj?
If you want to mod maps, scripts, models, textures, sounds, music, etc, you need to extract the contents of the PAK files (no need to repack them, if they are in the right path, the game will use them). Take a look there:
viewtopic.php?f=15&t=1902
From gamedata.cff you get a bunch of index files that essentially make up the items/spells/buildings/units/heroes/NPCs (and generally all objects). I am working on decrypting them, though it is a slow process. If you want to edit items and other things, you need to mess with the chunks in gamedata.cff
From the localization files (such as English.cff) you get a bunch of string tables. Some are simple unicode strings, some are pairs of unicode and UTF8 strings, and some are complex tables. If you want to translate the game to another language, you will need to mess with these files because they include all strings from the game...
Here are some templates that I found out the formats for (they might not be correct, but they do work):
1. This applies to most files (see list of flie IDs inside):
Code: Select all
//--------------------------------------
//--- 010 Editor v3.0.3 Binary Template
//
// File: uncompressed data chunks of CFF files in Spellforce 2.
// Appropriate files IDs in base\English.cff and addon1\English.cff:
// 9018 (1/1)
// 9035 (1/1)
// 9036 (1/1)
// 9037 (1/1)
// 9039 (1/1)
// 9040 (1/1)
// 9041 (1/1)
// 9042 (1/1) (empty in \base and \addon1)
// 9044 (1/1)
// 9045 (1/1)
// 9046 (1/1)
// 9047 (1/1)
// 9053 (1/1)
// 9055 (1/1) (empty in \base)
// 9057 (1/1) (empty in \base)
// Author: Csimbi
// Revision: 1.0.0
// Purpose: Game hacking
//--------------------------------------
struct FILE
{
struct HEADER
{
uint32 RecordCount;
} header;
local int i=0;
local char bMulti=0;
if(header.RecordCount>0) do
{
struct RECORD
{
uint16 ItemID; // See base\script\gds\definitions\gdsdbexport.lua
uint16 Unknown1;
uint16 Unknown2;
if(Unknown2==0)
{
uint16 Unknown3;
bMulti=0;
}
else
{
FSkip(-sizeof(uint16));
bMulti=1;
}
uint32 StringLen;
if(StringLen>0) char String [StringLen*2];
if(bMulti==1)
{
uint32 StringLen2;
if(StringLen2>0) char String2 [StringLen2*2];
}
} record;
++i;
} while (!FEof() && i<header.RecordCount);
} file;
2. This applies to only one file as well (see file ID inside):
Code: Select all
//--------------------------------------
//--- 010 Editor v3.0.3 Binary Template
//
// File: uncompressed data chunks of CFF files in Spellforce 2.
// Appropriate files IDs in base\English.cff and addon1\English.cff:
// 9051 (1/1)
// Author: Csimbi
// Revision: 1.0.0
// Purpose: Game hacking
//--------------------------------------
struct FILE
{
struct HEADER
{
uint32 RecordCount;
} header;
local int i=0;
if(header.RecordCount>0) do
{
struct RECORD
{
uint16 ItemID; // See base\script\gds\definitions\gdsdbexport.lua
uint16 Unknown1; // =0;
uint16 Unknown2;
uint32 StringLen;
if(StringLen>0) char String [StringLen*2];
} record;
++i;
} while (!FEof() && i<header.RecordCount);
} file;
3. This applies to only one file as well (see file ID inside):
Code: Select all
//--------------------------------------
//--- 010 Editor v3.0.3 Binary Template
//
// File: uncompressed data chunks of CFF files in Spellforce 2.
// Appropriate files IDs in base\English.cff and addon1\English.cff:
// 9052 (1/1) - item qualifiers
// Author: Csimbi
// Revision: 1.0.0
// Purpose: Game hacking
//--------------------------------------
struct FILE
{
struct HEADER
{
uint32 RecordCount;
} header;
local int i=0;
if(header.RecordCount>0) do
{
struct RECORD
{
uint16 ItemID; // See base\script\gds\definitions\gdsdbexport.lua
uint16 Unknown1; // =0;
char Unknown2; // 2, 2, 1, 1, 3, 3
char Unknown3; // 0, 1, 0, 1, 0, 1
char Unknown4; // =0;
uint32 StringLen;
if(StringLen>0) char String [StringLen*2];
} record;
++i;
} while (!FEof() && i<header.RecordCount);
} file;
4. This applies to two files (see list of flie IDs inside):
Code: Select all
//--------------------------------------
//--- 010 Editor v3.0.3 Binary Template
//
// File: uncompressed data chunks of CFF files in Spellforce 2.
// Appropriate files IDs in base\English.cff and addon1\English.cff:
// 9003 (1/1)
// 9050 (1/1)
// Author: Csimbi
// Revision: 1.0.0
// Purpose: Game hacking
//--------------------------------------
struct FILE
{
struct HEADER
{
uint32 RecordCount;
} header;
local int i=0;
local char bMulti=0;
if(header.RecordCount>0) do
{
struct RECORD
{
char Unknown; // =1
uint32 StringLen;
if(StringLen>0) char String [StringLen];
uint32 StringLen2;
if(StringLen>0) char String2 [StringLen2*2];
} record;
++i;
} while (!FEof() && i<header.RecordCount);
} file;