XML:BINA/OBJC/CMBT

From OniGalore
< XML:BINA‎ | OBJC
Revision as of 16:56, 27 March 2021 by Iritscen (talk | contribs) (correcting prev/next types in nav header)
Jump to navigation Jump to search
CMBT : Combat
XML modding tips
  • See HERE to start learning about XML modding.
  • See HERE if you are searching for information on how to handle object coordinates.
  • See HERE for some typical modding errors and their causes.
XML.png
XML

AKEV << Other file types >> CONS

TMBD << Other BINA >> ONIE

CHAR << Other OBJC >> CONS

switch to OBD page

General information

  • The XML code on this page is compatible with OniSplit v0.9.61.0
  • BINACJBOCombat.oni is global (It's stored in level0_...)

File structure

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <Objects>
   [...]
   </Objects>
</Oni>

[...] stands for a combat profile. You can add new profiles between the <Objects> </Objects> tags.

example: ID 0 (Stand_and_Fire)

File:CombatRanges.PNG
ai2_showcombatranges = 1
       <CMBT Id="368">
           <Header>
               <Flags></Flags>
               <Position>-223.332321 17.8324356 -116.511253</Position>
               <Rotation>0 0 0</Rotation>
           </Header>
           <OSD>
               <Name>Stand_and_Fire</Name>
               <CombatId>0</CombatId>
               <Behaviors>
                   <LongRange>HoldAndFire</LongRange>
                   <MediumRange>HoldAndFire</MediumRange>
                   <ShortRange>HoldAndFire</ShortRange>
                   <MediumRetreat>HoldAndFire</MediumRetreat>
                   <LongRetreat>HoldAndFire</LongRetreat>
               </Behaviors>
               <Combat>
                   <MediumRange>120</MediumRange>
                   <MeleeOverride>IfPunched</MeleeOverride>
                   <NoGunBehavior>Melee</NoGunBehavior>
                   <ShortRange>40</ShortRange>
                   <PursuitDistance>200</PursuitDistance>
               </Combat>
               <Panic>
                   <Hurt>600</Hurt>
                   <GunFire>900</GunFire>
                   <Melee>600</Melee>
                   <Sight>1200</Sight>
               </Panic>
               <Alarm>
                   <SearchDistance>300</SearchDistance>
                   <EnemyIgnoreDistance>80</EnemyIgnoreDistance>
                   <EnemyAttackDistance>0</EnemyAttackDistance>
                   <DamageThreshold>30</DamageThreshold>
                   <FightTimer>360</FightTimer>
               </Alarm>
           </OSD>
       </CMBT>

Tags

XML tag Content type Description
<?xml version="1.0" encoding="utf-8"?> float, flag Ignore this.
<Oni> -
<Objects> - Encloses the profiles, starting with <CMBT Id="..."> and ending with </CMBT>.
<CMBT Id="..."> integer Ignore this.
<Header> -
<Flags> flag Ignore this.
<Position> float x3 Ignore this.
<Rotation> float x3 Ignore this.
<OSD> -
<Name> char[64] Name of the profile (making it easier to remember what the content does).
<CombatId> integer Used by CHAR and ONCC.
A table of combat IDs can be found HERE.
<Behaviors> - Behavior at different ranges.
<LongRange> flag
None
Stare
HoldAndFire
FiringCharge
Melee
BarabasShoot
BarabasAdvance
BarabasMelee
SuperNinjaFireball
SuperNinjaAdvance
SuperNinjaMelee
RunForAlarm
MutantMuroMelee
MuroThunderbolt
<MediumRange> flag uses the same flags as <LongRange>
<ShortRange> flag uses the same flags as <LongRange>
<MediumRetreat> flag uses the same flags as <LongRange>
<LongRetreat> flag uses the same flags as <LongRange>
<Combat> -
<MediumRange> float you can show the combat ranges on-screen with the scripting command "ai2_showcombatranges = 1"
<MeleeOverride> flag
None
IfPunched
Cancelled
ShortRange
MediumRange
AlwaysMelee
<NoGunBehavior> flag
Melee
Retreat
RunForAlarm
<ShortRange> float you can show the combat ranges on-screen with the scripting command "ai2_showcombatranges = 1"
<PursuitDistance> float
<Panic> -
<Hurt> integer number of ticks to panic when hurt (60 ticks = 1 second)
<GunFire> integer number of ticks to panic when hearing gunfire
<Melee> integer number of ticks to panic when melee occurs nearby
<Sight> integer number of ticks to panic when seeing someone hostile
<Alarm> -
<SearchDistance> float Maximum distance from AI that search is performed for an alarm console.
<EnemyIgnoreDistance> float Enemies which are inside this range are not ignored, but the AI doesn't attack them.
<EnemyAttackDistance> float This one specifies an "attack range" around an AI running for an alarm. When there is an enemy inside, the AI stops running for the console and attacks the enemy (if the AI knows about him, of course). Nevertheless the AI still keeps in mind that it should run for the console. So when there is no enemy inside this range and the fight timer runs out, the AI resumes running to the specified console.
<DamageThreshold> integer Specifies how long the AI, which is running for the console, remembers someone hurt it. Until this timer runs out, the AI doesn't tend to use its desired console; it stays in fight stance near the console, ready to fight. If someone hurts the AI which is running for the console, then escapes and then tries to hurt it again while this timer isn't finished yet, the AI remembers him and immediately attacks him the moment he steps inside <EnemyAttackDistance>.
<FightTimer> integer

When the AI, which is running for the console, is engaged in a fight and the enemy manages to disappear (either by phase cloak or simply by hiding), the AI tries to chase him or looks for him. FightTimer specifies how long should the AI chase/look for the enemy. For chasing, the timer starts when the enemy is outside <EnemyAttackDistance>. Of course when the enemy escapes even from <EnemyIgnoreDistance>, the AI abandons him automatically.