Thread: Loading Multiple Revision Objects (if the models are packed)

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Loading Multiple Revision Objects (if the models are packed) 
    Donator


    Join Date
    Mar 2012
    Posts
    1,023
    Thanks given
    221
    Thanks received
    299
    Rep Power
    605
    I'm going to give you the methods that I personally use to load multiple revisions of object maps without the location data files breaking each other
    meaning white/invisible objects. This means that I can load every single revision landscape map almost perfectly. I'm also going to give you the code
    to extend your location data file. Although I haven't seen anyone else do this but it's pretty easy if you go try it without this snippet. I recently needed
    to add the Grand Exchange object map and it severely damaged my other maps. This will fix that. For any variable that you don't have, you'll have to initialize yourself.

    Natvigate to your ObjectDef.java class and below:

    Code:
     stream = new Stream(streamLoader.getDataForName("loc.dat"));
     Stream stream = new Stream(streamLoader.getDataForName("loc.idx"));
    load your second revision data file:

    Code:
    stream2 = new Stream(FileOperations.ReadFile(Client.CachePath + "Cache/562_loc.dat"));
    Stream stream2 = new Stream(FileOperations.ReadFile(Client.CachePath + "Cache/562_loc.idx"));
    Add your fileIndex int array under the one that's already there:

    Code:
    int totalObjects2 = stream2.readUnsignedWord();
    streamIndices2 = new int[totalObjects2];
    int x = 2;
    Loop through and read the file:

    Code:
    for (int j = 0; j < totalObjects2; j++) 
    {
          streamIndices2[j] = x;
          x += stream2.readUnsignedWord();
    }
    Next Navigate to your constructor "public static ObjectDef forID( int i ...)" and add this below the first {

    Code:
     if (i > streamIndices.length|| i > streamIndices2.length)
    {
              i = streamIndices.length+streamIndices2.length - 1;
              System.out.println("Array Index Out of Bounds at ObjectDef forID");
    }
    Next find "stream.currentOffset = streamIndices[i];"

    Code:
     if (rev562)
    {
        stream2.currentOffset = streamIndices2[i];
    
    
    } else {
    
    
        stream.currentOffset = streamIndices[i];
    }
    Next find "objectdef.readValues(stream);"

    Code:
    if (rev508)
    {
       objectdef.read562Values(stream2);
    
    
    } else {
    
    
       objectdef.readValues(stream);
    }
    Then in your client class you need to set the bool to true when a specific landscape file is fetched from the Map_Index.
    In your parse packet method at the bottom of (pktType = 74) you'll see: int objectMap = anIntArray1236[k16] = onDemandFetcher.getMapIndex(1, j26, l23);
    UNDER THAT:

    Code:
    if (objectMap == 267) // Center Grand Exchange Landscape File 
    {
    ObjectDef.rev562 = true; loadingStages = 1;
    
    
    } else {
    
    
    ObjectDef.rev562 = false; loadingStages = 1;
    }
    Then you can load any revision you want based on the objectmap!

    Enjoy your uninterrupted 377 maps with GE, NEX, Tormented Demons or whatever the hell you want to add...

    I made it a command to show you how fast it loads; here is the command ::fov with:

    ObjectDef.rev562 =! ObjectDef.rev562

    Attached imageAttached imageAttached imageAttached image
    Reply With Quote  
     

  2. #2  
    Registered Member
    hacker's Avatar
    Join Date
    Jun 2013
    Posts
    1,409
    Thanks given
    576
    Thanks received
    580
    Rep Power
    5000
    Lol what you added this just so you can have 377/525+ maps?
    Attached image
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Donator


    Join Date
    Mar 2012
    Posts
    1,023
    Thanks given
    221
    Thanks received
    299
    Rep Power
    605
    Quote Originally Posted by Hacker View Post
    Lol what you added this just so you can have 377/525+ maps?
    No it's just what I do to quickly switch through revisions.
    Reply With Quote  
     

  5. #4  
    Registered Member
    hacker's Avatar
    Join Date
    Jun 2013
    Posts
    1,409
    Thanks given
    576
    Thanks received
    580
    Rep Power
    5000
    Quote Originally Posted by Nucleon View Post
    No it's just what I do to quickly switch through revisions.
    Oh alright good job I suppose was considering releasing this myself but wasn't sure what response I'd get
    Attached image
    Reply With Quote  
     

  6. #5  
    Donator


    Join Date
    Mar 2012
    Posts
    1,023
    Thanks given
    221
    Thanks received
    299
    Rep Power
    605
    Quote Originally Posted by Hacker View Post
    Oh alright good job I suppose was considering releasing this myself but wasn't sure what response I'd get
    I'd imagine no one will use this unless they want to keep their 377 maps and have other content such as nex, soul wars etc, without having white trees/tables and other goofy shit loading from the higher revision loc.dat
    Reply With Quote  
     

  7. #6  
    Registered Member
    hacker's Avatar
    Join Date
    Jun 2013
    Posts
    1,409
    Thanks given
    576
    Thanks received
    580
    Rep Power
    5000
    Quote Originally Posted by Nucleon View Post
    I'd imagine no one will use this unless they want to keep their 377 maps and have other content such as nex, soul wars etc, without having white trees/tables and other goofy shit loading from the higher revision loc.dat
    Well it has its uses. Also Pea2nuts released a 742+ model decoder which happens to support textures for higher revision models
    Attached image
    Reply With Quote  
     

  8. #7  
    anInt69

    Max _'s Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,801
    Thanks given
    426
    Thanks received
    727
    Rep Power
    599
    Not bad seen people buying stuff like this so should make them quite happy.

    Good job.
    Reply With Quote  
     

  9. #8  
    Donator


    Join Date
    Mar 2012
    Posts
    1,023
    Thanks given
    221
    Thanks received
    299
    Rep Power
    605
    Quote Originally Posted by Hacker View Post
    Well it has its uses. Also Pea2nuts released a 742+ model decoder which happens to support textures for higher revision models
    All you have to do is use Nicknames model class and you won't have that problem. I've never heard of this decoder? Would you send me the link.
    Reply With Quote  
     

  10. #9  
    Registered Member
    hacker's Avatar
    Join Date
    Jun 2013
    Posts
    1,409
    Thanks given
    576
    Thanks received
    580
    Rep Power
    5000
    Quote Originally Posted by Nucleon View Post
    All you have to do is use Nicknames model class and you won't have that problem. I've never heard of this decoder? Would you send me the link.
    Eh true and here http://www.rune-server.org/runescape...l-decoder.html I released a 317 client with it, not sure if i removed download link tho
    Attached image
    Reply With Quote  
     

  11. #10  
    Donator


    Join Date
    Mar 2012
    Posts
    1,023
    Thanks given
    221
    Thanks received
    299
    Rep Power
    605
    added nex!

    Attached image
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. How many models are in the 377 cache?
    By Deadly A G S in forum Help
    Replies: 2
    Last Post: 10-23-2010, 03:36 AM
  2. Replies: 0
    Last Post: 04-06-2010, 01:27 PM
  3. Replies: 37
    Last Post: 02-19-2010, 07:04 PM
  4. Replies: 6
    Last Post: 07-10-2009, 11:54 PM
  5. What some of the models are for
    By Sub in forum Models
    Replies: 4
    Last Post: 06-21-2008, 04:02 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •