SV6 & SC6 FILE FORMAT

Back to RCT home

Last updated Dec 15, 2002

RCT2 stores the save game information in SV6 files. Scenarios are stored in SC6 files. Both file types consist of "chunks" of data. SV6 files contain five chunks and SC6 files contain thirteen chunks. Each chunk (except number 2) starts with a five byte header. The first byte is a code to specify the type of encoding used for that chunk. The next four bytes specify the number of data bytes in that chunk. The table below describes how the data is coded in the chunks. The last four bytes of the file is a simple checksum - formed by starting with zero and adding each byte of the file to a 32 bit variable.
Code Meaining
00 Copy the data bytes without change.
01 RLE
02 RLE , then string decompression
03 Rotate sequential bytes right by: 1, then 3, then 5, then 7 bits, then 1 etc.

The "String Compression" technique is decoded as follows: read a byte - if it is FF then copy the next byte to the output; otherwise, the lower three bits indicate the length (add 1) of a string (already in the output data) to be copied. The upper five bits are then shifted right (by 3) to become an offset to the beginning of the string to be copied. The shifted value has thirtytwo subtracted from it to create the offset. For example, A5 would indicate a string of 6 bytes to be copied; the string begins twelve bytes before the current position.

The following table lists which chunks are present in which file type.
Chunk SC6 SV6
0 Header Header
1 Mystery1 .
2* Import Objects Import Objects
3 Available Items Available Items
4 Flags1 Flags1
5 Game Map Game Map
6 Game Data Game Data
7 Flags2 .
8 Flags3 .
9 Park Rating .
10 Mystery2 .
11 Flags5 .
12 Flags6 .
13 Mystery3 .

Header: 32 bytes .

0x00,01: file type (0=SV6, 1=SC6)
0x02,03: number of custom objects imbedded

0x04..07: version marker = 120001 (decimal)
0x08..0B: ? (SV6=0x00031144, SC6=0x00031132)
0x0C..0F: ?
0x10..13: ?
0x14..17: ?
0x18..1B: ?
0x1C..1F: ?

Mystery1: 408 bytes - contains scenario description

Import Objects: a sequence of Dat files (custom objects). Does not have the 5-byte chunk header.

Available Items: 721 of 16 byte structures (Dat fileheader). Each structure has four bytes of flags, then 8 bytes of chars, then a four byte checksum.
128 entries for the rides
252 entries for the small scenery
128 entries for the large scenery
128 entries for the walls
32 entries for the banners
16 entries for the paths
15 entries for the path bits
19 entries for the scenery sets
1 entry for the park entrance
1 entry for the water
1 entry for the "stex" dat file to use

Flags1: 16 bytes

00,01: Month; divide by 8 for years, remainder is month starting at March.

02,03: Day; calculate with: DAY = ((Value*16) div 0x8421)+1

Game Map: 8 byte structure for each map element. Appears to be essentially the same as in RCT1. An element type byte, then a byte with continuation flag qudrant usage, etc., then a byte for the base height, then a byte for the clearance height, ...

Game Data: all the sprite(actor) structures, stats, values, strings, etc. Size = 3048816 in SV6 files, 2560076 (0x27104C) in SC6 files.

Flags2: 4 bytes

0,1: Number of guests in park

2,3: ?

Flags3: 8 bytes

Park Rating: 2 bytes=Park Rating (Recent vs. current?)0..999

Mystery2: 1082 bytes

Flags5: 16 bytes

Flags6: 4 bytes

Mystery3: 483816 bytes - remainder of Game Data in SC6 files.

0xF4: map size;

0x104..? : research items. Five byte structures; first byte is index in object table (chunk 3); second byte is track type(or zero when "imporovement" item, third byte is one as default, zero when "improvement" item; fourth byte is zero; fifth byte is research category(0=transport ride, 1=gentle ride, 2=rollercoaster, 3=thrill ride, 4=water ride, 5=shop, 6=improvement).

0x00A1B8..0x02FF57: 255 ride structures of 608 bytes each.