Difference between revisions of "WBD-WBN"

From GTAMods Wiki
Jump to navigation Jump to search
(File Format)
(File Format)
Line 39: Line 39:
 
  0x08 2b Short ???
 
  0x08 2b Short ???
 
  0x0A 2b Short ???
 
  0x0A 2b Short ???
  0x0C 4b  Float Bounds Sphere Radius
+
  0x0C 4b  Float Bounding Sphere Radius
  0x10 4b  Float  Bounds Box Max <X>
+
  0x10 4b  Float  Bounding Box Max <X>
  0x14 4b  Float  Bounds Box Max <Y>
+
  0x14 4b  Float  Bounding Box Max <Y>
  0x18 4b  Float  Bounds Box Max <Z>
+
  0x18 4b  Float  Bounding Box Max <Z>
  0x1C 4b Long    Always 1 <01 00 80 7F>
+
  0x1C 4b Long    Always 1 <Hex 0100807F>
  0x20 4b  Float  Bounds Box Min <X>
+
  0x20 4b  Float  Bounding Box Min <X>
  0x24 4b  Float  Bounds Box Min <Y>
+
  0x24 4b  Float  Bounding Box Min <Y>
  0x28 4b  Float  Bounds Box Min <Z>
+
  0x28 4b  Float  Bounding Box Min <Z>
  0x2C 4b Long    Always 1 <01 00 80 7F>   
+
  0x2C 4b Long    Always 1 <Hex 0100807F>   
  
 
  '''WBN''' Header
 
  '''WBN''' Header

Revision as of 21:21, 17 August 2010

WBD/WBN Description

WBD is a "Windows Bounds Dictionary" file usually located in the "Rockstar Games\Grand Theft Auto IV\pc\data\maps\xxx_folder\xxx.img"

WBN is a "Windows Bounds Nodes" file usually located in the "Rockstar Games\Grand Theft Auto IV\pc\data\maps\xxx_folder\xxx.img"

these files are the method used within GTA-IV for collision files, early indications show that map model colision files are mapped in game "World coordinates"

File Format

Here is some basic information that has been gathered so far. (From decompressed ext_door.wbd)

  • CPU Offsets are of form [xx xx xx 50] * Data Offsets are of form [xx xx xx 60]
WBD Header
-------------------------------------------------------------------
Offset	Size	Type	Data			Description
-------------------------------------------------------------------
0x00	4b	LONG	VTable		
0x04	4b  	Offset	Offset to blockMap
0x08	4b  	LONG	Unknown
0x0C	4b  	LONG	Unknown
0x10	8b  	SimpleCollection<Hashes>	Collection that contains all hashes of the models
0x18	8b	PointerCollection<Bounds>	Collection that contains pointers to the bounds data
--------------------------------------------------------------------
SimpleCollection (BlockSize 0x08) 
Contains data of the given type
--------------------------------------------------------------------
0x00	4b	Offset	Offset to the Data
0x04	2b	Short	Data Count
0x06	2b	Short	Data Size
--------------------------------------------------------------------
Bounds data
--------------------------------------------------------------------
0x00	4b	Long	VTable
0x04	2b	Short	???
0x06	2b	Short	???
0x08	2b	Short	???
0x0A	2b	Short	???
0x0C	4b  	Float	Bounding Sphere Radius
0x10	4b  	Float   Bounding Box Max <X>
0x14	4b  	Float   Bounding Box Max <Y>
0x18	4b  	Float   Bounding Box Max <Z>
0x1C	4b	Long    Always 1 <Hex 0100807F>
0x20	4b  	Float   Bounding Box Min <X>
0x24	4b  	Float   Bounding Box Min <Y>
0x28	4b  	Float   Bounding Box Min <Z>
0x2C	4b	Long    Always 1 <Hex 0100807F>   
WBN Header
-------------------------------------------------------------------
Offset	Size	Type	Data			Description
-------------------------------------------------------------------
0x00	4b	LONG	VTable		
0x04	4b  	Offset	????
0x08	4b  	Offset	Collection of Bounding Definitions (see VTable page)

See also