Jump to content

OBD:AKVA: Difference between revisions

1,505 bytes removed ,  18 September 2007
m
design
m (woohoops, forgot how to transclude ^^)
m (design)
Line 1: Line 1:
{{OBD_File_Header|align=center|type=AKVA|prev=AKOT|next=BINA|name=BNV Node Array|family=Level|onistuff=akva}}
{{OBD_File_Header | type=AKVA | prev=AKOT | next=BINA | name=BNV Node Array | family=Level | align=center}}
----
:BNVs are volumes that have a pathfinding grid assigned to them.
:The grid itself is in the RAW, while its overall parameters are in the DAT.
:*Child [[AKBP]] tree refines the volume after the [[OBD:Data types#AABB|AABB]] is checked
:*Child [[AKBA]] defines the "sides" needed by the pathfinding graph




http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/akva_a.gif
[[image:akva_a.gif]]




{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
{{Table}}
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
{{OBDth}}
| WIDTH=15% | <B>Hex</B>
{{OBDtr| 0x00 | res_id  |FF0000| 01 4E 02 00 | 590   | 00590-.AKVA }}
| WIDTH=15% | <B>Translation</B>
{{OBDtr| 0x04 | lev_id  |FFFF00| 01 00 00 06 | 3     | level 3 }}
| WIDTH=70% | <B>Meaning</B>
{{OBDtr| 0x08 | char[20] |00FF00| AD DE       | dead | unused }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x1C | int32    |00FFFF| 1E 01 00 00 | 10000 | array size }}
| BGCOLOR="#FF0000" | 01 '''4E 02''' 00
{{OBDtrBK}}
| 590
{{OBDtr| 0x00 | int32    |FFC8C8| 00 00 00 00 | 0         | index into [[OBD:AKBP|AKBP]] array; BSP tree for this BNV }}
| ALIGN=LEFT | 00590-.AKVA
{{OBDtr| 0x04 | int32    |FFFFC8| 00 00 00 00 | 0         | BNV's ID (same as index in array) }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x08 | int32    |C8FFC8| 00 00 00 00 | 0         | index into [[OBD:AKBA|AKBA]] array; "side" range start }}
| BGCOLOR="#FFFF00" | 01 00 00 '''06'''
{{OBDtr| 0x0C | int32    |C8FFC8| 06 00 00 00 | 6         | index into [[OBD:AKBA|AKBA]] array; "side" range end }}
| 3
{{OBDtr| 0x10 | int32    |C8FFFF| FF FF FF FF | -1       | index in array of child BNV }}
| ALIGN=LEFT | level 3
{{OBDtr| 0x14 | int32    |C8FFFF| FF FF FF FF | -1       | index in array of sibling BNV }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x18 | int32    |C8FFFF| FF FF FF FF | -1       | unknown (always -1 in level 3; other levels not checked) }}
| BGCOLOR="#00FF00" | AD DE
{{OBDtr| 0x1C | int32    |FFC8FF| C9 00 00 00 | 201       | size of the pathfinding grid along x in tiles }}
| dead
{{OBDtr| 0x20 | int32    |FFC8FF| 16 00 00 00 | 22       | size of the pathfinding grid along z in tiles }}
| ALIGN=LEFT | not used
{{OBDtr| 0x24 | offset  |FFC800| A0 3A 47 00 |00 47 3A A0| at this position starts the pathfinding grid part in the raw file }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x28 | int32    |C800C8| F7 01 00 00 | 503       | size of the pathfinding grid part in the raw file in bytes }}
| BGCOLOR="#00FFFF" | 1E 01 00 00
{{OBDtr| 0x2C | float    |C87C64| 00 00 80 40 | 4.000000 | tile size of the pathfinding grid }}
| 286
{{OBDtr| 0x30 | float    |B0C3D4| 00 00 20 41 | 10.000000 | AABB X- (AABB <nowiki>=</nowiki> Axis-aligned bounding box) }}
| ALIGN=LEFT | 286 BNV nodes in array
{{OBDtr| 0x34 | float    |B0C3D4| 00 00 58 C1 | -13.500000| AABB X- }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#000000"
{{OBDtr| 0x38 | float    |B0C3D4| 00 80 2A C4 |−682.000000| AABB Z- }}
| COLSPAN=3 | <FONT SIZE=2 COLOR="#FFFFFF">First BNV node (black outline)</FONT>
{{OBDtr| 0x3C | float    |E7CEA5| 00 40 47 44 | 797.000000| AABB X+ }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x40 | float    |E7CEA5| 00 00 22 42 | 40.500000 | AABB Y+ }}
| BGCOLOR="#FFC8C8" | 00 00 00 00
{{OBDtr| 0x44 | float    |E7CEA5| 00 00 19 C4 |-612.000000| AABB Z+ }}
| 0
{{OBDtr| 0x48 | int32    |FFDDDD| FE FF FE FF | -65538    | unknown; always the same in level 3 (other levels not checked); maybe these 4 bytes are two shorts <nowiki>==> then FEFF =</nowiki> -2 }}
| ALIGN=LEFT | index into [[AKBP]] array : BSP tree for this BNV
{{OBDtr| 0x4C | int32    |64AAAA| 00 00 00 00 | 0         | BNV's ID again }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x50 | int32    |EBEBEB| 00 00 00 00 | 0         | unknown, always zero }}
| BGCOLOR="#FFFFC8" | 00 00 00 00
{{OBDtr| 0x54 | int32    |EBEBEB| 00 00 00 00 | 0         | unknown, always zero }}
| 0
{{OBDtr| 0x58 | int32    |EBEBEB| 00 00 00 00 | 0         | unknown, always zero (was it a raw file offset once?) }}
| ALIGN=LEFT | BNV's ID (same as index in array)
{{OBDtr| 0x5C | bitset32 |8C8CCC| 04 00 00 00 | 4         | identifier for the next five floats; see explanation below this table }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x60 | float    |FF00C8| 00 00 00 00 | 0.000000 | if "sloped", x-component of floor/ceiling normal }}
| BGCOLOR="#C8FFC8" | 00 00 00 00
{{OBDtr| 0x64 | float    |FF00C8| 00 00 00 00 | 0.000000 | if "sloped", y-component of floor/ceiling normal }}
| 0
{{OBDtr| 0x68 | float    |FF00C8| 00 00 00 00 | 0.000000 | if "sloped", z-component of floor/ceiling normal }}
| ALIGN=LEFT | index into [[AKBA]] array : "side" range start
{{OBDtr| 0x6C | float    |FF00C8| 00 00 00 00 | 0.000000 | if "sloped", distance of floor plane to origin }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x70 | float    |FF00C8| 00 00 00 00 | 0.000000 | if "sloped", distance of ceiling plane to origin }}
| BGCOLOR="#C8FFFF" | 06 00 00 00
| 6
| ALIGN=LEFT | index into [[AKBA]] array : "side" range end
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8FF" | FF FF FF FF
| -1
| ALIGN=LEFT | index in array of child BNV
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC800" | FF FF FF FF
| -1
| ALIGN=LEFT | index in array of sibling BNV
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C800C8" | FF FF FF FF
| -1
| ALIGN=LEFT | unknown, always -1
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C87C64" | C9 00 00 00
| 201
| ALIGN=LEFT | size of the pathfinding grid along x : 201 tiles  
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#B0C3D4" | 16 00 00 00
| 22
| ALIGN=LEFT | size of the pathfinding grid along z : 22 tiles  
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | A0 3A 47 00
| 0x473AA0
| ALIGN=LEFT | offset of the [[OBD:AKVA_0|pathfinding grid data]] in the RAW file : 0x473AA0
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | F7 01 00 00
| 503
| ALIGN=LEFT | size of the [[OBD:AKVA_0|pathfinding grid data]] in the RAW file : 503 bytes
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | 00 00 80 40
| 4.000000
| ALIGN=LEFT | tile size of the pathfinding grid
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#EBEBEB" | 00 00 20 41
| 10.000000
| ALIGN=LEFT | [[OBD:Data types#AABB|AABB]] X-
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#8C8CCC" | 00 00 58 C1
| -13.500000
| ALIGN=LEFT | AABB Y-
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00C8" | 00 80 2A C4
| -682.000000
| ALIGN=LEFT | AABB Z-
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#F0F096" | 00 40 47 44
| 797.000000
| ALIGN=LEFT | AABB X+
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C864" | 00 00 22 42
| 40.500000
| ALIGN=LEFT | AABB Y+
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00C8FF" | 00 00 19 C4
| 612.000000
| ALIGN=LEFT | AABB Z+
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C80040" | FE FF
| 64534
| ALIGN=LEFT | unknown, always -2
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFCD96" | FE FF
| 64534
| ALIGN=LEFT | unknown, always -2
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8C864" | 00 00 00 00
| 0
| ALIGN=LEFT | BNV's ID again
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#0096C8" | 00 00 00 00
| 0
| ALIGN=LEFT | unknown, always 0
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#0096C8" | 00 00 00 00
| 0
| ALIGN=LEFT | unknown, always 0
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#0096C8" | 00 00 00 00
| 0
| ALIGN=LEFT | unknown, always 0 (was a raw file offset once?)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF80C0" | 04 00 00 00
| 4
| ALIGN=LEFT | bit 4 always set, bit 1 set if "sloped", bit 16 see below
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#D0C0AF" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | if "sloped", x-component of floor/ceiling normal
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#D0C0AF" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | if "sloped", y-component of floor/ceiling normal
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#D0C0AF" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | if "sloped", z-component of floor/ceiling normal
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#D0C0AF" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | if "sloped", distance of floor plane to origin
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#D0C0AF" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | if "sloped", distance of ceiling plane to origin
|}
|}
;0x00 - [[AKBP]] tree
 
 
;General
:BNVs are volumes that have a pathfinding grid assigned to them.
:The grid itself is in the RAW, while its overall parameters are in the DAT.
:*Child [[OBD:AKBP|AKBP]] tree refines the volume after the [[OBD:Data types#AABB|AABB]] is checked
:*Child [[OBD:AKBA|AKBA]] defines the "sides" needed by the pathfinding graph
;0x00 - [[OBD:AKBP|AKBP]] tree
:This binary space partition (BSP) tree is used for a refined check against a character's position.
:This binary space partition (BSP) tree is used for a refined check against a character's position.
;0x08 - [[AKBA]] range
;0x08 - [[OBD:AKBA|AKBA]] range
:The "sides" of a BNV define the quads by which an AI can transit to adjacent BNVs.
:The "sides" of a BNV define the quads by which an AI can transit to adjacent BNVs.
;0x10 - Children and siblings
;0x10 - Children and siblings
Line 171: Line 66:
;0x30 - AABB
;0x30 - AABB
:The axis-aligned bounding boxes are used for a first, quick check against a character's position.
:The axis-aligned bounding boxes are used for a first, quick check against a character's position.
::(note that the AKVA itself is looked up via the octtree: 2nd [[IDXA]] of the [[AKOT]] + [[OTLF]])
::(note that the AKVA itself is looked up via the octtree: 2nd [[OBD:IDXA_AKOT_2|IDXA]] of the [[OBD:AKOT|AKOT]] + [[OBD:OTLF|OTLF]])
;0x5C - Floor and ceiling
;0x5C - Floor and ceiling
:Bitset:
:Bitset:
Line 178: Line 73:
:*the 1 bit is set for BNVs involving "sloped" floors and ceilings
:*the 1 bit is set for BNVs involving "sloped" floors and ceilings
::(typical environment requiring this feature is compact staircases)
::(typical environment requiring this feature is compact staircases)
:The sloped floor and ceiling are used to apply a final cut to the volume defined by the [[AKBP]] tree
:The sloped floor and ceiling are used to apply a final cut to the volume defined by the [[OBD:AKBP|AKBP]] tree
::(the walls of which are typically vertical (possibly not axis-aligned) and horizontal)
::(the walls of which are typically vertical (possibly not axis-aligned) and horizontal)
:When the "sloped" bit isn't set, all 5 floats are always zero (and are probably ignored anyway).
:When the "sloped" bit isn't set, all 5 floats are always zero (and are probably ignored anyway).
Line 185: Line 80:




----
{{OBD_File_Footer | type=AKVA | prev=AKOT | next=BINA | name=BNV Node Array | family=Level}}
{{OBD_File_Footer|align=center|type=AKVA|prev=AKOT|next=BINA|name=BNV Node Array|family=Level|onistuff=akva}}
[[Category:Pathfinding]]
1,051

edits