OBD:BINA/OBJC/PATR: Difference between revisions

From OniGalore
< OBD:BINA‎ | OBJC
Jump to navigation Jump to search
No edit summary
 
m (added family to footer template call)
 
(22 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File types]] >> [[OBD:BINA|BINA]] >> Patrol_Path.BINA
{{OBD OBJC Header | align=center | type=PATR | prev=PART | next=PWRU | name=Patrol path | stuff=b_pp}}




<CENTER>[[OBD:BINA/Particle|<==]] <FONT SIZE=5>Patrol_Path.BINA</FONT> [[OBD:BINA/PowerUp|==>]]</CENTER>
[[Image:bin_r_pp.gif]]




http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/bin_r_pp.gif
{{Table}}
{{OBDth}}
{{OBDtr| 0x00 | char[4]  |FF0000| 43 4A 42 4F | OBJC      | objects }}
{{OBDtr| 0x04 | int32    |FFFF00| B4 1F 00 00 | 8116      | size of the complete patrol path part from this position in bytes }}
{{OBDtr| 0x08 | int32    |00FF00| 27 00 00 00 | 39        | object list version }}
{{OBDtr| 0x0C | int32    |00FFFF| 78 00 00 00 | 120        | size of the following element in bytes }}
{{OBDtrBK}}
{{OBDtr| 0x00 | char[4]  |FFC8C8| 52 54 41 50 | PATR      | patrol path }}
{{OBDtr| 0x04 | int32    |FFFFC8| 6F 1A 00 00 | 6767      | old file ID }}
{{OBDtr| 0x08 | int32    |C8FFC8| 00 00 00 00 | 0          | unknown }}
{{OBDtr| 0x0C | float    |C8FFFF| 08 AB 20 44 | 642.672363 | x-position of the patrol path start point }}
{{OBDtr| 0x10 | float    |C8FFFF| E7 26 87 41 | 16.893995  | y-position (height) of the patrol path start point }}
{{OBDtr| 0x14 | float    |C8FFFF| 6C CD BD C3 | -379.604858| z-position of the patrol path start point }}
{{OBDtr| 0x18 | float    |FFC8FF| 00 00 00 00 | 0.000000  | rotation on the x-axis in degrees }}
{{OBDtr| 0x1C | float    |FFC8FF| 00 00 00 00 | 0.000000  | rotation on the y-axis in degrees }}
{{OBDtr| 0x20 | float    |FFC8FF| 00 00 00 00 | 0.000000  | rotation on the z-axis in degrees }}
{{OBDtr2|0x24 | char[32] |FFC800| Floor1_Stk_1            | patrol path name }}
{{OBDtr| 0x44 | int32    |C800C8| 04 00 00 00 | 4          | number of path points (grey outline) }}
{{OBDtr| 0x48 | int16    |C87C64| 00 00       | 0          | patrol path ID }}
{{OBDtr| 0x4A | int16    |B0C3D4| 01 00      | 1          | "return to nearest"? }}
{{OBDtrBK|1=First path point (grey outline)}}
{{OBDtr| 0x00 | int32    |E7CEA5| 13 00 00 00 | 19        | path point type; the following types are possible (values in dec):




{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=1 BGCOLOR="#000000"
:00 - move to flag (short)
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
:01 - stop (nothing); (not used in Oni)
| WIDTH=15% | <B>Hex</B>
:02 - pause in frames (long)
| WIDTH=15% | <B>Translation</B>
:03 - look at flag (short)
| WIDTH=70% | <B>Meaning</B>
:04 - look at point (float, float, float); (not used in Oni)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
:05 - move and face to flag (short)
| BGCOLOR="#FF0000" | 43 4A 42 4F
:06 - run path in a loop (nothing)
| OBJC
:07 - movement mode (long) - the following values are possible:
| ALIGN=LEFT | object
 
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
::0 - by alert level
| BGCOLOR="#FFFF00" | B4 1F 00 00
::1 - stop
| 8116
::2 - crouch
| ALIGN=LEFT | 8116 bytes is the length of the following patrol path part from this position
::3 - creep
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
::4 - walk - no aim
| BGCOLOR="#00FF00" | 27 00 00 00
::5 - walk
| 39
::6 - run - no aim
| ALIGN=LEFT | identification number for the weapon classes; in every level the same; do not change it
::7 - run
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
::8 - forwards (* doesn't respond to ai2_setmovementmode and can make Oni crash when used in the patrol path file)
| BGCOLOR="#00FFFF" | 78 00 00 00
::9 - backwards (*)
| 120
::10 - left (*)
| ALIGN=LEFT | 120 bytes (7.5 lines) is the lenght of the following package (area edged in black)
::11 - right (*)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#000000"
::12 - stopped (*)
| COLSPAN=3 | <FONT SIZE=2 COLOR="#FFFFFF">Below follows the first package.</FONT>
 
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
:08 - move to point; (not used in Oni); in-game test result: works fine
| BGCOLOR="#FFC8C8" | 52 54 41 50
:09 - turn head by X degrees; (not used in Oni); in-game test result: malfunctioning
| PATR
:10 - move through flag (short, float) - character moves to this flag until he/she has reached the radius border of it
| ALIGN=LEFT | patrol
:11 - move through point (float, float, float, float) - character moves to this point until he/she has reached the radius border of it; (not used in Oni)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
:12 - stop looking (nothing)
| BGCOLOR="#FFFFC8" | 6F 1A 00 00
:13 - free facing?; used only once
| 6767
:14 - glance at flag for ... frames (short + long) - character looks (rotates only the head) to the flag for the fixed time
| ALIGN=LEFT | unknown
:15 - move near flag (short + float) - character moves to this flag until he/she has reached the radius border of it
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
:16 - run path in a loop from block number (long) - runs the complete path once; after that it loops the path from the block number to the end (note that the block number of the first block is zero and not one)
| BGCOLOR="#C8FFC8" | 00 00 00 00
:17 - time + rotation (short + float) - character looks/aims around for the fixed time
| 0
:18 - force loop continuance and correctness (type 17 can cause incorrect loops and a complete break in case of 0 frames)
| ALIGN=LEFT | unknown
:19 - time + flag + rotation in degrees (short + short + float) - character moves to the flag and when reached he/she looks/aims around for the fixed time
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
:20 - <u>fork</u> patrolscript by id (short) - BSL function with this id is called up (f.e. id <nowiki>= 1, then called up function =</nowiki> patrolscript0001)
| BGCOLOR="#C8FFFF" | 08 AB 20 44
:21 - <u>call</u> patrolscript by id (short) - BSL function with this id is called up (f.e. id <nowiki>= 1, then called up function =</nowiki> patrolscript0001), caution: bsl can interrupt the patrol path (see example below)
| 642.672363
:22 - ignore player (byte) - 0 <nowiki>= off; 1 =</nowiki> on
| ALIGN=LEFT | x-position of the patrol path start point ?
:23 - flag + time + firing spread in degrees (short + short + float) - character faces to to the flag and fires his/her weapon for the fixed time
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
 
| BGCOLOR="#C8FFFF" | E7 26 87 41
 
| 16.893995
}}
| ALIGN=LEFT | y-position (height) of the patrol path start point ?
{{OBDtr| 0x04 | int16    |FFDDDD| 58 02       | 600       | sleep time in 1/60 seconds }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x06 | int16    |64AAAA| CB 00       | 203       | flag ID }}
| BGCOLOR="#C8FFFF" | 6C CD BD C3
{{OBDtr| 0x08 | float    |EBEBEB| 00 00 A0 42 | 80.000000 | look around angle in degrees }}
| -379.604858
| ALIGN=LEFT | z-position of the patrol path start point ?
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8FF" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | rotation on the x-axis in degrees
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8FF" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | rotation on the y-axis in degrees
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8FF" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | rotation on the z-axis in degrees
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC800" COLSPAN=2 | <TT>Floor1_Stk_1</TT>
| ALIGN=LEFT | name of the patrol path
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C800C8" | 04 00 00 00
| 4
| ALIGN=LEFT | amount of blocks which follow
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C87C64" | 00 00
| 0
| ALIGN=LEFT | patrol path ID
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#B0C3D4" | 01 00
| 0
| ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#808080"
| COLSPAN=3 | <FONT SIZE=2 COLOR="#FFFFFF">Below follows the first block. It's a part of the package.</FONT>
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#E7CEA5" | 13 00 00 00
| 19
| ALIGN=LEFT | block option ID; the following block option IDs are possible (values in dec):<BR><BR>
{| BORDER=0 CELLPADDING=0 CELLSPACING=0
|- VALIGN=TOP
| ALIGN=RIGHT | 0 -&nbsp;
| flag follows (short)
|- VALIGN=TOP
| ALIGN=RIGHT | 1 -&nbsp;
| not checked yet
|- VALIGN=TOP
| ALIGN=RIGHT | 2 -&nbsp;
| time follows (long)
|- VALIGN=TOP
| ALIGN=RIGHT | 3 -&nbsp;
| flag follows (short)
|- VALIGN=TOP
| ALIGN=RIGHT | 4 -&nbsp;
| not checked yet
|- VALIGN=TOP
| ALIGN=RIGHT | 5 -&nbsp;
| flag follows (short)
|- VALIGN=TOP
| ALIGN=RIGHT | 6 -&nbsp;
| run in a loop ? (nothing follows; this ID is a stand-alone value)
|- VALIGN=TOP
| ALIGN=RIGHT | 7 -&nbsp;
| movement mode follows (long); the following movement modes are possible:<BR><BR>0 - walk in firing position<BR>3 - walk crouch in firing position<BR>4 - walk relaxed (weapon down)<BR>5 - walk in firing position (the same as 0)<BR>6 - run relaxed (weapon down)<BR>7 - run in firing positionDon't use other numbers. Oni will crash.<BR><BR>
|- VALIGN=TOP
| ALIGN=RIGHT | 8 -&nbsp;
| not checked yet
|- VALIGN=TOP
| ALIGN=RIGHT | 9 -&nbsp;
| not checked yet
|- VALIGN=TOP
| ALIGN=RIGHT | 10 -&nbsp;
| flag + rotation? follow (short + float)
|- VALIGN=TOP
| ALIGN=RIGHT | 11 -&nbsp;
| not checked yet
|- VALIGN=TOP
| ALIGN=RIGHT | 12 -&nbsp;
| not checked yet
|- VALIGN=TOP
| ALIGN=RIGHT | 13 -&nbsp;
| not checked yet
|- VALIGN=TOP
| ALIGN=RIGHT | 14 -&nbsp;
| flag + time follow (short + long)
|- VALIGN=TOP
| ALIGN=RIGHT | 15 -&nbsp;
| flag + rotation? follow (short + float)
|- VALIGN=TOP
| ALIGN=RIGHT | 16 -&nbsp;
| unknown follows (long)
|- VALIGN=TOP
| ALIGN=RIGHT | 17 -&nbsp;
| time + rotation? follow (long + float)
|- VALIGN=TOP
| ALIGN=RIGHT | 18 -&nbsp;
| not checked yet
|- VALIGN=TOP
| ALIGN=RIGHT | 19 -&nbsp;
| time + flag + rotation? follow (short + short + float)
|- VALIGN=TOP
| ALIGN=RIGHT | 20 -&nbsp;
| time follows (short)
|- VALIGN=TOP
| ALIGN=RIGHT | 21 -&nbsp;
| time? follows (short)
|- VALIGN=TOP
| ALIGN=RIGHT | 22 -&nbsp;
| unknown follows (byte)
|- VALIGN=TOP
| ALIGN=RIGHT | 23 -&nbsp;
| flag + time + rotation? follow (short + short + float)
|}<BR>
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFDDDD" | 58 02
| 600
| ALIGN=LEFT | sleep time in 1/60 seconds
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#64AAAA" | CB 00
| 203
| ALIGN=LEFT | flag ID
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#EBEBEB" | 00 00 A0 42
| 80.000000
| ALIGN=LEFT | character roation on the y-axis in degrees ?
|}
|}




<CENTER>[[OBD:BINA/Particle|<==]] <FONT SIZE=5>Patrol_Path.BINA</FONT> [[OBD:BINA/PowerUp|==>]]</CENTER>
;Path points
:A path can have at most 64 points.
 
 
;Corrupting BSL code at patrolscripts
:I suspect that ''instantly'' played BSL code breaks patrol path.
:example:
::patrolscript0001 contains a sleep command and patrolscript0002 will be played.
::But if you remove the sleep command the patrol path will break.
::(This was tested in level 1 SP1 with A_t48 and his patrol_48.)
 
 
XML code - patrolscript points:
 
<Points>
    <ScriptId ScriptId="1" />
    <ScriptId ScriptId="2" />
    <ScriptId ScriptId="3" />
</Points>
 
BSL code:
func patrolscript0001
{
dmsg "1"
chr_animate 0 KONOKOpowerup
sleep 1
}
func patrolscript0002
{
dmsg "2"
}
func patrolscript0003
{
dmsg "3"
}
 
 
;Tool Mode dialogs
 
[[Image:Tool dialog - Edit Paths.png]]
 
 
[[Image:Tool dialog - Edit Path.png]]
 
 
[[Image:Tool dialog - Edit Path Point.png]]
 


{{OBD OBJC Footer | type=PATR | prev=PART | next=PWRU | name=Patrol path | family=Level}}


[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File types]] >> [[OBD:BINA|BINA]] >> Patrol_Path.BINA
{{OBD}}

Latest revision as of 21:19, 9 December 2023

ONI BINARY DATA
AKVA << Other file types >> CBPI
BINA : Binary data
TMBD << Other BINA >> ONIE
OBJC : Objects
PART << Other OBJC >> PWRU
PATR : Patrol path
XML tutorial
Overview @ Oni Stuff
OBD.png


Bin r pp.gif


Offset Type Raw Hex Value Description
0x00 char[4] 43 4A 42 4F OBJC objects
0x04 int32 B4 1F 00 00 8116 size of the complete patrol path part from this position in bytes
0x08 int32 27 00 00 00 39 object list version
0x0C int32 78 00 00 00 120 size of the following element in bytes
First element (black outline)
0x00 char[4] 52 54 41 50 PATR patrol path
0x04 int32 6F 1A 00 00 6767 old file ID
0x08 int32 00 00 00 00 0 unknown
0x0C float 08 AB 20 44 642.672363 x-position of the patrol path start point
0x10 float E7 26 87 41 16.893995 y-position (height) of the patrol path start point
0x14 float 6C CD BD C3 -379.604858 z-position of the patrol path start point
0x18 float 00 00 00 00 0.000000 rotation on the x-axis in degrees
0x1C float 00 00 00 00 0.000000 rotation on the y-axis in degrees
0x20 float 00 00 00 00 0.000000 rotation on the z-axis in degrees
0x24 char[32] Floor1_Stk_1 patrol path name
0x44 int32 04 00 00 00 4 number of path points (grey outline)
0x48 int16 00 00 0 patrol path ID
0x4A int16 01 00 1 "return to nearest"?
First path point (grey outline)
0x00 int32 13 00 00 00 19 path point type; the following types are possible (values in dec):


00 - move to flag (short)
01 - stop (nothing); (not used in Oni)
02 - pause in frames (long)
03 - look at flag (short)
04 - look at point (float, float, float); (not used in Oni)
05 - move and face to flag (short)
06 - run path in a loop (nothing)
07 - movement mode (long) - the following values are possible:
0 - by alert level
1 - stop
2 - crouch
3 - creep
4 - walk - no aim
5 - walk
6 - run - no aim
7 - run
8 - forwards (* doesn't respond to ai2_setmovementmode and can make Oni crash when used in the patrol path file)
9 - backwards (*)
10 - left (*)
11 - right (*)
12 - stopped (*)
08 - move to point; (not used in Oni); in-game test result: works fine
09 - turn head by X degrees; (not used in Oni); in-game test result: malfunctioning
10 - move through flag (short, float) - character moves to this flag until he/she has reached the radius border of it
11 - move through point (float, float, float, float) - character moves to this point until he/she has reached the radius border of it; (not used in Oni)
12 - stop looking (nothing)
13 - free facing?; used only once
14 - glance at flag for ... frames (short + long) - character looks (rotates only the head) to the flag for the fixed time
15 - move near flag (short + float) - character moves to this flag until he/she has reached the radius border of it
16 - run path in a loop from block number (long) - runs the complete path once; after that it loops the path from the block number to the end (note that the block number of the first block is zero and not one)
17 - time + rotation (short + float) - character looks/aims around for the fixed time
18 - force loop continuance and correctness (type 17 can cause incorrect loops and a complete break in case of 0 frames)
19 - time + flag + rotation in degrees (short + short + float) - character moves to the flag and when reached he/she looks/aims around for the fixed time
20 - fork patrolscript by id (short) - BSL function with this id is called up (f.e. id = 1, then called up function = patrolscript0001)
21 - call patrolscript by id (short) - BSL function with this id is called up (f.e. id = 1, then called up function = patrolscript0001), caution: bsl can interrupt the patrol path (see example below)
22 - ignore player (byte) - 0 = off; 1 = on
23 - flag + time + firing spread in degrees (short + short + float) - character faces to to the flag and fires his/her weapon for the fixed time


0x04 int16 58 02 600 sleep time in 1/60 seconds
0x06 int16 CB 00 203 flag ID
0x08 float 00 00 A0 42 80.000000 look around angle in degrees


Path points
A path can have at most 64 points.


Corrupting BSL code at patrolscripts
I suspect that instantly played BSL code breaks patrol path.
example:
patrolscript0001 contains a sleep command and patrolscript0002 will be played.
But if you remove the sleep command the patrol path will break.
(This was tested in level 1 SP1 with A_t48 and his patrol_48.)


XML code - patrolscript points:

<Points>
   <ScriptId ScriptId="1" />
   <ScriptId ScriptId="2" />
   <ScriptId ScriptId="3" />
</Points>

BSL code:

func patrolscript0001
{
	dmsg "1"
	chr_animate 0 KONOKOpowerup
	sleep 1
}
func patrolscript0002
{
	dmsg "2"
}
func patrolscript0003
{
	dmsg "3"
}


Tool Mode dialogs

Tool dialog - Edit Paths.png


Tool dialog - Edit Path.png


Tool dialog - Edit Path Point.png


ONI BINARY DATA
AKVA << Other file types >> CBPI
BINA : Binary data
TMBD << Other BINA >> ONIE
OBJC : Objects
PART << Other OBJC >> PWRU
PATR : Patrol path
Level file