OBD:ONCC: Difference between revisions

elaborations and corrections
m (ref. ONI_Character.h, lines 448-506...)
(elaborations and corrections)
Line 12: Line 12:
{{OBDtr| 0x014 | float    |00FF00| 00 00 80 C0 | -4.000000  | maximum velocity for jumping and falling }}
{{OBDtr| 0x014 | float    |00FF00| 00 00 80 C0 | -4.000000  | maximum velocity for jumping and falling }}
{{OBDtr| 0x018 | float    |00FF00| 8F C2 F5 3C | 0.030000    | upward acceleration as long as you hold JUMP }}
{{OBDtr| 0x018 | float    |00FF00| 8F C2 F5 3C | 0.030000    | upward acceleration as long as you hold JUMP }}
{{OBDtr| 0x01C | uint16   |00FFFF| 07 00      | 7          | fall timer (always 7) (mostly unused, see below) }}
{{OBDtr| 0x01C | uint16   |00FFFF| 07 00      | 7          | fall timer (always 7) (mostly unused, see below) }}
{{OBDtr| 0x01E | uint16   |00FFFF| 14 00      | 20          | how long you can continue holding down JUMP to increase the height of your jump }}
{{OBDtr| 0x01E | uint16   |00FFFF| 14 00      | 20          | how long you can continue holding down JUMP to increase the height of your jump }}
{{OBDtr| 0x020 | float    |FF00FF| 00 00 34 42 | 45.000000  | maximum falling height without damage }}
{{OBDtr| 0x020 | float    |FF00FF| 00 00 34 42 | 45.000000  | maximum falling height without damage }}
{{OBDtr| 0x024 | float    |FF00FF| 00 00 07 43 | 135.000000  | maximum falling height with damage }}
{{OBDtr| 0x024 | float    |FF00FF| 00 00 07 43 | 135.000000  | maximum falling height with damage }}
Line 27: Line 27:


;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.
:The fields 0x008 and 0x01C 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 the gravity setting at 0x00C and the actual "fall timer" is the jump timer at 0x01E.




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


Line 53: Line 53:
{{OBDtr| 0x038 | float    |FF8000| 00 00 90 40 | 4.500000    | diameter that the shadow shrinks to when 0x030 is reached }}
{{OBDtr| 0x038 | float    |FF8000| 00 00 90 40 | 4.500000    | diameter that the shadow shrinks to when 0x030 is reached }}
{{OBDtr| 0x03C | float    |FF8000| 00 00 40 40 | 3.000000    | minimum diameter of the shadow }}
{{OBDtr| 0x03C | float    |FF8000| 00 00 40 40 | 3.000000    | minimum diameter of the shadow }}
{{OBDtr| 0x040 | uint16   |FF8000| 30 00      | 48          | starting transparency of the shadow as the character rises towards 0x030 }}
{{OBDtr| 0x040 | uint16   |FF8000| 30 00      | 48          | starting transparency of the shadow as the character rises towards 0x030 }}
{{OBDtr| 0x042 | uint16   |FF8000| 30 00      | 48          | starting transparency of the shadow when the character begins to get above 0x030 }}
{{OBDtr| 0x042 | uint16   |FF8000| 30 00      | 48          | starting transparency of the shadow when the character begins to get above 0x030 }}
|}
|}




;Jump Constants
;Jump Constants
 
These fields were deprecated at some point in Oni's development and do nothing.
{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x044 | float    |FF0080| 00 00 C8 41 | 25.000000  | jump distance; unused (always 25) }}
{{OBDtr| 0x044 | float    |FF0080| 00 00 C8 41 | 25.000000  | "jump distance"; unused (always 25) }}
{{OBDtr| 0x048 | uint8     |FFC8C8| 16          | 22         | jump height; unused (always 22) }}
{{OBDtr| 0x048 | uint8   |FFC8C8| 16          | 22         | "jump height"; unused (always 22) }}
{{OBDtr| 0x049 | uint8     |FFC8C8| 06          | 6         | jump distance squares(?); unused (always 6) }}
{{OBDtr| 0x049 | uint8   |FFC8C8| 06          | 6           | "jump distance squares"; unused (always 6) }}
{{OBDtr| 0x04A | char[2]  |FFC8C8| AD DE      | dead        | padding }}
{{OBDtr| 0x04A | char[2]  |FFC8C8| AD DE      | dead        | padding }}
|}
|}
Line 70: Line 70:


;Cover Constants
;Cover Constants
 
These fields were deprecated at some point in Oni's development and do nothing.
{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x04C | float    |FFFFC8| 00 00 20 42 | 40.000000  | ray increment(?); unused (always 40) }}
{{OBDtr| 0x04C | float    |FFFFC8| 00 00 20 42 | 40.000000  | "ray increment"; unused (always 40) }}
{{OBDtr| 0x050 | float    |FFFFC8| 00 00 96 43 | 300.000000  | ray max(?); unused (always 300) }}
{{OBDtr| 0x050 | float    |FFFFC8| 00 00 96 43 | 300.000000  | "ray max"; unused (always 300) }}
{{OBDtr| 0x054 | float    |FFFFC8| 35 FA 8E 3C | 0.017453    | ray angle(?); unused (always π/180) }}
{{OBDtr| 0x054 | float    |FFFFC8| 35 FA 8E 3C | 0.017453    | "ray angle"; unused (always π/180) }}
{{OBDtr| 0x058 | float    |FFFFC8| DB 0F C9 3F | 1.570796    | ray angle max(?);unused (always π/2) }}
{{OBDtr| 0x058 | float    |FFFFC8| DB 0F C9 3F | 1.570796    | "ray angle max"; unused (always π/2) }}
|}
|}




;Autofreeze Constants
;Autofreeze Constants
 
These fields were deprecated at some point in Oni's development and do nothing.
{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x05C | float    |FFFFC8| 00 00 A0 40 | 5.000000    | distance X+Z(?); unused (always 5) }}
{{OBDtr| 0x05C | float    |FFFFC8| 00 00 A0 40 | 5.000000    | "distance XZ"; unused (always 5) }}
{{OBDtr| 0x060 | float    |FFFFC8| 00 00 80 3F | 1.000000    | distance Y(?); unused (always 1) }}
{{OBDtr| 0x060 | float    |FFFFC8| 00 00 80 3F | 1.000000    | "distance Y"; unused (always 1) }}
|}
|}


Line 93: Line 93:
{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x064 | uint16    |C8FFC8| 06 00       | 6          | hypo regeneration rate in ticks per hit point restored }}
{{OBDtr| 0x064 | uint16    |C8FFC8| 06 00     | 6          | hypo regeneration rate in ticks per hit point restored }}
{{OBDtr| 0x066 | char[2]  |C8FFC8| AD DE      | dead        | padding }}
{{OBDtr| 0x066 | char[2]  |C8FFC8| AD DE      | dead        | padding }}
|}
|}
Line 99: Line 99:


;LOD Constants
;LOD Constants
Squares of the distance from the camera at which each LOD kicks in ([[LOD|this article]] has the full calculation for arriving at the LOD to use)
Squares of the distance from the camera at which each LOD kicks in; see {{SectionLink|XML:ONCC|<LODConstants>}} for an explanation of this table, and {{SectionLink|Graphics|LOD}} for the full calculation on which LOD to use.
{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x068 | float    |C8FFFF| 00 10 3D 48 |193600.000000| distance squared(?); always 440 squared }}
{{OBDtr| 0x068 | float    |C8FFFF| 00 10 3D 48 |193600.000000| min. distance for super-low LOD; always 440² }}
{{OBDtr| 0x06C | float    |C8FFFF| 00 10 3D 47 | 48400.000000| distance squared(?); always 220 squared }}
{{OBDtr| 0x06C | float    |C8FFFF| 00 10 3D 47 | 48400.000000| min. distance for low LOD; always 220² }}
{{OBDtr| 0x070 | float    |C8FFFF| 00 10 3D 46 | 12100.000000| distance squared(?); always 110 squared }}
{{OBDtr| 0x070 | float    |C8FFFF| 00 10 3D 46 | 12100.000000| min. distance for medium LOD; always 110² }}
{{OBDtr| 0x074 | float    |C8FFFF| 00 00 00 00 | 0.000000   | distance squared(?); always 0 }}
{{OBDtr| 0x074 | float    |C8FFFF| 00 00 00 00 |     0.000000| min. distance for high LOD; always 0 }}
{{OBDtr| 0x078 | float    |C8FFFF| 00 00 00 00 | 0.000000   | distance squared(?); always 0 }}
{{OBDtr| 0x078 | float    |C8FFFF| 00 00 00 00 |     0.000000| min. distance for super-high LOD; always 0 }}
|}
|}




;Hurt Sound Constants
;Hurt Sound Constants
 
The numbers below cannot be understood without some elaboration. See [[XML:ONCC#.3CHurtSoundConstants.3E|HERE]] for the full calculation of whether to play a hurt sound and which sound to play.
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 | uint16    |FFC8FF| 23 00      | 35          | minimum chance <code>in %</code> of playing a pain sound (always 35) }}
{{OBDtr| 0x07C | uint16    |FFC8FF| 23 00      | 35          | minimum % chance of playing a pain sound if char. has not been hurt before (always 35) }}
{{OBDtr| 0x07E | uint16    |FFC8FF| 5A 00      | 90          | maximum chance <code>in %</code> of playing a pain sound in % (always 90) }}
{{OBDtr| 0x07E | uint16    |FFC8FF| 5A 00      | 90          | maximum % chance of playing a pain sound if char. has not been hurt before (always 90) }}
{{OBDtr| 0x080 | uint16    |FFC8FF| 0F 00      | 15          | at least this much damage <code>in %</code> must be done to play a pain sound (always 15) }}
{{OBDtr| 0x080 | uint16    |FFC8FF| 0F 00      | 15          | damage threshold; used to calculate a percentage chance of pain sound between min % and max % (always 15) }}
{{OBDtr| 0x082 | uint16    |FFC8FF| 78 00      | 120        | time in ticks before the damage tracker used for this AI's pain sounds resets (always 120) }}
{{OBDtr| 0x082 | uint16    |FFC8FF| 78 00      | 120        | time in ticks before the damage tracker used for this AI's pain sounds resets (always 120) }}
{{OBDtr| 0x084 | uint16    |FFC8FF| 23 00      | 35          | time in ticks that must pass between pain sounds being played (always 35) }}
{{OBDtr| 0x084 | uint16    |FFC8FF| 23 00      | 35          | time in ticks that must pass between pain sounds being played (always 35) }}
Line 139: Line 137:
{{OBDtr| 0x124 | offset    |E7CEA5| 00 00 00 00 | 0          | runtime only: raw offset of death sound }}
{{OBDtr| 0x124 | offset    |E7CEA5| 00 00 00 00 | 0          | runtime only: raw offset of death sound }}
|}
|}




Line 146: Line 145:
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x128 | bitset  |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; always 1.0 }}
{{OBDtr| 0x12C | float    |FFDDDD| 00 00 80 3F | 1.000000    | AI rotation speed factor; always 1.0 except for ninjabots, ninjas and super_ninja, which use 2.0 }}
{{OBDtr| 0x130 | uint16   |64AAAA| 06 00      | 6          | minimum number of frames AI remains in fallen position when it is knocked down; overriden by char's MELE profile if possible }}
{{OBDtr| 0x130 | uint16   |64AAAA| 06 00      | 6          | minimum number of frames AI remains in fallen position when it is knocked down; overridden by char's MELE profile if possible }}
{{OBDtr| 0x132 | uint16   |64AAAA| 18 00      | 24          | maximum number of frames AI remains in fallen position when it is knocked down; overriden by char's MELE profile if possible }}
{{OBDtr| 0x132 | uint16   |64AAAA| 18 00      | 24          | maximum number of frames AI remains in fallen position when it is knocked down; overridden by char's MELE profile if possible }}
{{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    | 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| 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) }}
Line 298: Line 297:
{{Table}}
{{Table}}
{{OBDth}}
{{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) }}
{{OBDtr| 0x43C | link    |C5FF8A| 01 FA 03 00 | 1018       | link to [[OBD:ONIA|01018-.ONIA]]; lists the special impact sounds (used for special combat moves) }}
{{OBDtr| 0x43C | link    |C5FF8A| 01 FA 03 00 | 1018       | link to [[OBD:ONIA|01018-.ONIA]]; lists the special impact sounds (used for special combat moves) }}
{{OBDtr| 0x440 | bool    |C5FF8A| 00          | unused      | indices found(?); runtime only }}
{{OBDtr| 0x440 | bool    |C5FF8A| 00          | 0          | runtime: flag meaning that modifier type has been set by looking up modifier name and impact types have been set by looking up impact names; runtime only }}
{{OBDtr| 0x441 | uint8     |C5FF8A| 00         | unused      | padding }}
{{OBDtr| 0x441 | uint8   |C5FF8A| 00         | 0          | padding }}
{{OBDtr| 0x442 | uint16   |C5FF8A| 00 00       | unused      | modifier type; runtime only }}
{{OBDtr| 0x442 | uint16   |C5FF8A| 00 00     | 0          | runtime: modifier type }}
{{OBDtr2|0x444 | char[16] |C0C0C0| Light                     | modifier; either hardcoded or defunct (only visible in pm_mod_type.WMM_, level 0)
{{OBDtr2|0x444 | char[16] |C0C0C0| Light                   | modifier name, used to look up modifier type }}
edit: WMDD says: Effects found for Impact x on Material y with Modifier: pm_mod_types }}
{{OBDtrBK|1=Array of 15 impact elements: first element }}
{{OBDtrBK|1=Array of 15 impact elements: first element }}
{{OBDtr2|0x454 | char[128] |FF0080| Footstep_Walk             | walk impact (reference to 04124-Footstep_Walk.Impt of level 0); always the same; without the impacts you can't hear the steps of a character }}
{{OBDtr2|0x454 | char[128]|FF0080| Footstep_Walk           | impact name, used to look up impact type (reference to 04124-Footstep_Walk.Impt of level 0); always the same; without the impacts you can't hear the steps of a character }}
{{OBDtr| 0x4D4 | uint16     |FF0080| FF FF | -1 | set at runtime to the value stored at 0x08 in [[OBD:Impt|Impt]] }}
{{OBDtr| 0x4D4 | uint16   |FF0080| FF FF     | -1         | runtime: impact type (comes from 0x08 in [[OBD:Impt|Impt]]) }}
{{OBDtrBK|1=End of array }}
{{OBDtrBK|1=End of array }}
{{OBDtr| 0xBF2 | char[2]   |FFFFA5| 00 00 | unused | padding (seen below) }}
{{OBDtr| 0xBF2 | char[2] |FFFFA5| 00 00     | unused     | padding (seen below) }}
|}
|}
<br>
<br>


[[Image:oncc_e.gif]]
[[Image:oncc_e.gif]]
Line 320: Line 316:
{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr2|0xBF4 | char[64] |71FFB8| unused                   | special death particle; only the Mad Bomber uses it }}  
{{OBDtr2|0xBF4 | char[64] |71FFB8| unused                 | name of particle spawned on death; only the Mad Bomber uses it }}  
{{OBDtr| 0xC34 | offset     |0000BF| 00 00 00 00 | unused     | runtime: raw offset of death particle class }}
{{OBDtr| 0xC34 | offset   |0000BF| 00 00 00 00 | unused   | runtime: raw offset of death particle class }}
{{OBDtr| 0xC38 | offset     |0000BF| 00 00 00 00 | unused     | runtime: raw offset of cache of derived information on body model geometry }}
{{OBDtr| 0xC38 | offset   |0000BF| 00 00 00 00 | unused   | runtime: raw offset of cache of derived information on body model geometry }}
{{OBDtr| 0xC3C | link    |0000BF| 01 E6 03 00 | 998         | link to [[OBD:TRBS|00998-konoko_body_high.TRBS]] }}
{{OBDtr| 0xC3C | link    |0000BF| 01 E6 03 00 | 998       | link to [[OBD:TRBS|00998-konoko_body_high.TRBS]] }}
{{OBDtr| 0xC40 | link    |0000BF| 01 E7 03 00 | 999         | link to [[OBD:TRMA|00999-konoko002_high_texture_generic.TRMA]] }}
{{OBDtr| 0xC40 | link    |0000BF| 01 E7 03 00 | 999       | link to [[OBD:TRMA|00999-konoko002_high_texture_generic.TRMA]] }}
{{OBDtr| 0xC44 | link    |0000BF| 01 E8 03 00 | 1000       | link to [[OBD:CBPM|01000-.CBPM]] }}
{{OBDtr| 0xC44 | link    |0000BF| 01 E8 03 00 | 1000     | link to [[OBD:CBPM|01000-.CBPM]] }}
{{OBDtr| 0xC48 | link    |0000BF| 01 EC 03 00 | 1004       | link to [[OBD:CBPI|01004-.CBPI]] }}
{{OBDtr| 0xC48 | link    |0000BF| 01 EC 03 00 | 1004     | link to [[OBD:CBPI|01004-.CBPI]] }}
{{OBDtr| 0xC4C | uint32   |804040| 2C 01 00 00 | 300         | how long in ticks before character can leave fight mode }}  
{{OBDtr| 0xC4C | uint32   |804040| 2C 01 00 00 | 300       | how long in ticks before character can leave fight mode }}  
{{OBDtr| 0xC50 | uint32   |804040| 30 75 00 00 | 30000       | how long in ticks before the Idle animation can be played the first time }}  
{{OBDtr| 0xC50 | uint32   |804040| 30 75 00 00 | 30000     | how long in ticks before the Idle animation can be played the first time }}  
{{OBDtr| 0xC54 | uint32   |804040| 30 75 00 00 | 30000       | how long in ticks before the Idle animation can be played another time }}  
{{OBDtr| 0xC54 | uint32   |804040| 30 75 00 00 | 30000     | how long in ticks before the Idle animation can be played another time }}  
{{OBDtr| 0xC58 | uint32   |804040| C8 00 00 00 | 200         | base health of the character model; specific health information for every unique character is stored in the [[OBD:BINA/OBJC/CHAR|Character.BINA]] file}}  
{{OBDtr| 0xC58 | uint32   |804040| C8 00 00 00 | 200       | base health of the character model; specific health information for every unique character is stored in the [[OBD:BINA/OBJC/CHAR|Character.BINA]] file}}  
{{OBDtr| 0xC5C | uint32   |804040| 48 00 00 00 | 72         | the bits that marks the characters feet; unused }}  
{{OBDtr| 0xC5C | uint32   |804040| 48 00 00 00 | 72       | "feet bits"; unused }}  
{{OBDtr| 0xC60 | float    |FF22FF| 00 00 80 3F | 1.000000   | minimum body size factor }}  
{{OBDtr| 0xC60 | float    |FF22FF| 00 00 80 3F | 1.000000 | minimum body size factor }}  
{{OBDtr| 0xC64 | float    |FF22FF| 00 00 80 3F | 1.000000   | maximum body size factor }}  
{{OBDtr| 0xC64 | float    |FF22FF| 00 00 80 3F | 1.000000 | maximum body size factor }}  
{{Anchor|DamageTypes}}
{{Anchor|DamageTypes}}
{{OBDtrBK|The following 7 float values are ONCC-specific multipliers for each of the 7 PAR3 DamageTypes. See [[Particle damage types]] for an explanation of DamageTypes. Values range from 0.0-1.0, with 0 meaning "no immunity" and 1 meaning "total immunity".<br>
{{OBDtrBK|The following 7 float values are ONCC-specific multipliers for each of the 7 PAR3 DamageTypes. See [[Particle damage types]] for an explanation of DamageTypes. Values range from 0.0-1.0, with 0 meaning "no immunity" and 1 meaning "total immunity".<br>