Data files

From SRB2 Wiki
(Redirected from Srb2.pk3)
Jump to navigation Jump to search

SRB2 relies on a set of data files to run. These include the executable, WAD files that contain the game's resources, DLL files and various configuration files. The folder where all files related to an SRB2 installation should be located is referred to as the "SRB2 directory". This article lists the data files that are included (or can be included) in the SRB2 directory and explains their content and purpose.

Core installation

These are the files that are extracted from the self-extracting archive file for installing SRB2, most of which are required to run SRB2 itself. In most cases, modifying or deleting these files will cause the game to crash on startup.

Executable

This is the executable for running SRB2 itself – clicking on this file will start the game. With the use of batch files (such as the one below) or a launcher, command line parameters for this file can be set before starting the game.

srb2win.exe SRB2's executable. It runs under the SDL2 audio and video libraries.

Resources

These are a mix of PK3s and WAD files containing all of SRB2's resources. Note that all WAD resource files use the .dta file extension, instead of .wad.

srb2.pk3 SRB2's main PK3 file. This acts as the "IWAD" for WAD editors that are used for SRB2 editing. It contains most of the resources found in SRB2. These include most sprites, textures, patches, flats and graphics as well as SRB2's palette files (PLAYPAL, COLORMAP and TRANS10TRANS90).
zones.pk3 A PK3 file containing all maps, their level select images, and the MAINCFG lump for SRB2.
player.dta A WAD file containing sprites and other related graphics for all playable characters, as well as their S_SKIN lumps and character select data.
music.dta A WAD file containing all of SRB2's music, both in Ogg format and MIDI format, as well as the sound test's MUSICDEF file.

Unlike the other main resources, this WAD file can be modified to have custom music files, as there is no MD5 check for music.dta. However, only certain types of files are accepted within it: anything that is not a music file, sound file, palette file, or ENDOOM lump in this file will cause SRB2 to crash.

Libraries

exchndl.dll This library is used to create Dr. Mingw[1] debugging reports if SRB2 crashes. The reports are stored in a .RPT file sharing the same name as the executable used, e.g., srb2win.RPT.
libfluidsynth-2.dll This file contains the FluidSynth sythnesizer, one of the MIDI players SRB2 supports. FluidSynth is notable in that it supports a user-specified soundfont in the form of a .sf2 file.
libgcc_s_sjlj-1.dll This file contains the GNU Compiler Collection, a compiler that helps to optimise SRB2's code as it is compiled.
libgme.dll This file contains the Game Music Emu[2] library, which SRB2 uses to play back music in various video game music formats. See Sound and music tutorial > game-music-emu formats for all sound formats supported by the Game Music Emu library.
libopenmpt.dll This file contains the OpenMPT player, which SRB2 uses to play various tracked music formats. See Sound and music tutorial > libopenmpt formats for all sound formats supported by the OpenMPT player
libstdc++-6.dll This file contains the C++ standard library, providing various functions that SRB2's code makes use of.
mgwhelp.dll This file contains the MgwHelp library, which is used by Dr. Mingw.
SDL2.dll This file contains the Simple DirectMedia Layer library, which SRB2 uses for various purposes, such as audio and video input as well as handling the input devices.
SDL2_mixer_ext.dll This file contains the SDL Mixer X library, which is used for sound mixing. See Sound and music tutorial > SDL_mixer formats for all sound formats supported by the SDL Mixer X library.

Other files

Game data files

These files will automatically be created by the game to store progress made in Single Player's campaign mode, and will be updated by the game whenever necessary. These can deleted without harm, but this will result in the loss of game progress.

gamedata.dat A data file containing information on time attack records and unlocked secrets. Both of these areas of information can be overwritten independently in the options menu in SRB2. This file is saved every time a new goal or record is set.

If the game has been modified, the game will not save new data to this file until the game has been restarted. However, custom modifications can provide their own custom gamedata files with the use of SOC – the MainCfg parameter GameData determines the name of the custom gamedata file to use instead of gamedata.dat (see MainCfg > Data handling).

If the command line parameters -nodata or -resetdata are used, the contents of gamedata.dat will not be loaded on game startup: -nodata will simply not save to the file, while -resetdata will overwrite the existing file with new gamedata as the player progresses through the game again.

srb2savX.ssg These are save game files that store saved progress for each save slot in unmodified SRB2; they will automatically be created when a new game is started in a particular slot, and will be updated after every act cleared or when the game itself has been cleared.

For any save game file X is the save slot number, which will be a number between 1 and 30 – srb2sav1.ssg takes up save slot #1, srb2sav2.ssg takes up save slot #2, etc. Deleting any of these files will clear their respective save slots. If the save file is for a different SRB2 version, or is otherwise corrupted, the game will detect this and display a warning message on the save game screen.

If the game has been modified, the game will not save new data to these files until the game has been restarted. However, custom modifications with a custom gamedata file will allow SRB2 to use save game files of different names instead – the name of the save game files will be [gamedata file name]X.ssg, where [gamedata file name] is the name of the custom gamedata file without the .dat file extension, and X is the save slot number.

Configuration files

These files will automatically be created by the game to store various settings, and will be updated by the game whenever necessary. They can deleted without harm, but this will result in the loss of settings.

config.cfg A text file containing all settings for the user in SRB2. It will automatically be created when the game is started for the first time, or when the file can't be found in SRB2's directory otherwise on game start-up. It saves all keys set for the player's controls, as well as all the values of console variables that are intended to be retained on restarting SRB2 itself – these include various options such as screen resolution, mouse settings, sound/music volume settings, console settings, and many other tidbits of information.

The command line parameter -config can be used to determine the configuration file to start up the game with instead of config.cfg.

Certain console commands can also be used to change/save the configuration file used while the game is running: saveconfig saves the current configuration to a new file name, loadconfig loads a new configuration file (without saving the current file used), while changeconfig both saves the current configuration file and loads a new configuration file.

dconfig.cfg A text file containing settings in SRB2. This is identical to config.cfg, except it will only be used when a dedicated server is being set up.

The command line parameter -config will indirectly determine the name of the dedicated server configuration file to start up the game with instead of dconfig.cfg; the file name used instead will be d[config file name].cfg, where [config file name] is the name of the main custom configuration file.

User-created configuration files

These files are not included with the core installation of SRB2 and will not be created by the game in any situation, so they have to be created manually if necessary. Otherwise, these can be deleted without harm if they exist.

autoexec.cfg A console script file that SRB2 automatically loads on startup if it exists. It can be used to execute console commands for applying settings such as control configurations, player name and color.
adedserv.cfg A console script file that SRB2 automatically loads on startup if it exists. This is identical to autoexec.cfg in function, but will load only when a dedicated server is being set up.
models.dat A configuration file to determine which models replace certain sprite prefixes or player skins in OpenGL.

Log files

These are text files that will automatically be created by the game for logging purposes. They can safely be deleted without any harm, but for ban.txt this will result in the loss of IP addresses for banned players from the user's netgames.

latest-log.txt A text file that saves all console in- and output for the last SRB2 session. Note that starting a new SRB2 session will overwrite the old contents of this file with the console in- and output for the new session while the game is running. A copy of this file will be saved inside the /logs folder.
ban.txt Stores info on banned players from netgames hosted by the user. When the game is closed, all banned IP addresses and their ban reasons are saved into this file, to be reloaded back into the game when it is restarted or if reloadbans is used.
srb2win.RPT When SRB2 crashes, resulting error reports can be found here. Such crashes should be reported on the SRB2 Message Board.

Other

srb2XXXX.png Naming format for screenshots or APNG movies taken in SRB2, XXXX being a four-digit number from 0000 to 9999.
srb2XXXX.gif Naming format for GIF movies recorded in SRB2, XXXX being a four-digit number from 0000 to 9999.

Folders

Certain subfolders in the SRB2 directory have special purposes for the game itself. None of these are included with the SRB2 installation, but will be automatically generated by the game itself or will have to be created manually.

/replay Stores replay lumps for Record Attack and NiGHTS Mode. For unmodified SRB2, the folder the files are stored in is:
/replay/main

For custom gamedata files, the name of the folder used is:

/replay/[gamedata file name]

where [gamedata file name] is the name of the custom gamedata file without the .dat file extension.

Deleting /replay or any subfolders with replay files within will not clear any records obtained in Record Attack/NiGHTS Mode, but will result in loss of the replays used to obtain them.

/DOWNLOAD Stores files downloaded from a netgame.
/logs Stores log files from previous SRB2 sessions. In the format of:
log-YYYY-MM-DD_HH-MM-SS.txt

where YYYY-MM-DD is the year, month and day in that order, and HH-MM-SS is the hour, minutes, and seconds in the 24-hour time notation.

/models Stores models and their skin files. This folder must be created manually if needed.
/luafiles Stores files created by Lua scripts. This folder is automatically created when a Lua script writes to a file if it didn't exist previously.
/screenshots Stores screenshots taken in SRB2. This folder is automatically created when a screenshot is taken if it didn't exist previously.
/movies Stores movies recorded in SRB2. This folder is automatically created when a movie is recorded if it didn't exist previously.
/addons A folder that can be used to store addons. This folder is automatically created on game startup if it didn't exist previously.

References