CS

From FIFA Manager Modding Wiki
Jump to navigation Jump to search

CS (compiled scene?) is a file extension in FIFA and FIFA Manager games. Such files contain information about scene loading. Usually, the game includes 2 CS files - bescene.cs and fescene.cs.

Structure[edit | edit source]

Header[edit | edit source]

The file starts with a header.

Version 1 (FIFA 2003)[edit | edit source]

CHAR[4] signature ("SGSM")
UINT32  number of data types (11)
UINT32  header size (100)
UINT32  scene entry size (104)
UINT32  debug entry size (20)
UINT32  scene call size (8)
UINT32  format argument size (8)
UINT32  tex block size (24)
UINT32  texture size (12)
UINT32  texture assignment size (20)
UINT32  model block size (84)
UINT32  layer option size (12)
UINT32  variable size (8)
UINT32  light config size (24)
BOOL32  loading status (0)
UINT32  number of strings
OFFSET  strings (array of null-terminated strings)
UINT32  number of scene entries
OFFSET  scene entries
UINT32  unknown1
UINT32  number of debug entries
OFFSET  debug entries
UINT32  number of scene calls
OFFSET  scene calls
UINT32  terminator (0xFEDCBA98)

Version 2 (FIFA 2004, EURO 2004, TCM 2004)[edit | edit source]

CHAR[4] signature ("SGSM")
UINT32  number of data types (11)
UINT32  header size (96)
UINT32  scene entry size (104)
UINT32  debug entry size (20)
UINT32  scene call size (8)
UINT32  format argument size (8)
UINT32  tex block size (24)
UINT32  texture size (12)
UINT32  texture assignment size (20)
UINT32  model block size (80)
UINT32  layer option size (12)
UINT32  variable size (8)
BOOL32  loading status (0)
UINT32  number of strings
OFFSET  strings (array of null-terminated strings)
UINT32  number of scene entries
OFFSET  scene entries
UINT32  unknown1
UINT32  number of debug entries
OFFSET  debug entries
UINT32  number of scene calls
OFFSET  scene calls
UINT32  terminator (0xFEDCBA98)

Version 3 (FIFA 2005, TCM 2005)[edit | edit source]

CHAR[4] signature ("SGSM")
UINT32  number of data types (11)
UINT32  header size (96)
UINT32  scene entry size (108)
UINT32  debug entry size (20)
UINT32  scene call size (8)
UINT32  format argument size (8)
UINT32  tex block size (24)
UINT32  texture size (12)
UINT32  texture assignment size (20)
UINT32  model block size (88)
UINT32  layer option size (12)
UINT32  variable size (8)
BOOL32  loading status (0)
UINT32  number of strings
OFFSET  strings (array of null-terminated strings)
UINT32  number of scene entries
OFFSET  scene entries
UINT32  unknown1
UINT32  number of debug entries
OFFSET  debug entries
UINT32  number of scene calls
OFFSET  scene calls
UINT32  terminator (0xFEDCBA98)

Version 4 (CL 04/05, FM 06 - FM 08)[edit | edit source]

CHAR[4] signature ("SGSM")
UINT32  number of data types (11)
UINT32  header size (112)
UINT32  scene entry size (108)
UINT32  debug entry size (20)
UINT32  scene call size (8)
UINT32  unknown entry 2 size (4)
UINT32  format argument size (8)
UINT32  tex block size (24)
UINT32  texture size (12)
UINT32  texture assignment size (20)
UINT32  model block size (88)
UINT32  layer option size (12)
UINT32  variable size (8)
UINT32  unknownMinOne (-1, ending marker?)
BOOL32  loading status (usually 0)
UINT32  number of strings
OFFSET  strings (null-terminated strings, 4-byte alignment)
UINT32  number of scene entries
OFFSET  scene entries
UINT32  unknown1
UINT32  number of debug entries
OFFSET  debug entries
UINT32  number of scene calls
OFFSET  scene calls
UINT32  number of unknown callbacks
OFFSET  unknown callbacks
UINT32  terminator (0xFEDCBA98)

Version 5 (FIFA 06 - FIFA 10, WC 2006, CL 06/07, EURO 2008, FM 09 - 14)[edit | edit source]

CHAR[4] signature ("SGSM")
UINT32  number of data types (13)
UINT32  header size (112)
UINT32  scene entry size (108)
UINT32  debug entry size (20)
UINT32  scene call size (8)
UINT32  format argument size (8)
UINT32  tex block size (24)
UINT32  texture size (12)
UINT32  texture assignment size (20)
UINT32  model block size (88)
UINT32  layer name offset size (4)
UINT32  layer option size (12)
UINT32  variable name offset size (4)
UINT32  variable size (8)
BOOL32  loading status (0)
UINT32  number of scene entries
OFFSET  scene entries
UINT32  unknown1
UINT32  number of debug entries
OFFSET  debug entries
UINT32  number of scene calls
OFFSET  scene calls
UINT32  number of layer names
OFFSET  layer names (array of offsets to null-terminated strings)
UINT32  number of variable names
OFFSET  variable names
UINT32  terminator (0xFEDCBA98)

Scene entries[edit | edit source]

Unknown entries 2[edit | edit source]

OFFSET name (null-terminated string)
OFFSET layer name (null-terminated string)
OFFSET type (null-terminated string)
INT32  value accessor index (-1 = none)
UINT32 unknown4

Scene calls[edit | edit source]

UINT32 type (0 - entry, 1 - custom callback)
INT32  target entry index or custom callback accessor index

Layer names[edit | edit source]

Array of offsets to layer name.

OFFSET[] offset to layer name 

Variable names[edit | edit source]

Array of offsets to variable name.

OFFSET[] offset to variable name