Results 1 to 5 of 5
  1. #1
    Dwar
    Dwar is offline
    Veteran Dwar's Avatar
    Join Date
    2010 Mar
    Posts
    2,222
    Thanks Thanks Given 
    211
    Thanks Thanks Received 
    2,230
    Thanked in
    292 Posts
    Rep Power
    10

    VDK file structure (Ragnarok Online, Requiem)

    The structure of VDK files which are used in Ragnarok Online 2 and Requiem

    Code:
     //--------------------------------------
    //--- 010 Editor v3.1.2 Binary Template
    //
    // File: vdk 1.1
    // Author: Dwar
    // Revision: 2010-09-05
    // Purpose: vdk unpacker
    //--------------------------------------
    
    //vdk header
    struct VDKHeader                    
    {
      char VDK_desk[8];     //VDISK1.1
      int  VDK_unk;         //unknown
      int  VDK_CountFile;   //file count
      int  VDK_CountFolder; //folder count
      int  VDK_size;        //vdk file size without root (+91h) and FileList 
      int  VDK_unk;         //unknown
    } Header;
    
    // read files data until VDK_size + 91h
    struct Files                    
    {
      byte isDir;
      char fileName[128];
      int  SizeOriginal;
      int  SizePacked;
      int  parentDirOffset <format=hex>;
      int  NextAddrOffset  <format=hex>;
    };
    
    //
    struct FileList         // list of files at the end                   
    {
      int  VDK_filecount;   //file count
      char fileName[260];
      int  fileOffset <format=hex>;
    };
    Please, post your questions on forum, not by PM or mail

    I spend my time, so please pay a little bit of your time to keep world in equilibrium

  2. #2
    snaity
    snaity is offline
    New member
    Join Date
    2010 Aug
    Posts
    6
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post
    Rep Power
    0
    Revised Structs

    Code:
    //--------------------------------------
    //--- 010 Editor v3.1.2 Binary Template
    //
    // File: vdk 1.1
    // Author: Dwar
    // Revision: 2010-09-05
    // Purpose: vdk unpacker
    //--------------------------------------
     
    //vdk header
    struct VDKHeader                    
    {
    	char	VDK_desk[8];     //VDISK1.1(Ragnarok2)/VDISK1.0(Requiem)
    	int	VDK_unk;         //unknown
    	int	VDK_CountFile;   //file count
    	int	VDK_CountFolder; //folder count
    	int	VDK_size;        //vdk file size without root (+91h) and FileList 
    	int	VDK_filelist_size;         //Files List Size(VDISK1.1 Only)
    } Header;
     
    // read files data until VDK_size + 91h
    struct Files                    
    {
      byte isDir;
      char fileName[128];
      int  SizeOriginal;
      int  SizePacked;//zlib Compressed size
      //It is only for folders for files is 0
      int  parentDirOffset <format=hex>;
      //If is last file or folder this value is 0, and for folder is the offset of next folder on dir
      int  NextAddrOffset  <format=hex>;
      // Zlib compressed data (Deflate/Inflate), and only for files, not exist for folders
      byte FileData[SizePacked]; 
    };
     
    // Only for VDISK 1.1
    struct FileList         // list of files at the end                   
    {
      int  VDK_filecount;   //file count
      FileListRow Files[VDK_Filecount];  
    };
    
    struct FileListRow
    {
      char fileName[260]; // Full file name (path + filename in UPERCASE)
      int  fileOffset <format=hex>; // Offset of file entry with FileData
    };
    Last edited by snaity; 2011-02-02 at 10:55 PM.

  3. The Following User Says Thank You to snaity For This Useful Post:


  4. #3
    tackyjan
    tackyjan is offline
    Guest
    Join Date
    2013 Apr
    Posts
    2
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0

    Red face

    Can you please explain what you mean by <format=hex> (as for parent directory offset and next address offset)? If the values are save as an int wouldn't you just use the raw value when parsing the vdk?

  5. #4
    danielleally
    danielleally is offline
    Guest
    Join Date
    2013 Oct
    Posts
    1
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0
    Is this the updated version for Ragnarok Online 2?

  6. #5
    cyc1990
    cyc1990 is offline
    Guest
    Join Date
    2013 Oct
    Posts
    1
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0

    wat tools using to edit the file..

    hi can i know wat tools using to edit the file
    can teach me how to edit ..thx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •