[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 lmame on Sat Jul 05, 2008 12:12 am

I know it's just in case someone didn't see it and was still trying to figure out how it was working ;)
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [RELEASE] Massive Format Information

Postby Drakia on Tue Jul 08, 2008 6:32 am

Welp, here's an updated and fixed IFO format. Just did this as I was making my IFO dumper (Re-writing it) so it should be correct for Mobs, and NPCs atleast.
  1. DWORD block_count
  2. :FOREACH( block_count )
  3.     DWORD block_type
  4.     DWORD block_offset
  5. :ENDFOR
  6. :FOREACH( block_count )
  7.     :SEEK( block_offset )
  8.     :IF( block_type == 0 ) //Economy Data
  9.         BYTE[0x56] unknown
  10.     :ENDIF
  11.     :IF( block_type == 7 ) //Unknown
  12.         DWORD x_count
  13.         DWORD y_count
  14.         :FOREACH( x_count )
  15.             :FOREACH( y_count )
  16.                 BYTE[17] unknown
  17.             :ENDFOR
  18.         :ENDFOR
  19.         :GOTO NEXT BLOCK!
  20.     :ENDIF
  21.     :IF( block_type == 9 ) //Water Planes
  22.         FLOAT basic_float
  23.         DWORD entry_count
  24.         :FOREACH( entry_count )
  25.             FLOAT x1
  26.             FLOAT y1
  27.             FLOAT z1
  28.             FLOAT x2
  29.             FLOAT y2
  30.             FLOAT z2
  31.         :ENDFOR
  32.         :GOTO NEXT BLOCK!
  33.     :ENDIF
  34.     //All blocks except 0, 7 and 9 have base format:
  35.     DWORD entry_count
  36.     :FOREACH( entry_count )
  37.         BSTR str_data
  38.         WORD unknown1
  39.         WORD event_id
  40.         DWORD obj_type
  41.         DWORD obj_id
  42.         DWORD map_pos_x
  43.         DWORD map_pos_y
  44.         FLOAT quaternion_x
  45.         FLOAT quaternion_y
  46.         FLOAT quaternion_z
  47.         FLOAT quaternion_w
  48.         FLOAT position_x
  49.         FLOAT position_y
  50.         FLOAT position_z
  51.         FLOAT scale_x
  52.         FLOAT scale_y
  53.         FLOAT scale_z
  54.         :IF( block_type == 1 ) //Objects ( LIST_TERRAIN_OBJECT_*.STB, LIST_DECO_*.ZSC )
  55.             //No Extra Data
  56.         :ENDIF
  57.         :IF( block_type == 2 ) //NPC Locations
  58.             DWORD unknown1
  59.             BSTR con_file
  60.         :ENDIF
  61.         :IF( block_type == 3 ) //Objects 2 ( Houses ) ( LIST_CNST_*.STB, LIST_CNST_*.ZSC )
  62.             //No Extra Data
  63.         :ENDIF
  64.         :IF( block_type == 4 ) //Sound Effects
  65.             BSTR path
  66.             DWORD unknown1
  67.             DWORD unknown2
  68.         :ENDIF
  69.         :IF( block_type == 5 ) //Effects
  70.             BSTR path
  71.         :ENDIF
  72.         :IF( block_type == 6 ) //Objects 3 ( Animatable ) ( LIST_MORPH.STB )
  73.             //No Extra Data
  74.         :ENDIF
  75.         :IF( block_type == 8 ) //Monster Spawn Points
  76.             BSTR spawn_name
  77.             DWORD basic_mobs
  78.             :FOREACH( basic_mobs )
  79.                 BSTR mob_name
  80.                 DWORD monster_id
  81.                 DWORD amount
  82.             :ENDFOR
  83.             DWORD tactic_mobs
  84.             :FOREACH( tactic_mobs )
  85.                 BSTR mob_name
  86.                 DWORD monster_id
  87.                 DWORD amount
  88.             :ENDFOR
  89.             DWORD interval
  90.             DWORD limit_count
  91.             DWORD range
  92.             DWORD tactic_points
  93.         :ENDIF
  94.         :IF( block_type == 10 ) //Warp Gates
  95.             //No Extra Data
  96.         :ENDIF
  97.         :IF( block_type == 11 ) //Unknown
  98.             //No Extra Data
  99.         :ENDIF
  100.         :IF( block_type == 12 ) //Triggers
  101.             BSTR qsd_trigger
  102.             BSTR lua_trigger
  103.         :ENDIF
  104.     :ENDFOR
  105. :ENDFOR
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 Rescudo on Wed Jul 09, 2008 7:49 pm

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.
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 Drakia on Wed Jul 09, 2008 9:10 pm

I remember running across some INIT blocks that didn't have 0 as the data in pRose files. The init block is just what to initially do, so in the case of all your files, it's load dialog 0 as NPC text. I think I saw some in pRose that started at dialog 53 instead of 0 (Or something like that, I don't remember the exact number). I'll run a script on it later to double check though.
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 Rescudo on Wed Jul 09, 2008 11:17 pm

Sure, thanks for your effort.
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 xadet3 on Mon Aug 04, 2008 2:27 am

I found some .MRP file today I didn't even know existed. So I spent a whole 5 seconds of my life reversing it's incredibly hard format.

  1. DWORD Unknown
  2. LSTR ZMS
  3. LSTR ZMO
  4. LSTR DDS
  5. BYTE[0x20] Unused
xadet3
Pero pero
Pero pero
 
Posts: 727
Joined: Tue Jan 08, 2008 11:51 pm
Location: Norwich, England.

Re: [RELEASE] Massive Format Information

Postby Blah4 on Tue Aug 05, 2008 8:41 pm

And... where did you find it?
Blah4
ospRose dev team
ospRose dev team
 
Posts: 199
Joined: Sun Jan 06, 2008 12:05 pm
Location: The Netherlands

Re: [RELEASE] Massive Format Information

Postby Drakia on Tue Aug 05, 2008 9:39 pm

3ddata\effect\effectmesh\
3ddata\effect\effectmesh\mrp
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 Rescudo on Tue Aug 05, 2008 10:22 pm

From the looks of the format, it connects the ZMS, ZMO and DDS and is used to combine the correct files into an animated, textured model? (Just an assumption.)
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 Drakia on Tue Aug 05, 2008 11:23 pm

Those last 0x20 bytes don't look so much unused. Looks like 8 DWORD's, the values do change from file to file.
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

PreviousNext

Return to Client Editing Question Zone

Who is online

Users browsing this forum: No registered users and 3 guests

cron