Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • stCky: Palidinho is your OpenGL (was it OpenGL?) stuff open source anywhere?
      August 16, 2017, 09:07:22 PM
    • Travas:BUILD THE WALL
      August 15, 2017, 09:28:49 PM
    • Travas: i have ass cancer
      August 15, 2017, 09:23:29 PM
    • stCky: what are the fudge are you tryna ask?
      August 15, 2017, 08:21:35 PM
    • bader: what are the rsps community alive ?
      August 15, 2017, 05:46:16 PM
    • bader: yo guys
      August 15, 2017, 05:46:08 PM
    • Spacehost:[link] Updated our thread :)
      August 15, 2017, 09:40:34 AM
    • Adaro: The client is in Download section at Homepage
      August 15, 2017, 01:09:20 AM
    • FaTe_Of_GoDs: where do i get the client?????????????
      August 14, 2017, 05:23:14 PM
    • stCky: can anyone help me? I cant login to the shoutbox
      August 13, 2017, 05:45:15 PM
    • drubrkletern: appeal denied
      August 13, 2017, 02:35:27 PM
    • King_Trout:[link]
      August 13, 2017, 11:17:12 AM
    • Cole1497: no sorry
      August 13, 2017, 10:27:14 AM
    • ayz: yo can anyone explain something to me
      August 13, 2017, 08:08:51 AM
    • coolking12: Hi
      August 13, 2017, 04:16:06 AM
    • stCky: n+1
      August 11, 2017, 06:09:24 PM
    • PalidinoDH: How many more pages are going to show errors before this dude gets on and fixes shit
      August 11, 2017, 04:57:00 PM
    • stCky: it is made by the wonderful people at jetbrains
      August 10, 2017, 10:00:06 PM
    • Zoravon: what's the difference between that and eclipse?
      August 10, 2017, 05:59:52 PM
    • stCky: use an IDE like IntelliJ or shitclipse
      August 10, 2017, 05:33:01 PM

    Author Topic: Lin's Cache Suite v1.3 - 100% Plugin-based 317 Cache Editor [Now on GitHub!]  (Read 7606 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineLin

    • Member
    • ****
    • *
    • Posts: 4,368
    • Thanks: +0/-0
      • View Profile
    This is a project I've been working on for a couple days, and I think it will massively improve the RSPS scene. I was looking around for cache editors, and it seems Tom's cache suite is still what's popular. As I made a quick little archive extractor, it occurred to me I should make all the tools for viewing and editing files plugins, so we can have a giant integrated community-based clean cache editor capable of editing everything - maps, interfaces, configurations, etc..

    I wrote this in C#. There are three parts to the project - the shell (what you run), the cache API (what does all the dirty work), and the plugins (the features). The API is very powerful, allowing you to load, rename, edit, and even add new files to archives and sub-archives with just a couple lines of code.

    Update List
    1.3
    • Several additions to the cache API, including being able to load items, objects, NPCs, and "VarBit"
    • A model-viewer control has been added to the API to allow model viewing integration in any plugin with ease
    • Some other minor changes to the underlying client-ripped rendering system (still lots of work to do here)
    • "ModelViewer" plugin now uses the API's model viewer control. It is recommended you delete the Tao DLLs in the Plugins folder!
    • With the addition of the model viewer plugin, the Tao library files are now required to be in the same directory as the API library file. Either download the entire suite or manually place them there if you're just adding your own plugins
    • The source is no longer included in the download. Visit the GitHub page down below for it.

    1.2
    • Added drag/drop file importing/adding
    • Batch file exporting
    • Fixed the search feature not working for regular archives
    • Added the client's model and rasterizer class
    • Added a model viewer (wasd to move, left click to rotate, wheel to zoom)

    How To Use
    To start, open your cache. This is a folder with "main_file_cache.dat" and "main_file_cache.idx0-4". Upon doing so, the tree on the left should populate with archives and sub-archives. Sub-archives, commonly known as "Jagex Archives", are archives with a different file format that uses BZip2 compression. Regular archives use GZip compression. You don't have to worry about any of this, as the API deals with compression for you.

    To add a file, go to File > New when you have either an archive, file, or sub-archive parent node selected. Adding a file with a sub-archive file or sub-archive parent node will create a sub-archive file. Note that if you create a new file with the archive 0 node selected ("Sub-Archives") or try to add a file to sub-archive 0, the program will work but those archives and files specifically won't.

    On the right you see import/export data, which allow importing/exporting a file if any of the loaded plugins support importing/exporting. Note these always take the uncompressed files, so don't compress them before-hand. You can also rename files if they're part of sub-archives, but note you must add your name to files.txt for it to show when you open your cache down the road.

    When you modify a regular archive file by importing data or creating a new file, you don't have to save. It's automatic. With sub-archives, however, you must manually save. Do this by saving all archives or when the file/node you have selected is part of a sub-archive, save the current one.

    To view the plugins that are installed, go to Plugins > Summary. If a plugin allows configuring, the "Configure" button will be enabled. Here you can also view what criteria has to be met for a plugin to be loaded, and what I/O operations it allows you to do.

    Plugin Pack 1.3
    -ImageViewer - Views and allows the basic importing and exporting of 317-format images.
    -HexEditor - A basic hex editor. Note editing with it doesn't work. It's really only there to allow importing/exporting raw data.
    -PaletteViewer - Views the palette an image archive uses.
    -ModelViewer - Views and allows the basic importing and exporting of 317-format models. Note if OpenGL fails to initialize, software rendering is enabled. To disable it (or enable it), configure it from the plugin summary window.
    -ItemViewer - Views 317-format items.
    -ObjectViewer - Views 317-format objects.
    -NPCViewer - Views 317-format NPCs.
    -VarBitViewer - Views 317-format VarBit. (This was just a quick test to see everything VarBit contained)
    -MidiPlayer - Allows playing and exporting of midi files. This was made by Bobster from Rune-Server and I included it in the pack.

    Shell Features
    • Plugins (obviously)
    • Naming of archives and individual files (through Files.txt)
    • Search files with filtering - Searching allows for named files containing the searched text and/or unnamed files matching the whole text. If a sub-archive file hasn't been manually named, as in we only have its hash code (since file name storing is lossy), the search will bring it up anyways.
    • Map files display their coordinates (only works for I believe terrain files at the moment)
    • Importing, exporting, creating, and renaming files
    • Drag and drop (see below)
    • Batch export (file dumping)

    Cache API Features
    • Reading and writing archives (automatic GZip compressing/decompressing)
    • Reading and writing sub-archives (automatic BZip compressing/decompressing)
    • Client image loading, bitmap generating, PNG importing (excellent color quantization, thanks to the nQuant library)
    • Creating files for both archives and sub-archives
    • Contains a copy of the client's model and rasterizer class (mostly undocumented/copy-pasted)
    • Contains almost fully-documented Item, Object, and NPC definition files. Also has VarBit...
    • An easy-to-use model viewer control that will render any Model supplied and allow basic viewing interaction

    The Plugin API
    Creating and adding plugins is very simple. Start a new Class Library project in VS, add the API to the references, and create a class that extends IPlugin. Copy the properties and functions, fill them out, and compile the project. Adding the plugin is as easy as copying the DLL file to the "Plugins" folder.

    Plugins have specific criteria that have to be met (called Classifications in the IPlugin class) in order for the plugin to show up when you're viewing files, to not only keep things neat but also to prevent you from accidentally breaking stuff. By default, it makes the plugin appear for everything (blank properties), but you can limit it by requiring specific file names, extensions, sub-archives, and/or archives.

    The FileExtensions and StaticFileExtensions properties control how data can be imported/exported. StaticFileExtensions is what's used in the plugin's summary, and FileExtensions are used for the actual import/export dialog box. See the ImageViewer for an example on a plugin's I/O features can be enabled and disabled depending on the success of its operations.

    Drag and Drop
    Dragging and dropping files into the file browser and plugin window is supported. When a file is dropped into the plugin window, it will act simply as if the user imported the file; dropping files into the file browser is where things get more complicated. If a single file is dropped into a file node, the node's data is replaced by the plugin that would handle the dropped file. If a single file is dropped into a sub-archive header node, the file is added to the archive, or it replaces the existing file if it exists (node name must match the dropped file name). If a single file is dropped into an archive header node, the file is added to the archive. If multiple files are dragged into a file node, sub-archive header node, or archive header node, the files are added into the archive. Like the single-file drop into the sub-archive header, multiple files will attempt to check if the file exists first.

    Media
    (click to show/hide)

    Download[/url]
    The API is undocumented, but you should be able to figure out how to write plugins if you just look at the sample ones. To get plugins loading when debugging, you'll have to change the debug directories in the PluginContainer class in the Cache Editor project. I used Visual Studio 2013 for this.

    Notes
    • The file tree shows the compressed sizes for regular archive files to improve speed. When you import a raw file, it uses the uncompressed size.
    • The API image importer requires imported images are 32-bit, so if yours is not, it is made transparent automatically (white becomes transparent). Save your images in a 32-bit ARGB format to avoid this.
    • There are some serious time-consuming operations. Saving all the archives isn't fast, as rewriting each archive requires extracting and recompressing all the files in it to optimize the file size (it can be optimized but I'm lazy). Importing large images is extremely costly, primarily because of the color quantization (if you don't know what that means, it's finding the 256-color palette that gives the image the best quality. This is necessary because this is how the client reads images).
    • You can't create image groups with my image viewer plugin. If you would like one that could, develop it further or make your own! :)
    • This is still an early program that hasn't been fully tested with every situation, but it has passed every test so far. Use with caution and back up your cache frequently.

    Visit This Project on GitHub

    ~Lin
    « Last Edit: December 14, 2014, 11:48:29 PM by Lin »
    Quote
    <ry60003333> i was too busy waiting for this dollar i found on the floor to respawn
    Quote
    <Avail> so it's pretty cool to throw my penis around
    A tree falls out of the bird's nest.

    :palm:


    OfflineRevamp dis Shit

    • Member
    • ****
    • Posts: 294
    • Thanks: +0/-0
      • View Profile
    Re: 100% Plugin-based 317 Cache Editor [wip]
    « Reply #1 on: June 14, 2014, 06:35:54 PM »
    1st, Lin great job! :eek:
    FvCK the staff member who made it so I can't even post..guess a shitload of mopar users won't get any quality answers in 'Server Help' anymore..nor any other section.. Pricks.


    OfflineEyeownyew

    • Member
    • ****
    • Posts: 3,431
    • Thanks: +0/-0
      • View Profile
    Re: 100% Plugin-based 317 Cache Editor [wip]
    « Reply #2 on: June 14, 2014, 10:11:11 PM »
    This is really fascinating. I've been looking at this and I have to say nice job

    I'll post any plugins I make for this here but I can't guarantee I'll be making any quality ones


    OfflineJaydenD12

    • Member
    • ****
    • Posts: 1,321
    • Thanks: +0/-0
      • View Profile
    Re: 100% Plugin-based 317 Cache Editor [wip]
    « Reply #3 on: June 14, 2014, 11:34:34 PM »
    Excellent work, as per usual. I look forward to using this tool.
    20% cooler

    OfflineLin

    • Member
    • ****
    • *
    • Posts: 4,368
    • Thanks: +0/-0
      • View Profile
    Re: 100% Plugin-based 317 Cache Editor [wip]
    « Reply #4 on: June 15, 2014, 02:15:51 AM »
    If the plugins fail to load for some reason, try replacing them with the attached ones. I don't know what the difference is, but for some reason they won't load with some users.
    Quote
    <ry60003333> i was too busy waiting for this dollar i found on the floor to respawn
    Quote
    <Avail> so it's pretty cool to throw my penis around
    A tree falls out of the bird's nest.

    :palm:

    OfflineEvil_

    • wat
    • Member
    • ****
    • *
    • Posts: 1,618
    • Thanks: +0/-0
      • View Profile
    Re: 100% Plugin-based 317 Cache Editor [wip]
    « Reply #5 on: June 17, 2014, 06:24:29 PM »
    I actually really like this idea, Lin, I'd like to see it prosper and grow into something amazing and revolutionary. You're the greatest! Omg.
    [02:12am] faction: this bitch im talking to
    [02:12am] faction: thinks she comes before my bro
    [02:12am] john: how quick does your bro cum?

    Offlinearham 4

    • Member
    • ****
    • *
    • Posts: 6,723
    • Thanks: +0/-0
      • View Profile
    Re: 100% Plugin-based 317 Cache Editor [wip]
    « Reply #6 on: June 17, 2014, 08:26:43 PM »
    Sexy.
    lolol remember when mopar was a thing

    OfflineLin

    • Member
    • ****
    • *
    • Posts: 4,368
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #7 on: June 19, 2014, 01:57:00 AM »
    I have updated this to version 1.1, which includes some new major features like importing raw data and images and creating files. The topic post has been updated to provide some more clear documentation on how to use it and develop plugins. Thanks for the feedback. If this is bug-free, I probably won't be developing the shell/cache API much further for a while.
    Quote
    <ry60003333> i was too busy waiting for this dollar i found on the floor to respawn
    Quote
    <Avail> so it's pretty cool to throw my penis around
    A tree falls out of the bird's nest.

    :palm:

    Offlinenaseem142

    • Member
    • ****
    • Posts: 1,031
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #8 on: June 19, 2014, 03:17:01 AM »
    Interesting ...  :eek:

    OfflineRuneAgent

    • wololo
    • Member
    • ****
    • *
    • *
    • Posts: 7,516
    • Thanks: +0/-0
      • View Profile
      • MITB FORUMS
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #9 on: June 19, 2014, 04:29:19 PM »
    neat idea too bad its C# rep++

    rather than compiling plugins why not just have them as scripts similar to how GIMP functions

    OfflineRuby

    • Member
    • ****
    • *
    • *
    • Posts: 6,834
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #10 on: June 19, 2014, 04:42:17 PM »
    i'd like to remind everyone our friend lin bailed on us for months and still does indeed love ponies
    Shreddology.

    Toms guilty pleasure: http://i.imgur.com/bmWqw7v.png

    OfflineLin

    • Member
    • ****
    • *
    • Posts: 4,368
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #11 on: June 19, 2014, 06:55:56 PM »
    neat idea too bad its C# rep++

    rather than compiling plugins why not just have them as scripts similar to how GIMP functions
    I was going to write it in C++, but plugins in C# compared to C++ are significantly easier. They're compiled because not only are they easier to load, but easier for people to write. When you write a plugin, you can just create a regular project and distribute what it builds. Otherwise, you have to deal with references, which requires distributing compiled code anyway, so it's a lot easier overall. But thanks.

    Also this runs perfectly on Linux with Mono without any changes according to Evil_, so.

    i'd like to remind everyone our friend lin bailed on us for months and still does indeed love ponies
    Actually I don't, sorry.
    « Last Edit: June 19, 2014, 07:00:42 PM by Lin »
    Quote
    <ry60003333> i was too busy waiting for this dollar i found on the floor to respawn
    Quote
    <Avail> so it's pretty cool to throw my penis around
    A tree falls out of the bird's nest.

    :palm:

    OfflineRuby

    • Member
    • ****
    • *
    • *
    • Posts: 6,834
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #12 on: June 19, 2014, 06:58:09 PM »
    neat idea too bad its C# rep++

    rather than compiling plugins why not just have them as scripts similar to how GIMP functions
    I was going to write it in C++, but plugins in C# compared to C++ are significantly easier. They're compiled because not only are they easier to load, but easier for people to write. When you write a plugin, you can just create a regular project and distribute what it builds. Otherwise, you have to deal with references, which requires distributing compiled code anyway, so it's a lot easier overall. But thanks.

    i'd like to remind everyone our friend lin bailed on us for months and still does indeed love ponies
    Actually I don't, sorry.
    Srsly tho where u been negro
    Shreddology.

    Toms guilty pleasure: http://i.imgur.com/bmWqw7v.png

    Offlinetyb97

    • Member
    • ****
    • Posts: 6,195
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #13 on: June 19, 2014, 07:05:12 PM »
    This is a project I've been working on for a couple days,
    Yet it's a bigger contribution than 70% of the things that are posted here. This is amazing, glad to see more tools to help others ideas come to life, and "welcome back" (i guess), I don't know you but I've used all of your programs lol
    what if i want to stick it in? you got a problem with that?

    Offlinearham 4

    • Member
    • ****
    • *
    • Posts: 6,723
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #14 on: June 20, 2014, 10:26:33 AM »
    This should be given to Moparisthebest hahaha. :)
    lolol remember when mopar was a thing

    Offlineartem543

    • Member
    • ****
    • Posts: 1,539
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #15 on: June 20, 2014, 05:58:33 PM »
    Should add a transparency image support(rgba). That would be amazing.

    OfflinePure_

    • Member
    • ****
    • *
    • Posts: 4,687
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #16 on: June 20, 2014, 06:08:06 PM »
    op is faggot

    nice tho
    i won the forum

    OfflineLin

    • Member
    • ****
    • *
    • Posts: 4,368
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #17 on: June 20, 2014, 07:18:12 PM »
    Should add a transparency image support(rgba). That would be amazing.
    There is 32-bit ARGB image transparency support. Look at the last screenshot.

    Quote
    <ry60003333> i was too busy waiting for this dollar i found on the floor to respawn
    Quote
    <Avail> so it's pretty cool to throw my penis around
    A tree falls out of the bird's nest.

    :palm:

    OfflineJaydenD12

    • Member
    • ****
    • Posts: 1,321
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #18 on: June 21, 2014, 07:24:42 PM »


    There exist some rather interesting models.
    20% cooler

    Offlinezuppers

    • *autistic screeching*
    • Global Moderator
    • *****
    • *
    • Posts: 1,533
    • Thanks: +0/-0
      • View Profile
    Re: Lin's Cache Suite v1.1 - 100% Plugin-based 317 Cache Editor
    « Reply #19 on: June 21, 2014, 09:50:00 PM »
    [img][img]

    There exist some rather interesting models.
    That's the old dude in the tree spying on the draynor bank isn't it?
    « Last Edit: June 21, 2014, 11:16:10 PM by zuppers »
    REEEEEEEEE

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal