home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
!Zone: S!Zone
/
SZONE.BIN
/
tools
/
scedit
/
sc2000.txt
< prev
next >
Wrap
Text File
|
1994-06-14
|
10KB
|
229 lines
Un-Official SC2000.DAT File Specifications
By George White - Compuserve ID: 71511,1072
Internet: 71511.1072@compuserve.com
INTRODUCTION
This file will try to describe the SC2000.DAT file that comes with the DOS
version of Simcity 2000. The SC2000.DAT file contains the text, music,
sound and graphics for Simcity 2000. My purpose for publishing these
specifications is to allow programmers much better than I to code utilities
that will allow me to import my own buildings, sounds and music into the
SC2000.DAT file.
I have uploaded a program to the Compuserve Gamers Forum Strategy
Library called SCEDIT.ZIP. This is my attempt at a program that browses
the SC2000.DAT file and displays some of the items in the file. The next
version will attempt to import into the file.
My vision is that people will create tools to import buildings into the
SC2000.DAT file and then people will start uploading buildings (The White
House, Yankees's Stadium, McDonald's, World Trade Center) that others
can use in their Simcity 2000 game.
Maxis will not provide the format of the SC2000.DAT file so I have tried to
figure it out myself. These specifications are not totally complete and I am
still trying to figure out some areas of the file. If you figure out something
about the file please let me know and I will update these specs with the new
information and give you credit!
This file is NOT supported by Maxis and they had nothing to do with it.
Please don't ask them questions about these specifications! If you plan on
changing bytes in the SC2000.DAT file make sure to back up the file first.
Some changes in the SC2000.DAT file fill cause Simcity 2000 to crash! If
you are having problems with Simcity 2000 after modifying SC2000.DAT
don't call Maxis!! Restore the original SC2000.DAT or re-install the game
to see if your problems go away!
Please direct any questions or corrections about this file to me at the above
Compuserve or Internet address. If you write a utility for SC2000 please let
me know. Thanks!
-SPECIFICATIONS
*HEADER
The start of the SC2000.DAT file contains 400 names and pointers into the
rest of the SC2000 file. The format of each of these 400 entries are:
12 bytes text - Name of entry
4 byte integer - Offset to start of entry in SC2000 file
Entry 1 is 'MINE.PAL' and its offset is hex 'F0 18 00 00' or reversed
'00 00 18 F0' which converts to 6384 bytes into SC2000.DAT. Byte 6384 is
where the MINE.PAL section starts in the SC2000.DAT file.
There is no information on the length of each area. The only way to
determine it is by finding out where the next section starts and then
calculating the length.
The next 399 entries in the header are the same format. Below I will
describe each of the entry types and how to decode them.
HEADER ENTRIES DESCRIPTIONS
*.FNT SECTIONS
All sections that are named *.FNT are the fonts used by SC2000 in the
newspapers and other various text. I don't know the format of .FNT files
and didnÆt really want to change the fonts anyway.
*.VOC SECTIONS
These sections are all Sound files. These are soundblaster VOC files that
can be played by various utilities on the market. You can extract these
whole sections to a DOS file and play them like any other VOC file. These
contain sounds like the wind and air traffic.
*.XMI SECTIONS
These sections are all music files. The XMI files are what creates the Music
in SC2000. XMI is a enhanced version of the MIDI format developed by
Miles Design.. You can find a utility to play and create XMI files in the
Gamers forum under the Game Design library. The MIDPAK/DIGPAK
programmers toolkit from John W. Ratcliff is located there. The file is
named DMKIT.ZIP. Read the documentation with the toolkit for more
information about the XMI format.
TXT* SECTIONS
These sections are text used by SC2000. They contain help and other
information. These sections do not contain the newspaper data.
MINE.PAL
This is the Palette for the game. This section is 768 bytes long and contains
256 3 byte sections for each color (256 * 3 = 768). These 3 bytes are RGB
values in the order of Red, Green and Blue. If you modify the bytes in this
section you will change the colors of Simcity 2000.
ROADPAL.RAW
This section must have something to do with the palette for the road but I
haven't figured it out yet. If you do please let me know.
RAW SECTIONS
Most of the *.RAW sections are graphics. I will describe how to display the
RAW graphics and then will describe the other RAW areas.
*.RAW GRAPHICS
The first byte of the section is the height and the second byte is the width.
The data that follows is the color data. The color data is one byte per pixel.
The byte contains a number that points to a color in the Palette (loaded from
MINE.PAL). You just read the color data and display it until you reach the
end of the row (based on the width) and continue on the next row. All of the
raw pictures are square.
I have had some problem with the PERSON? RAW sections because they
don't follow the same height and width format as the others. I also have had
problems with the PAPER*.RAW sections that are the newspaper pictures.
If you figure out the format please let me know.
OTHER RAW SECTIONS
CUR.RAW - This is the game cursor. I haven't tried to determine the
format.
CULT?.RAW - These two files are used for the palette animation. Simcity
2000 uses palette shifting to make things look like their moving. It appears
that the palette numbers above 150 are used for palette shifting. For
example, the smoke from the factories appear to move but the colors that
make up the smoke just change colors to make the appearance of movement.
The cars also use palette shifting. The water pumps also use palette shifting.
CULT1.RAW and CULT2.RAW contain the colors (in RGB Format) that
are used to replace the colors on the map to make things move. You can
replace these colors in these two sections to see some weird results. If
someone can determine the exact purpose of each color and what color it
replaces in the palette, please let me know. To build our own buildings it
would be very helpful to know which colors we could use for animation.
PPDT????..RAW - These sections contain the newspaper stories. The
format is still a mystery to me. I have determined that it is using a token
replacement type format but am still working on the exact format.
1000.RAW to 2200.RAW and STR1000.RAW to STR2200.RAW - These
sections contain the building and areas names. I don't know the exact
difference between the STR* and the Non-STR* versions but they seem to
contain almost the same data. The format is:
1st Byte of section - The number of names that follows.
For each of the names:
1 byte for the length of the name followed by the actual name.
GM.AD and GM.OPL SECTIONS
These are the MIDI patches used to play the XMI files. They map
instruments for each sound card. I don't know the format of these.
USER.DAT SECTION
This contains your name and business that you entered when you first
started the game after installation.
BUILDING GRAHPICS SECTIONS - (LARGE.HED, LARGE.DAT,
SMALL.HED, SMALL.DAT, OTHER.HED, OTHER.DAT)
The *.HED sections are header files that point into the graphics stored in the
*.DAT files. LARGE.DAT stores the large building graphics that are visible
when SC2000 is zoomed in. SMALL.DAT stores the small and medium
sized graphics that are visible at all other times. The OTHER.DAT section
stores other graphics and some of the Medium sized graphics. All of the
*.HED and *.DAT files are in the same format. I will describe each below.
*.HED SECTIONS
These sections point to the building graphics located in the matching *.DAT
file. The format of this section contains many 8 byte segments as follows:
4 byte integer - Offset into *.dat file (See DAT graphic format below)
1 byte integer - Height of building
1 byte integer - Width of building
2 bytes - contains hex 'FFFF'
The header file for LARGE.DAT contains pointers for 500 graphics. The
header file for SMALL.DAT contains pointers for 1000 graphics, the small
graphics and the medium graphics.
Some of the header segments contain hex 'FF' in all 8 bytes. These of
course are not used.
*.DAT SECTIONS
The offset from the *.HED section is used to find the start of the graphic in
this section. Once the offset is found the format of the graphic is as follows:
(This occurs for each row of the building. The details are below)
Byte 1 - Hex '10' - Info Identifier
Byte 2 - 1 Byte - Info Data
Byte 3 - Hex '04' - Left Offset Identifier
Byte 4 - 1 Byte - Left Offset
Byte 5 - Hex '0C' - Number Of Pixels Identifier
Byte 6 - 1 byte - Number Of Pixels Of Color Data
Byte 7+ - Color Data
INFO DATA: There is one of these identifiers per row on the graphic. This
info data is calculated using the following formula:
If total_of_hex04_sections = total_of_hex0C_sections then
info_data = (total_color_bytes + 1) + (total_of_hex04_sections * 4)
else
info_data = (total_color_bytes + 1) + (total_of_hex04_sections * 4) + 2
end if
I don't know why this info data is needed but if you change it the re-paint of
the graphics is messed up. If someone figures this out please let me know.
Everytime you hit one of these Hex '10' sections you should start a new row
of the graphic.
LEFT OFFSET: This is the offset from the left of the picture before you
start placing color pixels for this row. If this '04' section is missing then
there is no offset for this row. You can have more than one of these sections
per row if the graphic has æholesÆ in the middle that will let the graphics
behind this one show through.
NUMBER OF PIXELS: This number is how tells how many bytes of color
data follow. There can be more than one of these per row if there is more
than one offset per row.
COLOR DATA - This is one byte for each pixel. The number of bytes is
stored in the NUMBER OF PIXELS field. This is a number that points into
the palette (See MINE.PAL Above).