Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • hexedss1: Anyone would like to help on client side got a variable declartion Error
      Today at 09:06:30 PM
    • SOUPSOUP: just get a vpn
      August 13, 2018, 06:44:28 PM
    • jme: _^_ will answer all of your javascript questions
      August 12, 2018, 07:11:00 PM
    • doomsale: and where is boxman?
      August 10, 2018, 03:16:59 AM
    • doomsale: Where can i play the Moparscape MMORPG with the Metallica instrumentals?
      August 10, 2018, 03:16:47 AM
    • doomsale: no longer clicking on doors and dummies at east bank
      August 10, 2018, 03:16:07 AM
    • doomsale: were all grown up now huh?
      August 10, 2018, 03:15:58 AM
    • _^_: hey everyone look at my graphs [link]
      August 06, 2018, 01:52:16 PM
    • braedyn: Someone pl0x help me out with PI Lottery!!
      August 03, 2018, 02:12:25 AM
    • Travas: p3n1s
      July 26, 2018, 09:46:33 PM
    • Krackkid: You up :eggplant:
      July 23, 2018, 06:18:17 PM
    • DeathsChaos9: no
      July 23, 2018, 03:53:31 PM
    • Emulous: Come check out Emulous: [link]
      July 22, 2018, 03:37:19 PM
    • Emulous:[link]
      July 22, 2018, 03:37:00 PM
    • Travas: ur mom
      July 21, 2018, 06:04:50 PM
    • YNRDAB: Watcha big ballers up too?
      July 20, 2018, 11:01:06 AM
    • dark250: i need help for coding client
      July 19, 2018, 08:27:37 AM
    • Travas: yes
      July 14, 2018, 02:19:44 PM
    • drubrkletern: lmao racist and sexist much?
      July 14, 2018, 01:11:52 PM
    • Cole1497: yeah i got you lil boat give me a second
      July 13, 2018, 03:19:35 AM

    Author Topic: Data files  (Read 804 times)

    0 Members and 1 Guest are viewing this topic.

    Offlinehadlich4

    • Member
    • ****
    • *
    • Posts: 587
    • Thanks: +0/-0
      • View Profile
    Data files
    « on: September 05, 2015, 09:37:21 PM »
    How can I view .dat files in a readable editable format? Would I use like datainputstream or bufferedreader and then output it to a txt or java file? I'm just confused and would like to have some better understanding of how this works. Any information about .dat files is welcome thankyou
    Runescape Gambling

    OfflineLimits

    • Member
    • ****
    • Posts: 2,190
    • Thanks: +0/-0
      • View Profile
    Re: Data files
    « Reply #1 on: September 05, 2015, 10:09:02 PM »
    .dat files are not in a specific format. They are in whatever format the person who created it chose. The .dat is just a placeholder for the lack of a better name for the data in the file.
    Runescape Gambling

    Offlinehadlich4

    • Member
    • ****
    • *
    • Posts: 587
    • Thanks: +0/-0
      • View Profile
    Re: Data files
    « Reply #2 on: September 06, 2015, 03:56:08 AM »
    .dat files are not in a specific format. They are in whatever format the person who created it chose. The .dat is just a placeholder for the lack of a better name for the data in the file.

    So how can you read them and edit them
    Runescape Gambling

    Offlinehadlich4

    • Member
    • ****
    • *
    • Posts: 587
    • Thanks: +0/-0
      • View Profile
    Re: Data files
    « Reply #3 on: September 06, 2015, 12:22:06 PM »
    .dat files are not in a specific format. They are in whatever format the person who created it chose. The .dat is just a placeholder for the lack of a better name for the data in the file.

    So how can you read them and edit them
    Depends on what the file contains. Look at how the client is loading them up, should give you a good idea.

    Hmm I guess I'll check it out in a refractored client

    Offlinehadlich4

    • Member
    • ****
    • *
    • Posts: 587
    • Thanks: +0/-0
      • View Profile
    Re: Data files
    « Reply #4 on: September 06, 2015, 06:15:29 PM »
    Top lad, update us with your progress. I don't want you pretending to look into the client and quit because you don't have a clue what you're doing but act like you did it.

    Haven't had time to check yet but, what I'm thinking is I'm gunna look for where it loads it in then use existing methods to edit it? And on the other hand how do I go about saving any data in java idk lately I've been researching and coming to not much of a conclusion, as in bytes what is the point I get they have 8 bits -128-128 but what's the point of using them and what's a situation where I'd use them and how do I store data can someone please take the time and explain this to me I have researched and I so just want to know how all this works but I cannot find a good explanation you don't understand how inspirational you would be if you explained this to me

    OfflineLimits

    • Member
    • ****
    • Posts: 2,190
    • Thanks: +0/-0
      • View Profile
    Re: Data files
    « Reply #5 on: September 06, 2015, 06:21:47 PM »
    Top lad, update us with your progress. I don't want you pretending to look into the client and quit because you don't have a clue what you're doing but act like you did it.

    Haven't had time to check yet but, what I'm thinking is I'm gunna look for where it loads it in then use existing methods to edit it? And on the other hand how do I go about saving any data in java idk lately I've been researching and coming to not much of a conclusion, as in bytes what is the point I get they have 8 bits -128-128 but what's the point of using them and what's a situation where I'd use them and how do I store data can someone please take the time and explain this to me I have researched and I so just want to know how all this works but I cannot find a good explanation you don't understand how inspirational you would be if you explained this to me
    What .dat file are you trying to open? In the case of Runescape, most .dat files, if not all, are caches containing more than one object.


    Think of it like this:


    (dat file for sprites for example)
    name Magic_icon1 // name of next sprite
    data_length 16384 // amount of data in this sprite
    // the following are color values

    11982
    129481
    198211... //128x128 sprite contains 16384 values if the only thing being stored is a pixel array
    name Magic_icon2 // start again
    data_length 1024 // 32x32 sprite
    3592852
    624636
    75742... (color values)
    .......
    and on and on.


    The information is stored in order so you'd go through in Java and do this (this is an example)


    String name = byteBuffer.getString();
    int[] pixels = new int[byteBuffer.getInt()]; //byteBuffer.getInt() returns the data_length value because that is the next value in the .dat file
    for (int i = 0; i < pixels.length; i++) {
         pixels = byteBuffer.getInt();
    }
    and boom, you just loaded Magic_icon1 from a dat file. You just need to find the order that the data is put in a .dat file and then load it from there.
    « Last Edit: September 06, 2015, 06:25:49 PM by Limits »

    Offlinehadlich4

    • Member
    • ****
    • *
    • Posts: 587
    • Thanks: +0/-0
      • View Profile
    Re: Data files
    « Reply #6 on: September 06, 2015, 06:44:28 PM »
    Top lad, update us with your progress. I don't want you pretending to look into the client and quit because you don't have a clue what you're doing but act like you did it.

    Haven't had time to check yet but, what I'm thinking is I'm gunna look for where it loads it in then use existing methods to edit it? And on the other hand how do I go about saving any data in java idk lately I've been researching and coming to not much of a conclusion, as in bytes what is the point I get they have 8 bits -128-128 but what's the point of using them and what's a situation where I'd use them and how do I store data can someone please take the time and explain this to me I have researched and I so just want to know how all this works but I cannot find a good explanation you don't understand how inspirational you would be if you explained this to me
    What .dat file are you trying to open? In the case of Runescape, most .dat files, if not all, are caches containing more than one object.


    Think of it like this:


    (dat file for sprites for example)
    name Magic_icon1 // name of next sprite
    data_length 16384 // amount of data in this sprite
    // the following are color values

    11982
    129481
    198211... //128x128 sprite contains 16384 values if the only thing being stored is a pixel array
    name Magic_icon2 // start again
    data_length 1024 // 32x32 sprite
    3592852
    624636
    75742... (color values)
    .......
    and on and on.


    The information is stored in order so you'd go through in Java and do this (this is an example)


    String name = byteBuffer.getString();
    int[] pixels = new int[byteBuffer.getInt()]; //byteBuffer.getInt() returns the data_length value because that is the next value in the .dat file
    for (int i = 0; i < pixels.length; i++) {
         pixels = byteBuffer.getInt();
    }
    and boom, you just loaded Magic_icon1 from a dat file. You just need to find the order that the data is put in a .dat file and then load it from there.


    So how do you find out the order

    OfflineLimits

    • Member
    • ****
    • Posts: 2,190
    • Thanks: +0/-0
      • View Profile
    Re: Data files
    « Reply #7 on: September 06, 2015, 06:46:13 PM »

    By finding this part in the code.


    String name = byteBuffer.getString();
    int[] pixels = new int[byteBuffer.getInt()]; //byteBuffer.getInt() returns the data_length value because that is the next value in the .dat file
    for (int i = 0; i < pixels.length; i++) {
         pixels = byteBuffer.getInt();
    }

     

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