OBD:ONCC: Difference between revisions

314 bytes removed ,  11 October 2010
m
no edit summary
No edit summary
mNo edit summary
Line 102: Line 102:




;Hurt sound paramters
;Hurt Sound Constants


{{Table}}
{{Table}}
Line 131: Line 131:




;AI Constants


{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x128 | bitsets  |E7CEA5| 17 00 00 00 | 23          | general AI option bitset collection ; see below }}
{{OBDtr| 0x128 | bitsets  |E7CEA5| 17 00 00 00 | 23          | AI options bitset; see below }}
{{OBDtr| 0x12C | float    |FFDDDD| 00 00 80 3F | 1.000000    | AI rotation speed factor }}
{{OBDtr| 0x12C | float    |FFDDDD| 00 00 80 3F | 1.000000    | AI rotation speed factor }}
{{OBDtr| 0x130 | int16    |64AAAA| 06 00      | 6          | minimal fallen time; number of frames for which AI remains in *fallen* position when it is knockdowned }}
{{OBDtr| 0x130 | int16    |64AAAA| 06 00      | 6          | minimal fallen time; number of frames for which AI remains in *fallen* position when it is knockdowned }}
Line 143: Line 144:
|}
|}


 
;AI options bitset
;AI rotation speed factor
:reference rotation speed is about 1 turn (360�) per second
:the setting is only effective if the AI is in control
:so it's a bit like the AI's mouse sensitivity :)
 
 
;General AI options bitset
:allows or disables some parts of the AI behavior
:allows or disables some parts of the AI behavior
*NONE - startle anim is enabled, rest is disabled
*NONE - startle anim is enabled, rest is disabled
Line 158: Line 152:
*0x08 - requires 0x02, overrides 0x04 if both are set; firingspread/projectile dodge enabled for weapons; AI isn't shooting, it just tends to run away, not facing shooter
*0x08 - requires 0x02, overrides 0x04 if both are set; firingspread/projectile dodge enabled for weapons; AI isn't shooting, it just tends to run away, not facing shooter
*0x10 - bit not used
*0x10 - bit not used
;AI rotation speed factor
:reference rotation speed is about 1 turn (360�) per second
:the setting is only effective if the AI is in control
:so it's a bit like the AI's mouse sensitivity :)


;AI Targeting Constants


{{Table}}
{{Table}}
Line 169: Line 170:
{{OBDtr| 0x154 | int32    |FF00C8| 0F 00 00 00 | 15          | unknown frame count; something with AI targeting prediction; always the same for TURR }}
{{OBDtr| 0x154 | int32    |FF00C8| 0F 00 00 00 | 15          | unknown frame count; something with AI targeting prediction; always the same for TURR }}
{{OBDtr| 0x158 | int32    |FF00C8| 3C 00 00 00 | 60          | unknown frame count; something with AI targeting prediction; always the same for TURR }}
{{OBDtr| 0x158 | int32    |FF00C8| 3C 00 00 00 | 60          | unknown frame count; something with AI targeting prediction; always the same for TURR }}
{{OBDtrBK|1=First of 13 elements (grey outline) }}
{{OBDtrBK|1=First of 13 shooting skills (grey outline) }}
{{OBDtr| 0x15C | float    |F0F096| 00 00 00 00 | 0.000000    | recoil compensation amount (0.0 <nowiki>= min, 1.0 =</nowiki> max) }}
{{OBDtr| 0x15C | float    |F0F096| 00 00 00 00 | 0.000000    | recoil compensation amount (0.0 <nowiki>= min, 1.0 =</nowiki> max) }}
{{OBDtr| 0x160 | float    |F0F096| 00 00 00 00 | 0.000000    | best aiming angle in radians }}
{{OBDtr| 0x160 | float    |F0F096| 00 00 00 00 | 0.000000    | best aiming angle in radians }}
Line 175: Line 176:
{{OBDtr| 0x168 | float    |F0F096| 00 00 80 3F | 1.000000    | shot grouping decay }}
{{OBDtr| 0x168 | float    |F0F096| 00 00 80 3F | 1.000000    | shot grouping decay }}
{{OBDtr| 0x16C | float    |F0F096| 00 00 80 3F | 1.000000    | shooting inaccuracy multiplier }}
{{OBDtr| 0x16C | float    |F0F096| 00 00 80 3F | 1.000000    | shooting inaccuracy multiplier }}
{{OBDtr| 0x170 | int16   |00C864| 00 00      | 0          | minimum delay between shots in frames }}
{{OBDtr| 0x170 | uint16   |00C864| 00 00      | 0          | minimum delay between shots in frames }}
{{OBDtr| 0x172 | int16   |00C864| 00 00      | 0          | maximum delay between shots in frames }}
{{OBDtr| 0x172 | uint16   |00C864| 00 00      | 0          | maximum delay between shots in frames }}
|}
|}


 
;AI Shooting Skills
;SHOOTING SKILLS
These can be reviewed with e.g. '''ai2_skill_select konoko_generic w1_tap''' and then either '''ai2_skill_show''' (prints to console) or '''ai2_skill_save''' (prints to file)
These can be reviewed with e.g. '''ai2_skill_select konoko_generic w1_tap''' and then either '''ai2_skill_show''' (prints to console) or '''ai2_skill_save''' (prints to file)
;Fields
:recoil compensation amount, between 0 and 1 (float)
:best aiming angle, in radians (float)
:shot grouping error (float)
:shot grouping decay (float)
:shooting inaccuracy multiplier (float)
:minimum delay between shots, in frames (short)
:maximum delay between shots, in frames (short)
The first weapon (weapon 0) is not in the game anymore, whatever that was. Muro's thunderbolt is handled as animation-bound particles, although it used to be handled as a weapon (same for Mukade's ball, except '''w10_sni''' is still available) ('''w12_ba2''' and '''w11_ba1''' are a bit mixed up : the beam is made of '''w12_ba2''' particles, and the grenade is a '''w11_ba1''' particle...)
The first weapon (weapon 0) is not in the game anymore, whatever that was. Muro's thunderbolt is handled as animation-bound particles, although it used to be handled as a weapon (same for Mukade's ball, except '''w10_sni''' is still available) ('''w12_ba2''' and '''w11_ba1''' are a bit mixed up : the beam is made of '''w12_ba2''' particles, and the grenade is a '''w11_ba1''' particle...)


See screenshot for the raw hex (example is '''konoko_generic''' from '''level3_Final''')
{{Table|width=""|align="left"}}
{{Table|width=""|align="left"}}
|-BGCOLOR="#E9E9E9" ALIGN=CENTER
|-BGCOLOR="#E9E9E9" ALIGN=CENTER
Line 275: Line 266:
{{OBDtr| 0x42C | int32    |D0C0AF| A0 8C 00 00 | 36000      | friendlythreat weak timer; how long will AI remain in weak feeling of ally, doing its usual job; can be checked by *ai2_report_verbose* command }}
{{OBDtr| 0x42C | int32    |D0C0AF| A0 8C 00 00 | 36000      | friendlythreat weak timer; how long will AI remain in weak feeling of ally, doing its usual job; can be checked by *ai2_report_verbose* command }}
{{OBDtr| 0x430 | float    |EEDDFF| 00 00 80 3F | 1.000000    | earshot radius; defines size of the sound-collision sphere around AI }}
{{OBDtr| 0x430 | float    |EEDDFF| 00 00 80 3F | 1.000000    | earshot radius; defines size of the sound-collision sphere around AI }}
|}
;Vision Field
The "range" and "max" values are logically angles but the cosine of the angle is stored instead for performace reasons. We have the following angles (in degrees):
:vertical range - 40
:horizontal central range - 35
:horizontal central max - 55
:horizontal peripheral range - 80
:horizontal peripheral max - 115
Within "range" the "distance" field is used to compute visibility (character is visible if the distance between AI and character is < "distance" field). Between "range" and "max" the visibility distance decreases gradually towards 0.
The vision field can be made visible with the script command *ai2_showvision <nowiki>=</nowiki>1* but it should be noted that the rendering might not be accurate. In particular the peripheral vision field it's missing the central segment.
;Character Constants
{{Table}}
{{OBDth}}
{{OBDtr| 0x434 | link    |C5FF8A| 01 FB 03 00 | 1019        | link to 01019-konoko.[[OBD:ONCV|ONCV]]; defines variants and upgrades }}
{{OBDtr| 0x434 | link    |C5FF8A| 01 FB 03 00 | 1019        | link to 01019-konoko.[[OBD:ONCV|ONCV]]; defines variants and upgrades }}
{{OBDtr| 0x438 | link    |C5FF8A| 01 F9 03 00 | 1017        | link to [[OBD:ONCP|01017-.ONCP]]; lists the particles available for this character (trails, flashes, etc) }}
{{OBDtr| 0x438 | link    |C5FF8A| 01 F9 03 00 | 1017        | link to [[OBD:ONCP|01017-.ONCP]]; lists the particles available for this character (trails, flashes, etc) }}
Line 313: Line 321:
{{OBDtr| 0xC68 | float    |FF22FF| 00 00 00 00 | 0.000000    | unknown; always the same }}  
{{OBDtr| 0xC68 | float    |FF22FF| 00 00 00 00 | 0.000000    | unknown; always the same }}  
{{OBDtr| 0xC6C | float    |FF22FF| 00 00 00 00 | 0.000000    | unknown; always the same }}  
{{OBDtr| 0xC6C | float    |FF22FF| 00 00 00 00 | 0.000000    | unknown; always the same }}  
{{OBDtr| 0xC70 | float    |FF22FF| 00 00 00 3F | 0.500000    | stun timer; specifies how long should be this char stunned when hit with w6_vdg; the longest time possible to be stunned is when this byte is zero. Then this ONCC is stunned for 200 frames (30 frames for initial stagger + the rest of the frames is stun animation). The shortest time is for 1.000000 (no stagger/stun at all) }}  
{{OBDtr| 0xC70 | float    |FF22FF| 00 00 00 3F | 0.500000    | stun timer; specifies how long should be this char stunned when hit with w6_vdg; the longest time possible to be stunned is when this field is zero. Then this ONCC is stunned for 200 frames (30 frames for initial stagger + the rest of the frames is stun animation). The shortest time is for 1.000000 (no stagger/stun at all) }}  
{{OBDtr| 0xC74 | float    |FF22FF| 00 00 80 3E | 0.250000    | unknown }}  
{{OBDtr| 0xC74 | float    |FF22FF| 00 00 80 3E | 0.250000    | unknown }}  
{{OBDtr| 0xC78 | float    |FF22FF| 00 00 00 00 | 0.000000    | unknown; always the same }}  
{{OBDtr| 0xC78 | float    |FF22FF| 00 00 00 00 | 0.000000    | unknown; always the same }}  
Line 363: Line 371:
:0x01 - Character is left-hander with both pistols and rifles
:0x01 - Character is left-hander with both pistols and rifles
:0x02 - Character is left-hander with pistols but "right-hander" with rifles (however, animations for rifles are treated as left-handed)
:0x02 - Character is left-hander with pistols but "right-hander" with rifles (however, animations for rifles are treated as left-handed)
;Vision Field
The "range" and "max" values are logically angles but the cosine of the angle is stored instead for performace reasons. We have the following angles (in degrees):
:vertical range - 40
:horizontal central range - 35
:horizontal central max - 55
:horizontal peripheral range - 80
:horizontal peripheral max - 115
Within "range" the "distance" field is used to compute visibility (character is visible if the distance between AI and character is < "distance" field). Between "range" and "max" the visibility distance decreases gradually towards 0.
The vision field can be made visible with the script command *ai2_showvision <nowiki>=</nowiki>1* but it should be noted that the rendering might not be accurate. In particular the peripheral vision field it's missing the central segment.




708

edits