OBD:BINA/OBJC/PATR: Difference between revisions

m
added family to footer template call
m (design)
m (added family to footer template call)
 
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{OBD OBJC Header | align=center | type=PATR | prev=PART | next=PWRU | name=Patrol path}}
{{OBD OBJC Header | align=center | type=PATR | prev=PART | next=PWRU | name=Patrol path | stuff=b_pp}}




[[image:bin_r_pp.gif]]
[[Image:bin_r_pp.gif]]




{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x00 | char[4]  |FF0000| 43 4A 42 4F | OBJC      | object collection }}
{{OBDtr| 0x00 | char[4]  |FF0000| 43 4A 42 4F | OBJC      | objects }}
{{OBDtr| 0x04 | int32    |FFFF00| B4 1F 00 00 | 8116      | size of the complete combat part from this postion in bytes }}
{{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        | unknown; do not change it }}
{{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 }}
{{OBDtr| 0x0C | int32    |00FFFF| 78 00 00 00 | 120        | size of the following element in bytes }}
{{OBDtrBK}}
{{OBDtrBK}}
Line 15: Line 15:
{{OBDtr| 0x04 | int32    |FFFFC8| 6F 1A 00 00 | 6767      | old file ID }}
{{OBDtr| 0x04 | int32    |FFFFC8| 6F 1A 00 00 | 6767      | old file ID }}
{{OBDtr| 0x08 | int32    |C8FFC8| 00 00 00 00 | 0          | unknown }}
{{OBDtr| 0x08 | int32    |C8FFC8| 00 00 00 00 | 0          | unknown }}
{{OBDtr| 0x0C | float    |C8FFFF| 08 AB 20 44 | 642.672363 | x-position of the neutral character }}
{{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 neutral character }}
{{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 neutral character }}
{{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| 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| 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 }}
{{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 }}
{{OBDtr2|0x24 | char[32] |FFC800| Floor1_Stk_1            | patrol path name }}
{{OBDtr| 0x44 | int32    |C800C8| 04 00 00 00 | 4          | amount of elements in array (grey outline) }}
{{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| 0x48 | int16    |C87C64| 00 00       | 0          | patrol path ID }}
{{OBDtr| 0x4A | int16    |B0C3D4| 01 00      | 1          | unknown }}
{{OBDtr| 0x4A | int16    |B0C3D4| 01 00      | 1          | "return to nearest"? }}
{{OBDtrBK|1=First element (grey outline)}}
{{OBDtrBK|1=First path point (grey outline)}}
{{OBDtr| 0x00 | int32    |E7CEA5| 13 00 00 00 | 19        | option ID; the following IDs are possible (values in dec):
{{OBDtr| 0x00 | int32    |E7CEA5| 13 00 00 00 | 19        | path point type; the following types are possible (values in dec):




Line 36: Line 36:
:05 - move and face to flag (short)
:05 - move and face to flag (short)
:06 - run path in a loop (nothing)
:06 - run path in a loop (nothing)
:07 - movement mode (long) - the following movement modes are possible (Don't use other numbers. Oni will crash.):
: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 (*)


::0 - walk in firing position
:08 - move to point; (not used in Oni); in-game test result: works fine
::3 - walk crouch in firing position
:09 - turn head by X degrees; (not used in Oni); in-game test result: malfunctioning
::4 - walk relaxed (weapon down)
::5 - walk in firing position (the same as 0)
::6 - run relaxed (weapon down)
::7 - run in firing position
 
 
:08 - unknown
:09 - unknown
:10 - move through flag (short, float) - character moves to this flag until he/she has reached the radius border of it
: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)
: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)
:12 - stop looking (nothing)
:13 - unknown (nothing); used only once; maybe free facing?
: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
: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
: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)
: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
:17 - time + rotation (short + float) - character looks/aims around for the fixed time
:18 - unkown (nothing follows)
: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 (short + short + float) - character moves to the flag and looks/aims around for the fixed time
: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 - time follows (short)
: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)
:21 - flag follows (short) - character moves to this flag
: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)
:22 - ignore player (byte) - 0 <nowiki>=</nowiki> off; 1 <nowiki>=</nowiki> on
:22 - ignore player (byte) - 0 <nowiki>= off; 1 =</nowiki> on
:23 - flag + time + unknown (short + short + float) - character faces to to the flag and fires his/her weapon for the fixed time (doesn't work on stairways)
: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  




}}
}}
{{OBDtr| 0x04 | int16    |FFDDDD| 58 02      | 600        | sleep time in 1/60 seconds }}
{{OBDtr| 0x04 | int16    |FFDDDD| 58 02      | 600        | sleep time in 1/60 seconds }}
{{OBDtr| 0x06 | int16    |FFDDDD| CB 00      | 203        | flag ID }}
{{OBDtr| 0x06 | int16    |64AAAA| CB 00      | 203        | flag ID }}
{{OBDtr| 0x08 | float    |FFDDDD| 00 00 A0 42 | 80.000000  | unknown; character roation on the y-axis in degrees? }}
{{OBDtr| 0x08 | float    |EBEBEB| 00 00 A0 42 | 80.000000  | look around angle in degrees }}
|}
|}




;Bluebox screenshots
;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]]


http://ssg.oni2.net/subfold/bluebox/images/300_edit_paths.jpg


[[Image:Tool dialog - Edit Path.png]]


http://ssg.oni2.net/subfold/bluebox/images/301_edit_path.jpg


[[Image:Tool dialog - Edit Path Point.png]]


http://ssg.oni2.net/subfold/bluebox/images/302_edit_path_point.jpg


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


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