Thread: Information on OSRS cache packing

Results 1 to 4 of 4
  1. #1 Information on OSRS cache packing 
    WhiteDownMb | HYBRID JEFE
    Brett the Don's Avatar
    Join Date
    Dec 2009
    Posts
    2,117
    Thanks given
    349
    Thanks received
    556
    Rep Power
    2540
    Looking for a little insight and right direction, messing around with Acranium just as a side project for my self to dip into OSRS.

    I understand that landscape is index 5, I have been looking through Displee's RS cache library.

    I think that that this is the https://github.com/Displee/RS-Cache-...-to-an-archive right place to be looking, I just need a little guidance.

    I happen to think that 48, and 54 is edgeville for OSRS (friend told me), now I need to go upon replacing with new maps. BUT now I don't know if maps that are released on here which are (624.gz and 625.gz) if I can just rename to 48;54;

    and if i can just simply rename them would I be assuming this is how I would repack?

    Code:
    library.getIndex(5).addArchive(would be 48 or 54 here);

    All of humanity's problems stem from man's
    inability to sit quietly in a room by himself




    Reply With Quote  
     

  2. #2  
    Extreme Donator


    Join Date
    Nov 2011
    Posts
    311
    Thanks given
    15
    Thanks received
    94
    Rep Power
    361
    This is a snippet from a tool I made back earlier this year that uses displees. But yes, you would be packing the 624/625 for edgeville.

    Code:
        private fun packMaps(path: Path, cache: CacheLibrary): Boolean {
            val maps = cache.getIndex(5)
            for (map in Files.walk(path, 1)) {
                if (map == path) {
                    continue
                }
    
                val fileName = map.fileName.toString().replace(".dat", "")
                val id = fileName.toInt()
                val buffer = Files.readAllBytes(map)
                maps.getArchive(id, true).addFile(0, buffer, 0)
                logger.info("Added $id")
    
            }
            if (maps.update()) {
                logger.info("Finished packing")
            }
    
            return true
        }
    }
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member

    Join Date
    Sep 2016
    Posts
    181
    Thanks given
    84
    Thanks received
    74
    Rep Power
    452
    And 624 and 625 come from the map_index which links all the region ids to file ids. The 624/625 is random but it's what the file ids ended up being. Region is for edgevillenis not a random number and it comes from the coordinates essentially.
    Reply With Quote  
     

  5. #4  
    Registered Member

    Join Date
    Dec 2009
    Posts
    774
    Thanks given
    367
    Thanks received
    455
    Rep Power
    927
    Code:
    int x = 48;
    int y = 54;
    cache.getIndex(5).addArchive("l$x_$y").addFile(0, landscape_data)
    cache.getIndex(5).addArchive("m$x_$y").addFile(0, map_scene_data)
    
    //if there's underground landscape and mapscene data
    cache.getIndex(5).addArchive("ul$x_$y").addFile(0, underground_landscape_data)
    cache.getIndex(5).addArchive("um$x_$y").addFile(0, underground_map_scene_data)
    `addArchive` here ensures that the archive exists, so if it doesn't, it will create it
    link removed
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [OSRS] Official OSRS Cache Dump Archive
    By _jordan in forum Downloads
    Replies: 47
    Last Post: 05-27-2021, 03:57 PM
  2. Opening and packing Jagex OSRS cache
    By Topz in forum Help
    Replies: 0
    Last Post: 05-22-2018, 05:51 AM
  3. Replies: 1
    Last Post: 01-28-2017, 08:08 PM
  4. Replies: 2
    Last Post: 11-02-2013, 05:21 AM
  5. Replies: 3
    Last Post: 04-09-2011, 07:37 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •