OBD:BINA/OBJC/CMBT: Difference between revisions

m
design
(pursuit finished + added info about melee overriding)
m (design)
Line 1: Line 1:
{{OBD OBJC Header|align=center|type=CMBT|prev=CHAR|next=CONS|name=Combat profile|onistuff=b_cb}}
{{OBD OBJC Header | align=center | type=CMBT | prev=CHAR | next=CONS | name=Combat Profile}}




----
==File description==
----
===General settings===
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/bin_r_cb.gif
[[image:bin_r_cb.gif]]
 
 
{{Table}}
{{OBDth}}
{{OBDtr| 0x00 | char[4]  |FF0000| 43 4A 42 4F | OBJC      | object collection }}
{{OBDtr| 0x04 | int32    |FFFF00| B0 0D 00 00 | 35628    | size of the complete combat part from this postion in bytes }}
{{OBDtr| 0x08 | int32    |00FF00| 27 00 00 00 | 39        | unknown; do not change it }}
{{OBDtr| 0x0C | int32    |00FFFF| B4 00 00 00 | 180      | size of the following element in bytes }}
{{OBDtrBK}}
{{OBDtr| 0x00 | char[4]  |FFC8C8| 54 42 4D 43 | TBMC      | combat }}
{{OBDtr| 0x04 | int32    |FFFFC8| 70 01 00 00 | 368      | old file ID }}
{{OBDtr| 0x08 | int32    |C8FFC8| 00 00 00 00 | 0        | unknown }}
{{OBDtr| 0x0C | float    |C8FFFF| 13 55 5F C3 |-223.332321| x-position of unknown }}
{{OBDtr| 0x10 | float    |C8FFFF| D4 A8 8E 41 | 17.832436 | y-position (height) of unknown }}
{{OBDtr| 0x14 | float    |C8FFFF| C3 05 E9 C2 |-116.511253| z-position of unknown }}
{{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[64] |FFC800| Stand_and_Fire          | space for notes }}
{{OBDtr| 0x64 | int32    |C800C8| 00 00 00 00 | 0        | combat ID (looked up from [[OBD:BINA/OBJC/CHAR|Character.BINA]] }}
|}
 
 
===Behavior part===
{{Table}}
{{OBDth}}
{{OBDtr| 0x68 | int32    |C87C64| 02 00 00 00 | 2        | long range behavior; the following values are possible (values in dec):
 
 
:00 - nothing
:01 - stare
:02 - hold and fire
:03 - firing charge
:04 - melee
:05 - Barabbas shoot
:06 - Barabbas advance
:07 - Barabbas melee
:08 - Superninja fireball
:09 - Superninja advance
:10 - Superninja melee
:11 - run for alarm (not used in Oni)
:12 - Mutant Muro melee
:13 - Muro thunderbolt




{|{{OBDtable}}
}}
|align=center|
{{OBDtr| 0x6C | int32    |B0C3D4| 02 00 00 00 | 2         | medium range behavior; values as above }}
{|{{OBDtable}}
{{OBDtr| 0x70 | int32    |E7CEA5| 02 00 00 00 | 2         | short range behavior (hand to hand behavior); values as above }}
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
{{OBDtr| 0x74 | int32    |FFDDDD| 02 00 00 00 | 2         | medium retreat behavior; values as above }}
| WIDTH=15% | <B>Raw hex</B>
{{OBDtr| 0x78 | int32    |64AAAA| 02 00 00 00 | 2         | long retreat behavior; values as above }}
| WIDTH=15% | <B>Value</B>
| WIDTH=70% | <B>Meaning</B>
|-
| BGCOLOR="#FFC8C8" | 54 42 4D 43
| TBMC
| ALIGN=LEFT | combat
|-
| BGCOLOR="#FFFFC8" | 70 01 00 00
| 368
| ALIGN=LEFT | old file ID
|-
| BGCOLOR="#C8FFC8" | 00 00 00 00
| 0
| ALIGN=LEFT | unknown
|-
| BGCOLOR="#C8FFFF" | 13 55 5F C3
| -223.332321
| ALIGN=LEFT | x-position of ???
|-
| BGCOLOR="#C8FFFF" | D4 A8 8E 41
| 17.832436
| ALIGN=LEFT | y-position (height) of ???
|-
| BGCOLOR="#C8FFFF" | C3 05 E9 C2
| -116.511253
| ALIGN=LEFT | z-position of ???
|-
| BGCOLOR="#FFC8FF" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | rotation on the x-axis in degrees
|-
| BGCOLOR="#FFC8FF" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | rotation on the y-axis in degrees
|-
| BGCOLOR="#FFC8FF" | 00 00 00 00
| 0.000000
| ALIGN=LEFT | rotation on the z-axis in degrees
|-
| BGCOLOR="#FFC800" COLSPAN=2 | <TT>Stand_and_Fire</TT>
| ALIGN=LEFT | space for notes
|-
| BGCOLOR="#C800C8" | 00 00 00 00
| 0
| ALIGN=LEFT | combat ID (looked up from [[OBD:BINA/OBJC/CHAR|CJBO'''Character'''.BINA]])
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#808080"
| COLSPAN=3 | <FONT SIZE=2 COLOR="#FFFFFF">Below follows the behavior part.</FONT>
|- VALIGN=TOP
| BGCOLOR="#C87C64" | 02 00 00 00
| 2
| ALIGN=LEFT | long range behavior; the following behavior values are possible (values in dec):<BR>&nbsp;<BR>
{| BORDER=0 CELLPADDING=0 CELLSPACING=0
|- VALIGN=TOP
| ALIGN=RIGHT | 0 -&nbsp;
| none
|- VALIGN=TOP
| ALIGN=RIGHT | 1 -&nbsp;
| stare
|- VALIGN=TOP
| ALIGN=RIGHT | 2 -&nbsp;
| hold and fire
|- VALIGN=TOP
| ALIGN=RIGHT | 3 -&nbsp;
| firing charge
|- VALIGN=TOP
| ALIGN=RIGHT | 4 -&nbsp;
| melee
|- VALIGN=TOP
| ALIGN=RIGHT | 5 -&nbsp;
| Barabbas shoot
|- VALIGN=TOP
| ALIGN=RIGHT | 6 -&nbsp;
| Barabbas advance
|- VALIGN=TOP
| ALIGN=RIGHT | 7 -&nbsp;
| Barabbas melee
|- VALIGN=TOP
| ALIGN=RIGHT | 8 -&nbsp;
| Superninja fireball
|- VALIGN=TOP
| ALIGN=RIGHT | 9 -&nbsp;
| Superninja advance
|- VALIGN=TOP
| ALIGN=RIGHT | 10 -&nbsp;
| Superninja melee
|- VALIGN=TOP
| ALIGN=RIGHT | 11 -&nbsp;
| run for alarm (not used in Oni)
|- VALIGN=TOP
| ALIGN=RIGHT | 12 -&nbsp;
| Mutant Muro melee
|- VALIGN=TOP
| ALIGN=RIGHT | 13&nbsp;-&nbsp;
| Muro thunderbolt
|}<BR>&nbsp;
|-
| BGCOLOR="#B0C3D4" | 02 00 00 00
| 2
| ALIGN=LEFT | medium range behavior; values as above
|-
| BGCOLOR="#E7CEA5" | 02 00 00 00
| 2
| ALIGN=LEFT | hand to hand behavior (short range behavior); values as above
|-
| BGCOLOR="#FFDDDD" | 02 00 00 00
| 2
| ALIGN=LEFT | medium retreat behavior; values as above
|-
| BGCOLOR="#64AAAA" | 02 00 00 00
| 2
| ALIGN=LEFT | long retreat behavior; values as above
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#808080"
| COLSPAN=3 | <FONT SIZE=2 COLOR="#FFFFFF">Below follows the combat part.</FONT>
|-
| BGCOLOR="#EBEBEB" | 00 00 F0 42
| 120.000000
| ALIGN=LEFT | long/medium range; distance of the border between long and medium ranges; you can make it visible with the script command <FONT COLOR="#0000FF">ai2_showcombatranges = 1</FONT>
|- VALIGN=TOP
| BGCOLOR="#8C8CCC" | 01 00 00 00
| 1
| ALIGN=LEFT | melee override; see below; the following values are possible (values in dec):<BR>&nbsp;<BR>0 - no<BR>1 - if punched<BR>2 - (canceled)<BR>3 - short range<BR>4 - medium range<BR>5 - always melee<BR>&nbsp;
|- VALIGN=TOP
| BGCOLOR="#FF00C8" | 00 00 00 00
| 0
| ALIGN=LEFT | if no gun; behavior of AI which doesn't have a gun in its hand ( but can have it holstered); the following values are possible (values in dec):<BR>&nbsp;<BR>0 - melee<BR>1 - retreat<BR>2 - run to alarm<BR>&nbsp;
|-
| BGCOLOR="#F0F096" | 00 00 20 42
| 40.000000
| ALIGN=LEFT | medium/short range; distance of the border between medium and short ranges; you can make it visible with the script command <FONT COLOR="#0000FF">ai2_showcombatranges = 1
|-
| BGCOLOR="#00C864" | 00 00 48 43
| 200.000000
| ALIGN=LEFT | pursuit distance; see below for info
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#808080"
| COLSPAN=3 | <FONT SIZE=2 COLOR="#FFFFFF">Below follows the non-combatant part.</FONT>
|-
| BGCOLOR="#00C8FF" | 58 02 00 00
| 600
| ALIGN=LEFT | panic hurt (time in 1/60 seconds)
|-
| BGCOLOR="#00C8FF" | 84 03 00 00
| 900
| ALIGN=LEFT | panic gunfire (time in 1/60 seconds)
|-
| BGCOLOR="#00C8FF" | 58 02 00 00
| 600
| ALIGN=LEFT | panic melee (time in 1/60 seconds)
|-
| BGCOLOR="#00C8FF" | B0 04 00 00
| 1200
| ALIGN=LEFT | panic sight (time in 1/60 seconds)
|}
|}
===Combat part===
{{Table}}
{{OBDth}}
{{OBDtr| 0x7C | float    |EBEBEB| 00 00 F0 42 | 120.000000| long/medium range; distance of the border between long and medium ranges; you can make it visible with the script command *ai2_showcombatranges <nowiki>=</nowiki> 1* }}
{{OBDtr| 0x80 | int32    |8C8CCC| 01 00 00 00 | 1        | melee override; see below; the following values are possible:
:0 - nothing
:1 - if punched
:2 - (canceled)
:3 - short Crange
:4 - medium range
:5 - always melee
}}
{{OBDtr| 0x84 | int32    |FF00C8| 00 00 00 00 | 0        | if no gun; behavior of AI which doesn't have a gun in its hand ( but can have it holstered); the following values are possible:
:0 - melee
:1 - retreat
:2 - run to alarm
}}
{{OBDtr| 0x88 | float    |F0F096| 00 00 20 42 | 40.000000 | medium/short range; distance of the border between medium and short ranges; you can make it visible with the script command *ai2_showcombatranges <nowiki>=</nowiki> 1* }}
{{OBDtr| 0x8C | float    |00C864| 00 00 48 43 | 200.000000| pursuit distance; see below for info }}
|}
|}




----
===Non-combatant part===
==Alarm behavior==
{{Table}}
These settings affect the behavior of an AI that's running for a console (e.g., script command '''ai2_doalarm''').
{{OBDth}}
{{OBDtr| 0x90 | int32    |00C8FF| 58 02 00 00 | 600      | panic hurt (time in 1/60 seconds) }}
{{OBDtr| 0x94 | int32    |00C8FF| 84 03 00 00 | 900      | panic gunfire (time in 1/60 seconds) }}
{{OBDtr| 0x98 | int32    |00C8FF| 58 02 00 00 | 600      | panic melee (time in 1/60 seconds) }}
{{OBDtr| 0x9C | int32    |00C8FF| B0 04 00 00 | 1200      | panic sight (time in 1/60 seconds) }}
|}
 


;Offsets relative to start of CMBT chunk
===Alarm part===
{{Table}}
{{Table}}
{{OBD_Table_Header}}
{{OBDth}}
|- align=center
{{OBDtr| 0xA0 | float   |C80040| 00 00 96 43 | 300.000000| alarm search distance }}
| 0xA0
{{OBDtr| 0xA4 | float   |C80040| 00 00 A0 42 | 80.000000 | alarm enemy ignore distance }}
| float
{{OBDtr| 0xA8 | float   |FFCD96| 00 00 00 00 | 0.000000  | alarm enemy attack distance }}
| BGCOLOR="#C80040" | 00 00 96 43
{{OBDtr| 0xAC | int32    |C8C864| 1E 00 00 00 | 30       | alarm damage threshold }}
| 300.000000
{{OBDtr| 0xB0 | int32    |C8C864| 68 01 00 00 | 360       | alarm fight timer }}
| ALIGN=LEFT | alarm search distance
|- align=center
| 0xA4
| float
| BGCOLOR="#C80040" | 00 00 A0 42
| 80.000000
| ALIGN=LEFT | alarm enemy ignore distance
|- align=center
| 0xA8
| float
| BGCOLOR="#FFCD96" | 00 00 00 00
| 0
| ALIGN=LEFT | alarm enemy attack distance
|- align=center
| 0xAC
| long
| BGCOLOR="#C8C864" | 1E 00 00 00
| 30
| ALIGN=LEFT | alarm damage threshold
|- align=center
| 0xB0
| long
| BGCOLOR="#C8C864" | 68 01 00 00
| 360
| ALIGN=LEFT | alarm fight timer
|}
|}


These settings affect the behavior of an AI that's running for a console (e.g., script command *ai2_doalarm*).
;alarm search distance
;alarm search distance
:area around AI, where engine checks if there is some console with 40 bit (see [[OBD:BINA/OBJC/CONS|CONS]]).
:area around AI, where engine checks if there is some console with 40 bit (see [[OBD:BINA/OBJC/CONS|CONS]]).
Line 254: Line 158:


--[[User:Loser|Loser]] 09:03, 29 July 2007 (CEST)
--[[User:Loser|Loser]] 09:03, 29 July 2007 (CEST)
----
==Blue Box Beta WMDD==
http://www6.fh-eberswalde.de/user/dkriesch/oni/bina_combat.gif




----
==Bluebox screenshot==
----
http://ssg.oni2.net/subfold/bluebox/images/bina_combat.gif (Coming soon...)
{{OBD TXT|align=center|size=2|onistuff=bina_combat}}
 
----
 
----
{{OBD OBJC Footer | type=CMBT | prev=CHAR | next=CONS | name=Combat profile}}
{{OBD OBJC Footer|align=center|type=CMBT|prev=CHAR|next=CONS|name=Combat profile}}
1,051

edits