Difference between revisions of "WBD-WBN"
Jump to navigation
Jump to search
(→File Format) |
|||
(10 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | + | '''Windows bounds dictionary''' (WBD) and '''Windows bounds nodes''' (WBN) are two formats for [[collision file]]s used in GTA 4. | |
− | |||
− | ''' | ||
− | |||
− | '''WBN | ||
− | |||
− | |||
== File Format == | == File Format == | ||
− | + | CPU Offsets are of form [xx xx xx 50] * Data Offsets are of form [xx xx xx 60] | |
− | |||
− | |||
'''WBD''' Header | '''WBD''' Header | ||
Line 20: | Line 12: | ||
0x08 4b LONG Unknown | 0x08 4b LONG Unknown | ||
0x0C 4b LONG Unknown | 0x0C 4b LONG Unknown | ||
− | 0x10 8b SimpleCollection<Hashes> Collection that contains all hashes of the models | + | 0x10 8b SimpleCollection <Hashes> Collection that contains all hashes of the models |
− | 0x18 8b PointerCollection<Bounds> Collection that contains pointers to the | + | 0x18 8b PointerCollection <Bounds> Collection that contains pointers to the Bounds Data |
-------------------------------------------------------------------- | -------------------------------------------------------------------- | ||
− | SimpleCollection (BlockSize 0x08) | + | SimpleCollection (Hashes) (BlockSize 0x08) |
Contains data of the given type | Contains data of the given type | ||
-------------------------------------------------------------------- | -------------------------------------------------------------------- | ||
− | 0x00 4b Offset Offset to the Data | + | 0x00 4b Offset Offset to the Hashes Data |
0x04 2b Short Data Count | 0x04 2b Short Data Count | ||
0x06 2b Short Data Size | 0x06 2b Short Data Size | ||
-------------------------------------------------------------------- | -------------------------------------------------------------------- | ||
− | Bounds data | + | PointerCollection (Bounds) (BlockSize 0x08) |
+ | Contains data of the given type | ||
+ | -------------------------------------------------------------------- | ||
+ | 0x00 4b Offset Offset to the Bounds Data PointerCollection | ||
+ | 0x04 2b Short Data Count | ||
+ | 0x06 2b Short Data Count | ||
+ | |||
+ | -------------------------------------------------------------------- | ||
+ | Bounds data (BlockSize 0x240h) | ||
-------------------------------------------------------------------- | -------------------------------------------------------------------- | ||
0x00 4b Long [[VTable]] | 0x00 4b Long [[VTable]] | ||
− | 0x04 2b Short | + | 0x04 2b Short Pivot Count (Usually 3) |
− | 0x06 2b Short | + | 0x06 2b Short (Usually 1) |
− | 0x08 2b Short | + | 0x08 2b Short (Usually 1) |
− | 0x0A 2b Short | + | 0x0A 2b Short (Usually 0) |
− | 0x0C 4b Float | + | 0x0C 4b Float Bounding Sphere Radius Size |
− | 0x10 4b Float | + | 0x10 4b Float Bounding Box Max (X) |
− | 0x14 4b Float | + | 0x14 4b Float Bounding Box Max (Y) |
− | 0x18 4b Float | + | 0x18 4b Float Bounding Box Max (Z) |
− | 0x1C 4b Long Always 1 | + | 0x1C 4b Long Always 1 (Hex 0100807F) |
− | 0x20 4b Float | + | 0x20 4b Float Bounding Box Min (X) |
− | 0x24 4b Float | + | 0x24 4b Float Bounding Box Min (Y) |
− | 0x28 4b Float | + | 0x28 4b Float Bounding Box Min (Z) |
− | 0x2C 4b Long Always 1 | + | 0x2C 4b Long Always 1 (Hex 0100807F) |
+ | 0x30 4b Float x (Bounding Sphere Pivot Coords) | ||
+ | 0x34 4b Float y | ||
+ | 0x38 4b Float z | ||
+ | 0x3C 4b Long Always 1 (Hex 0100807F) | ||
+ | 0x40 4b Float x (Bounding Box Pivot Coords) | ||
+ | 0x44 4b Float Y | ||
+ | 0x48 4b Float Z | ||
+ | 0x4C 4b Long Always 1 (Hex 0100807F) | ||
+ | 0x50 4b Float x (Geometry Model Pivot Coords) | ||
+ | 0x54 4b Float Y | ||
+ | 0x58 4b Float Z | ||
+ | 0x5C 4b Long Always 1 (Hex 0100807F) | ||
'''WBN''' Header | '''WBN''' Header | ||
Line 57: | Line 69: | ||
0x08 4b Offset Collection of Bounding Definitions (see [[VTable]] page) | 0x08 4b Offset Collection of Bounding Definitions (see [[VTable]] page) | ||
− | == | + | ==Tools== |
− | * | + | The following tools and scripts can be used to import & export (edit) these collisions files. |
+ | |||
+ | * [[OpenIV]] | ||
+ | * [[GIMS]] | ||
{{GTA4-navi}} | {{GTA4-navi}} | ||
[[Category:Map Formats]] | [[Category:Map Formats]] |
Latest revision as of 18:09, 5 March 2015
Windows bounds dictionary (WBD) and Windows bounds nodes (WBN) are two formats for collision files used in GTA 4.
File Format
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 (Hashes) (BlockSize 0x08) Contains data of the given type -------------------------------------------------------------------- 0x00 4b Offset Offset to the Hashes Data 0x04 2b Short Data Count 0x06 2b Short Data Size
-------------------------------------------------------------------- PointerCollection (Bounds) (BlockSize 0x08) Contains data of the given type -------------------------------------------------------------------- 0x00 4b Offset Offset to the Bounds Data PointerCollection 0x04 2b Short Data Count 0x06 2b Short Data Count
-------------------------------------------------------------------- Bounds data (BlockSize 0x240h) -------------------------------------------------------------------- 0x00 4b Long VTable 0x04 2b Short Pivot Count (Usually 3) 0x06 2b Short (Usually 1) 0x08 2b Short (Usually 1) 0x0A 2b Short (Usually 0) 0x0C 4b Float Bounding Sphere Radius Size 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) 0x30 4b Float x (Bounding Sphere Pivot Coords) 0x34 4b Float y 0x38 4b Float z 0x3C 4b Long Always 1 (Hex 0100807F) 0x40 4b Float x (Bounding Box Pivot Coords) 0x44 4b Float Y 0x48 4b Float Z 0x4C 4b Long Always 1 (Hex 0100807F) 0x50 4b Float x (Geometry Model Pivot Coords) 0x54 4b Float Y 0x58 4b Float Z 0x5C 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)
Tools
The following tools and scripts can be used to import & export (edit) these collisions files.
Grand Theft Auto IV | |
---|---|
File Formats | .dat • .gxt • .ide • .img • .ipl • .nod • .sco • .rpf • .rrr • .wad • .wbd/.wbn • .wdd • .wdr • .wft • .whm • .wpl • .wtd |
Documentation | Audio • Bink Video • Cryptography • Cutscenes • GXT Text • Image listing • Keycodes • Map Listing • Native functions • Paths • Radar Blips • Radio Stations • Saves • Scenarios • VTable • Weapons |
Tools | ASI Loader • ENBSeries • G-Texture • GIMS IV • Ingame WPL Editor • IV Needle • OpenIV • SparkIV • XLiveLess • WPL Manager • X Mod Installer Alice • C++ Script Hook • .NET Script Hook • Scocl |
Tutorials | Importing Textures with OpenIV • Importing Textures with SparkIV |
Modifications | GTA Connected • Gostown IV • Four Multiplayer • IV Multiplayer • CitizenMP:IV Reloaded |
Useful links | Community portal • Discussion forums • Modding forums • Mods on GTAGarage.com |