[RELEASE] Massive Format Information

This forum is for main questions (format files, STB / STL and so on).

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Forum rules
Client Editing is a delicate subject. osRose and osiRose will not support or use any Client Editing tool or results as a standard. So you are free to experiment, test, and develop there on Client Editing, but at your own risk :)

Re: [RELEASE] Massive Format Information

Postby xadet3 on Wed Aug 06, 2008 3:01 am

They probably are used, but at the end of the day I have no idea what uses MRP so it isn't easy to find out, and I don't like to use the word unknown lol.
xadet3
Pero pero
Pero pero
 
Posts: 727
Joined: Tue Jan 08, 2008 11:51 pm
Location: Norwich, England.

Re: [RELEASE] Massive Format Information

Postby Drakia on Wed Aug 06, 2008 3:56 am

They're referenced in EFT files
My favorite skill is scaring new users away.
If you haven't SEARCHED expect me to yell at you.
Image
Drakia
ospRose dev team
ospRose dev team
 
Posts: 1614
Joined: Tue Sep 18, 2007 6:53 am
Location: Nanaimo, BC, Canada

Re: [RELEASE] Massive Format Information

Postby shibii on Wed Aug 20, 2008 5:54 am

Damn you Brett, I leave rose for a couple years and there you go , you do all this stuffs :P I should have stayed around ^^ well good work :)
shibii
Little soul
Little soul
 
Posts: 3
Joined: Wed Aug 20, 2008 5:49 am

Re: [RELEASE] Massive Format Information

Postby Brett19 on Sat Sep 20, 2008 11:45 pm

Rescudo wrote:After in-depth analysis of the CON format, I have these modifications to make:
  1. BYTE[0x202] unused
  2. WORD unknown                  // is either CCCC, 0000, 2C2C or 4D00
  3.  
  4. DWORD block_offset            // always 524 / 0x20C
  5. DWORD lua_offset
  6.  
  7. DWORD init_count              // always 1
  8. DWORD init_offset             // always 16 / 0x10
  9. DWORD dialog_count
  10. DWORD dialog_offset           // always 100 / 0x64
  11.  
  12. // NPC INIT BLOCK
  13. DWORD init_lookuptable        // always 4
  14. DWORD entry_id                // always 0
  15. DWORD Command                 // always 3
  16. DWORD Data                    // always 0
  17. BYTE[0x20] condition_function // always "TA_checkRepeat"
  18. BYTE[0x20] reward_function    // always a nullstring
  19. DWORD str_id                  // referenced LTB entry always says "Root", though the actual number might vary
  20.  
  21. // DIALOG BLOCKS
  22. DWORD[dialog_count] dialog_lookuptable // contains offsets to each dialog
  23. : FOREACH (dialog_count)
  24.   DWORD block_size
  25.   DWORD entry_count
  26.   :XOR( ( (BYTE)entry_count % 2 == 0 ) ? (BYTE)block_size : (BYTE)entry_count )
  27.     DWORD[entry_count] entry_lookuptable // contains offsets to each dialog entry
  28. : FOREACH (entry_count)
  29.       DWORD entry_id
  30.       DWORD Command
  31.       DWORD Data
  32.       BYTE[0x20] condition_function
  33.       BYTE[0x20] reward_function
  34.       DWORD str_id
  35. : ENDFOR
  36. : ENDXOR
  37. : ENDFOR
  38.  
  39. // LUA CODE BLOCK
  40. DWORD code_len
  41. :XOR( (code_len % 2) ? code_len & 0xFF: (lua_offset+4+code_len) & 0xFF )
  42.   BYTE[code_len] lua_data
  43. : ENDXOR


As you can see, the init block always has only one entry, whose contents are constant. I also corrected block_count to dialog_count, and updated the XOR key for the Lua code block, as it was slightly off in Brett's original format. All assertions have been checked with a script and show 100% consistency in an Evo client. Hope this helps.


I don't entirely follow the purposing behind this. What the blocks "always" are doesn't matter, ROSE accepts the format with any correct value there, it doesn't have to be what it "seems" to always be. Also "(lua_offset+4+code_len)" == ( file_length ). <3

Cheers, Brett
Brett19
Smoulie
Smoulie
 
Posts: 59
Joined: Sun Dec 30, 2007 2:38 am
Location: Canada

Re: [RELEASE] Massive Format Information

Postby Rescudo on Sun Sep 21, 2008 12:01 pm

Okay ... this information is more useful when you are making an editor I suppose, it's easier to follow the "always" values because you know they will work. But I see your point. Same goes for your "file_length", you do not necessarily know this value until you have actually made the file. :)
SEARCH - it's there for a reason!
User avatar
Rescudo
El Verloon Marshall
El Verloon Marshall
 
Posts: 872
Joined: Tue Mar 11, 2008 7:20 am

Re: [RELEASE] Massive Format Information

Postby timmehl on Fri Oct 03, 2008 8:34 pm

well i had a nub server b4 but learning everything now 1st class of it :D so what can i basically do with this??
Man i hate my spacebar...
timmehl
Pomic
Pomic
 
Posts: 110
Joined: Mon Jan 28, 2008 8:21 pm

Re: [RELEASE] Massive Format Information

Postby Souleater on Fri Oct 03, 2008 11:47 pm

Humpff ... due to the fact that you don't know what to do with this, well you basically can't do anything with it :)

I am sorry for putting it tthat way :)
Image
Souleater
Antares
Antares
 
Posts: 355
Joined: Thu Aug 09, 2007 10:59 pm

Re: [RELEASE] Massive Format Information

Postby Vel on Mon Nov 03, 2008 9:22 am

Hello everyone! Can some one help me with .ZON format. I trying to read it but here:
// 1. DWORD blockcount
// 2. :FOREACH( blockcount )
// 3. DWORD blockid
// 4. DWORD blockoffset
// 5. :ENDFOR

I get those results:
blockid[0]=0; blockoffset[0]= 44;
blockid[0]=1; blockoffset[0]= 36936;
blockid[0]=2; blockoffset[0]= 37095;
blockid[0]=3; blockoffset[0]= 39253;
blockid[0]=4; blockoffset[0]= 45921;

As you can see blockoffset is too big, but it is read correctly, becose blockid has correct value. And when i trying to read section #2 i got wrong values and crash of the program can you help me to get through this problem?

PS
My english is bad :oops:
Sorry for terrible english. My native language is C++
User avatar
Vel
Pomic
Pomic
 
Posts: 120
Joined: Mon Nov 03, 2008 9:13 am
Location: Ukraine, Kharkov.

Re: [RELEASE] Massive Format Information

Postby Rescudo on Mon Nov 03, 2008 9:28 am

Those offsets are correct as far as I can see.
SEARCH - it's there for a reason!
User avatar
Rescudo
El Verloon Marshall
El Verloon Marshall
 
Posts: 872
Joined: Tue Mar 11, 2008 7:20 am

Re: [RELEASE] Massive Format Information

Postby Vel on Mon Nov 03, 2008 10:44 am

Correct? Maybe I have wrong type of block2:

  1. struct  Data
  2.     {
  3.         float x;
  4.         float y;
  5.         float z;
  6.         char name[8];
  7.     };
  8. struct Points // Points ( Respawn, Warp ) == 1
  9. {
  10.     int     entrycount;
  11.     Data*   data;       
  12. };


Is it right? I am not sure about name, what size it must be? Now i get first ~60 entrycount values = 0, and 61 is 16777216, I am sure this is not correct. This is my source, what is wrong?

  1. void Open(char* path)
  2. {
  3.     int fh = _open(path,_O_RDONLY | _O_BINARY);
  4.  
  5.     if (fh == -1)
  6.     {
  7.         fh = _creat("file.dat",_S_IREAD | _S_IWRITE);
  8.         if (fh == -1)
  9.             printf("%s", "Could not open ", path);
  10.     }
  11.         int blockcount;
  12.     _read(fh,&blockcount,sizeof blockcount);
  13.     cout<<"FILE LOADED:\n";
  14.     cout<<"\tblockcount: "<<blockcount<<endl;
  15.  
  16.     int *blockid = new int [blockcount];
  17.     int *blockoffset = new int[blockcount];
  18.    
  19.     for(int i=0;i<blockcount;i++)
  20.     {
  21.         _read(fh,&blockid[i],sizeof blockid[i]);   
  22.         _read(fh,&blockoffset[i],sizeof blockoffset[i]);   
  23.         cout<<"blockid[i]: "<<blockid[i]<<"  ";
  24.         cout<<"blockoffset[i]: "<<blockoffset[i]<<endl;
  25.     }
  26.  
  27.     BlockType1  *Block1Data = new BlockType1[blockcount];
  28.     Points    *points = new Points[blockcount];
  29.     Texture_List  *textures = new Texture_List[blockcount];
  30.     Tile_Combination_List   *tiles = new Tile_Combination_List[blockcount];
  31.     BlockType4    *Block4Data = new BlockType4[blockcount]; 
  32.    
  33.     for(int i=0;i<2;i++) //read only to block #2
  34.     { 
  35.         cout<<"\n blockoffset[i]: "<<blockoffset[i]<<endl; 
  36.         for(int j=0;j<blockoffset[i];j++)
  37.         {
  38.             if(blockid[i] == 0)
  39.             {
  40.                 //cout<<"reading block with id == 0"<<endl;
  41. _read(fh,&Block1Data[i].unk1,sizeof Block1Data[i].unk1);   
  42. _read(fh,&Block1Data[i].unk2,sizeof Block1Data[i].unk2);
  43. _read(fh,&Block1Data[i].unk3,sizeof Block1Data[i].unk3);
  44. _read(fh,&Block1Data[i].unk4,sizeof Block1Data[i].unk4);
  45. _read(fh,&Block1Data[i].unk5,sizeof Block1Data[i].unk5);
  46.  
  47. _read(fh,&Block1Data[i].xcount,sizeof Block1Data[i].xcount);
  48. _read(fh,&Block1Data[i].ycount,sizeof Block1Data[i].ycount);
  49.  
  50. for(int l=0;l<Block1Data[i].xcount;l++)
  51.    for(int k=0;k<Block1Data[i].ycount;k++)
  52.      {
  53.           _read(fh,&Block1Data[i].unkdata,sizeof Block1Data[i].unkdata);
  54.           cout<<(char)Block1Data[i].unkdata;
  55.       }
  56. }
  57.            
  58. else if(blockid[i] == 1)
  59.    {
  60.        //  cout<<"reading block with id == 1 \n";
  61.         _read(fh,&points->entrycount,sizeof points->entrycount);               
  62.           cout<<" "<<points->entrycount; //points->entrycount:  
  63.            points[i].data = new Data[points->entrycount];               
  64.  
  65.       for(int l=0;l<points->entrycount;l++)
  66.        {
  67.     read(fh,&points[i].data->x,sizeof points[i].data->x);
  68.     read(fh,&points[i].data->z,sizeof points[i].data->z);
  69.     read(fh,&points[i].data->y,sizeof points[i].data->y); 
  70.     read(fh,&points[i].data->name,sizeof points[i].data->name);
  71.          }
  72.                
  73.  }          
  74. ...
  75.  
Sorry for terrible english. My native language is C++
User avatar
Vel
Pomic
Pomic
 
Posts: 120
Joined: Mon Nov 03, 2008 9:13 am
Location: Ukraine, Kharkov.

PreviousNext

Return to Client Editing Question Zone

Who is online

Users browsing this forum: No registered users and 2 guests