Cache format
This page describes the technical information about the RuneScape:Cache. The information is currently work-in-progress.
Legacy cache format
editThis cache format was used for builds 244 through 377.
There are 5 files as shown in the table below. The main data Cache is separated into Archives, then individual Files. The archives and files are defined by Index Files which allow individual files to be accessed individually.
| File | Contents |
|---|---|
| main_file_cache.dat | Actual game data |
| main_file_cache.idx0 | Subarchives index |
| main_file_cache.idx1 | Model index |
| main_file_cache.idx2 | Animation index |
| main_file_cache.idx3 | Sound index |
| main_file_cache.idx4 | Map index |

Index files
editIndex files (.idx) can be thought of as large Tables of Contents like you would see in a book. The index files are a series of bytes which tell where individual files are within the main data cache so that they can be retrieved and used. Without them, the main data cache is essentially an unorganized blob of bytes. By dividing the total number of bytes in an Index by 6, you can determine to the total amount of files within.
Data files
editThe main data cache file (main_file_cache.dat) contains all the game files including models, textures, and maps, as a series of Sectors. A Sector is a 520 byte block of data that includes an 8 byte header and 512 bytes data. Multiple Sectors make up a single file, so the header of the Sector tells you which file it belongs to. Files can be extracted by combining all of the Sector's data for that file, then decompressing as required.
Example
editAn Index file defined a file with size 1,561 bytes at Sector 668. The starting position of the data buffer can be found by multiplying the starting Sector by 520, position 347,360 in this case. By looping through the Sectors and copying the data bits until reaching the end of file (EOF) Next Sector ID, the total data for file 4 is obtained.
| Sector Example | ||||
|---|---|---|---|---|
| Sector 0 | Sector 1 | Sector 2 | Sector 3 | |
| File ID | 4 | 4 | 4 | 4 |
| Chunk ID | 0 | 1 | 2 | 3 |
| Next Sector ID | 669 | 670 | 671 | 0 |
| Type ID | 1 | 1 | 1 | 1 |
| Data | 512 bytes | 512 bytes | 512 bytes | 25 bytes + 487 bytes 0 |
Other files
editflo.dat
editThis file defines the floors used in game.
map_index
editThis file defines the map coordinates and which map files are used.
Utility methods
editgetMedium
editpublic static int getMedium(ByteBuffer buf) {
return ((buf.get() & 0xFF) << 16) | ((buf.get() & 0xFF) << 8) | (buf.get() & 0xFF);
}
| Engine | |||||||
|---|---|---|---|---|---|---|---|
| Game clients |
| ||||||
| Performance | |||||||
| Exploits | |||||||
| Graphics | |||||||
| Servers | |||||||



