XML:ONCC: Difference between revisions
mNo edit summary |
(→Variants, geometry, health, etc.: moved supershield info to new Shields page) |
||
(69 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{XML_File_Header | prev=OFGA | type=ONCC | next=ONCV | name=Oni Character Class}} | |||
==General information== | |||
* The XML on this page is compatible with OniSplit '''v0.9.61.0'''. | |||
* ONCP, ONIA, OBPI and OBPM are part of '''ONCC*.oni''' files. | |||
* ONCC files are global; they can be found in AE/AEInstaller/vanilla/level0_Final.dat. | |||
==<AirConstants>== | |||
;Units | |||
*Times are in frames | |||
*Heights are in world units | |||
*Velocities are in world units per frames | |||
*Accelerations are in world units per frames squared | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <FallGravity> | |||
| float | |||
| Always 0.55. Used as the speed of a fall when predicting if an attack will hit a target when the attacker is in midair. It seems to be a bug that this is looked at, as <JumpGravity> actually controls the character's gravity while going up <u>and</u> down. | |||
|- | |||
| <JumpGravity> | |||
| float | |||
| Always in range 0.05-0.07. The strength of gravity (as acceleration per frame) for the entire duration of a jump. | |||
|- | |||
| <JumpStartVelocity> | |||
| float | |||
| Starting velocity for a simple jump (tapping JUMP) | |||
|- | |||
| <MaxVelocity> | |||
| float | |||
| Maximum velocity for jumping and falling | |||
|- | |||
| <JetpackAcceleration> | |||
| float | |||
| Upward acceleration for the duration of time that you hold down JUMP | |||
|- | |||
| <FramesFallGravity> | |||
| int16 | |||
| Always 7. After this many frames, <FallGravity> is used for the deceleration of a jump when predicting if an attack will hit a target when the attacker is in midair; before that many frames, <JumpGravity> is used for the prediction. It seems to be a bug that this is field is looked at, as <JumpGravity> controls a character's gravity while going up <u>and</u> down. | |||
|- | |||
| <JetpackTimer> | |||
| int16 | |||
| Standard value is 14, but ranges from 4 (Elite Striker) to 20 (Konoko). This misleadingly-named field is the number of frames for which you can continue holding down JUMP to increase the height of your jump. [http://mods.oni2.net/node/83 This mod] vastly increases the value of this field for Barabas. When shapeshifted to him, you can keep ascending by holding JUMP; pressing JUMP multiple times during the time window is also allowed. | |||
|- | |||
| <MaxNoDamageFallingHeight> | |||
| float | |||
| Maximum falling height without taking damage (see below) | |||
|- | |||
| <MaxDamageFallingHeight> | |||
| float | |||
| Maximum falling height with damage | |||
:Let FH1 be <MaxNoDamageFallingHeight> | |||
:Let FH2 be <MaxDamageFallingHeight> | |||
:Let BH be the base health of the character | |||
:Let FH be the actual falling height | |||
:Then, if FH > FH2, the character is killed | |||
:If FH < FH1, the character takes no damage | |||
:If FH1 < FH < FH2, the character takes damage (FH - FH1) / (FH2 - FH1) * BH | |||
|} | |||
==<ShadowConstants>== | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <Texture> | |||
| link | |||
| TXMPfile<font color="#777777">.oni (file suffix not used)</font> | |||
|- | |||
| <MaxHeight> | |||
| float | |||
| Height where the diameter of the shadow shrinks to <SizeMin> | |||
|- | |||
| <FadeHeight> | |||
| float | |||
| Height range over which the diameter of the shadow decreases from <SizeMax> to <SizeFade> and the shadow starts to fades out from <AlphaMax> to <AlphaFade> | |||
|- | |||
| <SizeMax> | |||
| float | |||
| Maximum diameter of the shadow | |||
|- | |||
| <SizeFade> | |||
| float | |||
| Diameter that the shadow shrinks to when <FadeHeight> is reached | |||
|- | |||
| <SizeMin> | |||
| float | |||
| Minimum diameter of the shadow | |||
|- | |||
| <AlphaMax> | |||
| int16 | |||
| Starting transparency of the shadow as the character rises towards <FadeHeight> | |||
|- | |||
| <AlphaFade> | |||
| int16 | |||
| Starting transparency of the shadow when the character begins to get above <FadeHeight> | |||
|} | |||
==<JumpConstants>== | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <JumpDistance> | |||
| float | |||
| Always 25; unused | |||
|- | |||
| <JumpHeight> | |||
| int8 | |||
| Always 22; unused | |||
|- | |||
| <JumpDistanceSquares> | |||
| int8 | |||
| Always 6; unused | |||
|} | |||
==<CoverConstants>== | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <RayIncrement> | |||
| float | |||
| Always 40; unused | |||
|- | |||
| <RayMax> | |||
| float | |||
| Always 300; unused | |||
|- | |||
| <RayAngle> | |||
| float | |||
| Always 0.017453 (π/180); unused | |||
|- | |||
| <RayAngleMax> | |||
| float | |||
| Always 1.57 (π/2); unused | |||
|} | |||
==<AutoFreezeConstants>== | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <DistanceXZ> | |||
| float | |||
| Always 5; unused | |||
|- | |||
| <DistanceY> | |||
| float | |||
| Always 1; unused | |||
|} | |||
==<InventoryConstants>== | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
|valign=top| <HypoRegenerationRate> | |||
|valign=top| int16 | |||
| Hypo healing speed in ticks per health point; overhealth regeneration rate is not affected by this | |||
If rate = 60 and a hypo restores 50HP then we get a total healing time of 60 * 50 = 3000 ticks (50s)<br> | |||
If rate = 6 and a hypo restores 50HP then we get 6 * 50 = 300 ticks (5s)<br> | |||
If rate = 0, it becomes rate = 1 at runtime so regeneration will take 50 ticks (<1s) | |||
|} | |||
==<LODConstants>== | |||
Distances from camera used to choose which [[XML:TRBS|LOD]] (level of detail) to use for a character model. The numbers are stored as squares of the distance in order to be compared quickly against the square of the current distance from the camera without having to perform any square root operations. | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <Float> | |||
| float | |||
| Always 193,600 (440<sup>2</sup>). Threshold for Super-Low LOD. If the camera is more than 440 world units (147ft or 44m) from a character, this LOD is selected. | |||
|- | |||
| <Float> | |||
| float | |||
| Always 48,400 (220<sup>2</sup>). Threshold for Low LOD. If the camera is more than 220 world units (73ft or 22m) from a character, this LOD is selected. | |||
|- | |||
| <Float> | |||
| float | |||
| Always 12,100 (110<sup>2</sup>). Threshold for Medium LOD. If the camera is more than 110 world units (37ft or 11m) from a character, this LOD is selected. | |||
|- | |||
| <Float> | |||
| float | |||
| Always 0. This means that the High LOD will always be selected if the camera is 110wu or less from a character. | |||
|- | |||
| <Float> | |||
| float | |||
| Always 0. This Super-High LOD is never reached by only looking at camera distance, but continue reading below. | |||
|} | |||
After the above distance-from-camera filter is applied, Oni performs additional calculations which could end up raising or lowering the LOD for this character. See the Graphics article's [[Graphics#LOD|LOD section]] for the details of the logic. | |||
==<HurtSoundConstants>== | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <BasePercentage> | |||
| int16 | |||
| Always 35; minimum chance of playing a pain sound (but the actual calculation is much more complicated; see below) | |||
|- | |||
| <MaxPercentage> | |||
| int16 | |||
| Always 90; maximum chance of playing a pain sound | |||
|- | |||
| <PercentageThreshold> | |||
| int16 | |||
| Always 15; at least this much damage must be done to play a pain sound | |||
|- | |||
| <Timer> | |||
| int16 | |||
| Always 120; time in ticks before the damage tracker used for this AI's pain sounds resets | |||
|- | |||
| <MinTimer> | |||
| int16 | |||
| Always 35; time in ticks that must pass between pain sounds being played, no matter any other considerations | |||
|- | |||
| <MaxLight> | |||
| int16 | |||
| Always 1; number of times that AI will play light pain sound before "upgrading" to a medium pain sound upon subsequent damage | |||
|- | |||
| <MaxMedium> | |||
| int16 | |||
| Always 2; number of times that AI will play medium pain sound before "upgrading" to a heavy pain sound upon subsequent damage | |||
|- | |||
| <DeathChance> | |||
| int16 | |||
| Always 100; chance of playing a death sound | |||
|- | |||
| <VolumeTreshold> | |||
| int16 | |||
| Always 10; at least this much damage must be done for the AI to play the pain sound at maximum volume | |||
|- | |||
| <MediumTreshold> | |||
| int16 | |||
| Always 12; after this much cumulative damage, a light pain sound gets upgraded to a medium pain sound | |||
|- | |||
| <HeavyTreshold> | |||
| int16 | |||
| Always 22; after this much cumulative damage, a medium pain sound gets upgraded to a heavy pain sound | |||
|- | |||
| <MinVolume> | |||
| float | |||
| Minimal sound volume, e.g. 0.5, used when determining the volume of the pain sound to be played (before <VolumeTreshold> damage is reached and the volume becomes 100%) | |||
|- | |||
| <LightSound> | |||
| char[32] | |||
| <font color="#777777">OSBD</font>file<font color="#777777">.imp.oni</font> (only the file name) | |||
|- | |||
| <MediumSound> | |||
| char[32] | |||
| <font color="#777777">OSBD</font>file<font color="#777777">.imp.oni</font> (only the file name) | |||
|- | |||
| <HeavySound> | |||
| char[32] | |||
| <font color="#777777">OSBD</font>file<font color="#777777">.imp.oni</font> (only the file name) | |||
|- | |||
| <DeathSound> | |||
| char[32] | |||
| <font color="#777777">OSBD</font>file<font color="#777777">.imp.oni</font> (only the file name) | |||
|} | |||
If the AI is in an alerted state, has not been hurt within the last <Timer> ticks, and the damage being done is at least <PercentageThreshold>, the chance of playing a pain sound is <BasePercentage> + (damage done * (<MaxPercentage> - <BasePercentage>)) / <PercentageThreshold>. If the AI is alerted and has already received damage within the last <Timer> ticks, they will not play a hurt sound. If the AI is ''not'' in an alerted state, they will always play a hurt sound. | |||
==<AIConstants>== | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
|valign=top| <Flags> | |||
|valign=top| flag | |||
| | |||
: NoStartleAnim | |||
: EnableMeleeFireDodge | |||
: ShootDodge (requires EnableMeleeFireDodge; AI tries to face shooter and shoot back while dodging) | |||
: RunAwayDodge (requires EnableMeleeFireDodge; overrides ShootDodge; firing spread/projectile dodge enabled for weapons; AI isn't shooting, it just tends to run away, not facing shooter) | |||
: NotUsed | |||
|- | |||
| <RotationSpeed> | |||
| float | |||
| 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 :) | |||
|- | |||
| <DazedMinFrames> | |||
| int16 | |||
| Minimum number of frames for which AI remains in fallen position when it is knocked down | |||
|- | |||
| <DazedMaxFrames> | |||
| int16 | |||
| Maximum number of frames for which AI remains in fallen position when it is knocked down | |||
|- | |||
| <DodgeReactFrames> | |||
| uint32 | |||
| Number of frames after which AI realizes that it is inside a firing spread and starts dodging | |||
|- | |||
|valign=top| <DodgeTimeScale> | |||
|valign=top| float | |||
| Minimum firing spread dodge amount; similar to the maneuver variable, it tells the AI how long it should continue dodging/hiding in response to being inside a firing spread (so setting this very high means that once the enemy starts dodging/hiding, it will continue even after the firing spread disappears) | |||
|- | |||
| <DodgeWeightScale> | |||
| float | |||
| Dampens dodging of firing spread/projectile; the higher it is, the lower priority the AI gives to dodging | |||
|- | |||
| <Targeting> | |||
| | |||
| See [[#<Targeting>|HERE]] | |||
|- | |||
| <WeaponSkills> | |||
| | |||
| See [[#<WeaponSkills>|HERE]] | |||
|- | |||
| <DeadMakeSureDelay> | |||
| int32 | |||
| Always 90; how long AI will continue shooting a dead body to make sure it's dead | |||
|- | |||
| <InvestigateBodyDelay> | |||
| int32 | |||
| Always 240; how long AI will stand over dead body before returning to last job | |||
|- | |||
| <LostContactDelay> | |||
| int32 | |||
| Always 180; how long after losing sight of target until AI engages pursuit mode | |||
|- | |||
| <DeadTauntChance> | |||
| int32 | |||
| Chance of AI taunting a dead body | |||
|- | |||
| <GoForGunChance> | |||
| int32 | |||
| Chance of AI running to some weapon to pick it up; can be checked in Dev Mode with the '''debug_gun_behavior''' command | |||
|- | |||
| <RunPickupChance> | |||
| int32 | |||
| Chance of AI performing a running weapon pickup (including acrobatics moves, slides) instead of the normal "stop and pick up"; this is calculated ''after'' the engine decides that the AI will go for a gun | |||
|- | |||
| <CombatId> | |||
| int16 | |||
| [[XML:BINA/OBJC/CMBT|Combat profile ID]] | |||
|- | |||
| <MeleeId> | |||
| int16 | |||
| [[XML:BINA/OBJC/MELE|Melee profile ID]] | |||
|- | |||
| <SoundConstants> | |||
| | |||
| See [[XML:SNDD#Step_1:_Preparing_the_TRAM|HERE]] | |||
|- | |||
|valign=top| <HostileThreatDefiniteTimer> | |||
|valign=top| int32 | |||
| How long an AI will know exactly where its enemy is even if it can't see him with its central vision field, and attempt to attack him | |||
|- | |||
|valign=top| <HostileThreatStrongTimer> | |||
|valign=top| int32 | |||
| How long an AI will remain strongly convinced that there is an enemy, but will investigate his presence rather than attempt to attack him | |||
|- | |||
|valign=top| <HostileThreatWeakTimer> | |||
|valign=top| int32 | |||
| How long an AI will remain weakly convinced of an enemy's presence, looking around aimlessly to find him (Glance pursuit mode) | |||
|- | |||
|valign=top| <FriendlyThreatDefiniteTimer> | |||
|valign=top| int32 | |||
| This field is mislabeled, as it is actually the decay time for dropping back from high alert to medium alert and does not concern friendly AIs | |||
|- | |||
|valign=top| <FriendlyThreatStrongTimer> | |||
|valign=top| int32 | |||
| This field is mislabeled, as it is actually the decay time for dropping back from medium alert to low alert and does not concern friendly AIs | |||
|- | |||
|valign=top| <FriendlyThreatWeakTimer> | |||
|valign=top| int32 | |||
| This field is mislabeled, as it is actually the decay time for dropping back from low alert to no alert status and does not concern friendly AIs | |||
|- | |||
| <EarshotRadius> | |||
| float | |||
| Hearing radius; defines the size of the sound-detection sphere around an AI | |||
|} | |||
You can observe the running of the various timers above by using the '''ai2_report_verbose''' command in the dev console (beware, this command causes random crashes). | |||
===<Targeting>=== | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <StartleMissAngle> | |||
| float | |||
| Always has value 0.5 for TURR and ONCC; multiplied against target's distance to get error in AI's/turret's first wild shot | |||
|- | |||
| <StartleMissDistance> | |||
| float | |||
| Always has value 25 for TURR and ONCC; max value for result of multiplication above | |||
|- | |||
| <PredictAmount> | |||
| float | |||
| Always has value 1 for TURR and ONCC; accuracy multiplier for prediction of target's position | |||
|- | |||
| <PredictPositionDelayFrames> | |||
| int32 | |||
| Always has value 0 for TURR and ONCC; max value for how many frames of lookback can be used to predict target's position | |||
|- | |||
| <PredictDelayFrames> | |||
| int32 | |||
| Always has value 5 for TURR and ONCC; number of frames delay in recognizing target's current position | |||
|- | |||
| <PredictVelocityFrames> | |||
| int32 | |||
| Always has value 15 for TURR and ONCC; number of frames over which AI can average target's velocity to help predict position | |||
|- | |||
| <PredictTrendFrames> | |||
| int32 | |||
| Always has value 60 for TURR and ONCC; size in frames of location buffer for target | |||
|} | |||
The higher <PredictPositionDelayFrames> is, the further back the AI will look in the position buffer which contains past location information for the target, however this value is always 0 in Oni's data, meaning the current location is used. The recognition of the target's current position is delayed by <PredictDelayFrames>, always 5/60 of a second, which represents something like "reaction time when tracking target". <PredictAmount> can be used to add inaccuracy to this prediction by choosing a value below 1.0, but in Oni's data it is always 1.0. | |||
===<WeaponSkills>=== | |||
Note that all the following tags are declared for each specific weapon in the game. | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <RecoilCompensation> | |||
| float | |||
| Ranges from 0.0 to 1.0; 1.0 means the weapon will not have any recoil when used by this AI | |||
|- | |||
| <BestAimingAngle> | |||
| float | |||
| A floor value in radians for aiming inaccuracy so that an AI never has perfect aim | |||
|- | |||
| <ShotGroupError> | |||
| float | |||
| An error percentage that is multiplied against the AI's final aim | |||
|- | |||
| <ShotGroupDecay> | |||
| float | |||
| Ranges from 0.0 to 1.0; how quickly the starting shot error decreases or increases (in other words, the middle of this range is desirable for natural-looking weapons handling) | |||
|- | |||
| <ShootingInaccuracyMultiplier> | |||
| float | |||
| Inaccuracy multiplier indicating AI's skill with this weapon; usually just 1 (no effect on weapon handling), but sometimes 0 (cancels out inaccuracy) | |||
|- | |||
| <MinShotDelay> | |||
| uint16 | |||
| Minimum delay in ticks before pulling the trigger again | |||
|- | |||
| <MaxShotDelay> | |||
| uint16 | |||
| Maximum delay in ticks before pulling the trigger again | |||
| | |||
| | |||
|- | |||
| | |||
| | |||
| | |||
|- | |||
| | |||
| | |||
| | |||
|- | |||
| | |||
| | |||
| | |||
|- | |||
| | |||
| | |||
| | |||
|- | |||
| | |||
| | |||
| | |||
|- | |||
| | |||
| | |||
| | |||
|- | |||
| | |||
| | |||
| | |||
|} | |} | ||
;Shooting skills | |||
These can be viewed 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). Sample skill settings for one ONCC are shown below. | |||
The first weapon (weapon 0) is not in the game anymore, whatever it was. Mutant Muro's thunderbolt is handled as animation-bound particles, although it used to be handled as a weapon (same for Mukade's Devil Star, except '''w10_sni''' is still available). Barabas' Wave Motion Cannon is a bit mixed up since the beam is made of '''w12_ba2''' particles and the grenade is a '''w11_ba1''' particle. | |||
{| class="wikitable" style="text-align:center" | |||
|- bgcolor="#e9e9e9" | |||
!Weapon ||recoil||best angle||error||decay||inaccuracy||delays | |||
|- align=center | |||
|'''w0_sec''' || 0.0 || 0.000000 || 0.00 || 1.0 || 1.0 || 0 - 0 | |||
|- align=center | |||
|'''w1_tap''' || 0.0 || 0.000000 || 0.40 || 0.4 || 0.0 || 30 - 45 | |||
|- align=center | |||
|'''w2_sap''' || 0.3 || 0.013962 || 0.13 || 1.0 || 1.0 || 0 - 0 | |||
|- align=center | |||
|'''w3_phr''' || 0.3 || 0.010472 || 0.05 || 0.5 || 1.0 || 0 - 0 | |||
|- align=center | |||
|'''w4_psm''' || 0.3 || 0.015707 || 0.03 || 0.2 || 1.0 || 0 - 0 | |||
|- align=center | |||
|'''w5_sbg''' || 0.3 || 0.001745 || 0.00 || 0.1 || 1.0 || 0 - 0 | |||
|- align=center | |||
|'''w6_vdg''' || 0.3 || 0.001745 || 0.13 || 0.9 || 1.0 || 0 - 0 | |||
|- align=center | |||
|'''w7_scc''' || 0.3 || 0.001745 || 0.05 || 0.1 || 1.0 || 0 - 0 | |||
|- align=center | |||
|'''w8_mbo''' || 0.3 || 0.005236 || 0.01 || 0.5 || 1.0 || 0 - 0 | |||
|- align=center | |||
|'''w9_scr''' || 0.3 || 0.010472 || 0.04 || 0.5 || 1.0 || 0 - 0 | |||
|- align=center | |||
|'''w10_sni'''|| 0.0 || 0.000000 || 0.00 || 1.0 || 1.0 || 0 - 0 | |||
|- align=center | |||
|'''w11_ba1'''|| 0.0 || 0.000000 || 0.00 || 1.0 || 1.0 || 0 - 0 | |||
|- align=center | |||
|'''w12_ba2'''|| 0.0 || 0.000000 || 0.00 || 1.0 || 1.0 || 0 - 0 | |||
|} | |||
===<VisionConstants>=== | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <CentralDistance> | |||
| float | |||
| Central vision distance | |||
|- | |||
| <PeripheralDistance> | |||
| float | |||
| Peripheral vision distance | |||
|- | |||
| <VerticalRange> | |||
| float | |||
| Vertical vision range | |||
|- | |||
| <CentralRange> | |||
| float | |||
| Central vision range | |||
|- | |||
| <CentralMax> | |||
| float | |||
| Central vision max | |||
|- | |||
| <PeripheralRange> | |||
| float | |||
| Peripheral vision range | |||
|- | |||
| <PeripheralMax> | |||
| float | |||
| Peripheral vision max | |||
|} | |||
;Vision field | |||
An AI's vision field is composed of a central area and peripheral area. See [[AI#Vision_and_hearing|HERE]] for details and illustrations. Put in terms of the data fields above, a character is visible if the distance between the AI and the character is less than the "distance" field. Between each area's "range" and "max" settings, the visibility distance decreases gradually towards 0. The vision field can be seen with the scripting command '''ai2_showvision=1''', but it should be noted that the visualization of the peripheral vision field is missing its central segment. | |||
The "range" and "max" values are angles, but stored as cosines of the angles for performance reasons. Here are some sample angles converted from cosine to degrees: | |||
{| | |||
| | |||
: <VerticalRange>0.766044438</VerticalRange> | |||
: <CentralRange>0.819152057</CentralRange> | |||
: <CentralMax>0.57357645</CentralMax> | |||
: <PeripheralRange>0.1736482</PeripheralRange> | |||
: <PeripheralMax>-0.42261824</PeripheralMax> | |||
| | |||
: = 40° | |||
: = 35° | |||
: = 55° | |||
: = 80° | |||
: = 115° | |||
|} | |||
==Variants, geometry, health, etc.== | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <Variant> | |||
| link | |||
| <font color="#777777">ONCV</font>file<font color="#777777">.oni</font>, which defines variants and upgrades; see [[XML:ONCV]] for explanation | |||
|- | |||
| <Particles> | |||
| link | |||
| [[#ONCP: Oni Character Particle (Array)|ONCP]] instance number (#N) | |||
|- | |||
| <Impacts> | |||
| link | |||
| [[#ONIA: Oni Character Impact Array|ONIA]] instance number (#N) | |||
|- | |||
|valign=top| <ImpactModifierName> | |||
|valign=top| flag | |||
| Used to choose the correct effect from [[XML:BINA/ONIE#List_of_tags.2C_types.2C_and_flags|ONIE]]; impact name -> material name -> modifier (<Component> probably has to be "Impact") | |||
: Any | |||
: Light | |||
: Medium | |||
: Heavy | |||
|- | |||
| <Impacts> | |||
| link | |||
| Holds a lot of links of the format <ONCCImpact><Name><font color="#777777">Impt</font>name<font color="#777777">.oni</font></Name></ONCCImpact> for character-environment collision (see [[XML:BINA/ONIE#Visual_guides:_weapon.2C_melee.2C_environment|HERE]] to learn about that). This seems to be a series of slots for specific animation types so that those animations inherit the Impt value (name). See for example <ONCCImpact><Name>"Fall_LandHard"</Name></ONCCImpact> and the StNA anim type Fall_LandHard. | |||
|- | |||
| <DeathParticle> | |||
| link | |||
| Only used by the Mad Bomber (his smoking foot) | |||
|- | |||
| <BodySet> | |||
| link | |||
| <font color="#777777">TRBS</font>file<font color="#777777">.oni</font> | |||
|- | |||
| <BodyTextures> | |||
| link | |||
| <font color="#777777">TRMA</font>file<font color="#777777">.oni</font> | |||
|- | |||
| <BodyMaterials> | |||
| link | |||
| [[#CBPM: Character Body Part Materials|CBPM]] instance number (#N) | |||
|- | |||
| <BodyImpacts> | |||
| link | |||
| [[#CBPI: Character Body Part Impacts|CBPI]] instance number (#N) | |||
|- | |||
| <FightModeTimer> | |||
| int32 | |||
| After fight mode is initiated, the character's COMidle animations will play for at least this many ticks. The character will then return to his non-COM idle animations as soon after that as an animation plays which has no COM variant, such as running, so that the COMidle loop has a reason to break. You can see the fight mode timer with '''chr_debug_characters=1'''. | |||
|- | |||
| <IdleAnimation1Timer> | |||
| int32 | |||
| Always 30,000 (= 8.333 minutes). The minimum ticks before an Idle type animation can be played (the engine will add a few frames to the counter, so the exact time is always different). Idle type animation are rarely seen by players because of the long wait time, and are not to be confused with typical idle animations, which use Stand as their type. Idle type animations can be seen in [https://www.youtube.com/watch?v=qbo2Q-VD6dc this video]. | |||
|- | |||
| <IdleAnimation2Timer> | |||
| int32 | |||
| Always 30,000 (= 8.333 minutes). The time in ticks before an idle animation is played again. | |||
|- | |||
| <Health> | |||
| int32 | |||
| Base health of the character class; additional health information for each unique character spawned from a class is stored in the [[XML:BINA/OBJC/CHAR#XML_structure|BINACJBOCharacter.oni]] file. If playing on Hard, non-player characters also receive a boost of +25% max HP (this number comes from the [[OBD:ONGS|ONGS]]). | |||
|- | |||
|valign=top| <FeetBones> | |||
|valign=top| flag | |||
| | |||
Unused. Can be: | |||
: LeftFoot | |||
: RightFoot | |||
|- | |||
| <MinBodySizeFactor> | |||
| float | |||
| Minimum body size factor (for an explanation of body size scaling, see the "Body size factor" on [[OBD:ONCC]]) | |||
|- | |||
| <MaxBodySizeFactor> | |||
| float | |||
| Maximum body size factor | |||
|- | |||
| <DamageFactors> | |||
| | |||
| See [[#<DamageFactors>|HERE]] | |||
|- | |||
| <BossShieldProtectAmount> | |||
| float | |||
| Damage reducer, multiplied against all incoming DamageTypes (can also be applied with '''chr_boss_shield(ai_name)''') | |||
|- | |||
| <Animations> | |||
| link | |||
| <font color="#777777">TRAC</font>file<font color="#777777">.oni</font> | |||
|- | |||
| <AimingScreens> | |||
| link | |||
| <font color="#777777">TRAS</font>file<font color="#777777">.oni</font> | |||
|- | |||
| <AIRateOfFire> | |||
| int16 | |||
| Unused | |||
|- | |||
| <DeathDeleteDelay> | |||
| int16 | |||
| Always 0 except for Mad Bomber, who is 190. The time in ticks that must pass between the character's death and their deletion (replacement by corpse model). | |||
|- | |||
|valign=top| <WeaponHand> | |||
|valign=top| flag | |||
| Which hand a character uses to hold their weapon. Only ninjas (including Mukade and the ninjabots) are lefthanded. | |||
: 0 (right) | |||
: 1 (left) | |||
|- | |||
| <HasDaodanPowers> | |||
| int8 | |||
| When set to 1, the character has Daodan powers (can overheal with hypos, and do more damage in this overpower mode) | |||
|- | |||
|valign=top| <HasSupershield> | |||
|valign=top| int8 | |||
| | |||
Only used by Mutant Muro. When set to 1, the character has a [[supershield]]. | |||
|- | |||
| <CantTouchThis> | |||
| int8 | |||
| Only used by Mutant Muro. When set to 1, forces on the [[Cheats|"canttouchthis" cheat]] for this character. | |||
|} | |||
===<DamageFactors>=== | |||
The float values in these seven tags correspond to damage types (see [[Particle damage types]] for details). Each one is a multiplier against the StunDamage and Knockback parameters of the DamageBlast and DamageChar PAR3 actions, which utilize these DamageTypes. The values range from 0.0-1.0, where 1.0 totally cancels out damage of that type. | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| Content type | |||
! Description | |||
|- | |||
| <Float> | |||
| float | |||
| "Normal" DamageType multiplier | |||
|- | |||
| <Float> | |||
| float | |||
| "MinorStun" DamageType multiplier | |||
|- | |||
| <Float> | |||
| float | |||
| "MajorStun" DamageType multiplier | |||
|- | |||
| <Float> | |||
| float | |||
| "MinorKnockdown" DamageType multiplier | |||
|- | |||
| <Float> | |||
| float | |||
| "MajorKnockdown" DamageType multiplier | |||
|- | |||
| <Float> | |||
| float | |||
| "Blownup" DamageType multiplier | |||
|- | |||
| <Float> | |||
| float | |||
| "Pickup" DamageType multiplier | |||
|} | |||
==ONCP: Oni Character Particle (Array)== | |||
* [[OBD:ONCP|ONCPs]] is used for attaching particles to animations. Search for the "Particles" tag in a TRAM XML to see this array. | |||
'''XML structure | |||
<ONCP id="3"> | |||
<Particles> | |||
<ONCPParticle> | |||
<Name>...</Name> | |||
<Type>...</Type> | |||
<BodyPart>...</BodyPart> | |||
</ONCPParticle> | |||
[...] | |||
</Particles> | |||
</ONCP> | |||
: <Name> is used for linking from a TRAM; here are the names available in Oni's data: | |||
:: acid - for Konoko's death event in Vago Biotech (level 3) | |||
:: barabwave - for Barabas' earthquaker | |||
:: blanka - for Mutant Muro's repelling lightning attack | |||
:: contrail - for attacks that use colored contrails (character specific <Type>) | |||
:: daodan - for the blast from Konoko's Daodan super-surge | |||
:: daodan2 - for the blast from Konoko's final Daodan super-surge at the end of the game | |||
:: death - the dust-like death particle | |||
:: dust - the ground-level particle when player lands from a great height | |||
:: fireball - Mukade's Devil Star | |||
:: flash - attack impact flash | |||
:: glow - colored glow particle for attacks | |||
:: murowave - for Mutant Muro's ''ass bomb'' | |||
:: snap - for Muro's neck snap move? | |||
:: teleport - for Mukade's teleport animation | |||
:: thud | |||
:: thunderbolt - for Mutant Muro's attraction lightning attack | |||
:: trail - white-colored contrail for standard attacks | |||
:: rocket - for Barabas' jetpack | |||
:: super_attractor - for MutantMuro | |||
:: super_glow - Daodan glow particle for body | |||
:: super_l_hand - Daodan glow particle for left hand (<BodyPart>LeftFist) | |||
:: super_r_hand - Daodan glow particle for right hand (<BodyPart>RightFist) | |||
: <Type> provides the particle class (file name without prefix BINA3RAP and without suffix .oni) | |||
: <BodyPart> means the bone ID; see [[OBD:TRIA#Bones|TRIA]] and [[XML:TRBS]] | |||
:: The bones have these names in XML: | |||
Pelvis | |||
LeftThigh | |||
LeftCalf | |||
LeftFoot | |||
RightThigh | |||
RightCalf | |||
RightFoot | |||
Mid | |||
Chest | |||
Neck | |||
Head | |||
LeftShoulder | |||
LeftArm | |||
LeftWrist | |||
LeftFist | |||
RightShoulder | |||
RightArm | |||
RightWrist | |||
RightFist | |||
KillImpact | |||
None | |||
==ONIA: Oni Character Impact Array== | |||
* [[OBD:ONIA|ONIAs]] are used for special attacks, as a kind of extension to [[#CBPI:_Character_Body_Part_Impacts|CBPI]] in ONIEs. See [[XML:BINA/ONIE|ONIE]] for more information. | |||
* <Name> is used for linking from a TRAM. <Type> and <Modifier> are for links to ONIE. "Light", "Medium" and "Heavy" are the possible choices for <Modifier>. | |||
'''XML structure''' | |||
<ONIA id="4"> | |||
<Impacts> | |||
<ONIAImpact> | |||
<Name>...</Name> | |||
<Type>Bar_Super_Punch</Type> | |||
<Modifier>Heavy</Modifier> | |||
</ONIAImpact> | |||
[...] | |||
</ONIA> | |||
==CBPM: Character Body Part Materials== | |||
* [[OBD:CBPM|CBPMs]] link to [[XML:Mtrl|Mtrls]] which are used by [[XML:BINA/ONIE|ONIEs]]. | |||
'''XML structure''' | |||
The link ID lines up with the bone list in [[OBD:TRIA#Bones|TRIA]]. For example, the eleventh material links to the character's head. | |||
< | <CBPM id="7"> | ||
<Materials> | |||
<Link>MtrlCloth</Link> | |||
<Link>MtrlCloth</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlCloth</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlCloth</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
<Link>MtrlArmor</Link> | |||
</Materials> | |||
</CBPM> | |||
==CBPI: Character Body Part Impacts== | |||
* [[OBD:CBPI|CBPIs]] link to [[XML:Impt|Impts]] which are used by [[XML:BINA/ONIE|ONIEs]]. | |||
* Special attacks have their own Impts. See [[#ONIA:_Oni_Character_Impact_Array|ONIA]]. | |||
'''XML structure''' | |||
The link ID lines up with the bone list in [[OBD:TRIA#Bones|TRIA]]. For example, the eleventh impact links to the character's head. | |||
<CBPI id="8"> | |||
<HitImpacts> | |||
<Link>ImptKick_Hit</Link> | |||
<Link>ImptKick_Hit</Link> | |||
<Link>ImptKick_Hit</Link> | |||
<Link>ImptKick_Hit</Link> | |||
<Link>ImptKick_Hit</Link> | |||
<Link>ImptKick_Hit</Link> | |||
<Link>ImptKick_Hit</Link> | |||
<Link>ImptKick_Hit</Link> | |||
<Link>ImptPunch_Hit</Link> | |||
<Link>ImptHead_Hit</Link> | |||
<Link>ImptHead_Hit</Link> | |||
<Link>ImptHead_Hit</Link> | |||
<Link>ImptPunch_Hit</Link> | |||
<Link>ImptPunch_Hit</Link> | |||
<Link>ImptPunch_Hit</Link> | |||
<Link>ImptHead_Hit</Link> | |||
<Link>ImptPunch_Hit</Link> | |||
<Link>ImptPunch_Hit</Link> | |||
<Link>ImptPunch_Hit</Link> | |||
</HitImpacts> | |||
<BlockedImpacts> | |||
<Link>ImptKick_Blocked</Link> | |||
<Link>ImptKick_Blocked</Link> | |||
<Link>ImptKick_Blocked</Link> | |||
<Link>ImptKick_Blocked</Link> | |||
<Link>ImptKick_Blocked</Link> | |||
<Link>ImptKick_Blocked</Link> | |||
<Link>ImptKick_Blocked</Link> | |||
<Link>ImptKick_Blocked</Link> | |||
<Link>ImptPunch_Blocked</Link> | |||
<Link>ImptHead_Blocked</Link> | |||
<Link>ImptHead_Blocked</Link> | |||
<Link>ImptHead_Blocked</Link> | |||
<Link>ImptPunch_Blocked</Link> | |||
<Link>ImptPunch_Blocked</Link> | |||
<Link>ImptPunch_Blocked</Link> | |||
<Link>ImptHead_Blocked</Link> | |||
<Link>ImptPunch_Blocked</Link> | |||
<Link>ImptPunch_Blocked</Link> | |||
<Link>ImptPunch_Blocked</Link> | |||
</BlockedImpacts> | |||
<KilledImpacts> | |||
<Link>ImptKick_Killed</Link> | |||
<Link>ImptKick_Killed</Link> | |||
<Link>ImptKick_Killed</Link> | |||
<Link>ImptKick_Killed</Link> | |||
<Link>ImptKick_Killed</Link> | |||
<Link>ImptKick_Killed</Link> | |||
<Link>ImptKick_Killed</Link> | |||
<Link>ImptKick_Killed</Link> | |||
<Link>ImptPunch_Killed</Link> | |||
<Link>ImptHead_Killed</Link> | |||
<Link>ImptHead_Killed</Link> | |||
<Link>ImptHead_Killed</Link> | |||
<Link>ImptPunch_Killed</Link> | |||
<Link>ImptPunch_Killed</Link> | |||
<Link>ImptPunch_Killed</Link> | |||
<Link>ImptHead_Killed</Link> | |||
<Link>ImptPunch_Killed</Link> | |||
<Link>ImptPunch_Killed</Link> | |||
<Link>ImptPunch_Killed</Link> | |||
</KilledImpacts> | |||
</CBPI> | |||
==List of all ONCCs== | |||
barabus | |||
bdfem_1 | |||
bdfem_2 | |||
bdfem_3 | |||
bdfem_4 | |||
bd_1 | |||
bd_2 | |||
bd_3 | |||
bd_4 | |||
bd_5 | |||
comguy_1 | |||
comguy_2 | |||
comguy_3 | |||
CopfemA1 | |||
CopfemA2 | |||
CopmaleA1 | |||
CopmaleA2 | |||
CopmaleA3 | |||
CopmaleA4 | |||
elite_easy_1 | |||
elite_easy_2 | |||
elite_easy_3 | |||
elite_hard_1 | |||
elite_hard_2 | |||
elite_hard_3 | |||
elite_med_1 | |||
elite_med_2 | |||
elite_med_3 | |||
generic_female_1 | |||
generic_female_2 | |||
generic_female_3 | |||
generic_female_4 | |||
generic_female_5 | |||
generic_female_6 | |||
generic_female_7 | |||
generic_female_8 | |||
generic_female_9 | |||
generic_male_1 | |||
generic_male_2 | |||
generic_male_3 | |||
generic_male_4 | |||
generic_male_5 | |||
generic_male_6 | |||
griffin_generic | |||
griffin_swat | |||
k3 | |||
k4_A | |||
k4_F | |||
k4_G | |||
k4_K | |||
k4_L | |||
konoko_generic | |||
mad_bomber | |||
muro_generic | |||
mutantmuro | |||
ninjabot | |||
ninja_easy_1 | |||
ninja_easy_2 | |||
ninja_easy_3 | |||
ninja_hard_1 | |||
ninja_hard_2 | |||
ninja_hard_3 | |||
ninja_med_1 | |||
ninja_med_2 | |||
ninja_med_3 | |||
red_easy_1 | |||
red_easy_2 | |||
red_easy_3 | |||
red_hard_1 | |||
red_hard_2 | |||
red_hard_3 | |||
red_med_1 | |||
red_med_2 | |||
red_med_3 | |||
security_guard_1 | |||
security_guard_2 | |||
Shinzom_generic | |||
SH_dream_lab | |||
SH_generic | |||
sniper_generic | |||
striker_dream_lab | |||
striker_easy_1 | |||
striker_easy_2 | |||
striker_easy_3 | |||
striker_hard_1 | |||
striker_hard_2 | |||
striker_hard_3 | |||
striker_med_1 | |||
striker_med_2 | |||
striker_med_3 | |||
super_ninja_1 | |||
tanker_easy_1 | |||
tanker_hard_1 | |||
tanker_med_1 | |||
TCTF_lite_1 | |||
TCTF_lite_blackops_1 | |||
TCTF_swat_1 | |||
TCTF_swat_blackops_1 | |||
thug_air_1 | |||
thug_air_2 | |||
thug_air_3 | |||
thug_air_4 | |||
thug_air_5 | |||
thug_mfg_1 | |||
thug_mfg_2 | |||
thug_mfg_3 | |||
thug_mfg_4 | |||
thug_mfg_5 | |||
thug_neuro_1 | |||
thug_neuro_2 | |||
thug_neuro_3 | |||
thug_neuro_4 | |||
thug_neuro_5 | |||
thug_pow_1 | |||
thug_pow_2 | |||
thug_pow_3 | |||
thug_pow_4 | |||
thug_pow_5 | |||
thug_wh_1 | |||
thug_wh_2 | |||
thug_wh_3 | |||
thug_wh_4 | |||
thug_wh_5 | |||
==New character balance== | |||
To know if a character you're creating is sufficiently balanced, you should compare Oni's vanilla characters against it. Factors that could be taken into account: | |||
* Basic: | |||
** Health | |||
** Block chances (melee profile) | |||
** Attack strength (per combat TRAM) | |||
** Attack speed (frame count per combat TRAM) | |||
* Advanced: | |||
** Damage multipliers (<DamageFactors>) | |||
** Average damage of combat animation set | |||
** Average damage per second (DPS) | |||
{{XML}} |
Latest revision as of 02:34, 26 October 2023
ONCC : Oni Character Class | ||
---|---|---|
XML
OFGA << Other file types >> ONCV |
General information
- The XML on this page is compatible with OniSplit v0.9.61.0.
- ONCP, ONIA, OBPI and OBPM are part of ONCC*.oni files.
- ONCC files are global; they can be found in AE/AEInstaller/vanilla/level0_Final.dat.
<AirConstants>
- Units
- Times are in frames
- Heights are in world units
- Velocities are in world units per frames
- Accelerations are in world units per frames squared
XML tag | Content type | Description |
---|---|---|
<FallGravity> | float | Always 0.55. Used as the speed of a fall when predicting if an attack will hit a target when the attacker is in midair. It seems to be a bug that this is looked at, as <JumpGravity> actually controls the character's gravity while going up and down. |
<JumpGravity> | float | Always in range 0.05-0.07. The strength of gravity (as acceleration per frame) for the entire duration of a jump. |
<JumpStartVelocity> | float | Starting velocity for a simple jump (tapping JUMP) |
<MaxVelocity> | float | Maximum velocity for jumping and falling |
<JetpackAcceleration> | float | Upward acceleration for the duration of time that you hold down JUMP |
<FramesFallGravity> | int16 | Always 7. After this many frames, <FallGravity> is used for the deceleration of a jump when predicting if an attack will hit a target when the attacker is in midair; before that many frames, <JumpGravity> is used for the prediction. It seems to be a bug that this is field is looked at, as <JumpGravity> controls a character's gravity while going up and down. |
<JetpackTimer> | int16 | Standard value is 14, but ranges from 4 (Elite Striker) to 20 (Konoko). This misleadingly-named field is the number of frames for which you can continue holding down JUMP to increase the height of your jump. This mod vastly increases the value of this field for Barabas. When shapeshifted to him, you can keep ascending by holding JUMP; pressing JUMP multiple times during the time window is also allowed. |
<MaxNoDamageFallingHeight> | float | Maximum falling height without taking damage (see below) |
<MaxDamageFallingHeight> | float | Maximum falling height with damage
|
<ShadowConstants>
XML tag | Content type | Description |
---|---|---|
<Texture> | link | TXMPfile.oni (file suffix not used) |
<MaxHeight> | float | Height where the diameter of the shadow shrinks to <SizeMin> |
<FadeHeight> | float | Height range over which the diameter of the shadow decreases from <SizeMax> to <SizeFade> and the shadow starts to fades out from <AlphaMax> to <AlphaFade> |
<SizeMax> | float | Maximum diameter of the shadow |
<SizeFade> | float | Diameter that the shadow shrinks to when <FadeHeight> is reached |
<SizeMin> | float | Minimum diameter of the shadow |
<AlphaMax> | int16 | Starting transparency of the shadow as the character rises towards <FadeHeight> |
<AlphaFade> | int16 | Starting transparency of the shadow when the character begins to get above <FadeHeight> |
<JumpConstants>
XML tag | Content type | Description |
---|---|---|
<JumpDistance> | float | Always 25; unused |
<JumpHeight> | int8 | Always 22; unused |
<JumpDistanceSquares> | int8 | Always 6; unused |
<CoverConstants>
XML tag | Content type | Description |
---|---|---|
<RayIncrement> | float | Always 40; unused |
<RayMax> | float | Always 300; unused |
<RayAngle> | float | Always 0.017453 (π/180); unused |
<RayAngleMax> | float | Always 1.57 (π/2); unused |
<AutoFreezeConstants>
XML tag | Content type | Description |
---|---|---|
<DistanceXZ> | float | Always 5; unused |
<DistanceY> | float | Always 1; unused |
<InventoryConstants>
XML tag | Content type | Description |
---|---|---|
<HypoRegenerationRate> | int16 | Hypo healing speed in ticks per health point; overhealth regeneration rate is not affected by this
If rate = 60 and a hypo restores 50HP then we get a total healing time of 60 * 50 = 3000 ticks (50s) |
<LODConstants>
Distances from camera used to choose which LOD (level of detail) to use for a character model. The numbers are stored as squares of the distance in order to be compared quickly against the square of the current distance from the camera without having to perform any square root operations.
XML tag | Content type | Description |
---|---|---|
<Float> | float | Always 193,600 (4402). Threshold for Super-Low LOD. If the camera is more than 440 world units (147ft or 44m) from a character, this LOD is selected. |
<Float> | float | Always 48,400 (2202). Threshold for Low LOD. If the camera is more than 220 world units (73ft or 22m) from a character, this LOD is selected. |
<Float> | float | Always 12,100 (1102). Threshold for Medium LOD. If the camera is more than 110 world units (37ft or 11m) from a character, this LOD is selected. |
<Float> | float | Always 0. This means that the High LOD will always be selected if the camera is 110wu or less from a character. |
<Float> | float | Always 0. This Super-High LOD is never reached by only looking at camera distance, but continue reading below. |
After the above distance-from-camera filter is applied, Oni performs additional calculations which could end up raising or lowering the LOD for this character. See the Graphics article's LOD section for the details of the logic.
<HurtSoundConstants>
XML tag | Content type | Description |
---|---|---|
<BasePercentage> | int16 | Always 35; minimum chance of playing a pain sound (but the actual calculation is much more complicated; see below) |
<MaxPercentage> | int16 | Always 90; maximum chance of playing a pain sound |
<PercentageThreshold> | int16 | Always 15; at least this much damage must be done to play a pain sound |
<Timer> | int16 | Always 120; time in ticks before the damage tracker used for this AI's pain sounds resets |
<MinTimer> | int16 | Always 35; time in ticks that must pass between pain sounds being played, no matter any other considerations |
<MaxLight> | int16 | Always 1; number of times that AI will play light pain sound before "upgrading" to a medium pain sound upon subsequent damage |
<MaxMedium> | int16 | Always 2; number of times that AI will play medium pain sound before "upgrading" to a heavy pain sound upon subsequent damage |
<DeathChance> | int16 | Always 100; chance of playing a death sound |
<VolumeTreshold> | int16 | Always 10; at least this much damage must be done for the AI to play the pain sound at maximum volume |
<MediumTreshold> | int16 | Always 12; after this much cumulative damage, a light pain sound gets upgraded to a medium pain sound |
<HeavyTreshold> | int16 | Always 22; after this much cumulative damage, a medium pain sound gets upgraded to a heavy pain sound |
<MinVolume> | float | Minimal sound volume, e.g. 0.5, used when determining the volume of the pain sound to be played (before <VolumeTreshold> damage is reached and the volume becomes 100%) |
<LightSound> | char[32] | OSBDfile.imp.oni (only the file name) |
<MediumSound> | char[32] | OSBDfile.imp.oni (only the file name) |
<HeavySound> | char[32] | OSBDfile.imp.oni (only the file name) |
<DeathSound> | char[32] | OSBDfile.imp.oni (only the file name) |
If the AI is in an alerted state, has not been hurt within the last <Timer> ticks, and the damage being done is at least <PercentageThreshold>, the chance of playing a pain sound is <BasePercentage> + (damage done * (<MaxPercentage> - <BasePercentage>)) / <PercentageThreshold>. If the AI is alerted and has already received damage within the last <Timer> ticks, they will not play a hurt sound. If the AI is not in an alerted state, they will always play a hurt sound.
<AIConstants>
XML tag | Content type | Description |
---|---|---|
<Flags> | flag |
|
<RotationSpeed> | float | 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 :) |
<DazedMinFrames> | int16 | Minimum number of frames for which AI remains in fallen position when it is knocked down |
<DazedMaxFrames> | int16 | Maximum number of frames for which AI remains in fallen position when it is knocked down |
<DodgeReactFrames> | uint32 | Number of frames after which AI realizes that it is inside a firing spread and starts dodging |
<DodgeTimeScale> | float | Minimum firing spread dodge amount; similar to the maneuver variable, it tells the AI how long it should continue dodging/hiding in response to being inside a firing spread (so setting this very high means that once the enemy starts dodging/hiding, it will continue even after the firing spread disappears) |
<DodgeWeightScale> | float | Dampens dodging of firing spread/projectile; the higher it is, the lower priority the AI gives to dodging |
<Targeting> | See HERE | |
<WeaponSkills> | See HERE | |
<DeadMakeSureDelay> | int32 | Always 90; how long AI will continue shooting a dead body to make sure it's dead |
<InvestigateBodyDelay> | int32 | Always 240; how long AI will stand over dead body before returning to last job |
<LostContactDelay> | int32 | Always 180; how long after losing sight of target until AI engages pursuit mode |
<DeadTauntChance> | int32 | Chance of AI taunting a dead body |
<GoForGunChance> | int32 | Chance of AI running to some weapon to pick it up; can be checked in Dev Mode with the debug_gun_behavior command |
<RunPickupChance> | int32 | Chance of AI performing a running weapon pickup (including acrobatics moves, slides) instead of the normal "stop and pick up"; this is calculated after the engine decides that the AI will go for a gun |
<CombatId> | int16 | Combat profile ID |
<MeleeId> | int16 | Melee profile ID |
<SoundConstants> | See HERE | |
<HostileThreatDefiniteTimer> | int32 | How long an AI will know exactly where its enemy is even if it can't see him with its central vision field, and attempt to attack him |
<HostileThreatStrongTimer> | int32 | How long an AI will remain strongly convinced that there is an enemy, but will investigate his presence rather than attempt to attack him |
<HostileThreatWeakTimer> | int32 | How long an AI will remain weakly convinced of an enemy's presence, looking around aimlessly to find him (Glance pursuit mode) |
<FriendlyThreatDefiniteTimer> | int32 | This field is mislabeled, as it is actually the decay time for dropping back from high alert to medium alert and does not concern friendly AIs |
<FriendlyThreatStrongTimer> | int32 | This field is mislabeled, as it is actually the decay time for dropping back from medium alert to low alert and does not concern friendly AIs |
<FriendlyThreatWeakTimer> | int32 | This field is mislabeled, as it is actually the decay time for dropping back from low alert to no alert status and does not concern friendly AIs |
<EarshotRadius> | float | Hearing radius; defines the size of the sound-detection sphere around an AI |
You can observe the running of the various timers above by using the ai2_report_verbose command in the dev console (beware, this command causes random crashes).
<Targeting>
XML tag | Content type | Description |
---|---|---|
<StartleMissAngle> | float | Always has value 0.5 for TURR and ONCC; multiplied against target's distance to get error in AI's/turret's first wild shot |
<StartleMissDistance> | float | Always has value 25 for TURR and ONCC; max value for result of multiplication above |
<PredictAmount> | float | Always has value 1 for TURR and ONCC; accuracy multiplier for prediction of target's position |
<PredictPositionDelayFrames> | int32 | Always has value 0 for TURR and ONCC; max value for how many frames of lookback can be used to predict target's position |
<PredictDelayFrames> | int32 | Always has value 5 for TURR and ONCC; number of frames delay in recognizing target's current position |
<PredictVelocityFrames> | int32 | Always has value 15 for TURR and ONCC; number of frames over which AI can average target's velocity to help predict position |
<PredictTrendFrames> | int32 | Always has value 60 for TURR and ONCC; size in frames of location buffer for target |
The higher <PredictPositionDelayFrames> is, the further back the AI will look in the position buffer which contains past location information for the target, however this value is always 0 in Oni's data, meaning the current location is used. The recognition of the target's current position is delayed by <PredictDelayFrames>, always 5/60 of a second, which represents something like "reaction time when tracking target". <PredictAmount> can be used to add inaccuracy to this prediction by choosing a value below 1.0, but in Oni's data it is always 1.0.
<WeaponSkills>
Note that all the following tags are declared for each specific weapon in the game.
XML tag | Content type | Description |
---|---|---|
<RecoilCompensation> | float | Ranges from 0.0 to 1.0; 1.0 means the weapon will not have any recoil when used by this AI |
<BestAimingAngle> | float | A floor value in radians for aiming inaccuracy so that an AI never has perfect aim |
<ShotGroupError> | float | An error percentage that is multiplied against the AI's final aim |
<ShotGroupDecay> | float | Ranges from 0.0 to 1.0; how quickly the starting shot error decreases or increases (in other words, the middle of this range is desirable for natural-looking weapons handling) |
<ShootingInaccuracyMultiplier> | float | Inaccuracy multiplier indicating AI's skill with this weapon; usually just 1 (no effect on weapon handling), but sometimes 0 (cancels out inaccuracy) |
<MinShotDelay> | uint16 | Minimum delay in ticks before pulling the trigger again |
<MaxShotDelay> | uint16 | Maximum delay in ticks before pulling the trigger again |
- Shooting skills
These can be viewed 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). Sample skill settings for one ONCC are shown below.
The first weapon (weapon 0) is not in the game anymore, whatever it was. Mutant Muro's thunderbolt is handled as animation-bound particles, although it used to be handled as a weapon (same for Mukade's Devil Star, except w10_sni is still available). Barabas' Wave Motion Cannon is a bit mixed up since the beam is made of w12_ba2 particles and the grenade is a w11_ba1 particle.
Weapon | recoil | best angle | error | decay | inaccuracy | delays |
---|---|---|---|---|---|---|
w0_sec | 0.0 | 0.000000 | 0.00 | 1.0 | 1.0 | 0 - 0 |
w1_tap | 0.0 | 0.000000 | 0.40 | 0.4 | 0.0 | 30 - 45 |
w2_sap | 0.3 | 0.013962 | 0.13 | 1.0 | 1.0 | 0 - 0 |
w3_phr | 0.3 | 0.010472 | 0.05 | 0.5 | 1.0 | 0 - 0 |
w4_psm | 0.3 | 0.015707 | 0.03 | 0.2 | 1.0 | 0 - 0 |
w5_sbg | 0.3 | 0.001745 | 0.00 | 0.1 | 1.0 | 0 - 0 |
w6_vdg | 0.3 | 0.001745 | 0.13 | 0.9 | 1.0 | 0 - 0 |
w7_scc | 0.3 | 0.001745 | 0.05 | 0.1 | 1.0 | 0 - 0 |
w8_mbo | 0.3 | 0.005236 | 0.01 | 0.5 | 1.0 | 0 - 0 |
w9_scr | 0.3 | 0.010472 | 0.04 | 0.5 | 1.0 | 0 - 0 |
w10_sni | 0.0 | 0.000000 | 0.00 | 1.0 | 1.0 | 0 - 0 |
w11_ba1 | 0.0 | 0.000000 | 0.00 | 1.0 | 1.0 | 0 - 0 |
w12_ba2 | 0.0 | 0.000000 | 0.00 | 1.0 | 1.0 | 0 - 0 |
<VisionConstants>
XML tag | Content type | Description |
---|---|---|
<CentralDistance> | float | Central vision distance |
<PeripheralDistance> | float | Peripheral vision distance |
<VerticalRange> | float | Vertical vision range |
<CentralRange> | float | Central vision range |
<CentralMax> | float | Central vision max |
<PeripheralRange> | float | Peripheral vision range |
<PeripheralMax> | float | Peripheral vision max |
- Vision field
An AI's vision field is composed of a central area and peripheral area. See HERE for details and illustrations. Put in terms of the data fields above, a character is visible if the distance between the AI and the character is less than the "distance" field. Between each area's "range" and "max" settings, the visibility distance decreases gradually towards 0. The vision field can be seen with the scripting command ai2_showvision=1, but it should be noted that the visualization of the peripheral vision field is missing its central segment.
The "range" and "max" values are angles, but stored as cosines of the angles for performance reasons. Here are some sample angles converted from cosine to degrees:
|
|
Variants, geometry, health, etc.
XML tag | Content type | Description |
---|---|---|
<Variant> | link | ONCVfile.oni, which defines variants and upgrades; see XML:ONCV for explanation |
<Particles> | link | ONCP instance number (#N) |
<Impacts> | link | ONIA instance number (#N) |
<ImpactModifierName> | flag | Used to choose the correct effect from ONIE; impact name -> material name -> modifier (<Component> probably has to be "Impact")
|
<Impacts> | link | Holds a lot of links of the format <ONCCImpact><Name>Imptname.oni</Name></ONCCImpact> for character-environment collision (see HERE to learn about that). This seems to be a series of slots for specific animation types so that those animations inherit the Impt value (name). See for example <ONCCImpact><Name>"Fall_LandHard"</Name></ONCCImpact> and the StNA anim type Fall_LandHard. |
<DeathParticle> | link | Only used by the Mad Bomber (his smoking foot) |
<BodySet> | link | TRBSfile.oni |
<BodyTextures> | link | TRMAfile.oni |
<BodyMaterials> | link | CBPM instance number (#N) |
<BodyImpacts> | link | CBPI instance number (#N) |
<FightModeTimer> | int32 | After fight mode is initiated, the character's COMidle animations will play for at least this many ticks. The character will then return to his non-COM idle animations as soon after that as an animation plays which has no COM variant, such as running, so that the COMidle loop has a reason to break. You can see the fight mode timer with chr_debug_characters=1. |
<IdleAnimation1Timer> | int32 | Always 30,000 (= 8.333 minutes). The minimum ticks before an Idle type animation can be played (the engine will add a few frames to the counter, so the exact time is always different). Idle type animation are rarely seen by players because of the long wait time, and are not to be confused with typical idle animations, which use Stand as their type. Idle type animations can be seen in this video. |
<IdleAnimation2Timer> | int32 | Always 30,000 (= 8.333 minutes). The time in ticks before an idle animation is played again. |
<Health> | int32 | Base health of the character class; additional health information for each unique character spawned from a class is stored in the BINACJBOCharacter.oni file. If playing on Hard, non-player characters also receive a boost of +25% max HP (this number comes from the ONGS). |
<FeetBones> | flag |
Unused. Can be:
|
<MinBodySizeFactor> | float | Minimum body size factor (for an explanation of body size scaling, see the "Body size factor" on OBD:ONCC) |
<MaxBodySizeFactor> | float | Maximum body size factor |
<DamageFactors> | See HERE | |
<BossShieldProtectAmount> | float | Damage reducer, multiplied against all incoming DamageTypes (can also be applied with chr_boss_shield(ai_name)) |
<Animations> | link | TRACfile.oni |
<AimingScreens> | link | TRASfile.oni |
<AIRateOfFire> | int16 | Unused |
<DeathDeleteDelay> | int16 | Always 0 except for Mad Bomber, who is 190. The time in ticks that must pass between the character's death and their deletion (replacement by corpse model). |
<WeaponHand> | flag | Which hand a character uses to hold their weapon. Only ninjas (including Mukade and the ninjabots) are lefthanded.
|
<HasDaodanPowers> | int8 | When set to 1, the character has Daodan powers (can overheal with hypos, and do more damage in this overpower mode) |
<HasSupershield> | int8 |
Only used by Mutant Muro. When set to 1, the character has a supershield. |
<CantTouchThis> | int8 | Only used by Mutant Muro. When set to 1, forces on the "canttouchthis" cheat for this character. |
<DamageFactors>
The float values in these seven tags correspond to damage types (see Particle damage types for details). Each one is a multiplier against the StunDamage and Knockback parameters of the DamageBlast and DamageChar PAR3 actions, which utilize these DamageTypes. The values range from 0.0-1.0, where 1.0 totally cancels out damage of that type.
XML tag | Content type | Description |
---|---|---|
<Float> | float | "Normal" DamageType multiplier |
<Float> | float | "MinorStun" DamageType multiplier |
<Float> | float | "MajorStun" DamageType multiplier |
<Float> | float | "MinorKnockdown" DamageType multiplier |
<Float> | float | "MajorKnockdown" DamageType multiplier |
<Float> | float | "Blownup" DamageType multiplier |
<Float> | float | "Pickup" DamageType multiplier |
ONCP: Oni Character Particle (Array)
- ONCPs is used for attaching particles to animations. Search for the "Particles" tag in a TRAM XML to see this array.
XML structure
<ONCP id="3"> <Particles> <ONCPParticle> <Name>...</Name> <Type>...</Type> <BodyPart>...</BodyPart> </ONCPParticle> [...] </Particles> </ONCP>
- <Name> is used for linking from a TRAM; here are the names available in Oni's data:
- acid - for Konoko's death event in Vago Biotech (level 3)
- barabwave - for Barabas' earthquaker
- blanka - for Mutant Muro's repelling lightning attack
- contrail - for attacks that use colored contrails (character specific <Type>)
- daodan - for the blast from Konoko's Daodan super-surge
- daodan2 - for the blast from Konoko's final Daodan super-surge at the end of the game
- death - the dust-like death particle
- dust - the ground-level particle when player lands from a great height
- fireball - Mukade's Devil Star
- flash - attack impact flash
- glow - colored glow particle for attacks
- murowave - for Mutant Muro's ass bomb
- snap - for Muro's neck snap move?
- teleport - for Mukade's teleport animation
- thud
- thunderbolt - for Mutant Muro's attraction lightning attack
- trail - white-colored contrail for standard attacks
- rocket - for Barabas' jetpack
- super_attractor - for MutantMuro
- super_glow - Daodan glow particle for body
- super_l_hand - Daodan glow particle for left hand (<BodyPart>LeftFist)
- super_r_hand - Daodan glow particle for right hand (<BodyPart>RightFist)
- <Type> provides the particle class (file name without prefix BINA3RAP and without suffix .oni)
- <BodyPart> means the bone ID; see TRIA and XML:TRBS
- The bones have these names in XML:
Pelvis LeftThigh LeftCalf LeftFoot RightThigh RightCalf RightFoot Mid Chest Neck Head LeftShoulder LeftArm LeftWrist LeftFist RightShoulder RightArm RightWrist RightFist KillImpact None
ONIA: Oni Character Impact Array
- ONIAs are used for special attacks, as a kind of extension to CBPI in ONIEs. See ONIE for more information.
- <Name> is used for linking from a TRAM. <Type> and <Modifier> are for links to ONIE. "Light", "Medium" and "Heavy" are the possible choices for <Modifier>.
XML structure
<ONIA id="4"> <Impacts> <ONIAImpact> <Name>...</Name> <Type>Bar_Super_Punch</Type> <Modifier>Heavy</Modifier> </ONIAImpact> [...] </ONIA>
CBPM: Character Body Part Materials
XML structure
The link ID lines up with the bone list in TRIA. For example, the eleventh material links to the character's head.
<CBPM id="7"> <Materials> <Link>MtrlCloth</Link> <Link>MtrlCloth</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> <Link>MtrlCloth</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> <Link>MtrlCloth</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> <Link>MtrlArmor</Link> </Materials> </CBPM>
CBPI: Character Body Part Impacts
XML structure
The link ID lines up with the bone list in TRIA. For example, the eleventh impact links to the character's head.
<CBPI id="8"> <HitImpacts> <Link>ImptKick_Hit</Link> <Link>ImptKick_Hit</Link> <Link>ImptKick_Hit</Link> <Link>ImptKick_Hit</Link> <Link>ImptKick_Hit</Link> <Link>ImptKick_Hit</Link> <Link>ImptKick_Hit</Link> <Link>ImptKick_Hit</Link> <Link>ImptPunch_Hit</Link> <Link>ImptHead_Hit</Link> <Link>ImptHead_Hit</Link> <Link>ImptHead_Hit</Link> <Link>ImptPunch_Hit</Link> <Link>ImptPunch_Hit</Link> <Link>ImptPunch_Hit</Link> <Link>ImptHead_Hit</Link> <Link>ImptPunch_Hit</Link> <Link>ImptPunch_Hit</Link> <Link>ImptPunch_Hit</Link> </HitImpacts> <BlockedImpacts> <Link>ImptKick_Blocked</Link> <Link>ImptKick_Blocked</Link> <Link>ImptKick_Blocked</Link> <Link>ImptKick_Blocked</Link> <Link>ImptKick_Blocked</Link> <Link>ImptKick_Blocked</Link> <Link>ImptKick_Blocked</Link> <Link>ImptKick_Blocked</Link> <Link>ImptPunch_Blocked</Link> <Link>ImptHead_Blocked</Link> <Link>ImptHead_Blocked</Link> <Link>ImptHead_Blocked</Link> <Link>ImptPunch_Blocked</Link> <Link>ImptPunch_Blocked</Link> <Link>ImptPunch_Blocked</Link> <Link>ImptHead_Blocked</Link> <Link>ImptPunch_Blocked</Link> <Link>ImptPunch_Blocked</Link> <Link>ImptPunch_Blocked</Link> </BlockedImpacts> <KilledImpacts> <Link>ImptKick_Killed</Link> <Link>ImptKick_Killed</Link> <Link>ImptKick_Killed</Link> <Link>ImptKick_Killed</Link> <Link>ImptKick_Killed</Link> <Link>ImptKick_Killed</Link> <Link>ImptKick_Killed</Link> <Link>ImptKick_Killed</Link> <Link>ImptPunch_Killed</Link> <Link>ImptHead_Killed</Link> <Link>ImptHead_Killed</Link> <Link>ImptHead_Killed</Link> <Link>ImptPunch_Killed</Link> <Link>ImptPunch_Killed</Link> <Link>ImptPunch_Killed</Link> <Link>ImptHead_Killed</Link> <Link>ImptPunch_Killed</Link> <Link>ImptPunch_Killed</Link> <Link>ImptPunch_Killed</Link> </KilledImpacts> </CBPI>
List of all ONCCs
barabus bdfem_1 bdfem_2 bdfem_3 bdfem_4 bd_1 bd_2 bd_3 bd_4 bd_5 comguy_1 comguy_2 comguy_3 CopfemA1 CopfemA2 CopmaleA1 CopmaleA2 CopmaleA3 CopmaleA4 elite_easy_1 elite_easy_2 elite_easy_3 elite_hard_1 elite_hard_2 elite_hard_3 elite_med_1 elite_med_2 elite_med_3 generic_female_1 generic_female_2 generic_female_3 generic_female_4 generic_female_5 generic_female_6 generic_female_7 generic_female_8 generic_female_9 generic_male_1 generic_male_2 generic_male_3 generic_male_4 generic_male_5 generic_male_6 griffin_generic griffin_swat k3 k4_A k4_F k4_G k4_K k4_L konoko_generic mad_bomber muro_generic mutantmuro ninjabot ninja_easy_1 ninja_easy_2 ninja_easy_3 ninja_hard_1 ninja_hard_2 ninja_hard_3 ninja_med_1 ninja_med_2 ninja_med_3 red_easy_1 red_easy_2 red_easy_3 red_hard_1 red_hard_2 red_hard_3 red_med_1 red_med_2 red_med_3 security_guard_1 security_guard_2 Shinzom_generic SH_dream_lab SH_generic sniper_generic striker_dream_lab striker_easy_1 striker_easy_2 striker_easy_3 striker_hard_1 striker_hard_2 striker_hard_3 striker_med_1 striker_med_2 striker_med_3 super_ninja_1 tanker_easy_1 tanker_hard_1 tanker_med_1 TCTF_lite_1 TCTF_lite_blackops_1 TCTF_swat_1 TCTF_swat_blackops_1 thug_air_1 thug_air_2 thug_air_3 thug_air_4 thug_air_5 thug_mfg_1 thug_mfg_2 thug_mfg_3 thug_mfg_4 thug_mfg_5 thug_neuro_1 thug_neuro_2 thug_neuro_3 thug_neuro_4 thug_neuro_5 thug_pow_1 thug_pow_2 thug_pow_3 thug_pow_4 thug_pow_5 thug_wh_1 thug_wh_2 thug_wh_3 thug_wh_4 thug_wh_5
New character balance
To know if a character you're creating is sufficiently balanced, you should compare Oni's vanilla characters against it. Factors that could be taken into account:
- Basic:
- Health
- Block chances (melee profile)
- Attack strength (per combat TRAM)
- Attack speed (frame count per combat TRAM)
- Advanced:
- Damage multipliers (<DamageFactors>)
- Average damage of combat animation set
- Average damage per second (DPS)