OBD:BINA/OBJC/CHAR: Difference between revisions

From OniGalore
< OBD:BINA‎ | OBJC
Jump to navigation Jump to search
m (fixing link to onistuff)
m (→‎Script functions: bg color was too dark to read the text)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{OBD OBJC Header | align=center | type=CHAR | prev=WEAP | next=CMBT | name=Character |onistuff=b_ch}}
{{OBD OBJC Header | align=center | type=CHAR | prev=WEAP | next=CMBT | name=Character |stuff=b_ch}}


==File description==
==File description==
===Basic setup - Appearance, weapon, position, misc spawn flags===
===Basic setup===
The character's appearance, weapon, position, and misc. spawn flags.


 
[[Image:bin_r_ch.gif]]
[[image:bin_r_ch.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      | wrapper tag }}
{{OBDtr| 0x04 | int32    |FFFF00| 2C 8B 00 00 | 35628      | size of the complete collection from this position in bytes }}
{{OBDtr| 0x04 | int32    |FFFF00| 2C 8B 00 00 | 35628      | size of the complete list in bytes from this position }}
{{OBDtr| 0x08 | int32    |00FF00| 27 00 00 00 | 39        | object collection version }}
{{OBDtr| 0x08 | int32    |00FF00| 27 00 00 00 | 39        | object list version }}
{{OBDtr| 0x0C | int32    |00FFFF| 20 02 00 00 | 544        | size of the following element in bytes }}
{{OBDtr| 0x0C | int32    |00FFFF| 20 02 00 00 | 544        | size of the following element in bytes }}
{{OBDtrBK}}
{{OBDtrBK}}
{{OBDtr| 0x000 | char[4]  |FFC8C8| 52 41 48 43 | CHAR      | character }}
{{OBDtr| 0x000 | char[4]  |FFC8C8| 52 41 48 43 | CHAR      | tag name }}
{{OBDtr| 0x004 | int32    |FFFFC8| 87 19 00 00 | 6535      | old file ID }}
{{OBDtr| 0x004 | int32    |FFFFC8| 87 19 00 00 | 6535      | old file ID }}
{{OBDtr| 0x008 | int32    |C8FFC8| 00 00 00 00 | 0          | unknown }}
{{OBDtr| 0x008 | int32    |C8FFC8| 00 00 00 00 | 0          | unknown }}
{{OBDtr| 0x00C | float    |C8FFFF| A5 7D 9D 43 | 314.981597 | x-position of the character }}
{{OBDtr| 0x00C | float    |C8FFFF| A5 7D 9D 43 | 314.981597 | x position of the character }}
{{OBDtr| 0x010 | float    |C8FFFF| 00 00 D8 C1 | -27.000000 | y-position (height) of the character }}
{{OBDtr| 0x010 | float    |C8FFFF| 00 00 D8 C1 | -27.000000 | y position (height) of the character }}
{{OBDtr| 0x014 | float    |C8FFFF| 98 09 1E 42 | 39.509368  | z-position of the character }}
{{OBDtr| 0x014 | float    |C8FFFF| 98 09 1E 42 | 39.509368  | z position of the character }}
{{OBDtr| 0x018 | float    |FFC8FF| 00 00 00 00 | 0.000000  | rotation on the x-axis in degrees }}
{{OBDtr| 0x018 | float    |FFC8FF| 00 00 00 00 | 0.000000  | rotation on the x axis in degrees }}
{{OBDtr| 0x01C | float    |FFC8FF| 00 00 87 43 | 270.000000 | rotation on the y-axis in degrees }}
{{OBDtr| 0x01C | float    |FFC8FF| 00 00 87 43 | 270.000000 | rotation on the y axis in degrees }}
{{OBDtr| 0x020 | float    |FFC8FF| 00 00 00 00 | 0.000000  | rotation on the z-axis in degrees }}
{{OBDtr| 0x020 | float    |FFC8FF| 00 00 00 00 | 0.000000  | rotation on the z axis in degrees }}
{{OBDtr| 0x024 | bitset32 |FFC800| 01 00 00 00 | 1, 0, 0, 0 | character options; the following bits are used:
{{OBDtr| 0x024 | bitset32 |FFC800| 01 00 00 00 | 1, 0, 0, 0 | character options; the following bits are used:
:0x '''01''' 00 00 00 - player character
:0x '''01''' 00 00 00 - player character
Line 34: Line 34:
:0x '''80''' 00 00 00 - superammo
:0x '''80''' 00 00 00 - superammo
:0x 00 '''01''' 00 00 - omniscient
:0x 00 '''01''' 00 00 - omniscient
:0x 00 '''02''' 00 00 - has LSI
:0x 00 '''02''' 00 00 - has [[LSI]]
:0x 00 '''04''' 00 00 - boss
:0x 00 '''04''' 00 00 - boss
:0x 00 '''08''' 00 00 - upgrade difficulty (spawns a stronger enemy if you play on medium or hard)
:0x 00 '''08''' 00 00 - upgrade difficulty (spawns a stronger enemy if you play on medium or hard)
:0x 00 '''10''' 00 00 - no auto-drop (doesn't drop "used" shield, "used" invisibility and LSI when killed)
:0x 00 '''10''' 00 00 - no auto-drop (doesn't drop "used" shield, "used" invisibility and LSI when killed)
}}
}}
{{OBDtr2|0x028 | char[64] |B0C3D4| konoko_generic          | character class name (reference to [[OBD:ONCC|00991-konoko_generic.ONCC]]) }}
{{OBDtr2|0x028 | char[64] |B0C3D4| konoko_generic          | character class name (reference to [[OBD:ONCC|ONCCkonoko_generic]]) }}
{{OBDtr2|0x068 | char[32] |E7CEA5| konoko                  | character name }}
{{OBDtr2|0x068 | char[32] |E7CEA5| konoko                  | character name }}
{{OBDtr2|0x088 | char[64] |FFDDDD| w1_tap                  | weapon class name (reference to [[OBD:ONWC|03701-w1_tap.ONWC]] of level 0) }}
{{OBDtr2|0x088 | char[64] |FFDDDD| w1_tap                  | weapon class name (reference to [[OBD:ONWC|ONWCw1_tap]] of level 0) }}
|}
|}


===Script functions - Called by engine when certain things happen to a character===
===Script functions===
 
These are the names of the functions in the level script to call when certain things happen to a character.


{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr2|0x0C8 | char[32] |EBEBEB| unused                  | script function called when character is spawned }}
{{OBDtr2|0x0C8 | char[32] |EBEBEB| unused                  | called when character is spawned }}
{{OBDtr2|0x0E8 | char[32] |8C8CCC| you_lose                | script function called when character dies (health reaches 0); can work multiple times }}
{{OBDtr2|0x0E8 | char[32] |8C8CCC| you_lose                | called when character dies (health reaches 0); can work multiple times }}
{{OBDtr2|0x108 | char[32] |FF00C8| unused                  | script function called when character notices an enemy; works only once }}
{{OBDtr2|0x108 | char[32] |FF00C8| unused                  | called when character notices an enemy; works only once }}
{{OBDtr2|0x128 | char[32] |F0F096| unused                  | alarm function; never used in Oni, it is called when character is alarmed }}
{{OBDtr2|0x128 | char[32] |F0F096| unused                  | never used in the game data, but it should be called when character is alarmed }}
{{OBDtr2|0x148 | char[32] |00C864| unused                  | script function called when character is hurt for the first time; works only once }}
{{OBDtr2|0x148 | char[32] |00C864| unused                  | called when character is hurt for the first time; works only once }}
{{OBDtr2|0x168 | char[32] |00C8FF| unused                  | script function called when character is "defeated" (health reaches 1); works only once }}
{{OBDtr2|0x168 | char[32] |00C8FF| unused                  | called when character is "defeated" (health reaches 1); works only once }}
{{OBDtr2|0x188 | char[32] |C80040| unused                  | script function called when character runs out of ammo (reloads a weapon with the last clip/cell); works only once, and the character must have the ammo at spawn-time }}
{{OBDtr2|0x188 | char[32] |C80040| unused                  | called when character runs out of ammo by reloading a weapon with the last available clip); works only once, and the character must have the ammo at spawn time }}
{{OBDtr2|0x1A8 | char[32] |FFCD96| unused                  | nopath function, some exotic script function call ("should" be called when a character has trouble pathfinding, but isn't) }}
{{OBDtr2|0x1A8 | char[32] |989898| unused                  | "nopath" function (meant to be called when a character has trouble pathfinding, but isn't) }}
|}
|}


 
===Less basic setup===
===Less basic setup - Inventory, team, jobs, alert/pursuit===
Inventory, team, jobs, alert/pursuit behavior.
 


{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x1C8 | int32    |C8C864| 00 00 00 00 | 0          | additional health (the basic health is stored in the [[OBD:ONCC|ONCC]] file of the character) }}
{{OBDtr| 0x1C8 | int32    |C8C864| 00 00 00 00 | 0          | +/- delta to the class's base health (stored in the [[OBD:ONCC|ONCC]] file of the character) }}
{{OBDtr| 0x1CC | int32    |0096C8| 00 00 00 00 | 0          | job ID; the following jobs are possible:
{{OBDtr| 0x1CC | int32    |0096C8| 00 00 00 00 | 0          | job ID; the following jobs are possible:
:0 - none
:0 - none
Line 73: Line 72:
:4 - teambattle (never used in Oni)
:4 - teambattle (never used in Oni)
}}
}}
{{OBDtr| 0x1D0 | int16    |FF80C0| 00 00      | 0          | patrol path ID (reference to the [[OBD:BINA/OBJC/PATR|Patrol_Path.BINA]] file) }}
{{OBDtr| 0x1D0 | int16    |FF80C0| 00 00      | 0          | patrol path ID (reference to the [[OBD:BINA/OBJC/PATR|BINACJBOPatrol_Path]] file) }}
{{OBDtr| 0x1D2 | int16    |FF80C0| 00 00      | 0          | combat ID (reference to the [[OBD:BINA/OBJC/CMBT|Combat.BINA]] file) }}
{{OBDtr| 0x1D2 | int16    |FF80C0| 00 00      | 0          | combat ID (reference to the [[OBD:BINA/OBJC/CMBT|BINACJBOCombat]] file) }}
{{OBDtr| 0x1D4 | int16    |D0C0AF| 00 00      | 0          | melee ID (reference to the [[OBD:BINA/OBJC/MELE|Melee Profile.BINA]] file) }}
{{OBDtr| 0x1D4 | int16    |D0C0AF| 00 00      | 0          | melee ID (reference to the [[OBD:BINA/OBJC/MELE|BINACJBOMelee Profile]] file) }}
{{OBDtr| 0x1D6 | int16    |D0C0AF| 00 00      | 0          | neutral ID (reference to the [[OBD:BINA/OBJC/NEUT|Neutral.BINA]] file) }}
{{OBDtr| 0x1D6 | int16    |D0C0AF| 00 00      | 0          | neutral ID (reference to the [[OBD:BINA/OBJC/NEUT|BINACJBONeutral]] file) }}
{{OBDtr| 0x1D8 | int16    |EEDDFF| 01 00      | 1          | amount of ammo (red clips) that can be used }}
{{OBDtr| 0x1D8 | int16    |EEDDFF| 01 00      | 1          | amount of ballistic ammo that can be used }}
{{OBDtr| 0x1DA | int16    |EEDDFF| 00 00      | 0          | amount of ammo (red clips) that can be dropped }}
{{OBDtr| 0x1DA | int16    |EEDDFF| 00 00      | 0          | amount of ballistic ammo that can be dropped }}
{{OBDtr| 0x1DC | int16    |C5FF8A| 00 00      | 0          | amount of energy cells (green clips) that can be used }}
{{OBDtr| 0x1DC | int16    |C5FF8A| 00 00      | 0          | amount of energy cells that can be used }}
{{OBDtr| 0x1DE | int16    |C5FF8A| 00 00      | 0          | amount of energy cells (green clips) that can be dropped }}
{{OBDtr| 0x1DE | int16    |C5FF8A| 00 00      | 0          | amount of energy cells that can be dropped }}
{{OBDtr| 0x1E0 | int16    |C0C0C0| 00 00      | 0          | amount of hypos that can be used }}
{{OBDtr| 0x1E0 | int16    |C0C0C0| 00 00      | 0          | amount of hypos that can be used }}
{{OBDtr| 0x1E2 | int16    |C0C0C0| 00 00      | 0          | amount of hypos that can be dropped }}
{{OBDtr| 0x1E2 | int16    |C0C0C0| 00 00      | 0          | amount of hypos that can be dropped }}
{{OBDtr| 0x1E4 | int16    |FF0080| 00 00      | 0          | amount of force shields that can be used }}
{{OBDtr| 0x1E4 | int16    |FF0080| 00 00      | 0          | amount of force shields that can be used }}
{{OBDtr| 0x1E6 | int16    |FF0080| 00 00      | 0          | amount of force shields that can be dropped }}
{{OBDtr| 0x1E6 | int16    |FF0080| 00 00      | 0          | amount of force shields that can be dropped }}
{{OBDtr| 0x1E8 | int16    |FFFFA6| 00 00      | 0          | amount of phase cloaking that can be used (60 <nowiki>=</nowiki> 1 second) }}
{{OBDtr| 0x1E8 | int16    |FFFFA6| 00 00      | 0          | amount of phase cloak remaining; this number is in ticks (1/60 second) except if it's 1, in which case it's interpreted to mean "a full phase cloak" }}
{{OBDtr| 0x1EA | int16    |FFFFA6| 00 00      | 0          | amount of phase cloaking that can be dropped }}
{{OBDtr| 0x1EA | int16    |FFFFA6| 00 00      | 0          | will drop phase cloak (true if any value above zero) }}


{{OBDtr| 0x1EC | int16    |71FFB8| 00 00      | 0          | unknown; always zero; used "nci"? }}
{{OBDtr| 0x1EC | int16    |71FFB8| 00 00      | 0          | unused }}
{{OBDtr| 0x1EE | int16    |71FFB8| 00 00      | 0          | unknown; always zero; dropped "nci"? }}
{{OBDtr| 0x1EE | int16    |71FFB8| 00 00      | 0          | unused }}


{{OBDtr| 0x1F0 | int32    |0000BF| 00 00 00 00 | 0          | team ID; the following teams are possible:
{{OBDtr| 0x1F0 | int32    |0000BF| 00 00 00 00 | 0          | team ID; the following teams are possible:
Line 101: Line 100:
:7 - SyndicateAccessory
:7 - SyndicateAccessory
}}
}}
{{OBDtr| 0x1F4 | int32    |804040| 64 00 00 00 | 100        | ammo filling in percent }}
{{OBDtr| 0x1F4 | int32    |804040| 64 00 00 00 | 100        | fullness of current ammo clip as a percentage }}
{{OBDtr| 0x1F8 | int32    |FF22FF| 00 00 00 00 | 0          | initial alert level; the following alert levels are possible:
{{OBDtr| 0x1F8 | int32    |FF22FF| 00 00 00 00 | 0          | initial alert level; the following alert levels are possible:
:0 - lull
:0 - lull
Line 109: Line 108:
:4 - combat
:4 - combat
}}
}}
{{OBDtr| 0x1FC | int32    |808080| 00 00 00 00 | 0          | minimal alert level }}
{{OBDtr| 0x1FC | int32    |808080| 00 00 00 00 | 0          | minimum alert level }}
{{OBDtr| 0x200 | int32    |FFAA82| 01 00 00 00 | 1          | alert level when starting a job }}
{{OBDtr| 0x200 | int32    |FFAA82| 01 00 00 00 | 1          | alert level when starting a job }}
{{OBDtr| 0x204 | int32    |00D900| 02 00 00 00 | 2          | alert level when investigating }}
{{OBDtr| 0x204 | int32    |00D900| 02 00 00 00 | 2          | alert level when investigating }}
Line 117: Line 116:
{{OBDtr| 0x214 | int32    |4F7291| 04 00 00 00 | 4          | pursuit mode for strong awareness when alert level medium/high/combat }}
{{OBDtr| 0x214 | int32    |4F7291| 04 00 00 00 | 4          | pursuit mode for strong awareness when alert level medium/high/combat }}
{{OBDtr| 0x218 | int32    |FFD6C1| 04 00 00 00 | 4          | pursuit mode for weak awareness when alert level medium/high/combat }}
{{OBDtr| 0x218 | int32    |FFD6C1| 04 00 00 00 | 4          | pursuit mode for weak awareness when alert level medium/high/combat }}
{{OBDtr| 0x21C | int32    |FF5E5E| 00 00 00 00 | 0          | unknown (pm_pursue_lost?) }}
{{OBDtr| 0x21C | int32    |FF5E5E| 00 00 00 00 | 0          | pursuit mode for lost contact (enemy was identified but then the enemy ran away) }}
{{OBDtr| 0x220 | float    |FF5E5E| 20 02 00 00 | ?          | "facing; internal use only"; used? }}
|}
|}




;Alarm groups
;Alarm groups
:Stored as a bitset
Stored as a bitset. If bit 2^N is ON, the character will be alarmed by script command '''ai2_tripalarm(N)''' or alarm console command '''0060 NN00''' where NN is the hex for N.
:If bit 2^N is ON, the character will be alarmed by script command '''ai2_tripalarm(N)''' or alarm console command '''0060 NN00''' where NN is the hex for N.
:(Since the size of the alarm group field is 4 bytes, there's a maximum of 32 alarm groups, i.e. N ranges from 0 to 31.)
:(Since the size of the alarm group field is 4 bytes, there's a maximum of 32 alarm groups, i.e. N ranges from 0 to 31)


;Pursuit modes:
;Pursuit modes:
:AI2 has 4 awareness modes: '''forgotten''', '''weak''', '''strong''', '''definite'''.
See {{SectionLink|AI|Reactions and awareness}} and {{SectionLink|AI|Pursuit}} to learn about meaning of CHAR pursuit values.
:Forgotten and definite are clear (either AI2 forgets about enemy or AI2 sees enemy with central vision field).
:Weak and strong are modes used when AI2 character pursues enemy. The moment AI2 char sees (with '''peripheral''' vision field) or hears enemy, it goes into pursue mode with this enemy. Strong is first, then (after timer finishes) it degrades to weak (and then to forgotten).
*values specified here in CHAR affect only pursuit that is called because of some '''SOUND contact'''. If AI2 heard some sound it does:
:*At the beginning of pursuit, AI2 chars tries to move as close to the point where enemy stood (or center of dangerous sound was) as possible. AI2 character has limited '''pursuit distance''', specified in [[CMBT]] profile it is using. If source of danger (or interest?) is too far away, AI2 char moves only so far where it can move from its current location according to the pursuit distance. For movement, pursuit mode 2 (GoTo) is used. Whole pursuit behavior depends on pathfinding, no "vectors of movement" or how should I call those green lines.
::"Green lines": ai2_showpaths=1, when in MELE mode or dodging, AI2 has some short green line pointing in the direction of movement instead of regular brown pathfinding line.
:*Then AI2 performs pursuit mode 4 (Look) for some specified time (which is probably hardcoded in this pursuit mode's procedure). Awareness of enemy is strong.
:*After this initial Look mode ends, AI2 char starts its '''strong awareness''' pursuit mode, choice depends on alert level.
:*When timer for strong awareness fades, AI2 goes to weak awareness and starts using its '''weak awareness''' pursuit mode, choice depends on alert level again. Possible pursuit modes are listed below.
 
*pursuit caused by '''PERIPHERAL VISION contact''' + a few other things about pursuit mode:
*OK, how to start? Maybe like this: we (me?) really, REALLY need source. Because chance is 95% that peripheral vision is broken. 5% that AI2 engineer really meant it that way. I will refer in this text to lots of things as "bugs". If AI2 engineer really meant it that way, then I apologize, but no, that was not good way.
:*When AI2 has no contacts with enemy, it either does its job or stands idle. If AI2 sees enemy with central vision field ([[ONCC]]), it goes into "combat mode" (or how to call it) with this one enemy.
::NOTE
::*Looks like ONI works that way that each AI2 can be in "combat mode" only with ONE enemy, while other contacts are held as "threats"(see [[ONCC]] for info about "...threat"). So more AI2s can be in "combat mode" with one enemy, but one AI2 cannot be in "combat mode" with more enemies.
::*Also, in combat mode, threat is set as "definite" one for enemy which has our AI2 "combat mode" with. When you run out of central vision field, AI2 still knows for a small amount of time your exact location before definite enemythreat timer runs out.
::/NOTE
:*While in combat mode (melee or guns, it is similar) this AI2 is given exact location of enemy as flag where this AI2 should go. So it can run through ''whole level'' if no doors are locked, no gaps in way are and enemy is near the end of level. But you hardly see this. Why? Continue reading.
:*If enemy with which our AI2 has "combat mode" is in AI2's central vision field, everything is OK. AI2 is attacking enemy, combat mode. What is enemy tries to escape from central vision field??
:*Then usually AI2 will chase him for a while, then it will start its "pursuit" job specified in CHAR. But BUGS are ocasionally happening:
::*AI2 chases enemy until it can see him with central vision field again. Can travel uexpectedly long distance.
::*When AI2 Striker performs his front throw or when AI2 Tanker does his running attack (UNCLEAR TACKLE !), they remain in prone position, rotating head and saying their pursuit line. But they saw you second ago!
:*those examples lead us to conclusion that something is "quite not right". Yep. Now for peripheral vision pursuit:
:*AI2 which is alarmed by peripheral vision contact automatically goes (I don't know correct alert levels, sorry):
::*broken Look mode; AI2 performs GoTo + Look combo (like in sound contact) but Look has broken timer. It has timer 600, good. But timer is NOT decreasing ^_^. Plus (maybe because that timer is not decreasing) AI2 does not perform rotation. It just stares forward and is stuck until other disturbance "wakes" it from this bug.
::*Glance mode, which has the end. Good. But...wherever you stood, AI2 will always move to the point of contact (GoTo) and then perform Glance up to the sky ^_^. So it is basically trying to find you somewhere up, while you can be everywhere. I guess this happened to everyone at least once.
:*So we can see that peripheral pursuit stands on its own and is NOT affected by values in CHAR. It goes even further-it has broken link or what in "from combat mode to pursuit mode X" at all because if AI2 enemy sees you but cannot hear you (ai2_deaf=1) he will remain in "combat mode" with you, which means he will find you everywhere! Well this is not 100% correct, but works like this quite often. I think reason is that AI2 has NO PURSUIT MODE to get in because remember - peripheral vision does not use values from CHAR. And if it get into some pursuit after peripheral contact, it is either broken Look or bugged Glance X_X.
:*So bugs like suddenly ignoring enemies etc are caused by this IMO. AI2 '''saw''' you as last contact, didn't heard any sound from you (case of Striker's throw). So it got bugged.
:*Sound detection looks like it is working normally, transitions pursuit->combat and combat->pursuit seem to be OK. In fact 75% of AI2 interaction when it comes to pursuing is handled by sound system. Even bullets, explosions etc if they hit are taken as "sound:gunshot-heard" type of alerting action.
:*What more to add? We NEED source...ô_ô or Neo ^_^
 
--[[User:Loser|Loser]] 15:17, 10 August 2008 (CEST)
 
 
 
;Useable values for pursuit modes:
*0 - No mode; looks like engine uses Look mode as "safe ring" from crash; maybe 0 is GoTo + Look ("starter" of AI2 pursuit mode, see above)???
*1 - '''Forget'''; works like "ai2_forget" command
*2 - '''GoTo'''; used by engine when char has to move to another place while in pursuit mode, if you set it in CHAR, it does nothing.
*3 - '''Wait'''; AI2 char keeps looking at the point where it looked before this mode started, waiting ^_^
*4 - '''Look'''; AI2 char keeps rotating whole body, looking around
*5 - '''Move'''; no effect when this value is set in CHAR, I don't have idea for what this is good if we have GoTo already. Maybe move randomly ???
*6 - '''Hunt'''; not implemented in Oni (as a few of us noticed, eh, EdT? ^_^). Looks like it is here (it has name, it does not make Oni crash etc), but main procedure is probably unfinished or what (or wrong linked)
*7 - '''Glance'''; AI2 char stands and rotates only as if player pressed "look" key ("v" by default) and tried to move the mouse. So no full-body turning, only "twisting" from extreme angle to extreme angle.
:speculations:
*9 - Find alarm?; this is interesting, becuase when you make AI2 char alarmed via "ai2_tripalarm" (or by alarm console), report will say that reason of high alert of AI2 is ''unknown: 9''. Maybe this mode means "find player, who is alarming whole place by doing his business here?"
 
Exe rip which contains (probably) all modes is in [[CMBT]], se near the end of the page.
 
--[[User:Loser|Loser]] 14:45, 31 July 2008 (CEST)


==Dialog from level0_Tools==
==Dialog from level0_Tools==
<!--http://geyser.oni2.net/OBD/dialogs/dialog_character2_properties.png-->
[[Image:Tool dialog - Character Properties 2.png]]
http://ssg.oni2.net/subfold/bluebox/images/215_character_properties2.png




Line 186: Line 135:




<!--http://geyser.oni2.net/OBD/dialogs/dialog_character_properties.png-->
[[Image:Tool dialog - Character Properties 1.png]]
http://ssg.oni2.net/subfold/bluebox/images/211_character_properties.png
 


{{OBD OBJC Footer | type=CHAR | prev=WEAP | next=CMBT | name=Character | family=Level}}


{{OBD OBJC Footer | type=CHAR | prev=WEAP | next=CMBT | name=Character}}
{{OBD}}

Latest revision as of 17:01, 5 November 2024

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

File description

Basic setup

The character's appearance, weapon, position, and misc. spawn flags.

Bin r ch.gif


Offset Type Raw Hex Value Description
0x00 char[4] 43 4A 42 4F OBJC wrapper tag
0x04 int32 2C 8B 00 00 35628 size of the complete list in bytes from this position
0x08 int32 27 00 00 00 39 object list version
0x0C int32 20 02 00 00 544 size of the following element in bytes
First element (black outline)
0x000 char[4] 52 41 48 43 CHAR tag name
0x004 int32 87 19 00 00 6535 old file ID
0x008 int32 00 00 00 00 0 unknown
0x00C float A5 7D 9D 43 314.981597 x position of the character
0x010 float 00 00 D8 C1 -27.000000 y position (height) of the character
0x014 float 98 09 1E 42 39.509368 z position of the character
0x018 float 00 00 00 00 0.000000 rotation on the x axis in degrees
0x01C float 00 00 87 43 270.000000 rotation on the y axis in degrees
0x020 float 00 00 00 00 0.000000 rotation on the z axis in degrees
0x024 bitset32 01 00 00 00 1, 0, 0, 0 character options; the following bits are used:
0x 01 00 00 00 - player character
0x 02 00 00 00 - random skin
0x 04 00 00 00 - not pre-spawned
0x 08 00 00 00 - non-combatant
0x 10 00 00 00 - multi-spawnable
0x 20 00 00 00 - unknown
0x 40 00 00 00 - unkillable
0x 80 00 00 00 - superammo
0x 00 01 00 00 - omniscient
0x 00 02 00 00 - has LSI
0x 00 04 00 00 - boss
0x 00 08 00 00 - upgrade difficulty (spawns a stronger enemy if you play on medium or hard)
0x 00 10 00 00 - no auto-drop (doesn't drop "used" shield, "used" invisibility and LSI when killed)
0x028 char[64] konoko_generic character class name (reference to ONCCkonoko_generic)
0x068 char[32] konoko character name
0x088 char[64] w1_tap weapon class name (reference to ONWCw1_tap of level 0)

Script functions

These are the names of the functions in the level script to call when certain things happen to a character.

Offset Type Raw Hex Value Description
0x0C8 char[32] unused called when character is spawned
0x0E8 char[32] you_lose called when character dies (health reaches 0); can work multiple times
0x108 char[32] unused called when character notices an enemy; works only once
0x128 char[32] unused never used in the game data, but it should be called when character is alarmed
0x148 char[32] unused called when character is hurt for the first time; works only once
0x168 char[32] unused called when character is "defeated" (health reaches 1); works only once
0x188 char[32] unused called when character runs out of ammo by reloading a weapon with the last available clip); works only once, and the character must have the ammo at spawn time
0x1A8 char[32] unused "nopath" function (meant to be called when a character has trouble pathfinding, but isn't)

Less basic setup

Inventory, team, jobs, alert/pursuit behavior.

Offset Type Raw Hex Value Description
0x1C8 int32 00 00 00 00 0 +/- delta to the class's base health (stored in the ONCC file of the character)
0x1CC int32 00 00 00 00 0 job ID; the following jobs are possible:
0 - none
1 - idle
2 - guard (never used in Oni)
3 - patrol
4 - teambattle (never used in Oni)
0x1D0 int16 00 00 0 patrol path ID (reference to the BINACJBOPatrol_Path file)
0x1D2 int16 00 00 0 combat ID (reference to the BINACJBOCombat file)
0x1D4 int16 00 00 0 melee ID (reference to the BINACJBOMelee Profile file)
0x1D6 int16 00 00 0 neutral ID (reference to the BINACJBONeutral file)
0x1D8 int16 01 00 1 amount of ballistic ammo that can be used
0x1DA int16 00 00 0 amount of ballistic ammo that can be dropped
0x1DC int16 00 00 0 amount of energy cells that can be used
0x1DE int16 00 00 0 amount of energy cells that can be dropped
0x1E0 int16 00 00 0 amount of hypos that can be used
0x1E2 int16 00 00 0 amount of hypos that can be dropped
0x1E4 int16 00 00 0 amount of force shields that can be used
0x1E6 int16 00 00 0 amount of force shields that can be dropped
0x1E8 int16 00 00 0 amount of phase cloak remaining; this number is in ticks (1/60 second) except if it's 1, in which case it's interpreted to mean "a full phase cloak"
0x1EA int16 00 00 0 will drop phase cloak (true if any value above zero)
0x1EC int16 00 00 0 unused
0x1EE int16 00 00 0 unused
0x1F0 int32 00 00 00 00 0 team ID; the following teams are possible:
0 - Konoko
1 - TCTF
2 - Syndicate
3 - Neutral
4 - SecurityGuard
5 - RogueKonoko
6 - Switzerland
7 - SyndicateAccessory
0x1F4 int32 64 00 00 00 100 fullness of current ammo clip as a percentage
0x1F8 int32 00 00 00 00 0 initial alert level; the following alert levels are possible:
0 - lull
1 - low
2 - medium
3 - high
4 - combat
0x1FC int32 00 00 00 00 0 minimum alert level
0x200 int32 01 00 00 00 1 alert level when starting a job
0x204 int32 02 00 00 00 2 alert level when investigating
0x208 bitset32 00 00 00 00 0, 0, 0, 0 alarm groups, see below this table
0x20C int32 04 00 00 00 4 pursuit mode for strong awareness when alert level lull/low
0x210 int32 01 00 00 00 1 pursuit mode for weak awareness when alert level lull/low
0x214 int32 04 00 00 00 4 pursuit mode for strong awareness when alert level medium/high/combat
0x218 int32 04 00 00 00 4 pursuit mode for weak awareness when alert level medium/high/combat
0x21C int32 00 00 00 00 0 pursuit mode for lost contact (enemy was identified but then the enemy ran away)
0x220 float 20 02 00 00 ? "facing; internal use only"; used?


Alarm groups

Stored as a bitset. If bit 2^N is ON, the character will be alarmed by script command ai2_tripalarm(N) or alarm console command 0060 NN00 where NN is the hex for N.

(Since the size of the alarm group field is 4 bytes, there's a maximum of 32 alarm groups, i.e. N ranges from 0 to 31.)
Pursuit modes

See AI § Reactions and awareness and AI § Pursuit to learn about meaning of CHAR pursuit values.

Dialog from level0_Tools

Tool dialog - Character Properties 2.png


Also available is the following dialog, which is redundant of CMBT and apparently predates both CHAR and AISA:


Tool dialog - Character Properties 1.png


ONI BINARY DATA
AKVA << Other file types >> CBPI
BINA : Binary data
TMBD << Other BINA >> ONIE
OBJC : Objects
WEAP << Other OBJC >> CMBT
CHAR : Character
Level file