OpenRS Cache Library

Graham

Programmer, Contributor, RM and Veteran
Mar 8, 2007
5,145
774
0
OpenRS Cache Library

Introduction

This is the cache library that myself and `Discardedx2 have been working on over the past few weeks. We've done some fairly extensive testing and seemed to have solved most of the issues. If you encounter one, before reporting it please ensure your cache isn't corrupt and is complete (the easiest way to do this if you are using the latest cache is to download the whole thing with Method's cache downloader).

This program is an official part of the OpenRS movement started by blakeman8192.

Features

  • Low-level API for editing the cache directory
  • High-level API for managing most things automatically such as reference tables, checksums, versioning, archive packing/unpacking, etc
  • Decodes and encodes the checksum/reference tables (including the new table which uses whirlpool digests and RSA encryption, some portions untested)
  • Decodes and encodes containers
  • Decodes and encodes archives
  • Supports no compression, gzip and bzip2 (both compression/decompression, dkk's lib has problems with bzip2 compression)
  • Supports whirlpool digests (untested but should work)
  • The high level API supports adding new entries to archives, modifying existing entries in archives, adding new files and modifying existing files (if you want to remove entries, right now you'll need to use the low level API and do it manually)
  • Full support for encoding and decoding sprites (including transparency and sprites with multiple 'frames')
  • Support for decoding item definitions (still requires some stuff to be finished for decoding, no encoding yet)
  • XTEA implementation included, however, it is untested and you'll need to write code to deal with it using the lower-level APIs
  • No code from the client - it is clean, well-documented and free from copyright issues

Screenshot

Although this is a library intended for embedding in your own applications, the rules state we must include a screenshot. So this is a picture of an item's name being edited:

screenshotowg.png


Credits

  • [user]Graham[/user]
  • [user]`Discardedx2[/user]
  • Paulo Barreto and Vincent Rijmen (Whirlpool implementation)
  • Keiron Liddle (bzip2 implementation)

Also thanks to Sean for pointing out some bugs and defyboy for his research into the cache format.

Download

The code is licensed under the GNU GPLv3 license. The full terms are included in a file named LICENSE and can also be found on the GNU website.

MediaFire link: openrs-cachelib.zip
 
Last edited by a moderator:
Oh? :o..This is pretty cool, will download, good job.
 
As I said on msn, I fail to see where dragonkk's credits are for his ItemDefinition class

Discarded wrote the ItemDef class like I said on MSN. If he did indeed use dkk's code as a base and informs me then I will gladly add dkk to the credits in the main post.
 
Thanks graham and `Discardedx2 I appreciate your guys work, and the decision to release this to Rune-Server.
 
This is just an application extension right? Or we build the application layer ontop of this and then use it however we wish... i fail to understand what this actually is intended for?
 
This is just an application extension right? Or we build the application layer ontop of this and then use it however we wish... i fail to understand what this actually is intended for?

It's a library for reading and editing the RuneScape cache (probably also works on Jagex's other games too like the ones on Funorb). You can integrate it into your own program or server or whatever, how you make use of it is up to you.
 
Thanks for contributing. Might even mess with it
Edit:someone should fullfill the 508 cache
 
Good job. I support OpenRS and I'll gladly contribute if needed/wanted.
 
From what I've seen so far, this looks pretty good. Well done, Discarded and Graham.

I think I've identified a few of the missing ItemDefinition opcodes:

Code:
90/91: male/female head model ids
92/93: "extra" male/female head model ids
110-112: model scale x/y/z

Also, I think the model id you guys labeled "inventoryModelId" is just the regular model id. The model gets flattened for use in the inventory, but the same model is used for that process as well as drawing it on the game screen.

Anyway, let me know if you guys want or need any help in the future. I'd be happy to contribute.
 
why are they called opcodes when they are attribute IDs
 
Nice job ;)

Also, I think the model id you guys labeled "inventoryModelId" is just the regular model id. The model gets flattened for use in the inventory, but the same model is used for that process as well as drawing it on the game screen.

Yeah that should be changed to something like "groundModelId", since the same model is used for dropped items.
 

Users who are viewing this thread (total: 1, members: 0, guests: 1)