OBD:BINA/OBJC/CMBT: Difference between revisions

From OniGalore
< OBD:BINA‎ | OBJC
Jump to navigation Jump to search
(Something about pursuing)
(pursuit finished + added info about melee overriding)
Line 132: Line 132:
| BGCOLOR="#8C8CCC" | 01 00 00 00
| BGCOLOR="#8C8CCC" | 01 00 00 00
| 1
| 1
| ALIGN=LEFT | melee overide; when 1 or higher, AI automatically switches from gunfire to melee on short distance; 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;
| 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
|- VALIGN=TOP
| BGCOLOR="#FF00C8" | 00 00 00 00
| BGCOLOR="#FF00C8" | 00 00 00 00
| 0
| 0
| ALIGN=LEFT | if no gun; ( when 1, AI tries to run if they don't hold weapon) (when 2, unknown) (when 3 and higher, they stand and seems to have no pathfinding logic); the following values are possible (values in dec):<BR>&nbsp;<BR>0 - melee<BR>1 - retreat<BR>2 - run to alarm<BR>&nbsp;
| 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
| BGCOLOR="#F0F096" | 00 00 20 42
Line 224: Line 224:
* *run to alarm* if no gun event ( only when AI is unarmed ), again it turns on *alarm search distance*, but this time AI can do normal actions (attack, hunt) if there is no 40 bit console within reach.
* *run to alarm* if no gun event ( only when AI is unarmed ), again it turns on *alarm search distance*, but this time AI can do normal actions (attack, hunt) if there is no 40 bit console within reach.
* ???Find alarm??? pm_pursue action, still unknown
* ???Find alarm??? pm_pursue action, still unknown
----
                                                              '''Further info'''
----
----
;About pursuit distance
;About pursuit distance
Line 237: Line 239:
:*GoTo
:*GoTo
:*Forget
:*Forget
While in pursuit mode, AI thanks to the pursuit distance decides what to do. If source of danger is inside pursuit distance, AI will run to the place where disturbing action was (GoTo mode) and then starts looking (Look or Glance modes). If source of danger lies out of the pursuit range, AI just turns to the position of it while being in Glance or Look mode.
What AI does while in pursuit mode depends on the last values in [[OBD:BINA/OBJC/CHAR|CHAR]]. But it is still unknown how it works. It also depends on the alert level of an AI (lull, low, med, high, combat). Pursuit mode lasts from the moment of the disturbing action until AI goes to forgotten hostilethreat for enemy action, or after one investigation loop for friendlythreat action (see [[OBD:ONCC|ONCC]] for info about ...threats).
 
So...what is the pursuit distance??? It is distance that is AI allowed to travel from its original location for *pursue* purposes. Set it high and AI can run through whole level if it hears or spots something. Set it low and AI will do just a few steps in a direction of disturbing action.
----
;About melee override
First something about minimal shooting distance.It is in the [[OBD:ONWC|ONWC]] and determines closest range for AI to fire that weapon. If enemy goes closer, AI stops shooting and tends to run away until it reahes minimal shooting distance again.
Now if you set this minimal shooting distance higher than it is originally (for example try 200) you can have some fun chasing AIs as they are running away from you.
 
Point is that if you set melee override to some range (for example 03 - short range) and then try it, you will see that the moment you are closer than minimal shooting distance AND you are in range which enables it (short range in this example) AI will switch to melee mode instead of running away.
 
So you can make short range for example 200 units big and set min.shoot.dist. 100 units big and have melee override 03 -short range. AI will then shoot at you even if you are inside short range, but the moment you ecounter min.shoot.dist. it switches to melee.
 
How it switches back to weapon when you run away back into min.shoot.dist. is not clear. So far it happens automatically after some time. Where is timer for that??? Let us know, if you know....


The behavior above doesn't have to be true for all AI. What to do and when is also decided by last values in [[OBD:BINA/OBJC/CHAR|CHAR]]. But it is still unknown how it works.
--[[User:Loser|Loser]] 09:03, 29 July 2007 (CEST)
----
----
==Blue Box Beta WMDD==
==Blue Box Beta WMDD==

Revision as of 07:03, 29 July 2007

ONI BINARY DATA
AKVA << Other file types >> CBPI
BINA : Binary data
TMBD << Other BINA >> ONIE
OBJC : Objects
CHAR << Other OBJC >> CONS
CMBT : Combat profile
XML tutorial
Overview @ Oni Stuff
OBD.png




bin_r_cb.gif


Raw hex Value Meaning
54 42 4D 43 TBMC combat
70 01 00 00 368 old file ID
00 00 00 00 0 unknown
13 55 5F C3 -223.332321 x-position of ???
D4 A8 8E 41 17.832436 y-position (height) of ???
C3 05 E9 C2 -116.511253 z-position of ???
00 00 00 00 0.000000 rotation on the x-axis in degrees
00 00 00 00 0.000000 rotation on the y-axis in degrees
00 00 00 00 0.000000 rotation on the z-axis in degrees
Stand_and_Fire space for notes
00 00 00 00 0 combat ID (looked up from CJBOCharacter.BINA)
Below follows the behavior part.
02 00 00 00 2 long range behavior; the following behavior values are possible (values in dec):
 
0 -  none
1 -  stare
2 -  hold and fire
3 -  firing charge
4 -  melee
5 -  Barabbas shoot
6 -  Barabbas advance
7 -  Barabbas melee
8 -  Superninja fireball
9 -  Superninja advance
10 -  Superninja melee
11 -  run for alarm (not used in Oni)
12 -  Mutant Muro melee
13 -  Muro thunderbolt

 
02 00 00 00 2 medium range behavior; values as above
02 00 00 00 2 hand to hand behavior (short range behavior); values as above
02 00 00 00 2 medium retreat behavior; values as above
02 00 00 00 2 long retreat behavior; values as above
Below follows the combat part.
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 = 1
01 00 00 00 1 melee override; see below; the following values are possible (values in dec):
 
0 - no
1 - if punched
2 - (canceled)
3 - short range
4 - medium range
5 - always melee
 
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 (values in dec):
 
0 - melee
1 - retreat
2 - run to alarm
 
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 = 1
00 00 48 43 200.000000 pursuit distance; see below for info
Below follows the non-combatant part.
58 02 00 00 600 panic hurt (time in 1/60 seconds)
84 03 00 00 900 panic gunfire (time in 1/60 seconds)
58 02 00 00 600 panic melee (time in 1/60 seconds)
B0 04 00 00 1200 panic sight (time in 1/60 seconds)



Alarm behavior

These settings affect the behavior of an AI that's running for a console (e.g., script command ai2_doalarm).

Offsets relative to start of CMBT chunk
Offset Type Raw Hex Value Description
0xA0 float 00 00 96 43 300.000000 alarm search distance
0xA4 float 00 00 A0 42 80.000000 alarm enemy ignore distance
0xA8 float 00 00 00 00 0 alarm enemy attack distance
0xAC long 1E 00 00 00 30 alarm damage threshold
0xB0 long 68 01 00 00 360 alarm fight timer
alarm search distance
area around AI, where engine checks if there is some console with 40 bit (see CONS).
Alarm enemy ignore distance
This one specifies an "ignore range". Enemies which are inside this range are not ignored but AI doesn't attack them.
Alarm enemy attack distance
Zero by default.
This one specifies an "attack range" around an AI running for an alarm. When there is an enemy inside, AI stops running for the console and attack the enemy (if AI knows about him, of course)
Nevertheless AI still keeps in mind that it should run for the console. So when there is no enemy inside this range and fight timer runs out, AI resumes running to the specified console.
Fight timer
When AI, which is running for the console, is engaged in a fight and enemy manages to disappear (either by phase-cloak or simply by hiding behind some corner), AI tries to chase him or looks for him. Alarm timer specifies how long should AI chase/look for the enemy. For chasing, timer starts when the enemy is outside *Alarm enemy attack distance*. Of course when the enemy escapes even from *Alarm enemy ignore range*, AI abandons him automatically.
Alarm damage threshold
Specifies how long AI, which is running for the console, remembers someone hurt it. Until this timer runs away, AI doesn't tend to use console. It only stays in fight stance near console, ready to fight. If someone hurts AI which is running for the console, then escapes and then tries to hurt it again while this timer isn't finished yet, AI remembers him and initatively attacks him the moment he steps inside *Alarm enemy attack distance*.

Whole alarm logic can be tripped by:

  • *ai2_doalarm* command (suitable for geyser's rugby)
  • *run for alarm* (0b) behavior, altough this behavior alone does NOTHING, it just turns on *alarm search distance*. If there is no console with 40 bit in reach, AI stands still and just stares.
  • *run to alarm* if no gun event ( only when AI is unarmed ), again it turns on *alarm search distance*, but this time AI can do normal actions (attack, hunt) if there is no 40 bit console within reach.
  • ???Find alarm??? pm_pursue action, still unknown

                                                             Further info

About pursuit distance

First of all, pursuit is NOT when you have been seen and now running away. If you do that, AI is in *combat* mode, not *pursue* mode. You are pursued only when you have NOT been seen by central vision field (see ONCC). So if some enemy does sound that touches AI's sound detection sphere, or when some enemy interferes with AI's peripheral vision field, AI goes into pursue mode with him. In this mode AI uses special behavior for investigating. According to the EXE, possibilities are (dunno if it is in proper order, it is raw EXE rip):

  • Find Alarm
  • Keep Looking
  • Return To Job
  • Glance
  • Hunt - not implemented in Oni (accidentaly I have read error message in Manplant a few months ago saying that)
  • Move
  • Look
  • Wait
  • GoTo
  • Forget

What AI does while in pursuit mode depends on the last values in CHAR. But it is still unknown how it works. It also depends on the alert level of an AI (lull, low, med, high, combat). Pursuit mode lasts from the moment of the disturbing action until AI goes to forgotten hostilethreat for enemy action, or after one investigation loop for friendlythreat action (see ONCC for info about ...threats).

So...what is the pursuit distance??? It is distance that is AI allowed to travel from its original location for *pursue* purposes. Set it high and AI can run through whole level if it hears or spots something. Set it low and AI will do just a few steps in a direction of disturbing action.


About melee override

First something about minimal shooting distance.It is in the ONWC and determines closest range for AI to fire that weapon. If enemy goes closer, AI stops shooting and tends to run away until it reahes minimal shooting distance again. Now if you set this minimal shooting distance higher than it is originally (for example try 200) you can have some fun chasing AIs as they are running away from you.

Point is that if you set melee override to some range (for example 03 - short range) and then try it, you will see that the moment you are closer than minimal shooting distance AND you are in range which enables it (short range in this example) AI will switch to melee mode instead of running away.

So you can make short range for example 200 units big and set min.shoot.dist. 100 units big and have melee override 03 -short range. AI will then shoot at you even if you are inside short range, but the moment you ecounter min.shoot.dist. it switches to melee.

How it switches back to weapon when you run away back into min.shoot.dist. is not clear. So far it happens automatically after some time. Where is timer for that??? Let us know, if you know....

--Loser 09:03, 29 July 2007 (CEST)


Blue Box Beta WMDD

bina_combat.gif




Template:OBD TXT



ONI BINARY DATA
AKVA << Other file types >> CBPI
BINA : Binary data
TMBD << Other BINA >> ONIE
OBJC : Objects
CHAR << Other OBJC >> CONS
CMBT : Combat profile
[[OBD:File types/{{{family}}}|{{{family}}} file]]