Oldschool Cache

OSRS Cache to SQL Database

One of the projects I have recently worked on in my free time is a tool that takes the Runescape file system (which was made internally by Runescape) and converting the data to a SQL database. The Runescape file cache is a group of binary files organized by type(item, npc, object, map/terrain, image, model, sound, etc..). The tool pulls all of this information and inserts them into SQL tables.

Along with this I have made various tools for dumping data from the live game such as npc spawns, ground item spawns, shops, etc..

Combining the data into a SQL database allows for very useful lists to be queried and generated such as all ways to obtain an item in region X (through the shops, spawns, npc drops, etc.. located in region X). Another example would be finding all locations of a specific object in the map, such as all Magic Trees. Querying this through SQL is simple and allows you to cross reference various data points.

This project required the following skills:

  • Working with JetBrain's Exposed: and ORM framework for Kotlin.

  • Strong knowledge of MySQL.

  • The ability to manipulate the live game client to dump useful data while logged into the game.

  • A good understanding of Runescape's custom file system along with the individual protocols of each file type.