Jump to content

OBD:ONCC: Difference between revisions

569 bytes added ,  22 October 2021
update part 2
(revising info to match corrected info on XML:ONCC (update part 1))
(update part 2)
Line 1: Line 1:
{{OBD_File_Header | type=ONCC | prev=OFGA | next=ONCP | name=Oni Character Class | family=Character | align=center}}
{{OBD_File_Header | type=ONCC | prev=OFGA | next=ONCP | name=Oni Character Class | family=Character | align=center}}


[[image:oncc_a.gif]]
[[image:oncc_a.gif]]


{{Table}}
{{Table}}
Line 26: Line 24:
:velocities are in world units per tick (1/60s)
:velocities are in world units per tick (1/60s)
:accelerations are in world units per tick squared
:accelerations are in world units per tick squared


;Fall speed and timer
;Fall speed and timer
:These two fields are only looked at when predicting whether an attack will hit a target while the attacker is in midair. They are probably a development relic that is looked at in error, as the actual falling speed is determined by 0x00C and the actual fall timer is 0x01E.
:These two fields are only looked at when predicting whether an attack will hit a target while the attacker is in midair. They are probably a development relic that is looked at in error, as the actual falling speed is determined by 0x00C and the actual fall timer is 0x01E.


;Jetpack timer
;Jetpack timer
:You can press JUMP multiple times during the time window when it's large enough. See [http://mods.oni2.net/node/83 this mod] for an application of this principle.
:You can press JUMP multiple times during the time window when it's large enough. See [http://mods.oni2.net/node/83 this mod] for an application of this principle.


;Falling height: let FH1 be the height at 0x20
;Falling height: let FH1 be the height at 0x20
Line 41: Line 42:
:if FH1 < FH < FH2, the character takes damage (FH - FH1) / (FH2 - FH1) * BH
:if FH1 < FH < FH2, the character takes damage (FH - FH1) / (FH2 - FH1) * BH


;Shadow Constants


{{Table}}
{{Table}}
Line 80: Line 83:


{{Table}}
{{Table}}
{{OBDth}}
{{OBDtr| 0x05C | float    |FFFFC8| 00 00 A0 40 | 5.000000    | unused (always 5) }}
{{OBDtr| 0x05C | float    |FFFFC8| 00 00 A0 40 | 5.000000    | unused (always 5) }}
{{OBDtr| 0x060 | float    |FFFFC8| 00 00 80 3F | 1.000000    | unused (always 1) }}
{{OBDtr| 0x060 | float    |FFFFC8| 00 00 80 3F | 1.000000    | unused (always 1) }}
Line 88: Line 92:


{{Table}}
{{Table}}
{{OBDth}}
{{OBDtr| 0x064 | int16    |C8FFC8| 06 00      | 6          | hypo regeneration rate in ticks per hit point restored }}
{{OBDtr| 0x064 | int16    |C8FFC8| 06 00      | 6          | hypo regeneration rate in ticks per hit point restored }}
{{OBDtr| 0x066 | char[2]  |C8FFC8| AD DE      | dead        | ignored }}
{{OBDtr| 0x066 | char[2]  |C8FFC8| AD DE      | dead        | ignored }}
Line 106: Line 111:


;Hurt Sound Constants
;Hurt Sound Constants
See [[XML:ONCC#.3CHurtSoundConstants.3E|HERE]] for the full calculation of whether to play a hurt sound and which sound to play.


{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x07C | int16    |FFC8FF| 23 00      | 35          | hurt_base_percentage; always the same }}
{{OBDtr| 0x07C | int16    |FFC8FF| 23 00      | 35          | minimum chance of playing a pain sound (always 35) }}
{{OBDtr| 0x07E | int16    |FFC8FF| 5A 00      | 90          | hurt_max_percentage; always the same }}
{{OBDtr| 0x07E | int16    |FFC8FF| 5A 00      | 90          | maximum chance of playing a pain sound (always 90) }}
{{OBDtr| 0x080 | int16    |FFC8FF| 0F 00      | 15          | hurt_percentage_threshold; always the same }}
{{OBDtr| 0x080 | int16    |FFC8FF| 0F 00      | 15          | at least this much damage must be done to play a pain sound (always 15) }}
{{OBDtr| 0x082 | int16    |FFC8FF| 78 00      | 120        | hurt_timer; always the same }}
{{OBDtr| 0x082 | int16    |FFC8FF| 78 00      | 120        | time in ticks before the damage tracker used for this AI's pain sounds resets (always 120) }}
{{OBDtr| 0x084 | int16    |FFC8FF| 23 00      | 35          | hurt_min_timer; always the same }}
{{OBDtr| 0x084 | int16    |FFC8FF| 23 00      | 35          | time in ticks that must pass between pain sounds being played (always 35) }}
{{OBDtr| 0x086 | int16    |FFC8FF| 01 00      | 1          | hurt_max_light; always the same }}
{{OBDtr| 0x086 | int16    |FFC8FF| 01 00      | 1          | number of times that AI will play light pain sound before "upgrading" to a medium pain sound (always 1) }}
{{OBDtr| 0x088 | int16    |FFC8FF| 02 00      | 2          | hurt_max_medium; always the same }}
{{OBDtr| 0x088 | int16    |FFC8FF| 02 00      | 2          | number of times that AI will play medium pain sound before "upgrading" to a heavy pain sound (always 2) }}
{{OBDtr| 0x08A | int16    |FFC8FF| 64 00      | 100        | hurt_death_chance; always the same }}
{{OBDtr| 0x08A | int16    |FFC8FF| 64 00      | 100        | chance of playing a death sound (always 100) }}
{{OBDtr| 0x08C | int16    |FFC8FF| 0A 00      | 10          | hurt_volume_threshold; always the same }}
{{OBDtr| 0x08C | int16    |FFC8FF| 0A 00      | 10          | minimum damage required for an AI to play the pain sound at maximum volume (always 10) }}
{{OBDtr| 0x08E | int16    |FFC8FF| 0C 00      | 12          | hurt_medium_threshold; always the same }}
{{OBDtr| 0x08E | int16    |FFC8FF| 0C 00      | 12          | cumulative damage before a light pain sound gets upgraded to a medium pain sound (always 12) }}
{{OBDtr| 0x090 | int16    |FFC8FF| 16 00      | 22          | hurt_heavy_threshold; always the same }}
{{OBDtr| 0x090 | int16    |FFC8FF| 16 00      | 22          | cumulative damage before a medium pain sound gets upgraded to a heavy pain sound (always 22) }}
{{OBDtr| 0x092 | int8    |FFC800| 00          | 0          | runtime only: if 1 sound pointers have been set }}
{{OBDtr| 0x092 | int8    |FFC800| 00          | 0          | runtime only: if sound pointers have been set }}
{{OBDtr| 0x093 | char[1]  |C800C8| DE          | dead        | ignored }}
{{OBDtr| 0x093 | char[1]  |C800C8| DE          | dead        | ignored }}
{{OBDtr| 0x094 | float    |C87C64| 00 00 00 3F | 0.500000    | sound volume }}
{{OBDtr| 0x094 | float    |C87C64| 00 00 00 3F | 0.500000    | minimum volume of pain sound (before 0x08C is reached and volume becomes 100%) }}
{{OBDtr2|0x098 | char[32] |B0C3D4| konoko_hurt_light        | hurt light sound (reference to 08121-konoko_hurt_light.[[OBD:OSBD|imp.OSBD]] of level 0) }}
{{OBDtr2|0x098 | char[32] |B0C3D4| konoko_hurt_light        | light hurt sound (reference to 08121-konoko_hurt_light.[[OBD:OSBD|imp.OSBD]] of level 0) }}
{{OBDtr2|0x0B8 | char[32] |B0C3D4| konoko_hurt_medium        | hurt medium sound (reference to 08123-konoko_hurt_medium.[[OBD:OSBD|imp.OSBD]] of level 0) }}
{{OBDtr2|0x0B8 | char[32] |B0C3D4| konoko_hurt_medium        | medium hurt sound (reference to 08123-konoko_hurt_medium.[[OBD:OSBD|imp.OSBD]] of level 0) }}
{{OBDtr2|0x0D8 | char[32] |B0C3D4| konoko_hurt_heavy        | hurt heavy sound (reference to 08119-konoko_hurt_heavy.[[OBD:OSBD|imp.OSBD]] of level 0) }}
{{OBDtr2|0x0D8 | char[32] |B0C3D4| konoko_hurt_heavy        | heavy hurt sound (reference to 08119-konoko_hurt_heavy.[[OBD:OSBD|imp.OSBD]] of level 0) }}
{{OBDtr2|0x0F8 | char[32] |B0C3D4| konoko_death              | death sound (reference to 08115-konoko_death.[[OBD:OSBD|imp.OSBD]] of level 0) }}
{{OBDtr2|0x0F8 | char[32] |B0C3D4| konoko_death              | death sound (reference to 08115-konoko_death.[[OBD:OSBD|imp.OSBD]] of level 0) }}
{{OBDtr| 0x118 | int32    |E7CEA5| 00 00 00 00 | 0          | runtime only: pointer to hurt light sound }}
{{OBDtr| 0x118 | int32    |E7CEA5| 00 00 00 00 | 0          | runtime only: pointer to light hurt sound }}
{{OBDtr| 0x11C | int32    |E7CEA5| 00 00 00 00 | 0          | runtime only: pointer to hurt medium sound }}
{{OBDtr| 0x11C | int32    |E7CEA5| 00 00 00 00 | 0          | runtime only: pointer to medium hurt sound }}
{{OBDtr| 0x120 | int32    |E7CEA5| 00 00 00 00 | 0          | runtime only: pointer to hurt heavy sound }}
{{OBDtr| 0x120 | int32    |E7CEA5| 00 00 00 00 | 0          | runtime only: pointer to heavy hurt sound }}
{{OBDtr| 0x124 | int32    |E7CEA5| 00 00 00 00 | 0          | runtime only: pointer to death sound }}
{{OBDtr| 0x124 | int32    |E7CEA5| 00 00 00 00 | 0          | runtime only: pointer to death sound }}
|}
|}
Line 138: Line 145:
{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x128 | bitsets  |E7CEA5| 17 00 00 00 | 23          | AI options bitset; see below }}
{{OBDtr| 0x128 | bitset  |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          | minimum number of frames AI remains in fallen position when it is knocked down }}
{{OBDtr| 0x132 | int16    |64AAAA| 18 00      | 24          | maximal fallen time; number of frames for which AI remains in *fallen* position when it is knockdowned }}
{{OBDtr| 0x132 | int16    |64AAAA| 18 00      | 24          | maximum number of frames AI remains in fallen position when it is knocked down }}
{{OBDtr| 0x134 | uint32   |EBEBEB| 0F 00 00 00 | 15          | number of frames after which AI realizes that it is in the firing spread and it starts dodging }}
{{OBDtr| 0x134 | uint32   |EBEBEB| 0F 00 00 00 | 15          | number of frames after which AI realizes that it is in the firing spread and it starts dodging }}
{{OBDtr| 0x138 | float    |8C8CCC| 00 00 80 3F | 1.000000    | minimal firingspread dodge amount; IMO similar to maneouvre variable, it tells AI how long it should perform dodging/hiding in response to some time spent inside firing spread (so setting this very high means that once enemy starts dodging/hiding, he will perform it even after firing spread disappears) }}
{{OBDtr| 0x138 | float    |8C8CCC| 00 00 80 3F | 1.000000    | minimum dodge time; how long AI should perform dodging/hiding in response to being inside a firing spread (the higher it is, the longer he will hide/dodge even after firing spread disappears) }}
{{OBDtr| 0x13C | float    |8C8CCC| 00 00 80 3F | 1.000000    | maximal firingspread dodge amount; IMO similar to maneouvre variable }}
{{OBDtr| 0x13C | float    |8C8CCC| 00 00 80 3F | 1.000000    | dodge priority dampening; the higher it is, the lower priority the AI gives to dodging }}
|}
|}


;AI options bitset
;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
*no flags - startle anim is enabled, rest is disabled
*0x01 - startle anim disabled
*0x01 - startle anim disabled
*0x02 - firingspread/projectile dodge enabled for melee
*0x02 - firing spread/projectile dodge enabled for melee
*0x04 - requires 0x02; firingspread/projectile dodge enabled for weapons; AI tries to face shooter and shoot back while dodging
*0x04 - requires 0x02; firing spread/projectile dodge enabled for weapons; AI tries to face shooter and shoot back while dodging
*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; firing spread/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