A few days ago I wrote a post about Extracting and Converting OSRS Models. The post went into detail including the background research, overview of a new tool I hacked together called ModelDumper using RuneLite’s Cache project, how to compile and run the tool, and how to map model ID numbers to items, NPCs and objects from the game.
Even in the few days since I wrote the post I have received a few emails and comments on the post asking for the compiled version of the ModelDumper tool. This post provides a link to the compiled version of the tool, as well as a summary of how to use it. The instructions provided are targeted for the Microsoft Windows 10 operating system, but the program is multiplatform and instructions should be adaptable for other operating systems.
If you are comfortable with running JAR (
.jar) files, have previous command line experience, have a copy of the OSRS cache, and have Java (JRE) installed… these quick instructions will probably be all you need:
ModelDumper.ziparchive to get the
-modelsargument needs to be followed by the name of the output directory to use. If a relative path is given, it will extract models into the current working directory. The
-convertoption specifies to convert models to
.objfiles, if the
-convertargument is not given the model will be extracted but not converted. Example below:
-cacheoption, followed by the file system location. Example below:
NOTE: The dot slash (
.\) preceeding files names in the above examples is a PowerShell quirk, indicating a file in the current directory. This is not needed if you are using Windows Command Pompt.
As documented in my previous post, the ModelDumper source code can be found in my forked version of RuneLite, in a branch named model-dumper. The program is the addition of a single file into the Cache project. The file, named
ModelDumper.java, is available in my branch on GitHub if you would like to review the source code.
Anyway, the point of this post is to provide the easy method to using the tool. I have provided a compiled version of the ModelDumper tool (in a
.jar file). This makes the program easy to run. I have bundled the tool in a ZIP (
.zip) archive, which is available for download in the following location:
Inside the ZIP archive are the following two files:
ModelDumper.jar: The ModelDumper tool in an executable JAR (
LICENSE: The RuneLite BSD 2-Clause License
Checking the integrity of downloaded files is important to ensure you have downloaded a valid file and that it is the same as the distributor published. If you are unsure of what the purpose of File verification is, read the linked Wikipedia article. I have provided the SHA256 hash value for the download ZIP archive, as well as the archive contants below:
If you are on Microsoft Windows you can use the
Get-FileHash module in PowerShell to calculate hash values for files, and on Linux you can use
sha256sum. There are also many third-party tools available to calculate file hashes. I recommend using PowerShell as it is built-into modern Windows operating systems and easy to use. To open PowerShell in the same folder, navigate to where you downloaded the
ModelDumper.zip file in Windows Explorer (most likely your Downloads folder). Right-click in any white-space and select Open PowerShell window here. A visual example is provided below.
You can then run the following command. This command calculates the SHA-256 hash value for the
An example of the expected output is listed below.
Make sure you check that the calculated hash value is the same as the hash value provided at the start of this section. You can also calculate the hash values on the files inside the archive if you want to be thorough (after extracting the archive).
The ModelDumper tool has two dependencies:
The tool requires Java to run - specifically the Java Runtime Environment, or JRE for short. If you play OSRS you most likely have this installed already - as you cannot play OSRS without the JRE installed. Given that, I am not going to go into depth on the install. One thing - if you do not have Java in your environment variable path, you will need to run the
java.exe executable from the folder where it is installed. To check if you have the Java executable in your path, just type in
java.exe into the PowerShell console, or Command Prompt, and press enter. If you have Java in your path, the options menu for the
java.exe program will be displayed.
The tool also requires a copy of the OSRS cache. This makes sense, as the models are located in the cache! If you play OSRS you most likely have the cache available in the home folder of your normal user account. The OSRS cache is located in the following file system path (on a Windows 10 system):
You can check this directory in Windows Explorer. It should have approximately 20 files… most of them starting with the file name:
Once you have downloaded and
ModelDumper.zip archive, and extracted the actual
ModelDumper.jar program, you can run the ModelDumper tool. Start by opening a PowerShell terminal or Windows Command Prompt in the same directory are the ModelDumper executable.
You must supply two command line arguments to make the program run correctly:
The options for the ModelDumper program arguments are:
-cache <location-of-cache>: Specify a location for the OSRS cache, if not provided the program will look for the cache in the default location under the current users home folder
-models <output-directory-for-files>: Extract models to the specified directory, if a relative path is given the program will save files to the present working directory
-convert: Convert any extracted model files, without this option no
.mtlfiles will be created
The following is an example of the Program arguments where no cache location is specified, and you want to extract and convert all models to the directory named
You can also provide a hard-coded cache location. The following example is the same as above, but you specify the cache location on a Windows-based system:
Below is an example output from the ModelDumper tool when run. In this example, the cache location was not provided and was automatically determined. The options specified to extract and convert all models, and a total of 72,278 model files were successfully extracted and converted. This output information can be seen in the Run output windows at the bottom of the IntelliJ IDE.
Please note that you may get an error when running the ModelDumper tool (as seen below). This error does not seem to affect the program.
The ModelDumper tool will by default output every model file from the OSRS cache, there is currently no option to only process one model or a selection of models. The output files are numbered using the model ID number, as this is a unique number for every model. The ModelDumper tool will output a number of different file formats. The list below documents these formats.
.model: The binary model file extracted from the OSRS cache sometimes referred to, and stored as,
.datfiles by other tools
.obj: A converted model file saved in the
.objextension and file format that contains the geometric data of the model
.mtl: The texture model file for the converted
.objfile that contains the material (surface shading) for the model
Below is a visual example of the output files in Windows Explorer. You can see for each model ID number there are the 3 files as described above.
So far we have discussed how to extract and convert models from the OSRS cache. Nice! However, this results in over 36,000 models which are only identified by the model ID number. If you want to lookup an item, NPC or object using the name used in-game - try my Model ID Search tool.
If you are interested in other aspects of creating the ModelDumper tool and the process behind creating the tool and matching model ID number to actual items, NPCs and object, feel free to have a read of the original post called Extracting and Converting OSRS Models.
If you have any feedback or questions please leave a comment below. Also, it would be great if you could let me know if you encounter any issues, or find any bugs in the tool or instructions. Until next time, happy scaping everyone!